checkwright 0.23.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 (321) hide show
  1. package/README.md +172 -10
  2. package/lib/common/lock.sh +7 -0
  3. package/lib/common/recipe.sh +1 -1
  4. package/lib/diff.sh +2 -0
  5. package/lib/init.sh +40 -16
  6. package/lib/uninstall.sh +2 -0
  7. package/package.json +2 -2
  8. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates +0 -0
  9. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates.sha256 +1 -1
  10. package/payload/canon-kit/SPEC.md +125 -13
  11. package/payload/canon-kit/checks/check-amendment-queue.gate +3 -0
  12. package/payload/canon-kit/checks/check-docs-link-convention.gate +3 -0
  13. package/payload/canon-kit/checks/check-knob-default-coupling.gate +3 -0
  14. package/payload/canon-kit/checks/check-prose-tells.gate +3 -0
  15. package/payload/canon-kit/checks/check-spec-embedded-source.gate +3 -0
  16. package/payload/canon-kit/gate-tests/check-amendment-queue/bad/SPEC-orphan.md +6 -0
  17. package/payload/canon-kit/gate-tests/check-amendment-queue/bad/TASK-QUEUE.md +7 -2
  18. package/payload/canon-kit/gate-tests/check-amendment-queue/bad/expect.txt +8 -0
  19. package/payload/canon-kit/gate-tests/check-comment-tier/bad/bad.sh +3 -0
  20. package/payload/canon-kit/gate-tests/check-comment-tier/bad/expect.txt +1 -0
  21. package/payload/canon-kit/gate-tests/check-comment-tier/good/good.sh +3 -0
  22. package/payload/canon-kit/gate-tests/check-docs-link-convention.test.sh +4 -4
  23. package/payload/canon-kit/gate-tests/check-knob-default-coupling.test.sh +2 -2
  24. package/payload/canon-kit/gate-tests/check-spec-embedded-source/bad/SPEC-wire.md +18 -0
  25. package/payload/canon-kit/gate-tests/check-spec-embedded-source/bad/expect.txt +3 -1
  26. package/payload/canon-kit/gate-tests/check-spec-embedded-source/bad/widget.proto +13 -0
  27. package/payload/canon-kit/gate-tests/check-spec-embedded-source/good/SPEC-wire.md +22 -0
  28. package/payload/canon-kit/gate-tests/check-spec-embedded-source/good/SPEC.md +17 -0
  29. package/payload/canon-kit/gate-tests/check-spec-embedded-source/good/widget.proto +13 -0
  30. package/payload/canon-kit/smoke/install.sh +1 -1
  31. package/payload/context-kit/README.md +6 -4
  32. package/payload/context-kit/SPEC.md +239 -70
  33. package/payload/context-kit/bin/always-loaded.sh +5 -21
  34. package/payload/context-kit/bin/env-probe.sh +2 -17
  35. package/payload/context-kit/checks/check-brevity.gate +3 -0
  36. package/payload/context-kit/checks/check-footprint-fresh.gate +3 -0
  37. package/payload/context-kit/checks/check-memory-off.gate +3 -0
  38. package/payload/context-kit/checks/check-settings-paths.gate +3 -0
  39. package/payload/context-kit/checks/check-settings-pins.gate +3 -0
  40. package/payload/context-kit/gate-tests/check-brevity.test.sh +3 -2
  41. package/payload/context-kit/gate-tests/check-memory-off/bad/scripts/context-config.sh +4 -0
  42. package/payload/context-kit/gate-tests/check-memory-off/good/scripts/context-config.sh +4 -0
  43. package/payload/context-kit/gate-tests/check-memory-off.test.sh +18 -4
  44. package/payload/context-kit/gate-tests/check-settings-pins.test.sh +70 -0
  45. package/payload/context-kit/index-tests/expected/toolfloor.txt +5 -5
  46. package/payload/context-kit/index-tests/toolfloor-cases.sh +5 -5
  47. package/payload/context-kit/lib/context.sh +56 -0
  48. package/payload/context-kit/lib/toolfloor.sh +1 -1
  49. package/payload/context-kit/smoke/agents-md.sh +16 -4
  50. package/payload/context-kit/smoke/install.sh +3 -2
  51. package/payload/context-kit/templates/session-context.sh +5 -5
  52. package/payload/delegation-kit/SPEC.md +284 -9
  53. package/payload/delegation-kit/checks/check-agent-tier-explicit.gate +3 -0
  54. package/payload/delegation-kit/checks/check-gate-tamper.gate +3 -0
  55. package/payload/delegation-kit/checks/check-rule-citation.gate +3 -0
  56. package/payload/delegation-kit/gate-tests/check-gate-tamper/bad/added-exemptions +5 -0
  57. package/payload/delegation-kit/gate-tests/check-gate-tamper/bad/expect.txt +2 -0
  58. package/payload/delegation-kit/gate-tests/check-gate-tamper.test.sh +108 -0
  59. package/payload/delegation-kit/smoke/install.sh +1 -1
  60. package/payload/delegation-kit/templates/agent-execution.md +71 -4
  61. package/payload/doctrine-kit/SPEC.md +1 -1
  62. package/payload/doctrine-kit/checks/check-doctrine-registration.gate +3 -0
  63. package/payload/doctrine-kit/gate-tests/check-doctrine-registration.test.sh +2 -3
  64. package/payload/doctrine-kit/smoke/install.sh +17 -4
  65. package/payload/drift-kit/README.md +2 -2
  66. package/payload/drift-kit/SPEC.md +71 -7
  67. package/payload/drift-kit/bin/stage-economics.sh +1 -1
  68. package/payload/drift-kit/lib/drift.sh +43 -0
  69. package/payload/drift-kit/smoke/install.sh +21 -14
  70. package/payload/evidence-kit/README.md +3 -1
  71. package/payload/evidence-kit/SPEC.md +160 -19
  72. package/payload/evidence-kit/checks/check-battery-roster.gate +3 -0
  73. package/payload/evidence-kit/checks/check-evidence-baseline.gate +3 -0
  74. package/payload/evidence-kit/checks/check-evidence-manifest.gate +3 -0
  75. package/payload/evidence-kit/checks/check-producer-liveness.sh +42 -2
  76. package/payload/evidence-kit/gate-tests/check-battery-roster.test.sh +4 -3
  77. package/payload/evidence-kit/gate-tests/check-evidence-baseline.test.sh +8 -5
  78. package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/WORKFLOW-STATE.txt +1 -1
  79. package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/scripts/evidence-config.sh +9 -0
  80. package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/WORKFLOW-STATE.txt +1 -1
  81. package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/scripts/evidence-config.sh +9 -0
  82. package/payload/evidence-kit/gate-tests/check-evidence-manifest.test.sh +6 -4
  83. package/payload/evidence-kit/gate-tests/producer-lock.test.sh +42 -1
  84. package/payload/evidence-kit/lib/evidence.sh +2 -0
  85. package/payload/evidence-kit/smoke/install.sh +1 -1
  86. package/payload/gate-sdk/README.md +10 -7
  87. package/payload/gate-sdk/SPEC.md +3916 -265
  88. package/payload/gate-sdk/bin/install-hooks.sh +14 -2
  89. package/payload/gate-sdk/bin/port-blockers.sh +37 -9
  90. package/payload/gate-sdk/bin/run-gate-tests.sh +1 -2
  91. package/payload/gate-sdk/bin/run-gates.sh +22 -0
  92. package/payload/gate-sdk/bin/upgrade-smoke.sh +21 -16
  93. package/payload/gate-sdk/checks/check-action-run-shell.sh +1 -0
  94. package/payload/gate-sdk/checks/check-commit-msg.gate +3 -0
  95. package/payload/gate-sdk/checks/check-commit-subject.gate +3 -0
  96. package/payload/gate-sdk/checks/check-core-files.gate +3 -0
  97. package/payload/gate-sdk/checks/check-crate-arms.sh +1 -0
  98. package/payload/gate-sdk/checks/check-enforcement-fresh.gate +3 -0
  99. package/payload/gate-sdk/checks/check-exec-bit.gate +3 -0
  100. package/payload/gate-sdk/checks/check-gate-assertions.sh +1 -0
  101. package/payload/gate-sdk/checks/check-gate-binary-fresh.gate +3 -0
  102. package/payload/gate-sdk/checks/check-gate-exemption-tasks.gate +3 -0
  103. package/payload/gate-sdk/checks/check-gate-fail-closed.gate +3 -0
  104. package/payload/gate-sdk/checks/check-gate-fixture-coverage.gate +3 -0
  105. package/payload/gate-sdk/checks/check-gate-output.gate +3 -0
  106. package/payload/gate-sdk/checks/check-gate-substrate-parity.sh +78 -14
  107. package/payload/gate-sdk/checks/check-graph.gate +3 -0
  108. package/payload/gate-sdk/checks/check-hook-exec-bit.gate +3 -0
  109. package/payload/gate-sdk/checks/check-identity.gate +3 -0
  110. package/payload/gate-sdk/checks/check-install-disposition.sh +1 -0
  111. package/payload/gate-sdk/checks/check-kit-enum.gate +3 -0
  112. package/payload/gate-sdk/checks/check-readme-roster.gate +3 -0
  113. package/payload/gate-sdk/checks/check-reads-couples.gate +3 -0
  114. package/payload/gate-sdk/checks/check-root-tiering.gate +3 -0
  115. package/payload/gate-sdk/checks/check-shellcheck.sh +1 -0
  116. package/payload/gate-sdk/checks/check-template-copy-parity.gate +3 -0
  117. package/payload/gate-sdk/checks/check-tree-terms.sh +1 -0
  118. package/payload/gate-sdk/checks/check-workflow-tiering.gate +3 -0
  119. package/payload/gate-sdk/gate-tests/check-commit-subject.test.sh +17 -12
  120. package/payload/gate-sdk/gate-tests/check-core-files.test.sh +4 -5
  121. package/payload/gate-sdk/gate-tests/check-exec-bit/bad/dump.txt +2 -1
  122. package/payload/gate-sdk/gate-tests/check-exec-bit/bad/expect.txt +2 -1
  123. package/payload/gate-sdk/gate-tests/check-exec-bit/good/dump.txt +3 -0
  124. package/payload/gate-sdk/gate-tests/check-exec-bit/good/expect.txt +1 -1
  125. package/payload/gate-sdk/gate-tests/check-exec-bit.test.sh +3 -4
  126. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh.test.sh +26 -4
  127. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/args +6 -1
  128. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/expect.txt +2 -0
  129. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/kitroot/checks/check-vendored-descriptor.gate +4 -0
  130. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/kitroot/checks/check-vendored.sh +14 -0
  131. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/scripts/check-descriptor.gate +4 -0
  132. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/scripts/check-held.sh +8 -0
  133. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/args +8 -1
  134. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/expect.txt +3 -0
  135. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/kitroot/checks/check-vendored-descriptor.gate +4 -0
  136. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/kitroot/checks/check-vendored.sh +14 -0
  137. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/scripts/check-descriptor.gate +4 -0
  138. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/scripts/check-held.sh +8 -0
  139. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks.test.sh +77 -0
  140. package/payload/gate-sdk/gate-tests/check-gate-output.test.sh +4 -5
  141. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/expect.txt +7 -0
  142. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-alpha.sh +1 -0
  143. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-bare.sh +4 -0
  144. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-both.sh +5 -0
  145. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-heldtwice.sh +5 -0
  146. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-orphan.gate +2 -0
  147. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-twice.sh +5 -0
  148. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gates.list +4 -0
  149. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/expect.txt +2 -1
  150. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-alpha.sh +1 -0
  151. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-held.sh +4 -0
  152. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gates.list +1 -0
  153. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity.test.sh +49 -4
  154. package/payload/gate-sdk/gate-tests/check-graph/bad/SPEC-example-gate.md +15 -5
  155. package/payload/gate-sdk/gate-tests/check-graph/bad/expect.txt +12 -0
  156. package/payload/gate-sdk/gate-tests/check-graph/good/SPEC-example-gate.md +27 -5
  157. package/payload/gate-sdk/gate-tests/check-graph/good/SPEC-second-gate.md +12 -0
  158. package/payload/gate-sdk/gate-tests/check-graph-cap.test.sh +5 -4
  159. package/payload/gate-sdk/gate-tests/check-graph-refs.test.sh +14 -12
  160. package/payload/gate-sdk/gate-tests/check-graph-theme.test.sh +43 -17
  161. package/payload/gate-sdk/gate-tests/check-graph-tree.test.sh +190 -0
  162. package/payload/gate-sdk/gate-tests/check-identity/bad/gh-hosts.yml +9 -0
  163. package/payload/gate-sdk/gate-tests/check-identity/bad/identity.conf +4 -2
  164. package/payload/gate-sdk/gate-tests/check-identity/bad/scripts/gate-sdk-config.sh +10 -0
  165. package/payload/gate-sdk/gate-tests/check-identity/good/gh-hosts.yml +11 -0
  166. package/payload/gate-sdk/gate-tests/check-identity/good/identity.conf +5 -1
  167. package/payload/gate-sdk/gate-tests/check-identity/good/scripts/gate-sdk-config.sh +10 -0
  168. package/payload/gate-sdk/gate-tests/check-identity.test.sh +114 -0
  169. package/payload/gate-sdk/gate-tests/check-kit-enum/bad/check-native-sample.gate +3 -0
  170. package/payload/gate-sdk/gate-tests/check-kit-enum/bad/gates.list +4 -1
  171. package/payload/gate-sdk/gate-tests/check-kit-enum/good/check-native-sample.gate +3 -0
  172. package/payload/gate-sdk/gate-tests/check-kit-enum/good/expect.txt +1 -1
  173. package/payload/gate-sdk/gate-tests/check-kit-enum/good/gates.list +5 -2
  174. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/args +3 -1
  175. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/delta-kit/README.md +15 -0
  176. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/delta-kit/checks/check-delta-one.gate +2 -0
  177. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/delta-kit/checks/check-delta-two.sh +3 -0
  178. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/expect.txt +3 -1
  179. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/scripts/gate-sdk-config.sh +1 -1
  180. package/payload/gate-sdk/gate-tests/check-readme-roster/good/args +3 -1
  181. package/payload/gate-sdk/gate-tests/check-readme-roster/good/delta-kit/README.md +13 -0
  182. package/payload/gate-sdk/gate-tests/check-readme-roster/good/delta-kit/checks/check-delta-one.gate +2 -0
  183. package/payload/gate-sdk/gate-tests/check-readme-roster/good/epsilon-kit/README.md +14 -0
  184. package/payload/gate-sdk/gate-tests/check-readme-roster/good/epsilon-kit/checks/check-eps-one.sh +3 -0
  185. package/payload/gate-sdk/gate-tests/check-readme-roster/good/epsilon-kit/checks/check-eps-two.gate +2 -0
  186. package/payload/gate-sdk/gate-tests/check-readme-roster/good/scripts/gate-sdk-config.sh +1 -1
  187. package/payload/gate-sdk/gate-tests/check-reads-couples.test.sh +87 -89
  188. package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/scripts/agent-budget-guard.sh +4 -0
  189. package/payload/gate-sdk/gate-tests/check-template-copy-parity.test.sh +56 -0
  190. package/payload/gate-sdk/gate-tests/declaration-lib-parity.test.sh +211 -0
  191. package/payload/gate-sdk/gate-tests/enforcement-map.test.sh +16 -15
  192. package/payload/gate-sdk/gate-tests/lib-gate.test.sh +94 -1
  193. package/payload/gate-sdk/lib/gate.sh +232 -25
  194. package/payload/gate-sdk/smoke/install.sh +5 -1
  195. package/payload/guard-kit/SPEC.md +207 -28
  196. package/payload/guard-kit/bin/run-guard-tests.sh +6 -1
  197. package/payload/guard-kit/gate-tests/git-mutation-under-producer.test.sh +105 -0
  198. package/payload/guard-kit/guard-tests/cases.tsv +37 -9
  199. package/payload/guard-kit/lib/guard.sh +170 -6
  200. package/payload/lifecycle-kit/README.md +3 -2
  201. package/payload/lifecycle-kit/SPEC.md +507 -75
  202. package/payload/lifecycle-kit/bin/enter-stage.sh +72 -33
  203. package/payload/lifecycle-kit/bin/file-gap.sh +2 -2
  204. package/payload/lifecycle-kit/checks/check-close-surfaces.gate +3 -0
  205. package/payload/lifecycle-kit/checks/check-stage-entry.gate +3 -0
  206. package/payload/lifecycle-kit/gate-tests/boundary-scratch-wipe.test.sh +4 -4
  207. package/payload/lifecycle-kit/gate-tests/check-close-surfaces.test.sh +1 -1
  208. package/payload/lifecycle-kit/gate-tests/check-stage-entry/bad/.workflow/WORKFLOW-STATE.txt +3 -3
  209. package/payload/lifecycle-kit/gate-tests/check-stage-entry/good/.workflow/WORKFLOW-STATE.txt +3 -3
  210. package/payload/lifecycle-kit/gate-tests/check-stage-entry.test.sh +22 -22
  211. package/payload/lifecycle-kit/gate-tests/check-stage-evidence/bad/.workflow/WORKFLOW-STATE.txt +2 -2
  212. package/payload/lifecycle-kit/gate-tests/check-stage-evidence/good/.workflow/WORKFLOW-STATE.txt +2 -2
  213. package/payload/lifecycle-kit/gate-tests/check-stage-evidence.test.sh +120 -10
  214. package/payload/lifecycle-kit/gate-tests/gap-inbox-route.test.sh +123 -0
  215. package/payload/lifecycle-kit/gate-tests/rename-iteration.test.sh +11 -11
  216. package/payload/lifecycle-kit/gate-tests/survey-record-entry.test.sh +16 -5
  217. package/payload/lifecycle-kit/lib/stages.sh +5 -0
  218. package/payload/lifecycle-kit/smoke/install.sh +29 -15
  219. package/payload/lifecycle-kit/templates/lead.md +24 -0
  220. package/payload/lifecycle-kit/templates/stages/align.md +20 -2
  221. package/payload/lifecycle-kit/templates/stages/build.md +3 -3
  222. package/payload/lifecycle-kit/templates/stages/close.md +20 -6
  223. package/payload/lifecycle-kit/templates/stages/scope.md +20 -1
  224. package/payload/lifecycle-kit/templates/stages/spec.md +1 -1
  225. package/payload/lifecycle-kit/templates/stages/validate.md +1 -1
  226. package/payload/lifecycle-kit/templates/workflow-state-guard.sh +1 -1
  227. package/payload/queue-kit/README.md +10 -10
  228. package/payload/queue-kit/SPEC.md +301 -84
  229. package/payload/queue-kit/bin/queue-counts.sh +1 -1
  230. package/payload/queue-kit/checks/check-queue-entry-budget.gate +1 -1
  231. package/payload/queue-kit/checks/check-queue-prose-precondition.gate +3 -0
  232. package/payload/queue-kit/checks/check-roadmap-fresh.gate +3 -0
  233. package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/TASK-QUEUE.md +15 -0
  234. package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/expect.txt +2 -0
  235. package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/TASK-QUEUE.md +7 -0
  236. package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/expect.txt +4 -0
  237. package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/expect.txt +1 -1
  238. package/payload/queue-kit/gate-tests/queue-counts.test.sh +1 -1
  239. package/payload/queue-kit/gate-tests/queue-index.test.sh +55 -119
  240. package/payload/queue-kit/gate-tests/roadmap.test.sh +22 -12
  241. package/payload/queue-kit/lib/queue.sh +0 -49
  242. package/payload/queue-kit/smoke/install.sh +1 -1
  243. package/payload/site-kit/SPEC.md +29 -2
  244. package/payload/site-kit/checks/check-docs-cname-parity.gate +3 -0
  245. package/payload/site-kit/checks/check-docs-render-fidelity.sh +1 -0
  246. package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/args +5 -4
  247. package/payload/site-kit/gate-tests/check-docs-cname-parity/good/args +6 -5
  248. package/payload/site-kit/gate-tests/check-docs-cname-parity/good/checks/check-sample.gate +3 -0
  249. package/payload/site-kit/gate-tests/check-docs-cname-parity/good/expect.txt +1 -1
  250. package/payload/site-kit/smoke/install.sh +1 -1
  251. package/payload/canon-kit/checks/check-amendment-queue.sh +0 -117
  252. package/payload/canon-kit/checks/check-docs-link-convention.sh +0 -79
  253. package/payload/canon-kit/checks/check-knob-default-coupling.sh +0 -240
  254. package/payload/canon-kit/checks/check-prose-tells.sh +0 -208
  255. package/payload/canon-kit/checks/check-spec-embedded-source.sh +0 -134
  256. package/payload/context-kit/bin/footprint.sh +0 -144
  257. package/payload/context-kit/checks/check-brevity.sh +0 -124
  258. package/payload/context-kit/checks/check-footprint-fresh.sh +0 -39
  259. package/payload/context-kit/checks/check-memory-off.sh +0 -113
  260. package/payload/context-kit/checks/check-settings-paths.sh +0 -94
  261. package/payload/context-kit/checks/check-settings-pins.sh +0 -111
  262. package/payload/context-kit/gate-tests/check-memory-off/bad/args +0 -1
  263. package/payload/context-kit/gate-tests/check-memory-off/good/args +0 -1
  264. package/payload/delegation-kit/checks/check-agent-tier-explicit.sh +0 -62
  265. package/payload/delegation-kit/checks/check-gate-tamper.sh +0 -140
  266. package/payload/delegation-kit/checks/check-rule-citation.sh +0 -77
  267. package/payload/doctrine-kit/checks/check-doctrine-registration.sh +0 -246
  268. package/payload/drift-kit/bin/trajectory.sh +0 -242
  269. package/payload/evidence-kit/checks/check-battery-roster.sh +0 -87
  270. package/payload/evidence-kit/checks/check-evidence-baseline.sh +0 -104
  271. package/payload/evidence-kit/checks/check-evidence-manifest.sh +0 -105
  272. package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/args +0 -3
  273. package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/args +0 -3
  274. package/payload/gate-sdk/bin/enforcement-map.sh +0 -273
  275. package/payload/gate-sdk/checks/check-commit-msg.sh +0 -51
  276. package/payload/gate-sdk/checks/check-commit-subject.sh +0 -44
  277. package/payload/gate-sdk/checks/check-core-files.sh +0 -76
  278. package/payload/gate-sdk/checks/check-enforcement-fresh.sh +0 -38
  279. package/payload/gate-sdk/checks/check-exec-bit.sh +0 -96
  280. package/payload/gate-sdk/checks/check-gate-binary-fresh.sh +0 -107
  281. package/payload/gate-sdk/checks/check-gate-exemption-tasks.sh +0 -106
  282. package/payload/gate-sdk/checks/check-gate-fail-closed.sh +0 -85
  283. package/payload/gate-sdk/checks/check-gate-fixture-coverage.sh +0 -93
  284. package/payload/gate-sdk/checks/check-gate-output.sh +0 -103
  285. package/payload/gate-sdk/checks/check-graph.sh +0 -632
  286. package/payload/gate-sdk/checks/check-hook-exec-bit.sh +0 -46
  287. package/payload/gate-sdk/checks/check-identity.sh +0 -135
  288. package/payload/gate-sdk/checks/check-kit-enum.sh +0 -95
  289. package/payload/gate-sdk/checks/check-readme-roster.sh +0 -108
  290. package/payload/gate-sdk/checks/check-reads-couples.sh +0 -200
  291. package/payload/gate-sdk/checks/check-root-tiering.sh +0 -67
  292. package/payload/gate-sdk/checks/check-template-copy-parity.sh +0 -127
  293. package/payload/gate-sdk/checks/check-workflow-tiering.sh +0 -85
  294. package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/args +0 -1
  295. package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/args +0 -1
  296. package/payload/gate-sdk/gate-tests/check-identity/bad/args +0 -1
  297. package/payload/gate-sdk/gate-tests/check-identity/good/args +0 -1
  298. package/payload/lifecycle-kit/bin/close-surfaces.sh +0 -94
  299. package/payload/lifecycle-kit/checks/check-close-surfaces.sh +0 -64
  300. package/payload/lifecycle-kit/checks/check-stage-entry.sh +0 -198
  301. package/payload/queue-kit/bin/queue-index.sh +0 -182
  302. package/payload/queue-kit/bin/roadmap.sh +0 -76
  303. package/payload/queue-kit/checks/check-queue-prose-precondition.sh +0 -64
  304. package/payload/queue-kit/checks/check-roadmap-fresh.sh +0 -111
  305. package/payload/site-kit/checks/check-docs-cname-parity.sh +0 -81
  306. /package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/{gates → scripts}/check-sample.sh +0 -0
  307. /package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/{gates → scripts}/check-sample.sh +0 -0
  308. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/{check-gamma.sh → scripts/check-gamma.sh} +0 -0
  309. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/{gate-tests → scripts/gate-tests}/check-alpha/bad/.keep +0 -0
  310. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/{gate-tests → scripts/gate-tests}/check-alpha/good/.keep +0 -0
  311. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/{gates.list → scripts/gates.list} +0 -0
  312. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/{check-beta.sh → scripts/check-beta.sh} +0 -0
  313. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/{gate-tests → scripts/gate-tests}/check-alpha/bad/.keep +0 -0
  314. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/{gate-tests → scripts/gate-tests}/check-alpha/good/.keep +0 -0
  315. /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/{gates.list → scripts/gates.list} +0 -0
  316. /package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/{site-config.sh → scripts/site-config.sh} +0 -0
  317. /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{tree → docs}/CNAME +0 -0
  318. /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{tree → docs}/index.md +0 -0
  319. /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{tree/docs → docs}/posts/2026-01-01-legacy.md +0 -0
  320. /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{tree/pkg → pkg}/gate-tests/fixture.md +0 -0
  321. /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{site-config.sh → scripts/site-config.sh} +0 -0
