checkwright 0.22.0 → 0.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (548) hide show
  1. package/README.md +855 -96
  2. package/lib/common/lock.sh +45 -9
  3. package/lib/common/profile.sh +33 -0
  4. package/lib/common/recipe.sh +50 -34
  5. package/lib/diff.sh +66 -0
  6. package/lib/doctor.sh +67 -42
  7. package/lib/init.sh +62 -46
  8. package/lib/uninstall.sh +214 -0
  9. package/lib/update.sh +34 -0
  10. package/package.json +2 -2
  11. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates +0 -0
  12. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates.sha256 +1 -1
  13. package/payload/canon-kit/README.md +1 -0
  14. package/payload/canon-kit/SPEC.md +527 -63
  15. package/payload/canon-kit/checks/check-amendment-queue.gate +3 -0
  16. package/payload/canon-kit/checks/check-comment-tier.gate +3 -0
  17. package/payload/canon-kit/checks/check-deprecation-task.gate +3 -0
  18. package/payload/canon-kit/checks/check-docs-cmd.gate +3 -0
  19. package/payload/canon-kit/checks/check-docs-link-convention.gate +3 -0
  20. package/payload/canon-kit/checks/check-install-claim.gate +3 -0
  21. package/payload/canon-kit/checks/check-knob-citation.gate +3 -0
  22. package/payload/canon-kit/checks/check-knob-default-coupling.gate +3 -0
  23. package/payload/canon-kit/checks/check-manifest-count.gate +3 -0
  24. package/payload/canon-kit/checks/check-manifest-temporal.gate +3 -0
  25. package/payload/canon-kit/checks/check-md-refs.gate +3 -0
  26. package/payload/canon-kit/checks/check-measured-claim.gate +3 -0
  27. package/payload/canon-kit/checks/check-payload-claim.gate +3 -0
  28. package/payload/canon-kit/checks/check-prose-enum.gate +3 -0
  29. package/payload/canon-kit/checks/check-prose-tells.gate +3 -0
  30. package/payload/canon-kit/checks/check-spec-derivable-section.gate +3 -0
  31. package/payload/canon-kit/checks/check-spec-dod-singleton.gate +3 -0
  32. package/payload/canon-kit/checks/check-spec-embedded-source.gate +3 -0
  33. package/payload/canon-kit/checks/check-spec-fence-balance.gate +3 -0
  34. package/payload/canon-kit/checks/check-spec-pointer.gate +3 -0
  35. package/payload/canon-kit/checks/check-surface-duplication.sh +1 -0
  36. package/payload/canon-kit/checks/check-todo-task-liveness.gate +3 -0
  37. package/payload/canon-kit/checks/check-tracking-claim.gate +3 -0
  38. package/payload/canon-kit/gate-tests/check-amendment-queue/bad/SPEC-orphan.md +6 -0
  39. package/payload/canon-kit/gate-tests/check-amendment-queue/bad/TASK-QUEUE.md +7 -2
  40. package/payload/canon-kit/gate-tests/check-amendment-queue/bad/expect.txt +8 -0
  41. package/payload/canon-kit/gate-tests/check-comment-tier/bad/.workflow/fixture-state.txt +4 -0
  42. package/payload/canon-kit/gate-tests/check-comment-tier/bad/bad.gate +4 -0
  43. package/payload/canon-kit/gate-tests/check-comment-tier/bad/bad.rs +5 -0
  44. package/payload/canon-kit/gate-tests/check-comment-tier/bad/bad.sh +3 -0
  45. package/payload/canon-kit/gate-tests/check-comment-tier/bad/expect.txt +5 -0
  46. package/payload/canon-kit/gate-tests/check-comment-tier/bad/templates/bad-tmpl.sh +4 -0
  47. package/payload/canon-kit/gate-tests/check-comment-tier/good/.workflow/fixture-state.txt +3 -0
  48. package/payload/canon-kit/gate-tests/check-comment-tier/good/expect.txt +1 -1
  49. package/payload/canon-kit/gate-tests/check-comment-tier/good/good.gate +4 -0
  50. package/payload/canon-kit/gate-tests/check-comment-tier/good/good.rs +5 -0
  51. package/payload/canon-kit/gate-tests/check-comment-tier/good/good.sh +3 -0
  52. package/payload/canon-kit/gate-tests/check-comment-tier/good/templates/good-tmpl.sh +5 -0
  53. package/payload/canon-kit/gate-tests/check-comment-tier.test.sh +3 -2
  54. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/.workflow/fixture-state.txt +3 -0
  55. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/bad.gate +2 -0
  56. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/bad.rs +4 -0
  57. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/expect.txt +3 -0
  58. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/scripts/canon-config.sh +6 -5
  59. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/templates/tmpl.sh +5 -0
  60. package/payload/canon-kit/gate-tests/check-deprecation-task/good/.workflow/fixture-state.txt +3 -0
  61. package/payload/canon-kit/gate-tests/check-deprecation-task/good/expect.txt +1 -1
  62. package/payload/canon-kit/gate-tests/check-deprecation-task/good/good.gate +2 -0
  63. package/payload/canon-kit/gate-tests/check-deprecation-task/good/good.rs +4 -0
  64. package/payload/canon-kit/gate-tests/check-deprecation-task/good/scripts/canon-config.sh +6 -5
  65. package/payload/canon-kit/gate-tests/check-deprecation-task/good/templates/tmpl.sh +5 -0
  66. package/payload/canon-kit/gate-tests/check-deprecation-task.test.sh +4 -3
  67. package/payload/canon-kit/gate-tests/check-docs-link-convention.test.sh +4 -4
  68. package/payload/canon-kit/gate-tests/check-knob-citation.test.sh +2 -2
  69. package/payload/canon-kit/gate-tests/check-knob-default-coupling.test.sh +2 -2
  70. package/payload/canon-kit/gate-tests/check-manifest-count/good/SPEC.md +4 -0
  71. package/payload/canon-kit/gate-tests/check-manifest-count.test.sh +27 -5
  72. package/payload/canon-kit/gate-tests/check-md-refs.test.sh +61 -9
  73. package/payload/canon-kit/gate-tests/check-measured-claim/bad/SPEC.md +12 -0
  74. package/payload/canon-kit/gate-tests/check-measured-claim/bad/expect.txt +3 -0
  75. package/payload/canon-kit/gate-tests/check-measured-claim/bad/scripts/canon-config.sh +6 -0
  76. package/payload/canon-kit/gate-tests/check-measured-claim/good/SPEC.md +23 -0
  77. package/payload/canon-kit/gate-tests/check-measured-claim/good/expect.txt +1 -0
  78. package/payload/canon-kit/gate-tests/check-measured-claim/good/scripts/canon-config.sh +6 -0
  79. package/payload/canon-kit/gate-tests/check-measured-claim.test.sh +90 -0
  80. package/payload/canon-kit/gate-tests/check-prose-enum.test.sh +3 -3
  81. package/payload/canon-kit/gate-tests/check-spec-dod-singleton.test.sh +21 -7
  82. package/payload/canon-kit/gate-tests/check-spec-embedded-source/bad/SPEC-wire.md +18 -0
  83. package/payload/canon-kit/gate-tests/check-spec-embedded-source/bad/expect.txt +3 -1
  84. package/payload/canon-kit/gate-tests/check-spec-embedded-source/bad/widget.proto +13 -0
  85. package/payload/canon-kit/gate-tests/check-spec-embedded-source/good/SPEC-wire.md +22 -0
  86. package/payload/canon-kit/gate-tests/check-spec-embedded-source/good/SPEC.md +17 -0
  87. package/payload/canon-kit/gate-tests/check-spec-embedded-source/good/widget.proto +13 -0
  88. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/.workflow/fixture-state.txt +2 -0
  89. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/bad.gate +2 -0
  90. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/bad.rs +4 -0
  91. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/expect.txt +3 -0
  92. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/templates/tmpl.sh +5 -0
  93. package/payload/canon-kit/gate-tests/check-spec-pointer/good/.workflow/fixture-state.txt +2 -0
  94. package/payload/canon-kit/gate-tests/check-spec-pointer/good/expect.txt +1 -1
  95. package/payload/canon-kit/gate-tests/check-spec-pointer/good/good.gate +2 -0
  96. package/payload/canon-kit/gate-tests/check-spec-pointer/good/good.rs +4 -0
  97. package/payload/canon-kit/gate-tests/check-spec-pointer/good/templates/tmpl.sh +5 -0
  98. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/.workflow/fixture-state.txt +3 -0
  99. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/bad.gate +2 -0
  100. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/bad.rs +4 -0
  101. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/expect.txt +3 -0
  102. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/templates/tmpl.sh +5 -0
  103. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/.workflow/fixture-state.txt +3 -0
  104. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/expect.txt +1 -1
  105. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/good.gate +2 -0
  106. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/good.rs +4 -0
  107. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/templates/tmpl.sh +5 -0
  108. package/payload/canon-kit/gate-tests/check-tracking-claim.test.sh +1 -2
  109. package/payload/canon-kit/lib/spec.sh +91 -62
  110. package/payload/canon-kit/smoke/install.sh +2 -1
  111. package/payload/canon-kit/templates/SPEC-amendment.md +4 -1
  112. package/payload/context-kit/README.md +10 -5
  113. package/payload/context-kit/SPEC.md +364 -62
  114. package/payload/context-kit/bin/always-loaded.sh +5 -21
  115. package/payload/context-kit/bin/env-probe.sh +21 -23
  116. package/payload/context-kit/checks/check-brevity.gate +3 -0
  117. package/payload/context-kit/checks/check-footprint-fresh.gate +3 -0
  118. package/payload/context-kit/checks/check-memory-off.gate +3 -0
  119. package/payload/context-kit/checks/check-settings-paths.gate +3 -0
  120. package/payload/context-kit/checks/check-settings-pins.gate +3 -0
  121. package/payload/context-kit/gate-tests/check-brevity.test.sh +3 -2
  122. package/payload/context-kit/gate-tests/check-memory-off/bad/scripts/context-config.sh +4 -0
  123. package/payload/context-kit/gate-tests/check-memory-off/good/scripts/context-config.sh +4 -0
  124. package/payload/context-kit/gate-tests/check-memory-off.test.sh +18 -4
  125. package/payload/context-kit/gate-tests/check-settings-paths/bad/expect.txt +3 -0
  126. package/payload/context-kit/gate-tests/check-settings-paths/bad/settings.json +12 -0
  127. package/payload/context-kit/gate-tests/check-settings-paths/bad/tools/real-tool.sh +4 -0
  128. package/payload/context-kit/gate-tests/check-settings-paths/good/expect.txt +1 -0
  129. package/payload/context-kit/gate-tests/check-settings-paths/good/settings.json +16 -0
  130. package/payload/context-kit/gate-tests/check-settings-paths/good/tools/real-tool.sh +4 -0
  131. package/payload/context-kit/gate-tests/check-settings-pins.test.sh +70 -0
  132. package/payload/context-kit/index-tests/expected/toolfloor.txt +9 -0
  133. package/payload/context-kit/index-tests/toolfloor-cases.sh +20 -0
  134. package/payload/context-kit/lib/context.sh +56 -0
  135. package/payload/context-kit/lib/toolfloor.sh +15 -4
  136. package/payload/context-kit/smoke/agents-md.sh +27 -4
  137. package/payload/context-kit/smoke/install.sh +4 -2
  138. package/payload/context-kit/templates/session-context.sh +5 -5
  139. package/payload/delegation-kit/README.md +3 -3
  140. package/payload/delegation-kit/SPEC.md +400 -22
  141. package/payload/delegation-kit/checks/check-agent-tier-explicit.gate +3 -0
  142. package/payload/delegation-kit/checks/check-gate-tamper.gate +3 -0
  143. package/payload/delegation-kit/checks/check-rule-citation.gate +3 -0
  144. package/payload/delegation-kit/gate-tests/check-gate-tamper/bad/added-exemptions +5 -0
  145. package/payload/delegation-kit/gate-tests/check-gate-tamper/bad/expect.txt +2 -0
  146. package/payload/delegation-kit/gate-tests/check-gate-tamper.test.sh +108 -0
  147. package/payload/delegation-kit/smoke/install.sh +1 -1
  148. package/payload/delegation-kit/templates/agent-execution.md +109 -18
  149. package/payload/delegation-kit/templates/statusline-usage.sh +23 -1
  150. package/payload/doctrine-kit/DOCTRINE.md +86 -12
  151. package/payload/doctrine-kit/README.md +7 -3
  152. package/payload/doctrine-kit/SPEC.md +103 -10
  153. package/payload/doctrine-kit/bin/install-doctrine.sh +83 -13
  154. package/payload/doctrine-kit/checks/check-doctrine-registration.gate +3 -0
  155. package/payload/doctrine-kit/gate-tests/check-doctrine-registration/bad/DOCTRINE.md +3 -0
  156. package/payload/doctrine-kit/gate-tests/check-doctrine-registration/good/DOCTRINE.md +3 -0
  157. package/payload/doctrine-kit/gate-tests/check-doctrine-registration.test.sh +84 -5
  158. package/payload/doctrine-kit/smoke/install.sh +106 -3
  159. package/payload/drift-kit/README.md +2 -2
  160. package/payload/drift-kit/SPEC.md +84 -11
  161. package/payload/drift-kit/bin/kfric.sh +21 -2
  162. package/payload/drift-kit/bin/stage-economics.sh +1 -1
  163. package/payload/drift-kit/lib/drift.sh +43 -0
  164. package/payload/drift-kit/smoke/install.sh +49 -14
  165. package/payload/evidence-kit/README.md +3 -1
  166. package/payload/evidence-kit/SPEC.md +160 -19
  167. package/payload/evidence-kit/checks/check-battery-roster.gate +3 -0
  168. package/payload/evidence-kit/checks/check-evidence-baseline.gate +3 -0
  169. package/payload/evidence-kit/checks/check-evidence-manifest.gate +3 -0
  170. package/payload/evidence-kit/checks/check-producer-liveness.sh +43 -2
  171. package/payload/evidence-kit/gate-tests/check-battery-roster.test.sh +4 -3
  172. package/payload/evidence-kit/gate-tests/check-evidence-baseline.test.sh +8 -5
  173. package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/WORKFLOW-STATE.txt +1 -1
  174. package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/scripts/evidence-config.sh +9 -0
  175. package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/WORKFLOW-STATE.txt +1 -1
  176. package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/scripts/evidence-config.sh +9 -0
  177. package/payload/evidence-kit/gate-tests/check-evidence-manifest.test.sh +6 -4
  178. package/payload/evidence-kit/gate-tests/producer-lock.test.sh +42 -1
  179. package/payload/evidence-kit/lib/evidence.sh +2 -0
  180. package/payload/evidence-kit/smoke/install.sh +1 -1
  181. package/payload/gate-sdk/README.md +23 -7
  182. package/payload/gate-sdk/SPEC.md +6402 -291
  183. package/payload/gate-sdk/bin/build-native.sh +38 -0
  184. package/payload/gate-sdk/bin/gen-pre-commit.sh +23 -3
  185. package/payload/gate-sdk/bin/install-hooks.sh +14 -2
  186. package/payload/gate-sdk/bin/port-blockers.sh +473 -0
  187. package/payload/gate-sdk/bin/run-consumer-smoke.sh +8 -1
  188. package/payload/gate-sdk/bin/run-gate-tests.sh +27 -7
  189. package/payload/gate-sdk/bin/run-gates.sh +30 -2
  190. package/payload/gate-sdk/bin/upgrade-smoke.sh +70 -17
  191. package/payload/gate-sdk/checks/check-action-gh-repo.gate +1 -0
  192. package/payload/gate-sdk/checks/check-action-pinning.gate +1 -0
  193. package/payload/gate-sdk/checks/check-action-run-shell.sh +2 -0
  194. package/payload/gate-sdk/checks/check-assertion-strength.gate +3 -0
  195. package/payload/gate-sdk/checks/check-commit-msg.gate +3 -0
  196. package/payload/gate-sdk/checks/check-commit-subject.gate +3 -0
  197. package/payload/gate-sdk/checks/check-core-files.gate +3 -0
  198. package/payload/gate-sdk/checks/check-crate-arms.sh +62 -0
  199. package/payload/gate-sdk/checks/check-enforcement-fresh.gate +3 -0
  200. package/payload/gate-sdk/checks/check-exec-bit.gate +3 -0
  201. package/payload/gate-sdk/checks/check-gate-assertions.sh +32 -6
  202. package/payload/gate-sdk/checks/check-gate-binary-fresh.gate +3 -0
  203. package/payload/gate-sdk/checks/check-gate-exemption-tasks.gate +3 -0
  204. package/payload/gate-sdk/checks/check-gate-fail-closed.gate +3 -0
  205. package/payload/gate-sdk/checks/check-gate-fixture-coverage.gate +3 -0
  206. package/payload/gate-sdk/checks/check-gate-output.gate +3 -0
  207. package/payload/gate-sdk/checks/check-gate-substrate-parity.sh +109 -14
  208. package/payload/gate-sdk/checks/check-graph.gate +3 -0
  209. package/payload/gate-sdk/checks/check-hook-exec-bit.gate +3 -0
  210. package/payload/gate-sdk/checks/check-identity.gate +3 -0
  211. package/payload/gate-sdk/checks/check-install-disposition.sh +93 -0
  212. package/payload/gate-sdk/checks/check-kit-enum.gate +3 -0
  213. package/payload/gate-sdk/checks/check-kit-registration.gate +3 -0
  214. package/payload/gate-sdk/checks/check-readme-roster.gate +3 -0
  215. package/payload/gate-sdk/checks/check-reads-couples.gate +3 -0
  216. package/payload/gate-sdk/checks/check-root-tiering.gate +3 -0
  217. package/payload/gate-sdk/checks/check-shellcheck.sh +2 -0
  218. package/payload/gate-sdk/checks/check-smoke-entry-guard.gate +3 -0
  219. package/payload/gate-sdk/checks/check-template-copy-parity.gate +3 -0
  220. package/payload/gate-sdk/checks/check-template-registry-parity.gate +3 -0
  221. package/payload/gate-sdk/checks/check-test-hermetic.gate +3 -0
  222. package/payload/gate-sdk/checks/check-tree-terms.sh +2 -0
  223. package/payload/gate-sdk/checks/check-workflow-tiering.gate +3 -0
  224. package/payload/gate-sdk/gate-tests/check-commit-subject.test.sh +17 -12
  225. package/payload/gate-sdk/gate-tests/check-core-files.test.sh +4 -5
  226. package/payload/gate-sdk/gate-tests/check-crate-arms/bad/crate/Cargo.toml +7 -0
  227. package/payload/gate-sdk/gate-tests/check-crate-arms/bad/crate/src/lib.rs +12 -0
  228. package/payload/gate-sdk/gate-tests/check-crate-arms/bad/expect.txt +5 -0
  229. package/payload/gate-sdk/gate-tests/check-crate-arms/bad/scripts/gate-sdk-config.sh +2 -0
  230. package/payload/gate-sdk/gate-tests/check-crate-arms/good/crate/Cargo.toml +7 -0
  231. package/payload/gate-sdk/gate-tests/check-crate-arms/good/crate/src/lib.rs +11 -0
  232. package/payload/gate-sdk/gate-tests/check-crate-arms/good/expect.txt +2 -0
  233. package/payload/gate-sdk/gate-tests/check-crate-arms/good/scripts/gate-sdk-config.sh +2 -0
  234. package/payload/gate-sdk/gate-tests/check-exec-bit/bad/dump.txt +2 -1
  235. package/payload/gate-sdk/gate-tests/check-exec-bit/bad/expect.txt +2 -1
  236. package/payload/gate-sdk/gate-tests/check-exec-bit/good/dump.txt +3 -0
  237. package/payload/gate-sdk/gate-tests/check-exec-bit/good/expect.txt +1 -1
  238. package/payload/gate-sdk/gate-tests/check-exec-bit.test.sh +3 -4
  239. package/payload/gate-sdk/gate-tests/check-gate-assertions/good/expect.txt +1 -1
  240. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh.test.sh +26 -4
  241. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/args +6 -1
  242. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/expect.txt +2 -0
  243. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/kitroot/checks/check-vendored-descriptor.gate +4 -0
  244. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/kitroot/checks/check-vendored.sh +14 -0
  245. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/scripts/check-descriptor.gate +4 -0
  246. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/scripts/check-held.sh +8 -0
  247. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/args +8 -1
  248. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/expect.txt +3 -0
  249. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/kitroot/checks/check-vendored-descriptor.gate +4 -0
  250. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/kitroot/checks/check-vendored.sh +14 -0
  251. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/scripts/check-descriptor.gate +4 -0
  252. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/scripts/check-held.sh +8 -0
  253. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks.test.sh +77 -0
  254. package/payload/gate-sdk/gate-tests/check-gate-output/bad/check-native-sample.gate +3 -0
  255. package/payload/gate-sdk/gate-tests/check-gate-output/bad/expect.txt +3 -0
  256. package/payload/gate-sdk/gate-tests/check-gate-output/bad/gates.list +1 -0
  257. package/payload/gate-sdk/gate-tests/check-gate-output/bad/native/Cargo.toml +4 -0
  258. package/payload/gate-sdk/gate-tests/check-gate-output/bad/native/src/gates/native_sample.rs +7 -0
  259. package/payload/gate-sdk/gate-tests/check-gate-output/good/check-native-sample.gate +3 -0
  260. package/payload/gate-sdk/gate-tests/check-gate-output/good/expect.txt +1 -1
  261. package/payload/gate-sdk/gate-tests/check-gate-output/good/gates.list +1 -0
  262. package/payload/gate-sdk/gate-tests/check-gate-output/good/native/Cargo.toml +4 -0
  263. package/payload/gate-sdk/gate-tests/check-gate-output/good/native/src/gates/native_sample.rs +11 -0
  264. package/payload/gate-sdk/gate-tests/check-gate-output.test.sh +110 -0
  265. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/expect.txt +7 -0
  266. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-alpha.sh +1 -0
  267. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-bare.sh +4 -0
  268. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-both.sh +5 -0
  269. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-heldtwice.sh +5 -0
  270. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-orphan.gate +2 -0
  271. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-twice.sh +5 -0
  272. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gates.list +4 -0
  273. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/expect.txt +2 -1
  274. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-alpha.sh +1 -0
  275. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-held.sh +4 -0
  276. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gates.list +1 -0
  277. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity.test.sh +110 -4
  278. package/payload/gate-sdk/gate-tests/check-graph/bad/SPEC-example-gate.md +15 -5
  279. package/payload/gate-sdk/gate-tests/check-graph/bad/expect.txt +12 -0
  280. package/payload/gate-sdk/gate-tests/check-graph/good/SPEC-example-gate.md +27 -5
  281. package/payload/gate-sdk/gate-tests/check-graph/good/SPEC-second-gate.md +12 -0
  282. package/payload/gate-sdk/gate-tests/check-graph-cap.test.sh +5 -4
  283. package/payload/gate-sdk/gate-tests/check-graph-refs.test.sh +14 -12
  284. package/payload/gate-sdk/gate-tests/check-graph-theme.test.sh +43 -17
  285. package/payload/gate-sdk/gate-tests/check-graph-tree.test.sh +190 -0
  286. package/payload/gate-sdk/gate-tests/check-identity/bad/gh-hosts.yml +9 -0
  287. package/payload/gate-sdk/gate-tests/check-identity/bad/identity.conf +4 -2
  288. package/payload/gate-sdk/gate-tests/check-identity/bad/scripts/gate-sdk-config.sh +10 -0
  289. package/payload/gate-sdk/gate-tests/check-identity/good/gh-hosts.yml +11 -0
  290. package/payload/gate-sdk/gate-tests/check-identity/good/identity.conf +5 -1
  291. package/payload/gate-sdk/gate-tests/check-identity/good/scripts/gate-sdk-config.sh +10 -0
  292. package/payload/gate-sdk/gate-tests/check-identity.test.sh +114 -0
  293. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-alpha.sh +6 -0
  294. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-delta.sh +5 -0
  295. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-epsilon.sh +6 -0
  296. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/smoke/install.sh +7 -0
  297. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/args +6 -0
  298. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/expect.txt +1 -0
  299. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/installer/lib/common/recipe.sh +9 -0
  300. package/payload/gate-sdk/gate-tests/check-install-disposition/bad/scripts/gate-sdk-config.sh +5 -0
  301. package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-alpha.sh +6 -0
  302. package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-beta.gate +3 -0
  303. package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-gamma.sh +6 -0
  304. package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/smoke/install.sh +8 -0
  305. package/payload/gate-sdk/gate-tests/check-install-disposition/good/args +6 -0
  306. package/payload/gate-sdk/gate-tests/check-install-disposition/good/expect.txt +1 -0
  307. package/payload/gate-sdk/gate-tests/check-install-disposition/good/installer/lib/common/recipe.sh +10 -0
  308. package/payload/gate-sdk/gate-tests/check-install-disposition/good/scripts/gate-sdk-config.sh +5 -0
  309. package/payload/gate-sdk/gate-tests/check-kit-enum/bad/check-native-sample.gate +3 -0
  310. package/payload/gate-sdk/gate-tests/check-kit-enum/bad/gates.list +4 -1
  311. package/payload/gate-sdk/gate-tests/check-kit-enum/good/check-native-sample.gate +3 -0
  312. package/payload/gate-sdk/gate-tests/check-kit-enum/good/expect.txt +1 -1
  313. package/payload/gate-sdk/gate-tests/check-kit-enum/good/gates.list +5 -2
  314. package/payload/gate-sdk/gate-tests/check-kit-registration.test.sh +6 -5
  315. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/args +3 -1
  316. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/delta-kit/README.md +15 -0
  317. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/delta-kit/checks/check-delta-one.gate +2 -0
  318. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/delta-kit/checks/check-delta-two.sh +3 -0
  319. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/expect.txt +3 -1
  320. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/scripts/gate-sdk-config.sh +1 -1
  321. package/payload/gate-sdk/gate-tests/check-readme-roster/good/args +3 -1
  322. package/payload/gate-sdk/gate-tests/check-readme-roster/good/delta-kit/README.md +13 -0
  323. package/payload/gate-sdk/gate-tests/check-readme-roster/good/delta-kit/checks/check-delta-one.gate +2 -0
  324. package/payload/gate-sdk/gate-tests/check-readme-roster/good/epsilon-kit/README.md +14 -0
  325. package/payload/gate-sdk/gate-tests/check-readme-roster/good/epsilon-kit/checks/check-eps-one.sh +3 -0
  326. package/payload/gate-sdk/gate-tests/check-readme-roster/good/epsilon-kit/checks/check-eps-two.gate +2 -0
  327. package/payload/gate-sdk/gate-tests/check-readme-roster/good/scripts/gate-sdk-config.sh +1 -1
  328. package/payload/gate-sdk/gate-tests/check-reads-couples.test.sh +87 -89
  329. package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/scripts/agent-budget-guard.sh +4 -0
  330. package/payload/gate-sdk/gate-tests/check-template-copy-parity.test.sh +56 -0
  331. package/payload/gate-sdk/gate-tests/check-test-hermetic-smoke.test.sh +2 -3
  332. package/payload/gate-sdk/gate-tests/declaration-lib-parity.test.sh +211 -0
  333. package/payload/gate-sdk/gate-tests/enforcement-map.test.sh +16 -15
  334. package/payload/gate-sdk/gate-tests/lib-gate.test.sh +204 -1
  335. package/payload/gate-sdk/gate-tests/run-dispatch-streams.test.sh +73 -0
  336. package/payload/gate-sdk/lib/consumer-smoke.sh +24 -12
  337. package/payload/gate-sdk/lib/gate.sh +353 -22
  338. package/payload/gate-sdk/lib/inject.sh +25 -0
  339. package/payload/gate-sdk/lib/test-hermetic.sh +26 -0
  340. package/payload/gate-sdk/smoke/install.sh +47 -1
  341. package/payload/guard-kit/README.md +14 -11
  342. package/payload/guard-kit/SPEC.md +477 -82
  343. package/payload/guard-kit/bin/run-guard-tests.sh +7 -1
  344. package/payload/guard-kit/gate-tests/git-mutation-under-producer.test.sh +105 -0
  345. package/payload/guard-kit/gate-tests/guard-read-path.test.sh +52 -0
  346. package/payload/guard-kit/guard-tests/cases.tsv +84 -14
  347. package/payload/guard-kit/lib/guard.sh +440 -54
  348. package/payload/guard-kit/templates/close-triage.md +5 -5
  349. package/payload/guard-kit/templates/settings-hooks.json +7 -1
  350. package/payload/lifecycle-kit/README.md +14 -3
  351. package/payload/lifecycle-kit/SPEC.md +929 -93
  352. package/payload/lifecycle-kit/bin/cite-survey.sh +81 -0
  353. package/payload/lifecycle-kit/bin/enter-stage.sh +193 -38
  354. package/payload/lifecycle-kit/bin/file-gap.sh +29 -12
  355. package/payload/lifecycle-kit/bin/file-survey.sh +21 -2
  356. package/payload/lifecycle-kit/checks/check-close-surfaces.gate +3 -0
  357. package/payload/lifecycle-kit/checks/check-gap-inbox-neutrality.gate +3 -0
  358. package/payload/lifecycle-kit/checks/check-lesson-disposition.gate +3 -0
  359. package/payload/lifecycle-kit/checks/check-lifecycle-registration.gate +3 -0
  360. package/payload/lifecycle-kit/checks/check-merge-attrs.gate +3 -0
  361. package/payload/lifecycle-kit/checks/check-scratch-citation.gate +3 -0
  362. package/payload/lifecycle-kit/checks/check-shim-restatement.gate +3 -0
  363. package/payload/lifecycle-kit/checks/check-skill-binding.gate +3 -0
  364. package/payload/lifecycle-kit/checks/check-stage-entry.gate +3 -0
  365. package/payload/lifecycle-kit/checks/check-stage-evidence.gate +3 -0
  366. package/payload/lifecycle-kit/checks/check-stage-skill-coverage.gate +3 -0
  367. package/payload/lifecycle-kit/checks/check-survey-record.gate +3 -0
  368. package/payload/lifecycle-kit/gate-tests/boundary-scratch-wipe.test.sh +4 -4
  369. package/payload/lifecycle-kit/gate-tests/check-close-surfaces.test.sh +2 -3
  370. package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/bad/args +2 -0
  371. package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/bad/expect.txt +3 -0
  372. package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/bad/gap-inbox.md +5 -0
  373. package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/good/args +2 -0
  374. package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/good/expect.txt +1 -0
  375. package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/good/gap-inbox.md +4 -0
  376. package/payload/lifecycle-kit/gate-tests/check-lesson-disposition.test.sh +2 -3
  377. package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration.test.sh +2 -3
  378. package/payload/lifecycle-kit/gate-tests/check-merge-attrs.test.sh +2 -3
  379. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/expect.txt +1 -0
  380. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/scripts/lifecycle-config.sh +4 -0
  381. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/surfaces/queue.md +13 -0
  382. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/expect.txt +1 -0
  383. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/scripts/lifecycle-config.sh +4 -0
  384. package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/surfaces/queue.md +31 -0
  385. package/payload/lifecycle-kit/gate-tests/check-shim-restatement.test.sh +2 -3
  386. package/payload/lifecycle-kit/gate-tests/check-skill-binding.test.sh +2 -3
  387. package/payload/lifecycle-kit/gate-tests/check-stage-entry/bad/.workflow/WORKFLOW-STATE.txt +3 -3
  388. package/payload/lifecycle-kit/gate-tests/check-stage-entry/good/.workflow/WORKFLOW-STATE.txt +3 -3
  389. package/payload/lifecycle-kit/gate-tests/check-stage-entry.test.sh +24 -25
  390. package/payload/lifecycle-kit/gate-tests/check-stage-evidence/bad/.workflow/WORKFLOW-STATE.txt +2 -2
  391. package/payload/lifecycle-kit/gate-tests/check-stage-evidence/good/.workflow/WORKFLOW-STATE.txt +2 -2
  392. package/payload/lifecycle-kit/gate-tests/check-stage-evidence.test.sh +129 -15
  393. package/payload/lifecycle-kit/gate-tests/check-survey-record.test.sh +2 -3
  394. package/payload/lifecycle-kit/gate-tests/file-gap-recurrence.test.sh +54 -26
  395. package/payload/lifecycle-kit/gate-tests/gap-inbox-route.test.sh +123 -0
  396. package/payload/lifecycle-kit/gate-tests/rename-iteration.test.sh +142 -0
  397. package/payload/lifecycle-kit/gate-tests/survey-record-entry.test.sh +16 -5
  398. package/payload/lifecycle-kit/gate-tests/workflow-state-guard.test.sh +100 -0
  399. package/payload/lifecycle-kit/lib/stages.sh +9 -0
  400. package/payload/lifecycle-kit/smoke/install.sh +96 -19
  401. package/payload/lifecycle-kit/templates/lead.md +60 -0
  402. package/payload/lifecycle-kit/templates/stages/align.md +20 -2
  403. package/payload/lifecycle-kit/templates/stages/build.md +3 -3
  404. package/payload/lifecycle-kit/templates/stages/close.md +48 -15
  405. package/payload/lifecycle-kit/templates/stages/scope.md +29 -5
  406. package/payload/lifecycle-kit/templates/stages/spec.md +6 -2
  407. package/payload/lifecycle-kit/templates/stages/validate.md +1 -1
  408. package/payload/lifecycle-kit/templates/workflow-state-guard.sh +29 -0
  409. package/payload/queue-kit/README.md +12 -10
  410. package/payload/queue-kit/SPEC.md +411 -74
  411. package/payload/queue-kit/bin/queue-counts.sh +35 -0
  412. package/payload/queue-kit/checks/check-queue-entry-budget.gate +3 -0
  413. package/payload/queue-kit/checks/check-queue-hygiene.gate +3 -0
  414. package/payload/queue-kit/checks/check-queue-prose-precondition.gate +3 -0
  415. package/payload/queue-kit/checks/check-queue-sections.gate +3 -0
  416. package/payload/queue-kit/checks/check-queue-slug-liveness.gate +3 -0
  417. package/payload/queue-kit/checks/check-queue-wrap.gate +3 -0
  418. package/payload/queue-kit/checks/check-roadmap-fresh.gate +3 -0
  419. package/payload/queue-kit/checks/check-tag-lead-line.gate +3 -0
  420. package/payload/queue-kit/checks/check-task-conservation.gate +4 -0
  421. package/payload/queue-kit/checks/check-task-names.gate +3 -0
  422. package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/TASK-QUEUE.md +15 -0
  423. package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/expect.txt +2 -0
  424. package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/TASK-QUEUE.md +7 -0
  425. package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/expect.txt +4 -0
  426. package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/expect.txt +1 -1
  427. package/payload/queue-kit/gate-tests/queue-counts.test.sh +116 -0
  428. package/payload/queue-kit/gate-tests/queue-index.test.sh +55 -119
  429. package/payload/queue-kit/gate-tests/queue-lib-parity.test.sh +215 -0
  430. package/payload/queue-kit/gate-tests/roadmap.test.sh +22 -12
  431. package/payload/queue-kit/lib/queue.sh +4 -68
  432. package/payload/queue-kit/smoke/install.sh +1 -1
  433. package/payload/site-kit/SPEC.md +52 -2
  434. package/payload/site-kit/checks/check-docs-cname-parity.gate +3 -0
  435. package/payload/site-kit/checks/check-docs-render-fidelity.sh +2 -0
  436. package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/args +5 -4
  437. package/payload/site-kit/gate-tests/check-docs-cname-parity/good/args +6 -5
  438. package/payload/site-kit/gate-tests/check-docs-cname-parity/good/checks/check-sample.gate +3 -0
  439. package/payload/site-kit/gate-tests/check-docs-cname-parity/good/expect.txt +1 -1
  440. package/payload/site-kit/smoke/install.sh +1 -1
  441. package/profiles.list +36 -8
  442. package/payload/canon-kit/checks/check-amendment-queue.sh +0 -116
  443. package/payload/canon-kit/checks/check-comment-tier.sh +0 -216
  444. package/payload/canon-kit/checks/check-deprecation-task.sh +0 -90
  445. package/payload/canon-kit/checks/check-docs-cmd.sh +0 -153
  446. package/payload/canon-kit/checks/check-docs-link-convention.sh +0 -78
  447. package/payload/canon-kit/checks/check-install-claim.sh +0 -146
  448. package/payload/canon-kit/checks/check-knob-citation.sh +0 -117
  449. package/payload/canon-kit/checks/check-knob-default-coupling.sh +0 -239
  450. package/payload/canon-kit/checks/check-manifest-count.sh +0 -46
  451. package/payload/canon-kit/checks/check-manifest-temporal.sh +0 -83
  452. package/payload/canon-kit/checks/check-md-refs.sh +0 -128
  453. package/payload/canon-kit/checks/check-payload-claim.sh +0 -133
  454. package/payload/canon-kit/checks/check-prose-enum.sh +0 -115
  455. package/payload/canon-kit/checks/check-prose-tells.sh +0 -207
  456. package/payload/canon-kit/checks/check-spec-derivable-section.sh +0 -69
  457. package/payload/canon-kit/checks/check-spec-dod-singleton.sh +0 -45
  458. package/payload/canon-kit/checks/check-spec-embedded-source.sh +0 -133
  459. package/payload/canon-kit/checks/check-spec-fence-balance.sh +0 -42
  460. package/payload/canon-kit/checks/check-spec-pointer.sh +0 -187
  461. package/payload/canon-kit/checks/check-todo-task-liveness.sh +0 -80
  462. package/payload/canon-kit/checks/check-tracking-claim.sh +0 -136
  463. package/payload/context-kit/bin/footprint.sh +0 -144
  464. package/payload/context-kit/checks/check-brevity.sh +0 -123
  465. package/payload/context-kit/checks/check-footprint-fresh.sh +0 -38
  466. package/payload/context-kit/checks/check-memory-off.sh +0 -112
  467. package/payload/context-kit/checks/check-settings-pins.sh +0 -110
  468. package/payload/delegation-kit/checks/check-agent-tier-explicit.sh +0 -61
  469. package/payload/delegation-kit/checks/check-gate-tamper.sh +0 -139
  470. package/payload/delegation-kit/checks/check-rule-citation.sh +0 -76
  471. package/payload/doctrine-kit/checks/check-doctrine-registration.sh +0 -216
  472. package/payload/drift-kit/bin/trajectory.sh +0 -242
  473. package/payload/evidence-kit/checks/check-battery-roster.sh +0 -86
  474. package/payload/evidence-kit/checks/check-evidence-baseline.sh +0 -103
  475. package/payload/evidence-kit/checks/check-evidence-manifest.sh +0 -104
  476. package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/args +0 -3
  477. package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/args +0 -3
  478. package/payload/gate-sdk/bin/enforcement-map.sh +0 -272
  479. package/payload/gate-sdk/checks/check-assertion-strength.sh +0 -134
  480. package/payload/gate-sdk/checks/check-commit-msg.sh +0 -50
  481. package/payload/gate-sdk/checks/check-commit-subject.sh +0 -43
  482. package/payload/gate-sdk/checks/check-core-files.sh +0 -75
  483. package/payload/gate-sdk/checks/check-enforcement-fresh.sh +0 -37
  484. package/payload/gate-sdk/checks/check-exec-bit.sh +0 -95
  485. package/payload/gate-sdk/checks/check-gate-binary-fresh.sh +0 -106
  486. package/payload/gate-sdk/checks/check-gate-exemption-tasks.sh +0 -105
  487. package/payload/gate-sdk/checks/check-gate-fail-closed.sh +0 -84
  488. package/payload/gate-sdk/checks/check-gate-fixture-coverage.sh +0 -92
  489. package/payload/gate-sdk/checks/check-gate-output.sh +0 -73
  490. package/payload/gate-sdk/checks/check-graph.sh +0 -631
  491. package/payload/gate-sdk/checks/check-hook-exec-bit.sh +0 -45
  492. package/payload/gate-sdk/checks/check-identity.sh +0 -134
  493. package/payload/gate-sdk/checks/check-kit-enum.sh +0 -94
  494. package/payload/gate-sdk/checks/check-kit-registration.sh +0 -68
  495. package/payload/gate-sdk/checks/check-readme-roster.sh +0 -107
  496. package/payload/gate-sdk/checks/check-reads-couples.sh +0 -199
  497. package/payload/gate-sdk/checks/check-root-tiering.sh +0 -66
  498. package/payload/gate-sdk/checks/check-smoke-entry-guard.sh +0 -53
  499. package/payload/gate-sdk/checks/check-template-copy-parity.sh +0 -126
  500. package/payload/gate-sdk/checks/check-template-registry-parity.sh +0 -81
  501. package/payload/gate-sdk/checks/check-test-hermetic.sh +0 -119
  502. package/payload/gate-sdk/checks/check-workflow-tiering.sh +0 -84
  503. package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/args +0 -1
  504. package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/args +0 -1
  505. package/payload/gate-sdk/gate-tests/check-identity/bad/args +0 -1
  506. package/payload/gate-sdk/gate-tests/check-identity/good/args +0 -1
  507. package/payload/lifecycle-kit/bin/close-surfaces.sh +0 -94
  508. package/payload/lifecycle-kit/checks/check-close-surfaces.sh +0 -63
  509. package/payload/lifecycle-kit/checks/check-lesson-disposition.sh +0 -98
  510. package/payload/lifecycle-kit/checks/check-lifecycle-registration.sh +0 -54
  511. package/payload/lifecycle-kit/checks/check-merge-attrs.sh +0 -69
  512. package/payload/lifecycle-kit/checks/check-shim-restatement.sh +0 -97
  513. package/payload/lifecycle-kit/checks/check-skill-binding.sh +0 -59
  514. package/payload/lifecycle-kit/checks/check-stage-entry.sh +0 -197
  515. package/payload/lifecycle-kit/checks/check-stage-evidence.sh +0 -81
  516. package/payload/lifecycle-kit/checks/check-stage-skill-coverage.sh +0 -47
  517. package/payload/lifecycle-kit/checks/check-survey-record.sh +0 -102
  518. package/payload/queue-kit/bin/queue-index.sh +0 -182
  519. package/payload/queue-kit/bin/roadmap.sh +0 -76
  520. package/payload/queue-kit/checks/check-queue-entry-budget.sh +0 -106
  521. package/payload/queue-kit/checks/check-queue-hygiene.sh +0 -81
  522. package/payload/queue-kit/checks/check-queue-prose-precondition.sh +0 -63
  523. package/payload/queue-kit/checks/check-queue-sections.sh +0 -44
  524. package/payload/queue-kit/checks/check-queue-slug-liveness.sh +0 -63
  525. package/payload/queue-kit/checks/check-queue-wrap.sh +0 -56
  526. package/payload/queue-kit/checks/check-roadmap-fresh.sh +0 -110
  527. package/payload/queue-kit/checks/check-tag-lead-line.sh +0 -70
  528. package/payload/queue-kit/checks/check-task-conservation.sh +0 -50
  529. package/payload/queue-kit/checks/check-task-names.sh +0 -128
  530. package/payload/site-kit/checks/check-docs-cname-parity.sh +0 -80
  531. /package/payload/context-kit/gate-tests/{check-memory-off → check-settings-paths}/bad/args +0 -0
  532. /package/payload/context-kit/gate-tests/{check-memory-off → check-settings-paths}/good/args +0 -0
  533. /package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/{gates → scripts}/check-sample.sh +0 -0
  534. /package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/{gates → scripts}/check-sample.sh +0 -0
  535. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/{check-gamma.sh → scripts/check-gamma.sh} +0 -0
  536. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/{gate-tests → scripts/gate-tests}/check-alpha/bad/.keep +0 -0
  537. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/{gate-tests → scripts/gate-tests}/check-alpha/good/.keep +0 -0
  538. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/{gates.list → scripts/gates.list} +0 -0
  539. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/{check-beta.sh → scripts/check-beta.sh} +0 -0
  540. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/{gate-tests → scripts/gate-tests}/check-alpha/bad/.keep +0 -0
  541. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/{gate-tests → scripts/gate-tests}/check-alpha/good/.keep +0 -0
  542. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/{gates.list → scripts/gates.list} +0 -0
  543. /package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/{site-config.sh → scripts/site-config.sh} +0 -0
  544. /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{tree → docs}/CNAME +0 -0
  545. /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{tree → docs}/index.md +0 -0
  546. /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{tree/docs → docs}/posts/2026-01-01-legacy.md +0 -0
  547. /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{tree/pkg → pkg}/gate-tests/fixture.md +0 -0
  548. /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{site-config.sh → scripts/site-config.sh} +0 -0
@@ -1,9 +1,12 @@
1
1
  # guard-kit — permission-friction reduction for agent sessions
2
2
 
3
- A permission prompt the human approves is invisible to the agent — nothing
4
- about it lands in the transcript, so the agent cannot notice, count, or fix
5
- the friction it causes. The cost lands on the operator, silently and
6
- per-prompt, and compounds as the command surface grows. The kit closes the
3
+ A command no allowlist entry matches is not refused — it is decided **out of
4
+ band**, by whatever a harness does when nothing matches: interrupt a human, or
5
+ run a model to judge the call. Either way that decision is invisible to the
6
+ agent — nothing about it lands in the transcript, so the agent cannot notice,
7
+ count, or fix the friction it causes — and either way it is paid per call, out
8
+ of the operator's attention or out of latency and tokens, compounding as the
9
+ command surface grows. The kit closes the
7
10
  loop: a `PreToolUse` guard decides at call time (block with a corrective
8
11
  message, steer to a better form, auto-allow the provably safe, log every
9
12
  fall-through), a scanner ranks the logged prompt sources, a curation pass
@@ -24,9 +27,9 @@ conventions without depending on its registry.
24
27
  1. **Call time** — the consumer's `bash-guard.sh` (copied from
25
28
  `templates/`, wired as the `PreToolUse(Bash)` hook) inspects each