@@ -1,273 +0,0 @@
1
- #!/usr/bin/env bash
2
- # spec: gate-sdk/SPEC.md §enforcement-map — the kit→surface→class map emitted from the class registries; the emitted page owns the enforcement-class taxonomy
3
- # usage: enforcement-map.sh [--emit]
4
- # bare: an advisory header plus the page; --emit: the page only, for the committed docs/enforcement.md projection.
5
- # advisory by construction: never joins gates.list; a healthy run exits 0 whatever registries are absent, a set-but-missing registry knob exits 2 fail-closed before any stdout; the freshness gate (check-enforcement-fresh) blocks a stale emission.
6
- set -uo pipefail
7
-
8
- SDK="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
9
- # shellcheck source=../lib/gate.sh
10
- source "$SDK/lib/gate.sh"
11
-
12
- # spec: gate-sdk/SPEC.md §enforcement-map — every registry defaults to this repo's layout and reads through the owning kit's knob, so a consumer relocates each surface without touching the emitter; the := expansion erases set-ness, so each knob's explicit value is captured first (adopted-but-broken refuses where not-adopted degrades)
13
- GATES_DIR="$(gate_sdk_gates_dir)"
14
- LIST="$GATES_DIR/gates.list"
15
- set_kpis="${DRIFT_KIT_KPIS_FILE:-}"
16
- set_settings="${CONTEXT_KIT_SETTINGS_FILE:-}"
17
- set_evidence="${EVIDENCE_KIT_CONFIG_FILE:-}"
18
- set_scan="${GATE_SDK_ENFORCE_SCAN_DIR:-}"
19
- : "${DRIFT_KIT_KPIS_FILE:=$GATES_DIR/kpis.list}"
20
- : "${CONTEXT_KIT_SETTINGS_FILE:=.claude/settings.json}"
21
- : "${EVIDENCE_KIT_CONFIG_FILE:=$GATES_DIR/evidence-config.sh}"
22
- : "${GATE_SDK_ENFORCE_SCAN_DIR:=.}"
23
-
24
- # spec: gate-sdk/SPEC.md §enforcement-map — check-before-emit: every explicitly set registry knob is verified before the first stdout byte in both modes, stderr naming the knob and exit 2 on a missing path (for the settings knob, also a set file jq refuses to parse; jq absence is a toolchain gap and keeps degrading), so a misconfigured --emit regen leaves an empty projection and a nonzero exit, never a plausible partial page
25
- preflight_knobs() {
26
- local bad=0
27
- [[ -n "$set_kpis" && ! -f "$DRIFT_KIT_KPIS_FILE" ]] &&
28
- { echo "enforcement-map: DRIFT_KIT_KPIS_FILE not found: $DRIFT_KIT_KPIS_FILE" >&2; bad=1; }
29
- [[ -n "$set_evidence" && ! -f "$EVIDENCE_KIT_CONFIG_FILE" ]] &&
30
- { echo "enforcement-map: EVIDENCE_KIT_CONFIG_FILE not found: $EVIDENCE_KIT_CONFIG_FILE" >&2; bad=1; }
31
- [[ -n "$set_scan" && ! -d "$GATE_SDK_ENFORCE_SCAN_DIR" ]] &&
32
- { echo "enforcement-map: GATE_SDK_ENFORCE_SCAN_DIR not found: $GATE_SDK_ENFORCE_SCAN_DIR" >&2; bad=1; }
33
- if [[ -n "$set_settings" ]]; then
34
- if [[ ! -f "$CONTEXT_KIT_SETTINGS_FILE" ]]; then
35
- echo "enforcement-map: CONTEXT_KIT_SETTINGS_FILE not found: $CONTEXT_KIT_SETTINGS_FILE" >&2; bad=1
36
- elif command -v jq >/dev/null 2>&1 && ! jq -e . "$CONTEXT_KIT_SETTINGS_FILE" >/dev/null 2>&1; then
37
- echo "enforcement-map: CONTEXT_KIT_SETTINGS_FILE unparseable: $CONTEXT_KIT_SETTINGS_FILE" >&2; bad=1
38
- fi
39
- fi
40
- return "$bad"
41
- }
42
- # spec: canon-kit/SPEC.md §check-md-refs — the reference-link ref knob (owned by canon-kit); the page's owner-section citations pin to the same ref check-md-refs' self-repo pass validates, so a link the emitter writes is a link the blocker resolves
43
- : "${CANON_KIT_DOCS_BLOB_REF:=master}"
44
- SELF_REPO_PREFIX="$(gate_self_repo_prefix "$CANON_KIT_DOCS_BLOB_REF")"
45
-
46
- emit=0
47
- [[ "${1:-}" == "--emit" ]] && emit=1
48
-
49
- # spec: gate-sdk/SPEC.md §enforcement-map — attribute a path to its owning kit label by the first kit segment (paths arrive absolute from gate_kit_roots or relative from a hook command); a surface under no kit groups as (consumer)
50
- attribute_kit() {
51
- local seg
52
- local IFS=/
53
- local -a segs
54
- read -ra segs <<< "${1#./}"
55
- for seg in "${segs[@]}"; do
56
- case "$seg" in
57
- gate-sdk|*-kit) printf '%s\n' "$seg"; return 0 ;;
58
- esac
59
- done
60
- printf '%s\n' "(consumer)"
61
- }
62
-
63
- # spec: gate-sdk/SPEC.md §enforcement-map — the first slash-bearing token of a hook/suite command is the enforcing script, whose dir attributes the row
64
- command_path() {
65
- local tok
66
- for tok in $1; do
67
- [[ "$tok" == */* ]] && { printf '%s\n' "$tok"; return 0; }
68
- done
69
- printf '%s\n' "$1"
70
- }
71
-
72
- # spec: gate-sdk/SPEC.md §enforcement-map — the kit column links each kit's docs page (`<kit>/index.md`, relative to the emitted page under the docs root); the (consumer) group owns no kit page and stays plain text
73
- kit_cell() {
74
- case "$1" in
75
- '(consumer)') printf '%s' "$1" ;;
76
- *) printf '[%s](%s/index.md)' "$1" "$1" ;;
77
- esac
78
- }
79
-
80
- # spec: gate-sdk/SPEC.md §enforcement-map — cite a class's owner section through the reference-link grammar (canon-kit/SPEC.md §The reference-link grammar): a self-repo blob link when the identity is known and the SPEC is git-tracked, degrading to the bare `<path> §<title>` when a consumer has not vendored that kit or a clone has no origin
81
- owner_ref() { # $1=path $2=anchor $3=section-title
82
- if [[ -n "$SELF_REPO_PREFIX" ]] && git ls-files --error-unmatch -- "$1" >/dev/null 2>&1; then
83
- printf '[`%s` §%s](%s%s#%s)' "$1" "$3" "$SELF_REPO_PREFIX" "$1" "$2"
84
- else
85
- printf '`%s` §%s' "$1" "$3"
86
- fi
87
- }
88
-
89
- mapfile -t CHECK_DIRS < <(gate_check_dirs)
90
- mapfile -t KIT_ROOTS < <(gate_kit_roots)
91
-
92
- # spec: gate-sdk/SPEC.md §enforcement-map — Blocking gates: gates.list membership, tier read from each gate's `# graph:` line, kit from the resolution dir; grouped by tier (precommit, commit-msg, align-only), gates.list order within a tier
93
- gate_rows() {
94
- [[ -f "$LIST" ]] || return 0
95
- local -a pre=() msg=() align=()
96
- local c src tier kit row
97
- while IFS= read -r c; do
98
- src="$(gate_resolve "$c" "${CHECK_DIRS[@]}" 2>/dev/null || true)"
99
- [[ -n "$src" ]] || continue
100
- tier="$(sed -n 's/^# graph:.*[[:space:]]tier=\([a-z-]*\).*/\1/p' "$src" | head -1)"
101
- [[ -n "$tier" ]] || tier="?"
102
- kit="$(attribute_kit "$src")"
103
- row="| $(kit_cell "$kit") | $c | $tier |"
104
- case "$tier" in
105
- precommit) pre+=("$row") ;;
106
- commit-msg) msg+=("$row") ;;
107
- *) align+=("$row") ;;
108
- esac
109
- done < <(gates_list_members "$LIST")
110
- [[ ${#pre[@]} -eq 0 && ${#msg[@]} -eq 0 && ${#align[@]} -eq 0 ]] && return 0
111
- printf '## Blocking gates\n\n'
112
- printf '| kit | gate | tier |\n| --- | --- | --- |\n'
113
- printf '%s\n' "${pre[@]+"${pre[@]}"}" "${msg[@]+"${msg[@]}"}" "${align[@]+"${align[@]}"}"
114
- printf '\n'
115
- }
116
-
117
- # spec: gate-sdk/SPEC.md §enforcement-map — Advisory KPIs: the drift-kit KPI registry, kit from where each plugin resolves (scripts/ then each kit's kpis/)
118
- kpi_rows() {
119
- [[ -f "$DRIFT_KIT_KPIS_FILE" ]] || return 0
120
- local -a rows=()
121
- local name src d
122
- while IFS= read -r name; do
123
- src=""
124
- [[ -f "$GATES_DIR/$name.sh" ]] && src="$GATES_DIR/$name.sh"
125
- if [[ -z "$src" ]]; then
126
- for d in "${KIT_ROOTS[@]}"; do
127
- [[ -f "$d/kpis/$name.sh" ]] && { src="$d/kpis/$name.sh"; break; }
128
- done
129
- fi
130
- [[ -n "$src" ]] || src="$GATES_DIR/$name.sh"
131
- rows+=("| $(kit_cell "$(attribute_kit "$src")") | $name |")
132
- done < <(gates_list_members "$DRIFT_KIT_KPIS_FILE")
133
- [[ ${#rows[@]} -eq 0 ]] && return 0
134
- printf '## Advisory KPIs\n\n'
135
- printf '| kit | KPI |\n| --- | --- |\n'
136
- printf '%s\n' "${rows[@]}"
137
- printf '\n'
138
- }
139
-
140
- # spec: gate-sdk/SPEC.md §enforcement-map — Guards and Session warnings: PreToolUse / SessionStart command hooks in the tracked harness settings file, kit from the enforcing script's dir
141
- hook_rows() {
142
- local kind="$1" jqpath="$2"
143
- command -v jq >/dev/null 2>&1 || return 0
144
- [[ -f "$CONTEXT_KIT_SETTINGS_FILE" ]] || return 0
145
- jq -e . "$CONTEXT_KIT_SETTINGS_FILE" >/dev/null 2>&1 || return 0
146
- local -a rows=()
147
- local line cmd matcher path
148
- while IFS=$'\t' read -r cmd matcher; do
149
- [[ -n "$cmd" ]] || continue
150
- path="$(command_path "$cmd")"
151
- if [[ "$kind" == guard ]]; then
152
- # spec: gate-sdk/SPEC.md §enforcement-map — an alternation matcher is the harness's own spelling, and a bare '|' inside a cell opens a fourth column: escape it so the emitted row survives the rendered page as one row of three
153
- rows+=("| $(kit_cell "$(attribute_kit "$path")") | $path | ${matcher//|/\\|} |")
154
- else
155
- rows+=("| $(kit_cell "$(attribute_kit "$path")") | $path |")
156
- fi
157
- done < <(jq -r "$jqpath" "$CONTEXT_KIT_SETTINGS_FILE" 2>/dev/null)
158
- [[ ${#rows[@]} -eq 0 ]] && return 0
159
- if [[ "$kind" == guard ]]; then
160
- printf '## Guards\n\n'
161
- printf '| kit | surface | intercepts |\n| --- | --- | --- |\n'
162
- else
163
- printf '## Session warnings\n\n'
164
- printf '| kit | surface |\n| --- | --- |\n'
165
- fi
166
- printf '%s\n' "${rows[@]}"
167
- printf '\n'
168
- }
169
-
170
- # spec: gate-sdk/SPEC.md §enforcement-map — Validate suites: evidence-kit's suite registry (the config's suite list + per-suite run command), kit from the run command's script
171
- suite_rows() {
172
- [[ -f "$EVIDENCE_KIT_CONFIG_FILE" ]] || return 0
173
- local -a suites=()
174
- local cmd var
175
- # shellcheck disable=SC1090 # consumer-supplied evidence config, path is config
176
- source "$EVIDENCE_KIT_CONFIG_FILE"
177
- declare -p EVIDENCE_KIT_SUITES &>/dev/null || return 0
178
- suites=("${EVIDENCE_KIT_SUITES[@]}")
179
- [[ ${#suites[@]} -eq 0 ]] && return 0
180
- printf '## Validate suites\n\n'
181
- printf '| kit | suite |\n| --- | --- |\n'
182
- local s
183
- for s in "${suites[@]}"; do
184
- var="EVIDENCE_KIT_RUN_$s"
185
- cmd="${!var-}"
186
- printf '| %s | %s |\n' "$(kit_cell "$(attribute_kit "$(command_path "$cmd")")")" "$s"
187
- done
188
- printf '\n'
189
- }
190
-
191
- # spec: gate-sdk/SPEC.md §enforcement-map — Monitors: the one class with no parseable registry, so a non-gate surface declares itself with a line-start `# enforce: class=monitor <free-text>` marker the emitter greps; a marker is dormant in a template/fixture (an inert copy-source) and activates only where a consumer copies the file into a live path, so the walk prunes templates/ (grep -v, the sibling-finder idiom) atop the gate-tests exclusion GATE_GREP_EXCLUDES already carries; sorted for a stable projection
192
- monitor_rows() {
193
- local -a rows=()
194
- local line file rest surface
195
- while IFS= read -r line; do
196
- [[ -n "$line" ]] || continue
197
- file="${line%%:*}"; rest="${line#*:}"; rest="${rest#*:}"
198
- surface="$(printf '%s' "$rest" | sed -E 's/^[[:space:]]*#[[:space:]]*enforce:[[:space:]]+class=monitor[[:space:]]+//; s/[[:space:]]+$//')"
199
- rows+=("| $(kit_cell "$(attribute_kit "$file")") | $surface |")
200
- done < <(grep -rHnI "${GATE_GREP_EXCLUDES[@]}" -E '^[[:space:]]*#[[:space:]]*enforce:[[:space:]]+class=monitor[[:space:]]' "$GATE_SDK_ENFORCE_SCAN_DIR" 2>/dev/null | grep -v '/templates/' | sort)
201
- [[ ${#rows[@]} -eq 0 ]] && return 0
202
- printf '## Monitors\n\n'
203
- printf '| kit | surface |\n| --- | --- |\n'
204
- printf '%s\n' "${rows[@]}"
205
- printf '\n'
206
- }
207
-
208
- # spec: gate-sdk/SPEC.md §enforcement-map — the enforcement-class taxonomy, ordered hardest to softest; this page owns the prose and each class cites its mechanism owner through the reference-link grammar
209
- class_roster() {
210
- local gate kpi guard warn suite monitor
211
- gate="$(owner_ref gate-sdk/SPEC.md enforcement-tiers 'Enforcement tiers')"
212
- kpi="$(owner_ref drift-kit/SPEC.md the-kpi-plugin-contract 'The KPI plugin contract')"
213
- guard="$(owner_ref guard-kit/SPEC.md the-guard-framework-libguardsh 'The guard framework')"
214
- warn="$(owner_ref context-kit/SPEC.md the-session-context-hook-template 'The session-context hook')"
215
- suite="$(owner_ref evidence-kit/SPEC.md baseline-manifest 'Baseline manifest')"
216
- monitor="$(owner_ref site-kit/SPEC.md the-monitor-boundary 'The monitor boundary')"
217
- cat <<CLASSES
218
- - A **blocking gate** fails the commit (or, at the \`align-only\` tier, the
219
- consistency audit) — the pre-commit hook is its local reach, the CI workflow
220
- its server-side backstop. Owner: $gate.
221
- - An **advisory KPI** never blocks; it reports a drift trend into the
222
- session-context line. Owner: $kpi.
223
- - A **guard** intercepts a tool call before it runs. Owner: $guard.
224
- - A **session warning** surfaces context when a session opens. Owner: $warn.
225
- - A **validate suite** holds a test baseline that a per-run evidence manifest
226
- attests. Owner: $suite.
227
- - A **monitor** watches deployment truth rather than tree truth, so it reds a
228
- scheduled run, never a merge. Owner: $monitor.
229
- CLASSES
230
- }
231
-
232
- emit_page() {
233
- cat <<'PREAMBLE'
234
- ---
235
- title: Enforcement map
236
- nav_parent: value
237
- nav_child_order: 1
238
- ---
239
- # Enforcement map
240
-
241
- _Generated by `bash gate-sdk/bin/enforcement-map.sh --emit`; do not hand-edit —
242
- `check-enforcement-fresh` byte-compares this page against the emitter._
243
-
244
- Every governed surface in this repo is held by one enforcement class, ordered
245
- here from hardest to softest:
246
-
247
- PREAMBLE
248
- class_roster
249
- cat <<'PREAMBLE'
250
-
251
- The rows below derive from the class registries — the gate registry, the KPI
252
- registry, the harness settings hooks, the evidence-suite config, and the
253
- `# enforce:` markers a non-gate surface declares itself with — so this map
254
- cannot drift from what actually runs. A registry a consumer has not adopted
255
- leaves its section absent.
256
-
257
- PREAMBLE
258
- gate_rows
259
- kpi_rows
260
- hook_rows guard '.hooks.PreToolUse // [] | .[] | (.matcher // "*") as $m | (.hooks // [])[] | select(.type == "command") | "\(.command)\t\($m)"'
261
- hook_rows warning '.hooks.SessionStart // [] | .[] | (.hooks // [])[] | select(.type == "command") | "\(.command)\t"'
262
- suite_rows
263
- monitor_rows
264
- }
265
-
266
- preflight_knobs || exit 2
267
-
268
- if [[ "$emit" -eq 0 ]]; then
269
- echo "=== Enforcement map (advisory — regenerate the committed page with --emit) ==="
270
- echo
271
- fi
272
- emit_page
273
- exit 0
@@ -1,51 +0,0 @@
1
- #!/usr/bin/env bash
2
- # graph: couples=scripts/msg-patterns.list dir=one valve=none tier=commit-msg
3
- # install: zero-config
4
- # spec: gate-sdk/SPEC.md §check-commit-msg — the commit message matches no banned pattern (the leak guard for the message surface the pre-commit hook never sees)
5
- #
6
- # usage: check-commit-msg.sh <message-file> [pattern-file...]
7
- # message-file: the commit-msg hook's $1. pattern-file args (grep -E, one per
8
- # line) override GATE_SDK_MSG_PATTERN_FILES (+ _LOCAL); default when absent.
9
- set -uo pipefail
10
-
11
- SDK="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
12
- # shellcheck source=../lib/gate.sh
13
- source "$SDK/lib/gate.sh"
14
-
15
- # spec: gate-sdk/SPEC.md §check-commit-msg — no-arg is a clean skip: the message is not a whole-tree surface and a history scan is deferred
16
- if [[ $# -eq 0 ]]; then
17
- echo "COMMIT-MSG: clean (no message file argument — the commit-msg hook surface is not a whole-tree target; skipped)"
18
- exit 0
19
- fi
20
- MSG="$1"
21
- [[ -f "$MSG" ]] || { echo "check-commit-msg: message file not found: $MSG" >&2; exit 2; }
22
- shift
23
-
24
- pat_list="$(gate_msg_pattern_files "$@")"; st=$?
25
- fail_closed "$st" COMMIT-MSG pattern-files
26
- mapfile -t PATS < <(printf '%s' "$pat_list")
27
-
28
- patterns="$(grep -hEv '^[[:space:]]*(#|$)' "${PATS[@]+"${PATS[@]}"}")"; gst=$?
29
- [[ "$gst" -le 1 ]] || fail_closed "$gst" COMMIT-MSG grep-patterns
30
-
31
- npat=0
32
- [[ -n "$patterns" ]] && npat="$(grep -c '' <<<"$patterns")"
33
- if [[ "$npat" -eq 0 ]]; then
34
- echo "COMMIT-MSG: clean (0 banned pattern(s) configured; message unchecked)"
35
- exit 0
36
- fi
37
-
38
- hits="$(grep -EnHf <(printf '%s\n' "$patterns") "$MSG")"; hst=$?
39
- [[ "$hst" -le 1 ]] || fail_closed "$hst" COMMIT-MSG grep
40
-
41
- if [[ -n "$hits" ]]; then
42
- echo "check-commit-msg: commit message matches a banned pattern (leaked local/private term):"
43
- echo "$hits"
44
- echo " help: rewrite the message to remove the leaked term; the pattern set is"
45
- echo " GATE_SDK_MSG_PATTERN_FILES (+ the local list). The Co-Authored-By"
46
- echo " trailer is a footer convention, not a leak — do not ban it."
47
- exit 1
48
- fi
49
-
50
- echo "COMMIT-MSG: clean (message matches none of $npat banned pattern(s))"
51
- exit 0
@@ -1,44 +0,0 @@
1
- #!/usr/bin/env bash
2
- # graph: couples=gate-sdk/lib/gate.sh dir=one valve=none tier=commit-msg
3
- # install: on-surface
4
- # spec: gate-sdk/SPEC.md §check-commit-subject — the subject line parses as <type>(<scope>)?!?: <summary> with <type> in the shared roster, or matches a git-generated carve-out (the parse guarantee under trajectory.sh's feat/debt column)
5
- #
6
- # usage: check-commit-subject.sh <message-file>
7
- # message-file: the commit-msg hook's $1. Roster is GATE_SDK_COMMIT_TYPES
8
- # (gate_commit_types, lib/gate.sh); no positional roster override.
9
- set -uo pipefail
10
-
11
- SDK="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
12
- # shellcheck source=../lib/gate.sh
13
- source "$SDK/lib/gate.sh"
14
-
15
- # spec: gate-sdk/SPEC.md §check-commit-subject — no-arg is a clean skip: the message is not a whole-tree surface
16
- if [[ $# -eq 0 ]]; then
17
- echo "COMMIT-SUBJECT: clean (no message file argument — the commit-msg hook surface is not a whole-tree target; skipped)"
18
- exit 0
19
- fi
20
- MSG="$1"
21
- [[ -f "$MSG" ]] || { echo "check-commit-subject: message file not found: $MSG" >&2; exit 2; }
22
-
23
- roster="$(gate_commit_types)"; st=$?
24
- fail_closed "$st" COMMIT-SUBJECT roster
25
- types="$(printf '%s' "$roster" | tr ' ' '|')"
26
-
27
- subject="$(sed -n '1p' "$MSG")"; sst=$?
28
- fail_closed "$sst" COMMIT-SUBJECT subject
29
-
30
- # spec: gate-sdk/SPEC.md §check-commit-subject — conventional grammar (roster type, optional (scope) with token [a-z0-9./-]+, optional ! break marker, ': ' then non-empty summary) OR a git-generated carve-out (Merge/Revert + the fixup!/squash! autosquash forms)
31
- if [[ "$subject" =~ ^($types)(\([a-z0-9./-]+\))?!?:\ .+$ ]] \
32
- || [[ "$subject" =~ ^(Merge|Revert)\ ]] \
33
- || [[ "$subject" =~ ^(fixup|squash)!\ ]]; then
34
- echo "COMMIT-SUBJECT: clean (subject parses against the ${roster// /, } roster or a git-generated carve-out)"
35
- exit 0
36
- fi
37
-
38
- echo "check-commit-subject: subject line does not parse as <type>(<scope>)?!?: <summary>:"
39
- echo " $subject"
40
- echo " help: open the subject with a roster type followed by ': ' and a summary"
41
- echo " (e.g. 'feat(scope): …'); the roster is GATE_SDK_COMMIT_TYPES"
42
- echo " (default: $roster). git's own Merge/Revert/fixup!/squash! forms are"
43
- echo " carve-outs — do not reword them."
44
- exit 1
@@ -1,76 +0,0 @@
1
- #!/usr/bin/env bash
2
- # graph: couples=scripts/core-files.list,kit:SPEC.md,kit:README.md dir=one valve=none tier=precommit
3
- # install: on-surface
4
- # spec: gate-sdk/SPEC.md §check-core-files — every path in the core-files manifest exists in the worktree and is tracked
5
- #
6
- # usage: check-core-files.sh [manifest]
7
- # default: GATE_SDK_CORE_FILES_FILE (<gates-dir>/core-files.list)
8
- set -uo pipefail
9
-
10
- SDK="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
11
- # shellcheck source=../lib/gate.sh
12
- source "$SDK/lib/gate.sh"
13
-
14
- MANIFEST="${1:-${GATE_SDK_CORE_FILES_FILE:-$(gate_sdk_gates_dir)/core-files.list}}"
15
-
16
- if [[ ! -e "$MANIFEST" ]]; then
17
- echo "CORE-FILES: clean (no manifest at $MANIFEST — optional consumer config absent)"
18
- exit 0
19
- fi
20
- [[ -r "$MANIFEST" ]] || { echo "check-core-files: manifest not readable: $MANIFEST" >&2; exit 2; }
21
-
22
- mapfile -t lines < <(gates_list_members "$MANIFEST")
23
- if [[ ${#lines[@]} -eq 0 ]]; then
24
- echo "CORE-FILES: clean (manifest $MANIFEST lists no paths)"
25
- exit 0
26
- fi
27
-
28
- # spec: gate-sdk/SPEC.md §check-core-files — a kit: line derives one path per kit root; the
29
- # wildcard refusal is fail-closed because this reader requires each expanded path to exist,
30
- # which is a different invariant from the glob match a couples= field performs
31
- paths=(); _cf_expanded=""
32
- for line in "${lines[@]}"; do
33
- if [[ "$line" == kit:* ]]; then
34
- case "${line#kit:}" in
35
- *'*'* | *'?'* | *'['*)
36
- echo "check-core-files: kit: token carries a wildcard in $MANIFEST: $line" >&2
37
- echo " help: this manifest requires every expanded path to exist and be tracked," >&2
38
- echo " which a wildcard cannot express — name an exact per-kit basename" >&2
39
- echo " (e.g. kit:SPEC.md), or hand-list the paths." >&2
40
- exit 2
41
- ;;
42
- esac
43
- gate_expand_couples_var _cf_expanded "$line"
44
- IFS=',' read -ra _cf_parts <<<"$_cf_expanded"
45
- paths+=("${_cf_parts[@]}")
46
- else
47
- paths+=("$line")
48
- fi
49
- done
50
-
51
- git rev-parse --git-dir >/dev/null 2>&1 || {
52
- echo "check-core-files: not a git repository — cannot verify tracked status" >&2; exit 2; }
53
-
54
- missing=(); untracked=(); present=0
55
- for p in "${paths[@]}"; do
56
- if [[ ! -e "$p" ]]; then
57
- missing+=("$p")
58
- elif git ls-files --error-unmatch -- "$p" >/dev/null 2>&1; then
59
- present=$((present + 1))
60
- else
61
- untracked+=("$p")
62
- fi
63
- done
64
-
65
- if [[ ${#missing[@]} -gt 0 || ${#untracked[@]} -gt 0 ]]; then
66
- echo "check-core-files: core file(s) listed in $MANIFEST but missing or untracked"
67
- echo "(the silent-deletion class downstream gates catch only incidentally):"
68
- for p in "${missing[@]}"; do echo " missing: $p"; done
69
- for p in "${untracked[@]}"; do echo " untracked: $p"; done
70
- echo " help: restore the file (git checkout / git add), or — if the removal is"
71
- echo " intentional — delete its line from $MANIFEST in the same commit."
72
- exit 1
73
- fi
74
-
75
- echo "CORE-FILES: clean ($present manifest path(s) present and tracked in $MANIFEST)"
76
- exit 0
@@ -1,38 +0,0 @@
1
- #!/usr/bin/env bash
2
- # graph: couples=docs/enforcement.md,scripts/gates.list,scripts/*.sh,kit:*.sh,scripts/kpis.list,.claude/settings.json,.github/workflows/*.yml dir=one valve=none tier=precommit
3
- # install: on-surface
4
- # spec: gate-sdk/SPEC.md §check-enforcement-fresh — docs/enforcement.md is the byte-fresh projection of enforcement-map.sh --emit
5
- #
6
- # usage: check-enforcement-fresh.sh [projection-file] [emit-file]
7
- # bare: compare docs/enforcement.md against `enforcement-map.sh --emit`.
8
- # two args: compare projection-file to a pre-baked emit-file (hermetic fixture).
9
- set -uo pipefail
10
-
11
- SDK="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
12
- # shellcheck source=../lib/gate.sh
13
- source "$SDK/lib/gate.sh"
14
-
15
- PROJECTION="${1:-docs/enforcement.md}"
16
- EMIT_SRC="${2:-}"
17
-
18
- [[ -f "$PROJECTION" ]] || { echo "check-enforcement-fresh: projection not found: $PROJECTION" >&2; exit 2; }
19
-
20
- if [[ -n "$EMIT_SRC" ]]; then
21
- [[ -f "$EMIT_SRC" ]] || { echo "check-enforcement-fresh: emit source not found: $EMIT_SRC" >&2; exit 2; }
22
- emitted="$(cat "$EMIT_SRC")"; st=$?
23
- fail_closed "$st" check-enforcement-fresh cat
24
- else
25
- EMITTER="$SDK/bin/enforcement-map.sh"
26
- [[ -x "$EMITTER" ]] || { echo "check-enforcement-fresh: emitter not found: $EMITTER" >&2; exit 2; }
27
- emitted="$(bash "$EMITTER" --emit)"; st=$?
28
- fail_closed "$st" check-enforcement-fresh enforcement-map
29
- fi
30
-
31
- if [[ "$emitted" != "$(cat "$PROJECTION")" ]]; then
32
- echo "check-enforcement-fresh: $PROJECTION is stale vs the enforcement-map emitter:"
33
- diff <(printf '%s\n' "$emitted") "$PROJECTION" | head -20 || true
34
- echo " help: regenerate — bash gate-sdk/bin/enforcement-map.sh --emit > docs/enforcement.md"
35
- exit 1
36
- fi
37
- echo "ENFORCEMENT-FRESH: clean ($PROJECTION byte-matches the enforcement-map emitter)"
38
- exit 0
@@ -1,96 +0,0 @@
1
- #!/usr/bin/env bash
2
- # graph: couples=kit:checks/*.sh,kit:kpis/*.sh,kit:bin/*.sh,scripts/check-*.sh,scripts/kpi-*.sh dir=one valve=none tier=precommit
3
- # install: on-surface
4
- # spec: gate-sdk/SPEC.md §check-exec-bit — every tracked *.sh matching an exec-glob carries git index mode 100755, or a by-path-invoked kit script degrades silently to a skipped check / failed plugin in a fresh clone
5
- #
6
- # usage: check-exec-bit.sh [ls-files-dump]
7
- # No argument: reads `git ls-files -s` from the repo root (the index mode a
8
- # clone gets). With an argument: lints that canned dump (hermetic fixtures).
9
- set -uo pipefail
10
-
11
- SDK="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
12
- # shellcheck source=../lib/gate.sh
13
- source "$SDK/lib/gate.sh"
14
-
15
- if [[ -n "${GATE_SDK_EXEC_GLOBS:-}" ]]; then
16
- read -r -a EXEC_GLOBS <<<"$GATE_SDK_EXEC_GLOBS"
17
- else
18
- gd="$(gate_sdk_gates_dir)"
19
- EXEC_GLOBS=('*/checks/*.sh' '*/kpis/*.sh' '*/bin/*.sh' "$gd/check-*.sh" "$gd/kpi-*.sh")
20
- fi
21
- if [[ -n "${GATE_SDK_EXEC_PRUNE:-}" ]]; then
22
- read -r -a EXEC_PRUNE <<<"$GATE_SDK_EXEC_PRUNE"
23
- else
24
- EXEC_PRUNE=(gate-tests fixtures templates smoke)
25
- fi
26
-
27
- if [[ $# -gt 0 ]]; then
28
- [[ -r "$1" ]] || { echo "check-exec-bit: ls-files dump not readable: $1" >&2; exit 2; }
29
- listing="$(cat -- "$1")"; st=$?
30
- fail_closed "$st" EXEC-BIT cat
31
- else
32
- git rev-parse --git-dir >/dev/null 2>&1 || {
33
- echo "check-exec-bit: not a git repository — cannot read index modes" >&2; exit 2; }
34
- listing="$(git ls-files -s)"; st=$?
35
- fail_closed "$st" EXEC-BIT git-ls-files
36
- fi
37
-
38
- is_pruned() {
39
- local p="$1" seg pr
40
- local -a segs
41
- IFS='/' read -ra segs <<<"$p"
42
- for seg in "${segs[@]}"; do
43
- for pr in "${EXEC_PRUNE[@]}"; do
44
- [[ "$seg" == "$pr" ]] && return 0
45
- done
46
- done
47
- return 1
48
- }
49
-
50
- bad=(); count=0
51
- notexec=(); dcount=0
52
- while IFS= read -r line; do
53
- [[ -n "$line" ]] || continue
54
- mode="${line%% *}"
55
- path="${line#*$'\t'}"
56
- # assertion: a .gate descriptor is data — never sourced, never run — so it
57
- # must be committed non-executable; stated so "not executable" cannot read
58
- # as "not covered" (gate-sdk/SPEC.md §check-exec-bit)
59
- if [[ "$path" == *.gate ]]; then
60
- is_pruned "$path" && continue
61
- dcount=$((dcount + 1))
62
- [[ "$mode" == 100644 ]] || notexec+=("$path (index mode $mode)")
63
- continue
64
- fi
65
- [[ "$path" == *.sh ]] || continue
66
- matched=0
67
- for g in "${EXEC_GLOBS[@]}"; do
68
- # shellcheck disable=SC2053 # g is the glob, deliberately unquoted
69
- [[ "$path" == $g ]] && { matched=1; break; }
70
- done
71
- [[ "$matched" == 1 ]] || continue
72
- is_pruned "$path" && continue
73
- count=$((count + 1))
74
- [[ "$mode" == 100755 ]] || bad+=("$path (index mode $mode)")
75
- done <<< "$listing"
76
-
77
- if [[ ${#bad[@]} -gt 0 ]]; then
78
- echo "check-exec-bit: by-path-invoked script(s) not committed executable (mode 100755) — a"
79
- echo "100644 script degrades silently in a fresh clone (a KPI plugin to 'n/a (plugin"
80
- echo "failed)', a runner-invoked preflight to a skipped check):"
81
- printf ' %s\n' "${bad[@]}"
82
- echo " help: git update-index --chmod=+x <path> (and chmod +x locally), then recommit."
83
- exit 1
84
- fi
85
-
86
- if [[ ${#notexec[@]} -gt 0 ]]; then
87
- echo "check-exec-bit: .gate descriptor(s) committed executable — a descriptor is data"
88
- echo "carrying a manifest and directives, never sourced and never run; an executable one"
89
- echo "invites a reader to run a file with no interpreter line:"
90
- printf ' %s\n' "${notexec[@]}"
91
- echo " help: git update-index --chmod=-x <path> (and chmod -x locally), then recommit."
92
- exit 1
93
- fi
94
-
95
- echo "EXEC-BIT: clean ($count by-path-invoked script(s) at index mode 100755; $dcount .gate descriptor(s) non-executable)"
96
- exit 0