26
29
  command: block, steer, rewrite, auto-allow, or fall through. Every
27
- fall-through — exactly the set of commands that may have prompted — is
28
- appended to the friction log. An *approved* prompt is invisible to the
29
- agent, so this log is the only record.
30
+ fall-through — exactly the set of commands whose decision was made out of
31
+ band — is appended to the friction log. That decision is invisible to the
32
+ agent whichever way it went, so this log is the only record.
30
33
  2. **Close time** — `bin/scan-prompts.sh` filters the log against the
31
34
  committed allowlist and ranks what survives (§scan-prompts states the
32
35
  local-overlay upper bound), grouped by command
@@ -40,6 +43,40 @@ conventions without depending on its registry.
40
43
  local `settings.local.json` stays near-empty, and the guard encodes the
41
44
  steering rules no static glob can express.
42
45
 
46
+ ### What the steering is buying
47
+
48
+ The guard's blocks **serialize**: a compound the agent wanted as one call becomes
49
+ several, and a convenient spelling becomes a written-out one. That cost is real
50
+ and paid every session, so the rationale is stated here rather than assumed — and
51
+ it is not "the agent would otherwise be interrupted". Steering does not stop a
52
+ decision from being *made*; it moves the call onto the path where the decision is
53
+ already made, the static match, and off the path where something else must decide.
54
+ Three things pay for the serialization, and none of them turns on *which* thing
55
+ decides:
56
+
57
+ - **The match short-circuits everything downstream.** An allow/ask/deny match
58
+ resolves the call there. Whatever a harness does with an unmatched command, the
59
+ matched form skips it — so the bare spelling is the cheaper one on every axis a
60
+ harness charges, without knowing which axis that is.
61
+ - **The match verdict is deterministic; the out-of-band one is not.** A steered
62
+ command's outcome is a property of a reviewed settings file, stable across
63
+ sessions and auditable without running anything. An unmatched command's outcome
64
+ is a judgment made per call. This is the half of the win that survives a harness
65
+ getting cheap at deciding.
66
+ - **The tool-hygiene rules are untouched by any of it.** Read over `cat`, Glob
67
+ over `find`, Grep over a working-tree `git grep`, `git rm` over `rm`, a scratch
68
+ dir over the repo root — each steers to a better tool or a safer form, and would
69
+ earn the guard's keep with no permission mechanism in the picture at all.
70
+
71
+ **The honest limit.** None of this is measured. Whether N matched calls beat one
72
+ unmatched call in wall-clock is an empirical question the kit does not answer, and
73
+ a harness whose unmatched path is cheap narrows the first bullet toward nothing.
74
+ The ruling therefore rests on the second and third, which do not turn on cost: the
75
+ guard is worth its serialization because it makes the outcome deterministic and
76
+ the tool choice better — not because it dodges an interrupt. A message that names
77
+ one harness's consequence is wrong in the same way whichever consequence it names,
78
+ which is why none of them do.
79
+
43
80
  ### The triage criterion
44
81
 
45
82
  Allowlist and guard are two tools with distinct jobs — resolve each
@@ -59,7 +96,7 @@ exists, steer to it in the guard rather than permitting the worse one.
59
96
  Note: the harness matches the allowlist **per segment** of a compound
60
97
  command, so a glob on the core command does not cover the `echo` banners,
61
98
  `wc`, redirects, or `;`-chained diagnostics wrapped around it — one
62
- unmatched segment re-prompts the whole line. The read-only banner/diagnostic
99
+ unmatched segment takes the whole line off the match path. The read-only banner/diagnostic
63
100
  tools an agent habitually chains (`echo`, `wc`, `grep`, `ls`, `command -v`)
64
101
  are therefore themselves legitimate allowlist entries; allowlist them, or
65
102
  run the core command bare.
@@ -72,6 +109,14 @@ Primitives a consumer guard composes; each emits the harness's
72
109
  - `guard_read_command` — parse the hook JSON on stdin, emit the command;
73
110
  **fail-open** on any parse problem (exit 0) so a guard can never wedge
74
111
  the agent.
112
+ - `guard_read_path` — the same accessor for `.tool_input.file_path`, the field a
113
+ path-bearing tool call carries where a Bash call carries a command. It returns
114
+ **non-zero, emitting nothing**, when the field is absent, empty, or the payload
115
+ will not parse — so a matcher covering a call without one falls through instead
116
+ of blocking. That return contract is the whole design: an accessor returning
117
+ success on a missing field passes every happy path and wedges every other call
118
+ its matcher covers. Generic over any path-bearing tool; it names no path and no
119
+ rule, which is what keeps the rule in the kit that owns the file.
75
120
  - `guard_block <msg>` — exit 2 with the message on stderr. Every block
76
121
  message is self-describing: it names the offending pattern *and* the
77
122
  corrective form, so the why of a rule rides to the agent in the rejection
@@ -87,17 +132,85 @@ Primitives a consumer guard composes; each emits the harness's
87
132
  the string matches a committed allow pattern, with the harness `:*` prefix
88
133
  idiom (`Bash(printf:*)` ≡ any `printf …`) normalized to a trailing `*`. Not a
89
134
  hook primitive — a shared helper, one implementation behind
90
- compare-settings-allow's redundancy detection and rule 14's silent-grant
135
+ compare-settings-allow's redundancy detection and rule 17's silent-grant
91
136
  guard so the two never drift.
137
+ - `guard_skeleton <cmd> <inert-class>…` — the context-aware normalizer, and the
138
+ only place a rule learns what part of a command is live. It returns the command
139
+ with every region of the named inert classes replaced by a placeholder token,
140
+ leaving everything else byte-identical. Four classes: **`sq`** (single-quoted
141
+ spans), **`dq`** (double-quoted spans), **`hd`** (heredoc bodies, from the line
142
+ after an opener to its terminator line), and **`hdq`** — the subset of `hd`
143
+ whose **delimiter is quoted** (`<<'EOF'`), where the shell itself guarantees
144
+ the body does not expand. `hdq` exists because that guarantee is what lets the
145
+ one rule that must keep heredoc bodies live keep only the bodies that can
146
+ actually expand. Each rule names the classes inert **for it**, in one argument, at one
147
+ call site — the classes were never the disagreement, since every rule agrees
148
+ that *some* regions are inert; the disagreement was that each decided privately
149
+ and none recorded why. Not a hook primitive, and a pure function of its
150
+ arguments: no config read, no subprocess, no global.
92
151
  - `guard_split_compound <skeleton>` — the compound splitter: emits one segment
93
152
  per line, splitting on the harness's statement separators (`;`, `&&`, `||`,
94
153
  `|`). Also not a hook primitive — the single implementation every consumer
95
- that reasons *per segment* shares (rules 8/14/16, the read-compound carve-out
96
- of rules 9/10, and scan-prompts' `allowed()`), so the harness's per-segment
97
- matching surface is modelled in exactly one place and cannot drift between
98
- them. Fed a quote-stripped skeleton (`'…'`/`"…"` regions already neutralized
99
- by the caller, as every rule does), so a separator inside a quoted argument is
100
- never mistaken for a statement break.
154
+ that reasons *per segment* shares (rules 8/12/14/16/17/19, the read-compound
155
+ carve-out of rules 9/10, and scan-prompts' `allowed()`), so the harness's
156
+ per-segment matching surface is modelled in exactly one place and cannot drift
157
+ between them. Fed a `guard_skeleton` view, so a separator inside a quoted
158
+ argument is never mistaken for a statement break. Its separator class carries
159
+ **no newline**, and it does not need one: it *emits* segments as lines and
160
+ every consumer reads lines, so a newline already present in the input is
161
+ already a boundary before the substitution runs.
162
+
163
+ **Placeholder, never deletion, and this is a correctness point rather than
164
+ taste.** Deleting an inert span **fuses adjacent tokens**: a pattern glued to its
165
+ flag loses the boundary between them and the residue reads as one word that was
166
+ never in the command. The normalizer substitutes, so the skeleton has the same
167
+ token count and the same statement structure as the command it models.
168
+
169
+ **The heredoc class marks the body extent only.** The opener line and everything
170
+ after the terminator stay fully live, so a heredoc-bearing call is still matched
171
+ on its executable text — neither blanking everything after a `<<` (which blinds
172
+ the guard to real commands in the same call) nor stripping quotes alone (which
173
+ still refuses a double-quoted mention). The extent is decidable without a shell
174
+ parser because the terminator is a literal token alone on its line, which is the
175
+ property the class rests on.
176
+
177
+ **Two bounds, stated rather than discovered later.** A heredoc with an
178
+ **unquoted** delimiter does expand, so `hd` is not inert for the expansion rule
179
+ even though it is inert for every glyph rule — which is why classes are declared
180
+ per rule and not fixed per region, and why the rule that cannot take `hd` takes
181
+ `hdq` instead rather than going without. Only the delimiter's quoting decides
182
+ this, never the body's content, so the test is decidable at the opener; a
183
+ delimiter escaped rather than quoted (`<<\EOF`) is not recognized and its body
184
+ stays live, which is the conservative direction. And the normalizer models **quoting, not
185
+ shell semantics**: a construct that survives its scan and is not one of the three
186
+ classes is treated as live, the fail-toward-matching direction and the one a
187
+ guard should err in. That bound is why the command/process-substitution and
188
+ backtick tests in rules 9, 10, 11, 12, 13, 14, 16 and 19 read the **raw** command
189
+ rather than
190
+ a skeleton and must keep doing so — a `"$(…)"` inside double quotes still
191
+ executes, so a rule that declared `dq` inert for *that* test would hand an
192
+ auto-allow to a command substitution it could not see. Those tests are
193
+ conservative declines, not verdict matching.
194
+
195
+ **Rule 12 is the one rule that reaches its verdict off the raw command, and the
196
+ exception is forced rather than chosen.** Its predicate is *the pattern literal
197
+ `-f` will scan argv for*, and a skeleton replaces exactly that literal with a
198
+ placeholder — the quoted operand is the normal spelling — so a skeleton view
199
+ would blind the rule to the only thing it tests. It pays for the exception in the
200
+ same conservative direction every other clause takes: it declines outright on any
201
+ expansion, substitution or backtick (rule 6 blocks those shapes anyway), and a
202
+ pattern operand carrying a stray quote — the evidence that the compound split
203
+ landed *inside* a quoted span — declines rather than guesses at the operand.
204
+
205
+ **The payload carries the live permission mode, and no accessor above reads it.**
206
+ `PreToolUse` delivers `permission_mode` alongside the fields
207
+ `guard_read_command` and `guard_read_path` pick off, so a rule whose rationale is
208
+ mode-*conditional* — "no allowlist entry can suppress this prompt" is false under
209
+ an auto-approving mode and true under the others — currently asserts a mode
210
+ rather than reading one. Recorded here because it is a fact about this framework's
211
+ own inputs: without it, each session re-establishes it from the vendor hook
212
+ reference. Whether a guard *should* read the mode is a consumer decision and is
213
+ not settled here.
101
214
 
102
215
  Fail-open is the default posture. The one sanctioned fail-closed shape is a
103
216
  deny-guard whose hook *matcher* already proves the tool identity (see
@@ -126,6 +239,18 @@ dispatch-shape rules; guard-kit mechanism **does** move for that one, by
126
239
  exactly one clause — the fail-open-but-loud posture above, which it is the
127
240
  shipped instance of (delegation-kit/SPEC.md §The delegation model).
128
241
 
242
+ lifecycle-kit is the fourth consumer, on the same axis: its
243
+ `templates/workflow-state-guard.sh` is a `PreToolUse(Write|Edit)` hook refusing a
244
+ direct write to the lifecycle state file, and guard-kit mechanism **does** move
245
+ for it, again by exactly one clause — `guard_read_path` above. Nothing else was
246
+ missing: `guard_block` and `guard_advise` never read a command, so they were
247
+ already tool-agnostic. This is the rule the three consumers now make explicit —
248
+ **the kit owning the rule ships the guard**, riding `lib/guard.sh` through the
249
+ `GUARD_KIT_LIB` indirection, and guard-kit moves only where the lib lacks a
250
+ primitive. The state file's path lives with lifecycle-kit, never here, so
251
+ guard-kit gains no dependency on a kit it does not otherwise know about
252
+ (lifecycle-kit/SPEC.md §check-stage-evidence).
253
+
129
254
  ## Consumer rules
130
255
 
131
256
  A consumer's project-specific block/steer/allow rules live in its copy of
@@ -140,18 +265,60 @@ and names none. What a project blocks or steers is its own toolchain knowledge
140
265
  and stays in its copy, which is why the copy legitimately diverges from the
141
266
  template here and why no rule content crosses into the kit.
142
267
 
268
+ **Placement is a verification decision before it is a seam one, and this is the
269
+ sentence that makes the contract usable.** The generic lane carries §Testing's
270
+ decision-table obligation — every rule there owes a firing and a non-firing case,
271
+ and the table is the only instrument that reads a *block* at all. The consumer
272
+ lane carries none: a rule in a consumer's copy is reachable by no table in this
273
+ kit, so it ships hand-verified and its narrowing cannot be measured. A rule that
274
+ qualifies for either lane therefore belongs in the generic one. That a consumer's
275
+ own rules have no verification lane at all is a real gap and a separate one; it
276
+ is named here rather than solved, since solving it designs a testing lane for
277
+ consumer copies.
278
+
143
279
  ## The generic ruleset
144
280
 
145
- Rules that encode **harness behavior**, not any project's toolchain —
146
- shipped as `lib/guard.sh` functions the template guard invokes. Order is
147
- load-bearing where noted.
281
+ Rules that encode **harness behavior, shell-substrate behavior, or behavior over
282
+ an artifact whose grammar a kit owns**, never any project's toolchain — shipped
283
+ as `lib/guard.sh` functions the template guard invokes. Order is load-bearing
284
+ where noted.
285
+
286
+ **The clause has taken two widenings, and each is recorded with the rule that
287
+ forced it, because a rule slipped in unremarked is what would rot it.**
288
+
289
+ - **The shell-substrate half was added for rule 12, and it admits nothing a
290
+ project owns.** A `-f` pattern match seeing the matcher's own argv is a
291
+ property of the shell substrate every consumer of this kit runs on — neither
292
+ harness behavior nor any project's toolchain — so the narrower sentence left
293
+ it in a gap it had no reason to leave.
294
+ - **The kit-artifact half was added for rule 14, and it takes the same form and
295
+ passes the same test.** Rule 14 is neither of the two earlier classes as they
296
+ were written: what it reads is evidence-kit's `pid=<n> run=<key>` record and
297
+ the OS's process table. It interprets **no project vocabulary at all** — it
298
+ reads a PID and asks whether it is alive — so the test rule 12's widening had
299
+ to pass is the test this one passes: **it admits nothing a project owns**. A
300
+ kit's own artifact grammar is shipped mechanism, which is exactly what
301
+ CLAUDE.md §The provenance seam distinguishes from private rule content.
302
+
303
+ A project's toolchain stays out on the same words as before, under both.
304
+
305
+ **Naming one harness's forms in a corrective costs portability, not privacy, and
306
+ the cost is recorded rather than pre-paid.** Rule 13's block message names a
307
+ backgrounded condition wait and the harness's event-stream form, because a
308
+ corrective that named neither would be unfollowable. A harness tool name is
309
+ public, documented, and shared by every consumer of that harness, so it is not
310
+ private rule content and the provenance seam — a privacy boundary over private
311
+ vocabularies (CLAUDE.md §The provenance seam) — does not reach it. What such a
312
+ literal does cost is portability: a second harness with different form names is
313
+ what would force these into a configurable slot, and building that slot before
314
+ that harness exists would be designing against no case.
148
315
 
149
- 1. **`cd` in a compound command** — blocked: cwd drift plus a permission
150
- prompt no allowlist entry suppresses. Corrective form: absolute paths,
151
- or `git -C <dir>` for git.
316
+ 1. **`cd` in a compound command** — blocked: cwd drift, plus a compound the
317
+ allowlist cannot match, so the call is decided out of band. Corrective form:
318
+ absolute paths, or `git -C <dir>` for git.
152
319
  2. **`git -C <repo-root>` when cwd is the root** — blocked: the absolute
153
- `-C` target matches no allowlist entry and re-prompts, while the bare
154
- `git` form is allowlisted. Pinned with a trailing space to the exact
320
+ `-C` target matches no allowlist entry and falls off the match path, while
321
+ the bare `git` form is allowlisted and resolves on it. Pinned with a trailing space to the exact
155
322
  root, so `git -C <root>/subdir` and a foreign-repo `-C` are untouched.
156
323
  3. **Bare-name scratch redirect** — a `>`/`>>` to a slash-free
157
324
  `*.err`/`*.out`/`*.log` target is blocked (it lands in the tracked tree
@@ -168,16 +335,35 @@ load-bearing where noted.
168
335
  the literal repo-root prefix is steered to the repo-relative spelling.
169
336
  `git` is excluded — rule 2 already owns its `-C` handling.
170
337
  6. **Shell expansion / assignment** — a residual `${…}`/`$(…)`/`<(…)`/
171
- `$NAME` after single-quoted regions are stripped is blocked (the harness
172
- prompts on every expansion before allowlist matching). Only
173
- *single*-quoted regions are stripped: inside single quotes `$` is
174
- literal (`awk '$1'`), but a double-quoted `"$x"` still expands and must
175
- stay visible. A standalone `NAME=value` assignment is caught separately,
176
- since the expansion check only sees a *used* `$VAR`.
177
- 7. **Unquoted brace glyph** — the harness prompts on the bare `{` glyph
338
+ `$NAME` in the skeleton is blocked (the harness's matcher refuses every
339
+ expansion before allowlist matching). **Declares `sq hdq`** for the expansion
340
+ check and **`sq dq hdq`** for the assignment check, and every part of that is
341
+ deliberate rather than inherited. `dq` stays live for the expansion check:
342
+ inside single quotes `$` is literal (`awk '$1'`), but a double-quoted `"$x"`
343
+ still expands and must stay visible. `hd` is **not** declared, since an
344
+ unquoted-delimiter heredoc body expands too — but `hdq` is, because a
345
+ **quoted** delimiter makes the shell itself the guarantee that the body
346
+ cannot expand. That is what stops the rule refusing prose that merely
347
+ *names* a substitution: a journal entry, a queue entry being appended, or a
348
+ commit message written through `git commit -F - <<'MSG'`. The assignment
349
+ check adds `dq` because a `NAME="value"` assigns whatever the quotes hold. A
350
+ standalone `NAME=value` assignment is
351
+ caught separately, since the expansion check only sees a *used* `$VAR`.
352
+ 7. **Unquoted brace glyph** — the harness's matcher refuses the bare `{` glyph
178
353
  before allowlist matching, the same behavior class rule 6 pre-empts for
179
- `$`-expansions, so a `{` surviving rule 6's single-quote strip is handled
180
- by shape. A **bare `{}` placeholder** (`find … -exec cmd {} +`,
354
+ `$`-expansions, so a `{` surviving in the skeleton is handled by shape.
355
+ **Declares `sq dq hd`, and the difference from rule 6 is the point rather
356
+ than an accident of two adjacent lines.** Rule 6's reason to keep
357
+ double-quoted spans live does not carry here: `{` is a **matcher glyph, not a
358
+ shell expansion**, so a double-quoted brace is exactly as inert as a
359
+ single-quoted one, and a heredoc-body brace is inert whatever the delimiter.
360
+ This is what stops a working POSIX quantifier (`grep -rnE "^[a-z]{2,}"`)
361
+ being refused, and it is equally what stops the **wrong corrective**: a block
362
+ message owes the offending pattern *and* the corrective form, and *write out
363
+ the brace expansion, spell the members* is inapplicable to a quantifier that
364
+ has no members and to a heredoc body that has nothing to respell. A block
365
+ whose corrective cannot be followed fails that contract however right its
366
+ verdict. A **bare `{}` placeholder** (`find … -exec cmd {} +`,
181
367
  `xargs -I{}`), when every residual brace is exactly `{}`, is rewritten
182
368
  via `guard_rewrite` — each `{}` single-quoted to `'{}'`,
183
369
  behavior-preserving (the shell passes a literal `{}` either way) and
@@ -186,12 +372,12 @@ load-bearing where noted.
186
372
  git-ref shorthand (`@{u}`, `@{-n}`, `<ref>@{n}`) names the explicit
187
373
  spelling (`origin/<branch>..HEAD`, or the resolved ref/hash);
188
374
  list/range (`{a,b}`, `{a..b}`) names the spelled-out members or a loop;
189
- any other residual `{` gets the generic corrective (single-quote if
190
- literal — an awk/sed program in double quotes — write it out if it
191
- expands). There is no legitimate brace-glob convenience to preserve:
192
- since every bare `{` already costs an operator prompt no allowlist entry
193
- can suppress, block-and-steer strictly dominates; only single-quoted
194
- (literal) braces pass untouched. **Placed before both auto-allow rules**
375
+ any other residual `{` gets the generic corrective (quote it if literal —
376
+ an unquoted awk/sed program — write it out if it expands). There is no
377
+ legitimate brace-glob convenience to preserve:
378
+ since every bare `{` already costs an out-of-band decision no allowlist entry
379
+ can suppress, block-and-steer strictly dominates; a brace in any inert region
380
+ passes untouched. **Placed before both auto-allow rules**
195
381
  so their literal-target premise holds for braces as well.
196
382
  8. **`sed` reading or rewriting a file** — blocked with the steer to the
197
383
  harness's file tools: `sed -i` (or any short bundle carrying `i`) to the
@@ -204,7 +390,7 @@ load-bearing where noted.
204
390
  so `-e`/`-f` consume their argument and the first bare operand is the script
205
391
  — a *second* bare operand is the file that fires the rule. **Placed before
206
392
  both auto-allow rules:** a consumer that widens `GUARD_KIT_RO_BINS` with
207
- `sed` would otherwise have rule 13 silently grant an in-place rewrite.
393
+ `sed` would otherwise have rule 16 silently grant an in-place rewrite.
208
394
  9. **Listing-only `find`** — a bare `find` that only lists is blocked with
209
395
  the steer to the harness's Glob tool (the same shape as rule 8's `sed`
210
396
  read-steer: a better tool exists, and Glob returns paths registered for a
@@ -217,7 +403,7 @@ load-bearing where noted.
217
403
  batch of independent listings, exactly what the Glob steer collapses into one
218
404
  call. A literal `echo`/`printf` banner segment between them is the natural
219
405
  separator of such a batch and is tolerated; at least one segment must be a
220
- listing. A piped `find` is a legitimate producer (rule 13 may still
406
+ listing. A piped `find` is a legitimate producer (rule 16 may still
221
407
  auto-allow it), an action-predicate `find` is an executor, a redirected
222
408
  `find` has a downstream reader, and a **mixed** compound (a segment that is
223
409
  neither a listing nor a banner) all pass untouched. **Placed before both
@@ -259,42 +445,204 @@ load-bearing where noted.
259
445
  this rule (the consumer disqualifies it). Conservative by construction: an
260
446
  unrecognized option-with-argument or a glued pattern flag biases toward
261
447
  passing, never a false steer of a history search.
262
- 12. **Auto-allow `: > file` truncation** — a leading `:` plus redirect
263
- defeats the permission matcher, so it always prompts. Granted silently
264
- when the command is *only* `:` followed by redirects and every target is
448
+ 12. **Self-matching process-liveness predicate** — a `pgrep`/`pkill -f` whose
449
+ pattern literal the command's own text repeats is **blocked**. `-f` matches
450
+ against full argv, and the waiter's own argv — the harness's wrapper included
451
+ — carries that literal, so `until ! pgrep -f '<script>'; do …; done` has a
452
+ permanently-true condition and never exits. It reds nothing: the work
453
+ completes correctly and the only symptom is the foreground cap absorbing an
454
+ unbounded loop, which reads from outside as a fixed cap-length wait. Fires on
455
+ the conjunction no allowlist glob expresses: a segment whose **command word**
456
+ is `pgrep` or `pkill` — read past a leading `until`/`while`/`if`/`!`, which do
457
+ not change which binary runs, so the loop-headed spelling the rule exists for
458
+ is reached — carrying `-f` (bare or bundled in a short cluster), whose pattern
459
+ operand is a literal occurring **elsewhere** in the same command. The
460
+ corrective names both sanctioned forms: wait on the work's own artifact, or
461
+ `kill -0` against a **recorded PID** where liveness genuinely is the condition
462
+ — whoever started that producer, a child the session backgrounded itself
463
+ included, whose PID it recorded at launch as a `<key>.run` record under its
464
+ scratch directory. That clause is owned by
465
+ delegation-kit/SPEC.md §The delegation model and this text carries it, the
466
+ record's naming convention included — rule 14 reads that same set, so a
467
+ corrective that named the PID but not where it lives would send a blocked
468
+ session to write the one artifact shape neither reader can find.
469
+ A PID is an identity; a pattern is a
470
+ guess about a process table that includes the guesser. The refusal of the
471
+ bracket-trick repair as the *sanctioned* form is delegation-kit's ruling and
472
+ its grounds live there (delegation-kit/SPEC.md §The delegation model); this
473
+ rule exists because a correct form one character from an incorrect one will be
474
+ got wrong. Conservative by construction, in this ruleset's established
475
+ directions: an expansion or substitution anywhere in the command declines
476
+ outright (rule 6 already blocks those shapes); a `pgrep` without `-f` matches
477
+ process **names** rather than argv and is untouched; an unrecognized option, an
478
+ option whose argument cannot be walked, or a second bare operand declines; and
479
+ a pattern occurring nowhere else in the command is a genuine query and passes.
480
+ Each biases toward passing rather than toward a false block. **Placed with the
481
+ read-steer rules and before both auto-allow rules**, on rule 8's stated
482
+ reasoning: `pgrep` is a plausible member of a widened `GUARD_KIT_RO_BINS` — it
483
+ is, after all, a read-only query — and a consumer who added it would otherwise
484
+ have rule 16 silently bless a waiter that can never exit.
485
+ 13. **Bare foreground `sleep`** — a `sleep` standing in for a wait is
486
+ **blocked**, and the discriminator is the whole rule: a blanket `sleep` block
487
+ is wrong and is refused. The sanctioned wait *is* a condition loop, and
488
+ `until <cond>; do sleep N; done` is expressly legitimate. So the rule fires on
489
+ exactly one shape — a bare foreground `sleep` in command position, outside
490
+ every loop wrapper — and never on a `sleep` inside a loop body. *The
491
+ discriminator is new territory:* no other rule in this ruleset parses shell
492
+ keywords. This one takes the skeleton view (so a `sleep` merely *named* in a
493
+ quoted span or a heredoc body is already inert), then walks it for `do … done`
494
+ spans and treats a `sleep` inside one as **inert** — structurally the carve-out
495
+ `_guard_is_banner` already performs for `echo`/`printf` segments in the batched-read
496
+ rules, applied to a keyword span instead of a segment. A `sleep` outside every
497
+ such span fires. Where the wrapper cannot be resolved — an unbalanced `do`/`done`,
498
+ or a span the rule cannot attribute — it **declines**, the direction every
499
+ other conservative clause here takes; a `sleep` that is an *argument* rather
500
+ than a command word never fires at all. **Blocks** rather than advises, on
501
+ rule 17's reasoning: no consumer allowlist is presumed to grant a bare
502
+ `sleep`, so the rule fires on a command that would be decided out of band
503
+ anyway and converts that decision into a durable steer at no extra cost. *The
504
+ corrective names the property and both forms* rather than one spelling: a wait
505
+ must end when its condition goes true, not when a duration expires; a
506
+ backgrounded command that *exits* on the condition fires one notification the
507
+ moment the condition holds, while the harness's event-stream form stays armed
508
+ to its deadline even after its event fires and is therefore the wrong tool for
509
+ a single completion. Naming one form teaches a spelling; naming the property
510
+ and sorting both under it teaches the rule — the discriminator is owned by
511
+ delegation-kit/SPEC.md §The delegation model. **Placed with rule 12, before both
512
+ auto-allow rules,** for the same reason: `sleep` is not on the default
513
+ read-only roster, but the placement argument is about what a consumer may add
514
+ and the whole family of steer rules already sits there.
515
+ 14. **Tracked-tree mutation under a live producer** — a `git` command that
516
+ writes the index, the worktree or a ref is **blocked** while a `*.run`
517
+ record under a `GUARD_KIT_SCRATCH_DIRS` member names a live PID. The record
518
+ is the launch-time liveness record a session writes when it backgrounds a
519
+ shell child (delegation-kit/SPEC.md §The delegation model owns that rule;
520
+ evidence-kit/SPEC.md §The producer-liveness lock owns the `pid=<n>
521
+ run=<key>` grammar and the PID predicate, and neither is re-decided here).
522
+ **The act set is bounded and named rather than gestured at**: `add`,
523
+ `commit`, `rm`, `mv`, `restore`, `checkout`, `switch`, `reset`, `stash`,
524
+ `merge`, `rebase`, `cherry-pick`, `revert`, `apply`, `am`, `clean`.
525
+ Read-only git — `status`, `log`, `diff`, `show`, `rev-parse`, `ls-files` —
526
+ passes, and so does every non-`git` command. **`Write`/`Edit` are
527
+ deliberately outside the rule**: a mutating session's mandated journal write
528
+ lands through them and the scratch directory is gitignored, so a rule
529
+ reaching them would refuse the very mechanic the resume-journal contract
530
+ requires *while a wait is in progress*.
531
+ **This is the enforcement half of the waiting rule, and it works by
532
+ relocation.** The turn-end itself passes no chokepoint and stays unreachable
533
+ (delegation-kit/SPEC.md §Operative residency); the **harm** it causes
534
+ arrives as an ordinary tool call at a chokepoint already wired, which is
535
+ what this rule fires on.
536
+ **Why the block is right even though it over-reaches, stated rather than
537
+ softened.** A read-only producer takes no harm from a commit, and the record
538
+ cannot say which kind it is. This ruleset's established direction is to bias
539
+ toward passing; that direction is **not** taken here, and the ground is that
540
+ the biased-toward-passing reading is what has failed every time this rule
541
+ fired. The corrective is cheap and names both exits: **wait for the producer
542
+ on its own artifact, or delete the record if the producer is done** — and
543
+ deleting a record whose producer has exited is not a workaround, it is the
544
+ statement of fact becoming false and being retracted.
545
+ **Conservative in this ruleset's other established directions**, which are
546
+ kept: an expansion or substitution anywhere in the command declines outright
547
+ (rule 6 already blocks those shapes); a record that does not parse declines
548
+ rather than blocks, because a guard is not the place a corruption verdict is
549
+ taken and `check-producer-liveness` already exits 2 on one; git's global
550
+ options are walked so `git -C <dir> commit` is reached, but an option the
551
+ walk does not recognize declines rather than guess which token is the
552
+ subcommand; and an unrecognized `git` subcommand declines. Each biases
553
+ toward passing rather than toward a false block, which is the calibration
554
+ the previous paragraph departs from **only** on the read-only producer.
555
+ **Placed with rules 12 and 13, before every auto-allow rule.** It is the
556
+ third member of the wait-discipline family and inherits their placement
557
+ argument (`git` is not on the default `GUARD_KIT_RO_BINS` roster, but a
558
+ consumer that widened it would otherwise have the read-only-pipeline rule
559
+ silently grant the mutation). **Two collisions make the placement necessary
560
+ rather than tidy**, and both are with rules that sit *after* the
561
+ auto-allows: rule 17 would block a chained `git commit` first and hand back
562
+ *run it bare* — a corrective that is wrong under a live producer and that
563
+ the session can follow; and rule 18 **advises** on `git commit --amend`, so
564
+ a rewrite under a live producer would proceed with a re-verification steer
565
+ instead of stopping.
566
+ 15. **Auto-allow `: > file` truncation** — a leading `:` plus redirect
567
+ defeats the permission matcher, so it is always decided out of band. Granted
568
+ silently when the command is *only* `:` followed by redirects and every target is
265
569
  gitignored (`git check-ignore`): truncating scratch is safe; a tracked
266
- file must still prompt. The `git` subprocess is gated behind the rare
570
+ file must still take that decision. The `git` subprocess is gated behind the rare
267
571
  `:`-redirect match; expansions (rule 6) and brace forms (rule 7) are
268
572
  already blocked, so a surviving target is a literal path.
269
- 13. **Auto-allow read-only pipeline** — granted silently when every pipe
573
+ 16. **Auto-allow read-only pipeline** — granted silently when every pipe
270
574
  segment leads with a roster binary (`GUARD_KIT_RO_BINS`, default the
271
575
  grep/head/cat/find/jq family) and every redirect target is `/dev/null`
272
- or an fd-dup. Conservative by construction: command/process
273
- substitution, a leftover quote after stripping, any statement separator,
274
- a non-`/dev/null` redirect, or a `find` with a write action all refuse
275
- and fall through.
276
- 14. **Decorated allowlisted command** — the leading command exactly matches a
576
+ or an fd-dup. Declares `sq dq hd`. Conservative by construction:
577
+ command/process substitution, a leftover quote after normalization, any
578
+ statement separator, a non-`/dev/null` redirect, or a `find` with a write
579
+ action all refuse and fall through. **`xargs` is on the roster but is not
580
+ a text filter — it executes a command** — so it carries a discriminator
581
+ rather than riding the leads-with test: an `xargs` segment counts read-only
582
+ only when the command it runs is itself a roster binary (or absent, since
583
+ bare `xargs` defaults to `echo`). Without it, roster membership alone would
584
+ silently grant `find . -type f | xargs rm -rf` and
585
+ `grep -rln foo src | xargs sed -i s/a/b/`. Unrecognized `xargs` options and
586
+ a nested `xargs` decline rather than guess. The discriminator makes an
587
+ `xargs` segment exactly as safe as the segment it runs and no safer, which
588
+ is the honest bound: roster membership does not by itself prove an
589
+ *invocation* read-only (`sort -o` writes a file), and that weaker predicate
590
+ is a separate, already-filed gap this rule inherits rather than introduces.
591
+ Two carve-outs widen the grant, and
592
+ neither widens it past what the segment-by-segment safety argument already
593
+ covers:
594
+ - **A literal `echo`/`printf` banner segment is skipped**, the tolerance
595
+ rules 9 and 10 already carry on the stated ground that a banner is the
596
+ natural separator of a batched read; `_guard_is_banner` is shared and this
597
+ is its third caller. The asymmetry was the accident, not the tolerance. At
598
+ least one non-banner roster segment must remain, so a banner-only pipeline
599
+ is not granted.
600
+ - **The lead segment may instead be a bare committed allow entry** — an
601
+ exact `Bash(<cmd>)` with no glob, on rule 17's own reasoning that a
602
+ glob-headed family coexists with allowlisted decorators and would admit
603
+ far more than the reviewed command. The shape this repairs is an
604
+ allowlisted script piped into `head`: the lead is statically allowlisted,
605
+ so it was reviewed; every tail segment leads with a roster binary, so it
606
+ is read-only. The widened lead applies **only where something decorates
607
+ it** (more than one segment): an undecorated allowlisted command already
608
+ resolves on the static match, and intercepting it here would take it off
609
+ the friction log for no gain. Reads `GUARD_KIT_SETTINGS`, and the
610
+ **fail-open contract travels with the read**: no `jq`, no settings file,
611
+ or a parse error and the lead-widening silently declines, leaving the rule
612
+ exactly as it behaves without it. A grant that depends on a settings read
613
+ must never turn a missing settings file into a grant, and declining is the
614
+ only direction that cannot.
615
+ 17. **Decorated allowlisted command** — the leading command exactly matches a
277
616
  committed **bare** allow entry (a `Bash(<cmd>)` with no `:*`/`*` glob) but
278
617
  the command decorates it — `&&`/`;`/`|` chaining, a trailing redirect, or
279
- `2>&1` — which forces a permission prompt no allowlist entry suppresses.
618
+ `2>&1` — which leaves a segment nothing grants, so the whole call falls off
619
+ the match path and is decided out of band, and no allowlist entry pre-empts that.
280
620
  **Blocked** with the steer *run it bare — the bare form is statically
281
- allowed; the decoration forces a prompt.* Block, not advise: the rule fires
282
- only on commands that would prompt anyway, so blocking converts the prompt
283
- into a durable steer at no extra interrupt, and an advise would *grant* the
621
+ allowed; the decoration is what costs the decision.* Block, not advise: the rule fires
622
+ only on commands that were going to be decided out of band anyway, so blocking
623
+ converts that decision into a durable steer at no extra cost, and an advise would *grant* the
284
624
  decorated command (its extra segments the allowlist never reviewed).
285
625
  **Bare leads only:** a glob-headed family (`Bash(git log:*)`) coexists with
286
626
  allowlisted decorators, so only an exact bare entry qualifies as the lead;
287
627
  widening to glob leads is possible later without a new name. **Never
288
628
  intercepts a silent grant:** the harness matches per segment, so a compound
289
- whose every segment matches the committed allowlist is granted without a
290
- prompt and blocking it would regress — the rule therefore fires only when a
629
+ whose every segment matches the committed allowlist resolves on the match
630
+ and blocking it would regress — the rule therefore fires only when a
291
631
  non-leading segment (or a redirect on the lead) fails to match any committed
292
632
  allow entry, reusing `guard_allow_match`'s shell-glob semantics. Reads
293
633
  `GUARD_KIT_SETTINGS`; **fail-open** — no `jq`, no settings file, or a
294
634
  parse error and the rule silently declines and falls through. Placed after
295
- the auto-allow rules (12, 13) so a silently granted read-only pipeline never
296
- reaches it.
297
- 15. **Git history-rewrite advisory** — a `git commit` carrying `--amend`, `-F`,
635
+ the auto-allow rules (15, 16) so a silently granted read-only pipeline never
636
+ reaches it — which is also **why the allowlisted-lead grant lives in rule 16
637
+ and not here**. Grant, not fall-through, is what removes the friction of an
638
+ allowlisted command decorated only by a read-only reduction of its own
639
+ output, and this rule's own text refuses to grant, correctly: granting here
640
+ would bless segments the allowlist never reviewed. Rule 16 is already the
641
+ sanctioned place for a grant of exactly that shape and is already ordered
642
+ ahead of this rule, so a granted pipeline never arrives and nothing
643
+ ungranted becomes granted that either half would not have granted alone.
644
+ Declares `sq dq hd`.
645
+ 18. **Git history-rewrite advisory** — a `git commit` carrying `--amend`, `-F`,
298
646
  or `--file`, or a `git reset --soft`, gets a `guard_advise` steer carrying
299
647
  the checklist from DOCTRINE.md's *Re-verify volatile state before a git
300
648
  history rewrite* rule (verify HEAD before amend/squash; re-stage and verify
@@ -302,31 +650,40 @@ load-bearing where noted.
302
650
  this turn). Advisory, not a block: each is a legitimate command, so the rule
303
651
  injects the re-verification context and lets the command proceed. The
304
652
  DOCTRINE.md rule is cited by **name**, not number — the doctrine's craft
305
- rules renumber as it grows, and this ruleset carries its own rule 15, so a
306
- doc-qualified number would both rot on a renumber and read ambiguously
653
+ rules renumber as it grows, and this ruleset renumbers on its own account
654
+ too — this rule's own number moved when rules 12 and 13 were inserted ahead
655
+ of it, and again when rule 14 was — so a
656
+ doc-qualified number would rot on either renumber and read ambiguously
307
657
  against the local numbering. Placed
308
- after the auto-allow rules (12, 13) and the decorated-allowlist rule (14),
658
+ after the auto-allow rules (15, 16) and the decorated-allowlist rule (17),
309
659
  so it fires only on a bare rewrite command none of those claimed; a
310
- decorated form meets rule 14's block first and the advisory fires on the
660
+ decorated form meets rule 17's block first and the advisory fires on the
311
661
  re-issued bare command.
312
- 16. **Bare `rm` of a tracked path** — an `rm` statement naming a git-tracked
662
+ 19. **Bare `rm` of a tracked path** — an `rm` statement naming a git-tracked
313
663
  file (`git ls-files --error-unmatch`) is **blocked** with the steer to
314
664
  `git rm -q <path>`, which deletes and stages that one deletion in a single
315
665
  motion. The deletion is the point: a bare `rm` leaves it unstaged, so it
316
666
  lands only via a later `git add -A` — the form the shared-index discipline
317
667
  warns against, since it sweeps a concurrent session's foreign path into the
318
- commit. Block, not advise, on rule 14's reasoning: no consumer allowlist is
319
- presumed to grant `rm`, so the rule fires on a command that would prompt
320
- anyway and converts the prompt into a durable steer. Fires per statement
668
+ commit. Block, not advise, on rule 17's reasoning: no consumer allowlist is
669
+ presumed to grant `rm`, so the rule fires on a command that would be decided
670
+ out of band anyway and converts that decision into a durable steer. Fires per statement
321
671
  (`;`/`&&`/`||`/`|` split), so a decorated form steers on the same premise as
322
672
  the bare one. Conservative by construction: expansions and backticks decline
323
673
  outright (rule 6 already blocks them), option words are skipped, and a
324
674
  tracked *directory* under `rm -r` does not match `--error-unmatch` — each
325
675
  biases toward passing rather than a false steer. An untracked or gitignored
326
676
  target never matches, so scratch deletion is untouched.
327
- 17. **Fall-through logging** — anything neither blocked nor auto-allowed is
677
+ 20. **Fall-through logging** — anything neither blocked nor auto-allowed is
328
678
  appended to the friction log. Always last; never affects the decision.
329
679
 
680
+ **Nothing above claims the sleep half was already enforced.** Before rule 13, no
681
+ rule in this ruleset enforced the never-poll rule's `sleep` half and rule 13 is
682
+ the first; whether a mechanism *outside* a consumer's tree blocks a foreground
683
+ `sleep` is an open question, unprobed as to cause, and no clause here rests a
684
+ coverage claim on one. The rule is built as though nothing outside the tree
685
+ enforced it — the only construction that is correct whichever way that resolves.
686
+
330
687
  ### Consumer rules
331
688
 
332
689
  Project rules — build-cache hygiene, container-build concurrency,
@@ -339,9 +696,11 @@ steering rule must precede the broader rule that would catch the same
339
696
  command less precisely. A third, on the match surface: a substring rule
340
697
  sees the entire tool input, heredoc bodies included, so prose that merely
341
698
  *names* a guarded command — a `git commit -F -` message describing one —
342
- false-blocks. Match against a quote-stripped copy of the command (quoted
343
- spans may then name anything), and keep longer prose out of the match
344
- surface via a quoted `-m` span or a `-F <file>` the hook never reads.
699
+ false-blocks. Match against a `guard_skeleton` view naming the classes inert
700
+ for the rule (`sq dq hd` for any rule that does not itself test for an
701
+ expansion), which neutralizes quoted spans and heredoc bodies alike, and keep
702
+ longer prose out of the match surface via a quoted `-m` span or a `-F <file>`
703
+ the hook never reads.
345
704
 
346
705
  ## scratch-run
347
706
 
@@ -349,7 +708,7 @@ surface via a quoted `-m` span or a `-F <file>` the hook never reads.
349
708
  themselves open. The generic ruleset pushes probes and multi-line sweeps
350
709
  into the consumer's gitignored scratch dir (`GATE_SDK_TMP_DIR`) and refuses
351
710
  the harness scratchpad by name — yet nothing allowlists *executing* what
352
- lands there, so every run of a steered-to script prompts, forever. The
711
+ lands there, so every run of a steered-to script is decided out of band, forever. The
353
712
  runner is the fixed, allowlistable path that ends it: given a target inside
354
713
  the scratch dir it **echoes the script's contents to stdout** (a header
355
714
  naming the path, then the body), then **executes it**, passing stdout,
@@ -359,7 +718,7 @@ without interpreting them.
359
718
  The echo is the point, not a convenience. A bare scratch-glob allowlist
360
719
  would auto-approve executing any script at that path with its contents
361
720
  visible only in an earlier write call — turning a visible command into a
362
- silent *and* opaque one, the opposite of what the prompt was buying.
721
+ silent *and* opaque one, the opposite of what the permission decision was buying.
363
722
  Echo-at-execution makes the silent run **self-documenting**: the executed
364
723
  lines land in the transcript at the moment they run, which is the evidence
365
724
  surface a supervisor's post-commit review reads. Steering the agent to
@@ -376,14 +735,14 @@ as a convenience: the generic rules that would refuse an expansion-bearing
376
735
  one-liner do not reach the same code once it sits inside a scratch file.
377
736
  The echoed body is the **compensating control**, and it relocates review
378
737
  rather than removing it — from *before* execution, where the permission
379
- prompt put it, to *after*, in the transcript a supervisor reads. That is
738
+ decision put it, to *after*, in the transcript a supervisor reads. That is
380
739
  the actual posture of the entry, and a consumer unwilling to move review
381
- downstream should simply not add it: the tool still runs without it, and
382
- still prompts.
740
+ downstream should simply not add it: the tool still runs without it, and its
741
+ runs still take that decision.
383
742
 
384
743
  **Fail-closed on reach.** A target resolving outside the scratch dir is
385
744
  refused before any echo or execution, so the tool cannot become a general
386
- "run this arbitrary path without a prompt" bypass: its reach is exactly the
745
+ "run this arbitrary path unreviewed" bypass: its reach is exactly the
387
746
  scratch surface the guard already steers into. The test reads the
388
747
  *resolved* path, never the spelling, so a traversal out of the dir refuses
389
748
  like any other outsider. Refusal, an absent target, and a missing argument
@@ -396,7 +755,7 @@ path is that consumer's settings, never a kit literal.
396
755
 
397
756
  ## scan-prompts
398
757
 
399
- Advisory: surfaces recurring permission-prompt sources from the friction
758
+ Advisory: surfaces recurring permission-friction sources from the friction
400
759
  log, filtering against **both** settings files (`GUARD_KIT_SETTINGS` and
401
760
  `GUARD_KIT_SETTINGS_LOCAL`) and the harness's built-in read-only git/docker
402
761
  auto-allows. Matching is **per compound segment**, the same surface the
@@ -406,6 +765,13 @@ spans a compound the harness would split and refuse — `Bash(git status:*)`
406
765
  against `git status && rm -rf x` — does not read as allowed and is counted as
407
766
  prompting.
408
767
 
768
+ **What "prompting" names in this tool's output.** The word is the tool's shipped
769
+ vocabulary and stays as it is; what it counts is the set of calls **nothing in the
770
+ allowlist grants**, whose decision the harness therefore made out of band. On a
771
+ harness that interrupts, that set is literally the prompts; on one that decides
772
+ another way, it is the same set under an inherited name. The count is the same
773
+ number either way, and it is the number the triage criterion reads.
774
+
409
775
  The friction log's fall-throughs split three ways:
410
776
  - **Committed-covered** — every segment matches the committed allowlist or a
411
777
  harness built-in. Silently granted, reinforced; off every list.
@@ -433,7 +799,7 @@ close-stage audit. A committed pattern subsumes a local entry when the
433
799
  local string matches it under shell-glob semantics; the harness `:*` prefix
434
800
  idiom (`Bash(printf:*)` ≡ any `printf …`) is normalized to a trailing `*`
435
801
  so one glob test covers both forms — the match core is `guard_allow_match`
436
- in `lib/guard.sh`, shared with rule 14. Read-only — reports candidates, never
802
+ in `lib/guard.sh`, shared with rule 17. Read-only — reports candidates, never
437
803
  mutates (the operator prunes). It is the detector, not the policy: a
438
804
  non-redundant local entry can still be one-off junk worth pruning by
439
805
  judgment.
@@ -467,6 +833,17 @@ place holds back for an attested miss. What replaces the gate is a scheduled
467
833
  reader — §The close-stage triage step — the same mechanism the redundancy
468
834
  criterion has relied on since it shipped.
469
835
 
836
+ **That ruling is about this subject, not about allow-list checking generally**,
837
+ and the boundary is stated because the section otherwise reads as covering the
838
+ whole surface and the next reader re-derives it. Both clauses are load-bearing
839
+ and both fail on the *committed* file: it is tracked, so CI sees it, and "does
840
+ this path exist" is a binary filesystem fact no operator intent can move. A
841
+ committed-allow-list predicate of that shape is therefore gated, and gated
842
+ elsewhere — context-kit/SPEC.md §check-settings-paths, with the kit that already
843
+ owns the committed settings file as a gate subject. This kit holds the three
844
+ `.permissions.allow[]` readers in the tree and still ships no gates; co-location
845
+ by parsing technique does not outrank placement by governed surface.
846
+
470
847
  `--count` emits both bare counts on one line, redundancy first and breadth
471
848
  second.
472
849
 
@@ -592,8 +969,9 @@ repo's layout as defaults):
592
969
  consumer's vocabulary, never the kit's (CLAUDE.md §The provenance seam).
593
970
  - `GUARD_KIT_RO_SCRIPTS` — array of globs eligible for the
594
971
  absolute→relative rewrite (rule 4); default `("check-*.sh")`.
595
- - `GUARD_KIT_RO_BINS` — read-only pipeline roster (rule 13); default the
596
- grep/head/cat/find/jq family.
972
+ - `GUARD_KIT_RO_BINS` — read-only pipeline roster (rule 16); default the
973
+ grep/head/cat/find/jq family, plus `xargs`, whose membership is qualified by
974
+ rule 16's discriminator rather than granting on the leads-with test alone.
597
975
  - `GUARD_KIT_SCRATCH_DIRS` — gitignored scratch dirs named in the
598
976
  rule-3 corrective message; default `(".tmp")`.
599
977
 
@@ -609,7 +987,24 @@ decision (`block`/`advise`/`allow`/`rewrite`/`fallthrough`) with a command;
609
987
  `bin/run-guard-tests.sh` feeds each through the template guard as hook JSON
610
988
  on stdin and asserts the exit code and output class, failing on any
611
989
  mismatch. Every generic rule carries at least one firing and one
612
- non-firing case (the fixture-pair discipline, transplanted).
990
+ non-firing case (the fixture-pair discipline, transplanted). Two substitutions
991
+ make a command expressible in one tab-separated cell: `@ROOT@` becomes the git
992
+ sandbox root, and `@NL@` becomes a newline — without the second a heredoc case
993
+ cannot be written at all, and the heredoc class would ship untested.
994
+
995
+ **The decision table is the instrument for any change to what the guard
996
+ refuses, and its red condition is not monotone.** A change that *narrows*
997
+ refusal cannot be cleared by inspection, because the table fails on a verdict
998
+ mismatch **in either direction** rather than on a violation count: every
999
+ existing case whose command carries a double-quoted brace, a heredoc, a banner
1000
+ segment, or an allowlisted lead with a read-only tail must have its expected
1001
+ column **re-derived**, never assumed still correct. `bin/scan-prompts.sh` cannot
1002
+ substitute for it, and the reason is structural rather than a matter of
1003
+ precision: `guard_block` exits 2 before `guard_log_fallthrough` runs, so a
1004
+ blocked command never reaches `GUARD_KIT_LOG` and that report is blind to every
1005
+ block the guard makes. A change converting a block into a grant therefore reads
1006
+ as a pure improvement on the scan and as nothing at all — which is why the
1007
+ table, not the scan, is what a narrowing change is measured on.
613
1008
 
614
1009
  The same runner drives the escalation-guard from a second table,
615
1010
  `guard-tests/escalation-cases.tsv` (`<decision> <TAB> <to> <TAB> <message>`),