checkwright 0.0.1 → 0.17.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 (839) hide show
  1. package/README.md +260 -4
  2. package/bin/checkwright.sh +53 -0
  3. package/lib/common/lock.sh +28 -0
  4. package/lib/common/profile.sh +58 -0
  5. package/lib/common/recipe.sh +93 -0
  6. package/lib/doctor.sh +90 -0
  7. package/lib/init.sh +289 -0
  8. package/package.json +15 -3
  9. package/payload/canon-kit/README.md +78 -0
  10. package/payload/canon-kit/SPEC.md +1264 -0
  11. package/payload/canon-kit/checks/check-amendment-queue.sh +115 -0
  12. package/payload/canon-kit/checks/check-comment-tier.sh +211 -0
  13. package/payload/canon-kit/checks/check-deprecation-task.sh +90 -0
  14. package/payload/canon-kit/checks/check-docs-cmd.sh +153 -0
  15. package/payload/canon-kit/checks/check-docs-link-convention.sh +71 -0
  16. package/payload/canon-kit/checks/check-knob-citation.sh +117 -0
  17. package/payload/canon-kit/checks/check-knob-default-coupling.sh +239 -0
  18. package/payload/canon-kit/checks/check-manifest-count.sh +46 -0
  19. package/payload/canon-kit/checks/check-manifest-temporal.sh +83 -0
  20. package/payload/canon-kit/checks/check-md-refs.sh +115 -0
  21. package/payload/canon-kit/checks/check-prose-enum.sh +115 -0
  22. package/payload/canon-kit/checks/check-prose-tells.sh +207 -0
  23. package/payload/canon-kit/checks/check-spec-derivable-section.sh +69 -0
  24. package/payload/canon-kit/checks/check-spec-dod-singleton.sh +45 -0
  25. package/payload/canon-kit/checks/check-spec-embedded-source.sh +133 -0
  26. package/payload/canon-kit/checks/check-spec-fence-balance.sh +42 -0
  27. package/payload/canon-kit/checks/check-spec-pointer.sh +176 -0
  28. package/payload/canon-kit/checks/check-surface-duplication.sh +105 -0
  29. package/payload/canon-kit/checks/check-todo-task-liveness.sh +80 -0
  30. package/payload/canon-kit/checks/check-tracking-claim.sh +136 -0
  31. package/payload/canon-kit/gate-tests/check-amendment-queue/bad/SPEC-tidy.md +5 -0
  32. package/payload/canon-kit/gate-tests/check-amendment-queue/bad/TASK-QUEUE.md +15 -0
  33. package/payload/canon-kit/gate-tests/check-amendment-queue/bad/expect.txt +1 -0
  34. package/payload/canon-kit/gate-tests/check-amendment-queue/good/SPEC-widget.md +6 -0
  35. package/payload/canon-kit/gate-tests/check-amendment-queue/good/TASK-QUEUE.md +15 -0
  36. package/payload/canon-kit/gate-tests/check-amendment-queue/good/expect.txt +1 -0
  37. package/payload/canon-kit/gate-tests/check-comment-tier/bad/bad.sh +25 -0
  38. package/payload/canon-kit/gate-tests/check-comment-tier/bad/expect.txt +1 -0
  39. package/payload/canon-kit/gate-tests/check-comment-tier/good/expect.txt +1 -0
  40. package/payload/canon-kit/gate-tests/check-comment-tier/good/good.sh +32 -0
  41. package/payload/canon-kit/gate-tests/check-comment-tier.test.sh +146 -0
  42. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/TASK-QUEUE.md +19 -0
  43. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/bad.sh +6 -0
  44. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/expect.txt +1 -0
  45. package/payload/canon-kit/gate-tests/check-deprecation-task/bad/scripts/canon-config.sh +5 -0
  46. package/payload/canon-kit/gate-tests/check-deprecation-task/good/TASK-QUEUE.md +21 -0
  47. package/payload/canon-kit/gate-tests/check-deprecation-task/good/expect.txt +1 -0
  48. package/payload/canon-kit/gate-tests/check-deprecation-task/good/good.sh +5 -0
  49. package/payload/canon-kit/gate-tests/check-deprecation-task/good/scripts/canon-config.sh +5 -0
  50. package/payload/canon-kit/gate-tests/check-deprecation-task.test.sh +98 -0
  51. package/payload/canon-kit/gate-tests/check-docs-cmd/bad/args +1 -0
  52. package/payload/canon-kit/gate-tests/check-docs-cmd/bad/doc.md +9 -0
  53. package/payload/canon-kit/gate-tests/check-docs-cmd/bad/expect.txt +1 -0
  54. package/payload/canon-kit/gate-tests/check-docs-cmd/good/args +1 -0
  55. package/payload/canon-kit/gate-tests/check-docs-cmd/good/bin/tool.sh +3 -0
  56. package/payload/canon-kit/gate-tests/check-docs-cmd/good/doc.md +18 -0
  57. package/payload/canon-kit/gate-tests/check-docs-cmd/good/expect.txt +1 -0
  58. package/payload/canon-kit/gate-tests/check-docs-link-convention/bad/args +4 -0
  59. package/payload/canon-kit/gate-tests/check-docs-link-convention/bad/docs/demokit/index.md +5 -0
  60. package/payload/canon-kit/gate-tests/check-docs-link-convention/bad/docs/index.md +3 -0
  61. package/payload/canon-kit/gate-tests/check-docs-link-convention/bad/expect.txt +1 -0
  62. package/payload/canon-kit/gate-tests/check-docs-link-convention/good/args +4 -0
  63. package/payload/canon-kit/gate-tests/check-docs-link-convention/good/docs/demokit/index.md +6 -0
  64. package/payload/canon-kit/gate-tests/check-docs-link-convention/good/docs/index.md +3 -0
  65. package/payload/canon-kit/gate-tests/check-docs-link-convention/good/docs/methodology.md +3 -0
  66. package/payload/canon-kit/gate-tests/check-docs-link-convention/good/expect.txt +1 -0
  67. package/payload/canon-kit/gate-tests/check-knob-citation/bad/SPEC.md +10 -0
  68. package/payload/canon-kit/gate-tests/check-knob-citation/bad/expect.txt +1 -0
  69. package/payload/canon-kit/gate-tests/check-knob-citation/good/SPEC.md +19 -0
  70. package/payload/canon-kit/gate-tests/check-knob-citation/good/expect.txt +1 -0
  71. package/payload/canon-kit/gate-tests/check-knob-citation.test.sh +71 -0
  72. package/payload/canon-kit/gate-tests/check-knob-default-coupling/bad/expect.txt +1 -0
  73. package/payload/canon-kit/gate-tests/check-knob-default-coupling/bad/scripts/gate-sdk-config.sh +4 -0
  74. package/payload/canon-kit/gate-tests/check-knob-default-coupling/bad/widget-kit/SPEC.md +4 -0
  75. package/payload/canon-kit/gate-tests/check-knob-default-coupling/bad/widget-kit/lib/widget-cli.sh +3 -0
  76. package/payload/canon-kit/gate-tests/check-knob-default-coupling/bad/widget-kit/lib/widget.sh +5 -0
  77. package/payload/canon-kit/gate-tests/check-knob-default-coupling/good/expect.txt +1 -0
  78. package/payload/canon-kit/gate-tests/check-knob-default-coupling/good/scripts/gate-sdk-config.sh +5 -0
  79. package/payload/canon-kit/gate-tests/check-knob-default-coupling/good/widget-kit/SPEC.md +7 -0
  80. package/payload/canon-kit/gate-tests/check-knob-default-coupling/good/widget-kit/lib/widget-cli.sh +3 -0
  81. package/payload/canon-kit/gate-tests/check-knob-default-coupling/good/widget-kit/lib/widget.sh +5 -0
  82. package/payload/canon-kit/gate-tests/check-knob-default-coupling.test.sh +73 -0
  83. package/payload/canon-kit/gate-tests/check-manifest-count/bad/SPEC.md +15 -0
  84. package/payload/canon-kit/gate-tests/check-manifest-count/bad/expect.txt +1 -0
  85. package/payload/canon-kit/gate-tests/check-manifest-count/good/SPEC.md +37 -0
  86. package/payload/canon-kit/gate-tests/check-manifest-count/good/expect.txt +1 -0
  87. package/payload/canon-kit/gate-tests/check-manifest-count.test.sh +104 -0
  88. package/payload/canon-kit/gate-tests/check-manifest-temporal/bad/SPEC.md +6 -0
  89. package/payload/canon-kit/gate-tests/check-manifest-temporal/bad/expect.txt +1 -0
  90. package/payload/canon-kit/gate-tests/check-manifest-temporal/good/SPEC.md +17 -0
  91. package/payload/canon-kit/gate-tests/check-manifest-temporal/good/expect.txt +1 -0
  92. package/payload/canon-kit/gate-tests/check-md-refs/bad/args +1 -0
  93. package/payload/canon-kit/gate-tests/check-md-refs/bad/doc.md +3 -0
  94. package/payload/canon-kit/gate-tests/check-md-refs/bad/expect.txt +1 -0
  95. package/payload/canon-kit/gate-tests/check-md-refs/good/args +1 -0
  96. package/payload/canon-kit/gate-tests/check-md-refs/good/doc.md +3 -0
  97. package/payload/canon-kit/gate-tests/check-md-refs/good/expect.txt +1 -0
  98. package/payload/canon-kit/gate-tests/check-md-refs/good/target.md +1 -0
  99. package/payload/canon-kit/gate-tests/check-md-refs.test.sh +82 -0
  100. package/payload/canon-kit/gate-tests/check-prose-enum/bad/SPEC.md +4 -0
  101. package/payload/canon-kit/gate-tests/check-prose-enum/bad/expect.txt +1 -0
  102. package/payload/canon-kit/gate-tests/check-prose-enum/bad/scripts/canon-config.sh +4 -0
  103. package/payload/canon-kit/gate-tests/check-prose-enum/good/SPEC.md +16 -0
  104. package/payload/canon-kit/gate-tests/check-prose-enum/good/expect.txt +1 -0
  105. package/payload/canon-kit/gate-tests/check-prose-enum/good/scripts/canon-config.sh +4 -0
  106. package/payload/canon-kit/gate-tests/check-prose-enum.test.sh +127 -0
  107. package/payload/canon-kit/gate-tests/check-prose-tells/bad/expect.txt +1 -0
  108. package/payload/canon-kit/gate-tests/check-prose-tells/bad/prose.md +15 -0
  109. package/payload/canon-kit/gate-tests/check-prose-tells/bad/scripts/canon-config.sh +8 -0
  110. package/payload/canon-kit/gate-tests/check-prose-tells/good/expect.txt +1 -0
  111. package/payload/canon-kit/gate-tests/check-prose-tells/good/prose.md +21 -0
  112. package/payload/canon-kit/gate-tests/check-prose-tells/good/scripts/canon-config.sh +8 -0
  113. package/payload/canon-kit/gate-tests/check-spec-derivable-section/bad/SPEC.md +20 -0
  114. package/payload/canon-kit/gate-tests/check-spec-derivable-section/bad/expect.txt +1 -0
  115. package/payload/canon-kit/gate-tests/check-spec-derivable-section/good/SPEC.md +13 -0
  116. package/payload/canon-kit/gate-tests/check-spec-derivable-section/good/expect.txt +1 -0
  117. package/payload/canon-kit/gate-tests/check-spec-dod-singleton/bad/SPEC.md +15 -0
  118. package/payload/canon-kit/gate-tests/check-spec-dod-singleton/bad/expect.txt +1 -0
  119. package/payload/canon-kit/gate-tests/check-spec-dod-singleton/good/SPEC.md +13 -0
  120. package/payload/canon-kit/gate-tests/check-spec-dod-singleton/good/expect.txt +1 -0
  121. package/payload/canon-kit/gate-tests/check-spec-dod-singleton.test.sh +63 -0
  122. package/payload/canon-kit/gate-tests/check-spec-embedded-source/bad/SPEC.md +16 -0
  123. package/payload/canon-kit/gate-tests/check-spec-embedded-source/bad/expect.txt +1 -0
  124. package/payload/canon-kit/gate-tests/check-spec-embedded-source/bad/widget.sh +9 -0
  125. package/payload/canon-kit/gate-tests/check-spec-embedded-source/good/SPEC.md +19 -0
  126. package/payload/canon-kit/gate-tests/check-spec-embedded-source/good/expect.txt +1 -0
  127. package/payload/canon-kit/gate-tests/check-spec-embedded-source/good/widget.sh +9 -0
  128. package/payload/canon-kit/gate-tests/check-spec-fence-balance/bad/args +1 -0
  129. package/payload/canon-kit/gate-tests/check-spec-fence-balance/bad/doc.md +8 -0
  130. package/payload/canon-kit/gate-tests/check-spec-fence-balance/bad/expect.txt +1 -0
  131. package/payload/canon-kit/gate-tests/check-spec-fence-balance/good/args +1 -0
  132. package/payload/canon-kit/gate-tests/check-spec-fence-balance/good/doc.md +9 -0
  133. package/payload/canon-kit/gate-tests/check-spec-fence-balance/good/expect.txt +1 -0
  134. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/README.md +4 -0
  135. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/SPEC-target.md +6 -0
  136. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/SPEC-widget.md +5 -0
  137. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/cand-tmpl.md +5 -0
  138. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/expect.txt +1 -0
  139. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/scripts/canon-config.sh +5 -0
  140. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/widget.sh +5 -0
  141. package/payload/canon-kit/gate-tests/check-spec-pointer/good/README.md +4 -0
  142. package/payload/canon-kit/gate-tests/check-spec-pointer/good/SPEC-target.md +6 -0
  143. package/payload/canon-kit/gate-tests/check-spec-pointer/good/SPEC-widget.md +5 -0
  144. package/payload/canon-kit/gate-tests/check-spec-pointer/good/cand-tmpl.md +7 -0
  145. package/payload/canon-kit/gate-tests/check-spec-pointer/good/expect.txt +1 -0
  146. package/payload/canon-kit/gate-tests/check-spec-pointer/good/scripts/canon-config.sh +5 -0
  147. package/payload/canon-kit/gate-tests/check-spec-pointer/good/widget.sh +6 -0
  148. package/payload/canon-kit/gate-tests/check-surface-duplication/bad/GLOSSARY.md +11 -0
  149. package/payload/canon-kit/gate-tests/check-surface-duplication/bad/VISION.md +6 -0
  150. package/payload/canon-kit/gate-tests/check-surface-duplication/bad/expect.txt +1 -0
  151. package/payload/canon-kit/gate-tests/check-surface-duplication/good/GLOSSARY.md +11 -0
  152. package/payload/canon-kit/gate-tests/check-surface-duplication/good/VISION.md +6 -0
  153. package/payload/canon-kit/gate-tests/check-surface-duplication/good/expect.txt +1 -0
  154. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/TASK-QUEUE.md +19 -0
  155. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/bad.sh +5 -0
  156. package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/expect.txt +1 -0
  157. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/TASK-QUEUE.md +23 -0
  158. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/expect.txt +1 -0
  159. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/good.sh +5 -0
  160. package/payload/canon-kit/gate-tests/check-tracking-claim/bad/README.md +4 -0
  161. package/payload/canon-kit/gate-tests/check-tracking-claim/bad/args +1 -0
  162. package/payload/canon-kit/gate-tests/check-tracking-claim/bad/expect.txt +1 -0
  163. package/payload/canon-kit/gate-tests/check-tracking-claim/bad/kept.txt +1 -0
  164. package/payload/canon-kit/gate-tests/check-tracking-claim/good/README.md +7 -0
  165. package/payload/canon-kit/gate-tests/check-tracking-claim/good/args +1 -0
  166. package/payload/canon-kit/gate-tests/check-tracking-claim/good/expect.txt +1 -0
  167. package/payload/canon-kit/gate-tests/check-tracking-claim/good/kept.txt +1 -0
  168. package/payload/canon-kit/gate-tests/check-tracking-claim/good/roster.list +1 -0
  169. package/payload/canon-kit/gate-tests/check-tracking-claim.test.sh +86 -0
  170. package/payload/canon-kit/lib/spec.sh +475 -0
  171. package/payload/canon-kit/smoke/install.sh +36 -0
  172. package/payload/canon-kit/smoke/violation.sh +22 -0
  173. package/payload/canon-kit/templates/SPEC-amendment.md +55 -0
  174. package/payload/canon-kit/templates/canon-config.sh +2 -0
  175. package/payload/context-kit/README.md +82 -0
  176. package/payload/context-kit/SPEC.md +785 -0
  177. package/payload/context-kit/bin/always-loaded.sh +86 -0
  178. package/payload/context-kit/bin/env-probe.sh +144 -0
  179. package/payload/context-kit/bin/footprint.sh +144 -0
  180. package/payload/context-kit/bin/md-index.sh +80 -0
  181. package/payload/context-kit/bin/md-section.sh +63 -0
  182. package/payload/context-kit/bin/pub-index.sh +90 -0
  183. package/payload/context-kit/bin/run-index-tests.sh +91 -0
  184. package/payload/context-kit/checks/check-brevity.sh +123 -0
  185. package/payload/context-kit/checks/check-footprint-fresh.sh +38 -0
  186. package/payload/context-kit/checks/check-memory-off.sh +112 -0
  187. package/payload/context-kit/checks/check-settings-pins.sh +110 -0
  188. package/payload/context-kit/gate-tests/check-brevity/bad/CLAUDE.md +14 -0
  189. package/payload/context-kit/gate-tests/check-brevity/bad/args +2 -0
  190. package/payload/context-kit/gate-tests/check-brevity/bad/expect.txt +1 -0
  191. package/payload/context-kit/gate-tests/check-brevity/good/CLAUDE.md +20 -0
  192. package/payload/context-kit/gate-tests/check-brevity/good/args +2 -0
  193. package/payload/context-kit/gate-tests/check-brevity/good/expect.txt +1 -0
  194. package/payload/context-kit/gate-tests/check-brevity.test.sh +89 -0
  195. package/payload/context-kit/gate-tests/check-footprint-fresh/bad/args +4 -0
  196. package/payload/context-kit/gate-tests/check-footprint-fresh/bad/emit.txt +12 -0
  197. package/payload/context-kit/gate-tests/check-footprint-fresh/bad/expect.txt +1 -0
  198. package/payload/context-kit/gate-tests/check-footprint-fresh/bad/projection.txt +11 -0
  199. package/payload/context-kit/gate-tests/check-footprint-fresh/good/args +4 -0
  200. package/payload/context-kit/gate-tests/check-footprint-fresh/good/emit.txt +12 -0
  201. package/payload/context-kit/gate-tests/check-footprint-fresh/good/expect.txt +1 -0
  202. package/payload/context-kit/gate-tests/check-footprint-fresh/good/projection.txt +12 -0
  203. package/payload/context-kit/gate-tests/check-memory-off/bad/args +1 -0
  204. package/payload/context-kit/gate-tests/check-memory-off/bad/expect.txt +1 -0
  205. package/payload/context-kit/gate-tests/check-memory-off/bad/memory/example-fact.md +6 -0
  206. package/payload/context-kit/gate-tests/check-memory-off/good/args +1 -0
  207. package/payload/context-kit/gate-tests/check-memory-off/good/expect.txt +1 -0
  208. package/payload/context-kit/gate-tests/check-memory-off/good/memory/.gitkeep +0 -0
  209. package/payload/context-kit/gate-tests/check-memory-off.test.sh +54 -0
  210. package/payload/context-kit/gate-tests/check-settings-pins/bad/args +1 -0
  211. package/payload/context-kit/gate-tests/check-settings-pins/bad/expect.txt +1 -0
  212. package/payload/context-kit/gate-tests/check-settings-pins/bad/settings-pins.conf +3 -0
  213. package/payload/context-kit/gate-tests/check-settings-pins/bad/settings.json +6 -0
  214. package/payload/context-kit/gate-tests/check-settings-pins/good/args +1 -0
  215. package/payload/context-kit/gate-tests/check-settings-pins/good/expect.txt +1 -0
  216. package/payload/context-kit/gate-tests/check-settings-pins/good/settings-pins.conf +3 -0
  217. package/payload/context-kit/gate-tests/check-settings-pins/good/settings.json +6 -0
  218. package/payload/context-kit/index-tests/corpus/baseline.txt +2 -0
  219. package/payload/context-kit/index-tests/corpus/hook-sample.txt +4 -0
  220. package/payload/context-kit/index-tests/corpus/sample.md +23 -0
  221. package/payload/context-kit/index-tests/corpus/sample.rs +24 -0
  222. package/payload/context-kit/index-tests/corpus/sample.ts +34 -0
  223. package/payload/context-kit/index-tests/corpus/surface.md +6 -0
  224. package/payload/context-kit/index-tests/expected/always-loaded.txt +1 -0
  225. package/payload/context-kit/index-tests/expected/md-index.txt +6 -0
  226. package/payload/context-kit/index-tests/expected/md-section.txt +6 -0
  227. package/payload/context-kit/index-tests/expected/pub-index-shadow.txt +2 -0
  228. package/payload/context-kit/index-tests/expected/pub-index-ts.txt +12 -0
  229. package/payload/context-kit/index-tests/expected/pub-index.txt +10 -0
  230. package/payload/context-kit/index-tests/expected/toolfloor.txt +14 -0
  231. package/payload/context-kit/index-tests/toolfloor-cases.sh +29 -0
  232. package/payload/context-kit/lib/pub-lang/rust.sh +26 -0
  233. package/payload/context-kit/lib/pub-lang/ts.sh +32 -0
  234. package/payload/context-kit/lib/toolfloor.sh +47 -0
  235. package/payload/context-kit/smoke/agents-md.sh +116 -0
  236. package/payload/context-kit/smoke/install.sh +60 -0
  237. package/payload/context-kit/smoke/violation.sh +21 -0
  238. package/payload/context-kit/templates/close-brevity.md +30 -0
  239. package/payload/context-kit/templates/context-config.sh +2 -0
  240. package/payload/context-kit/templates/session-context.sh +133 -0
  241. package/payload/context-kit/templates/settings-sessionstart.json +12 -0
  242. package/payload/delegation-kit/README.md +87 -0
  243. package/payload/delegation-kit/SPEC.md +780 -0
  244. package/payload/delegation-kit/bin/run-budget-guard-tests.sh +88 -0
  245. package/payload/delegation-kit/bin/run-trend-tests.sh +63 -0
  246. package/payload/delegation-kit/bin/run-usage-tests.sh +226 -0
  247. package/payload/delegation-kit/bin/usage-trend.sh +120 -0
  248. package/payload/delegation-kit/bin/usage-verdict.sh +144 -0
  249. package/payload/delegation-kit/checks/check-gate-tamper.sh +139 -0
  250. package/payload/delegation-kit/checks/check-rule-citation.sh +76 -0
  251. package/payload/delegation-kit/gate-tests/check-gate-tamper/bad/args +1 -0
  252. package/payload/delegation-kit/gate-tests/check-gate-tamper/bad/expect.txt +1 -0
  253. package/payload/delegation-kit/gate-tests/check-gate-tamper/bad/staged-files +5 -0
  254. package/payload/delegation-kit/gate-tests/check-gate-tamper/good/added-exemptions +2 -0
  255. package/payload/delegation-kit/gate-tests/check-gate-tamper/good/args +1 -0
  256. package/payload/delegation-kit/gate-tests/check-gate-tamper/good/expect.txt +1 -0
  257. package/payload/delegation-kit/gate-tests/check-gate-tamper/good/staged-files +5 -0
  258. package/payload/delegation-kit/gate-tests/check-rule-citation/bad/args +1 -0
  259. package/payload/delegation-kit/gate-tests/check-rule-citation/bad/expect.txt +1 -0
  260. package/payload/delegation-kit/gate-tests/check-rule-citation/bad/spec.md +9 -0
  261. package/payload/delegation-kit/gate-tests/check-rule-citation/bad/tmpl.md +4 -0
  262. package/payload/delegation-kit/gate-tests/check-rule-citation/good/args +1 -0
  263. package/payload/delegation-kit/gate-tests/check-rule-citation/good/expect.txt +1 -0
  264. package/payload/delegation-kit/gate-tests/check-rule-citation/good/spec.md +20 -0
  265. package/payload/delegation-kit/gate-tests/check-rule-citation/good/tmpl.md +5 -0
  266. package/payload/delegation-kit/lib/delegation.sh +81 -0
  267. package/payload/delegation-kit/smoke/install.sh +61 -0
  268. package/payload/delegation-kit/smoke/violation.sh +16 -0
  269. package/payload/delegation-kit/templates/agent-budget-guard.sh +18 -0
  270. package/payload/delegation-kit/templates/agent-execution.md +136 -0
  271. package/payload/delegation-kit/templates/delegation-config.sh +2 -0
  272. package/payload/delegation-kit/templates/dispatch-checklists.md +60 -0
  273. package/payload/delegation-kit/templates/statusline-usage.sh +79 -0
  274. package/payload/delegation-kit/templates/usage-poller.sh +67 -0
  275. package/payload/delegation-kit/usage-tests/budget-guard-cases.tsv +20 -0
  276. package/payload/delegation-kit/usage-tests/cases.tsv +44 -0
  277. package/payload/delegation-kit/usage-tests/trend-history.log +20 -0
  278. package/payload/doctrine-kit/DOCTRINE.md +386 -0
  279. package/payload/doctrine-kit/README.md +70 -0
  280. package/payload/doctrine-kit/SPEC.md +233 -0
  281. package/payload/doctrine-kit/bin/install-doctrine.sh +44 -0
  282. package/payload/doctrine-kit/bin/stage-rules.sh +51 -0
  283. package/payload/doctrine-kit/checks/check-doctrine-registration.sh +216 -0
  284. package/payload/doctrine-kit/gate-tests/check-doctrine-registration/bad/AGENT.md +14 -0
  285. package/payload/doctrine-kit/gate-tests/check-doctrine-registration/bad/DOCTRINE.md +12 -0
  286. package/payload/doctrine-kit/gate-tests/check-doctrine-registration/bad/args +1 -0
  287. package/payload/doctrine-kit/gate-tests/check-doctrine-registration/bad/expect.txt +1 -0
  288. package/payload/doctrine-kit/gate-tests/check-doctrine-registration/good/AGENT.md +15 -0
  289. package/payload/doctrine-kit/gate-tests/check-doctrine-registration/good/DOCTRINE.md +12 -0
  290. package/payload/doctrine-kit/gate-tests/check-doctrine-registration/good/args +1 -0
  291. package/payload/doctrine-kit/gate-tests/check-doctrine-registration/good/expect.txt +1 -0
  292. package/payload/doctrine-kit/gate-tests/check-doctrine-registration.test.sh +208 -0
  293. package/payload/doctrine-kit/lib/doctrine.sh +29 -0
  294. package/payload/doctrine-kit/smoke/install.sh +24 -0
  295. package/payload/doctrine-kit/smoke/violation.sh +13 -0
  296. package/payload/drift-kit/README.md +115 -0
  297. package/payload/drift-kit/SPEC.md +828 -0
  298. package/payload/drift-kit/bin/drift-report.sh +152 -0
  299. package/payload/drift-kit/bin/kfric.sh +42 -0
  300. package/payload/drift-kit/bin/overhead-meter.sh +106 -0
  301. package/payload/drift-kit/bin/stage-economics.sh +311 -0
  302. package/payload/drift-kit/bin/trajectory.sh +242 -0
  303. package/payload/drift-kit/kpis/kpi-always-loaded.sh +39 -0
  304. package/payload/drift-kit/kpis/kpi-amendment-age.sh +33 -0
  305. package/payload/drift-kit/kpis/kpi-deferred-age.sh +44 -0
  306. package/payload/drift-kit/kpis/kpi-gate-backlog.sh +52 -0
  307. package/payload/drift-kit/kpis/kpi-gate-runtime.sh +31 -0
  308. package/payload/drift-kit/kpis/kpi-knowledge-friction.sh +21 -0
  309. package/payload/drift-kit/kpis/kpi-overhead.sh +44 -0
  310. package/payload/drift-kit/kpis/kpi-price-table-age.sh +68 -0
  311. package/payload/drift-kit/kpis/kpi-prompt-friction.sh +38 -0
  312. package/payload/drift-kit/kpis/kpi-settings-local.sh +21 -0
  313. package/payload/drift-kit/kpis/kpi-task-split.sh +43 -0
  314. package/payload/drift-kit/smoke/install.sh +348 -0
  315. package/payload/drift-kit/smoke/overhead-fixture.jsonl +4 -0
  316. package/payload/drift-kit/templates/close-knowledge.md +24 -0
  317. package/payload/drift-kit/templates/drift-config.sh +2 -0
  318. package/payload/drift-kit/templates/economics.md +45 -0
  319. package/payload/drift-kit/templates/kpi-deprecated-surface.sh +32 -0
  320. package/payload/drift-kit/templates/kpis.list +22 -0
  321. package/payload/drift-kit/templates/price-table.tsv +21 -0
  322. package/payload/evidence-kit/README.md +59 -0
  323. package/payload/evidence-kit/SPEC.md +261 -0
  324. package/payload/evidence-kit/bin/diff-baseline.sh +34 -0
  325. package/payload/evidence-kit/bin/run-validate.sh +82 -0
  326. package/payload/evidence-kit/checks/check-evidence-baseline.sh +103 -0
  327. package/payload/evidence-kit/checks/check-evidence-manifest.sh +104 -0
  328. package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/TASK-QUEUE.md +3 -0
  329. package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/args +2 -0
  330. package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/expect.txt +1 -0
  331. package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/validate-baseline.txt +3 -0
  332. package/payload/evidence-kit/gate-tests/check-evidence-baseline/good/TASK-QUEUE.md +3 -0
  333. package/payload/evidence-kit/gate-tests/check-evidence-baseline/good/args +2 -0
  334. package/payload/evidence-kit/gate-tests/check-evidence-baseline/good/expect.txt +1 -0
  335. package/payload/evidence-kit/gate-tests/check-evidence-baseline/good/validate-baseline.txt +3 -0
  336. package/payload/evidence-kit/gate-tests/check-evidence-baseline.test.sh +84 -0
  337. package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/TASK-QUEUE.md +1 -0
  338. package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/WORKFLOW-STATE.txt +3 -0
  339. package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/args +3 -0
  340. package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/expect.txt +1 -0
  341. package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/validate-evidence.txt +2 -0
  342. package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/TASK-QUEUE.md +1 -0
  343. package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/WORKFLOW-STATE.txt +3 -0
  344. package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/args +3 -0
  345. package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/expect.txt +1 -0
  346. package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/validate-evidence.txt +2 -0
  347. package/payload/evidence-kit/gate-tests/check-evidence-manifest.test.sh +107 -0
  348. package/payload/evidence-kit/gate-tests/evidence-lib.test.sh +82 -0
  349. package/payload/evidence-kit/lib/evidence.sh +173 -0
  350. package/payload/evidence-kit/smoke/install.sh +45 -0
  351. package/payload/evidence-kit/smoke/violation.sh +8 -0
  352. package/payload/evidence-kit/templates/evidence-config.sh +2 -0
  353. package/payload/gate-sdk/README.md +124 -0
  354. package/payload/gate-sdk/SPEC.md +1861 -0
  355. package/payload/gate-sdk/bin/enforcement-map.sh +272 -0
  356. package/payload/gate-sdk/bin/gen-pre-commit.sh +267 -0
  357. package/payload/gate-sdk/bin/install-hooks.sh +48 -0
  358. package/payload/gate-sdk/bin/run-consumer-smoke.sh +112 -0
  359. package/payload/gate-sdk/bin/run-gate-tests.sh +128 -0
  360. package/payload/gate-sdk/bin/run-gates.sh +147 -0
  361. package/payload/gate-sdk/bin/upgrade-smoke.sh +163 -0
  362. package/payload/gate-sdk/checks/check-action-pinning.sh +55 -0
  363. package/payload/gate-sdk/checks/check-action-run-shell.sh +219 -0
  364. package/payload/gate-sdk/checks/check-assertion-strength.sh +134 -0
  365. package/payload/gate-sdk/checks/check-commit-msg.sh +50 -0
  366. package/payload/gate-sdk/checks/check-commit-subject.sh +43 -0
  367. package/payload/gate-sdk/checks/check-core-files.sh +52 -0
  368. package/payload/gate-sdk/checks/check-enforcement-fresh.sh +37 -0
  369. package/payload/gate-sdk/checks/check-exec-bit.sh +76 -0
  370. package/payload/gate-sdk/checks/check-gate-assertions.sh +123 -0
  371. package/payload/gate-sdk/checks/check-gate-exemption-tasks.sh +106 -0
  372. package/payload/gate-sdk/checks/check-gate-fail-closed.sh +84 -0
  373. package/payload/gate-sdk/checks/check-gate-fixture-coverage.sh +92 -0
  374. package/payload/gate-sdk/checks/check-gate-output.sh +65 -0
  375. package/payload/gate-sdk/checks/check-graph.sh +632 -0
  376. package/payload/gate-sdk/checks/check-hook-exec-bit.sh +45 -0
  377. package/payload/gate-sdk/checks/check-identity.sh +134 -0
  378. package/payload/gate-sdk/checks/check-kit-enum.sh +94 -0
  379. package/payload/gate-sdk/checks/check-kit-registration.sh +68 -0
  380. package/payload/gate-sdk/checks/check-readme-roster.sh +102 -0
  381. package/payload/gate-sdk/checks/check-reads-couples.sh +148 -0
  382. package/payload/gate-sdk/checks/check-root-tiering.sh +66 -0
  383. package/payload/gate-sdk/checks/check-shellcheck.sh +55 -0
  384. package/payload/gate-sdk/checks/check-smoke-entry-guard.sh +53 -0
  385. package/payload/gate-sdk/checks/check-template-copy-parity.sh +126 -0
  386. package/payload/gate-sdk/checks/check-test-hermetic.sh +119 -0
  387. package/payload/gate-sdk/checks/check-tree-terms.sh +61 -0
  388. package/payload/gate-sdk/checks/check-workflow-tiering.sh +84 -0
  389. package/payload/gate-sdk/gate-tests/check-action-pinning/bad/args +1 -0
  390. package/payload/gate-sdk/gate-tests/check-action-pinning/bad/expect.txt +1 -0
  391. package/payload/gate-sdk/gate-tests/check-action-pinning/bad/tree/mutable.yml +11 -0
  392. package/payload/gate-sdk/gate-tests/check-action-pinning/bad/tree/nested/pinned.yml +5 -0
  393. package/payload/gate-sdk/gate-tests/check-action-pinning/good/args +1 -0
  394. package/payload/gate-sdk/gate-tests/check-action-pinning/good/expect.txt +1 -0
  395. package/payload/gate-sdk/gate-tests/check-action-pinning/good/tree/nested/deep.yml +5 -0
  396. package/payload/gate-sdk/gate-tests/check-action-pinning/good/tree/no-refs.yaml +8 -0
  397. package/payload/gate-sdk/gate-tests/check-action-pinning/good/tree/pinned.yml +10 -0
  398. package/payload/gate-sdk/gate-tests/check-action-run-shell/bad/args +3 -0
  399. package/payload/gate-sdk/gate-tests/check-action-run-shell/bad/expect.txt +1 -0
  400. package/payload/gate-sdk/gate-tests/check-action-run-shell/bad/tree/workflows/ci.yml +15 -0
  401. package/payload/gate-sdk/gate-tests/check-action-run-shell/good/args +3 -0
  402. package/payload/gate-sdk/gate-tests/check-action-run-shell/good/expect.txt +1 -0
  403. package/payload/gate-sdk/gate-tests/check-action-run-shell/good/tree/action.yml +14 -0
  404. package/payload/gate-sdk/gate-tests/check-action-run-shell/good/tree/not-actions.yml +16 -0
  405. package/payload/gate-sdk/gate-tests/check-action-run-shell/good/tree/workflows/ci.yml +106 -0
  406. package/payload/gate-sdk/gate-tests/check-action-run-shell.test.sh +88 -0
  407. package/payload/gate-sdk/gate-tests/check-assertion-strength/bad/args +3 -0
  408. package/payload/gate-sdk/gate-tests/check-assertion-strength/bad/bin/verdict.sh +5 -0
  409. package/payload/gate-sdk/gate-tests/check-assertion-strength/bad/expect.txt +1 -0
  410. package/payload/gate-sdk/gate-tests/check-assertion-strength/bad/smoke/install.sh +11 -0
  411. package/payload/gate-sdk/gate-tests/check-assertion-strength/good/args +3 -0
  412. package/payload/gate-sdk/gate-tests/check-assertion-strength/good/bin/verdict.sh +5 -0
  413. package/payload/gate-sdk/gate-tests/check-assertion-strength/good/expect.txt +1 -0
  414. package/payload/gate-sdk/gate-tests/check-assertion-strength/good/smoke/install.sh +16 -0
  415. package/payload/gate-sdk/gate-tests/check-commit-msg/bad/args +2 -0
  416. package/payload/gate-sdk/gate-tests/check-commit-msg/bad/expect.txt +1 -0
  417. package/payload/gate-sdk/gate-tests/check-commit-msg/bad/msg.txt +5 -0
  418. package/payload/gate-sdk/gate-tests/check-commit-msg/bad/patterns.list +5 -0
  419. package/payload/gate-sdk/gate-tests/check-commit-msg/good/args +2 -0
  420. package/payload/gate-sdk/gate-tests/check-commit-msg/good/expect.txt +1 -0
  421. package/payload/gate-sdk/gate-tests/check-commit-msg/good/msg.txt +5 -0
  422. package/payload/gate-sdk/gate-tests/check-commit-msg/good/patterns.list +5 -0
  423. package/payload/gate-sdk/gate-tests/check-commit-subject/bad/args +2 -0
  424. package/payload/gate-sdk/gate-tests/check-commit-subject/bad/expect.txt +1 -0
  425. package/payload/gate-sdk/gate-tests/check-commit-subject/bad/msg.txt +4 -0
  426. package/payload/gate-sdk/gate-tests/check-commit-subject/good/args +2 -0
  427. package/payload/gate-sdk/gate-tests/check-commit-subject/good/expect.txt +1 -0
  428. package/payload/gate-sdk/gate-tests/check-commit-subject/good/msg.txt +5 -0
  429. package/payload/gate-sdk/gate-tests/check-commit-subject.test.sh +73 -0
  430. package/payload/gate-sdk/gate-tests/check-core-files/bad/args +1 -0
  431. package/payload/gate-sdk/gate-tests/check-core-files/bad/core-files.list +3 -0
  432. package/payload/gate-sdk/gate-tests/check-core-files/bad/expect.txt +1 -0
  433. package/payload/gate-sdk/gate-tests/check-core-files/bad/present.txt +1 -0
  434. package/payload/gate-sdk/gate-tests/check-core-files/good/args +1 -0
  435. package/payload/gate-sdk/gate-tests/check-core-files/good/core-files.list +5 -0
  436. package/payload/gate-sdk/gate-tests/check-core-files/good/expect.txt +1 -0
  437. package/payload/gate-sdk/gate-tests/check-core-files/good/nested/also-present.txt +1 -0
  438. package/payload/gate-sdk/gate-tests/check-core-files/good/present.txt +1 -0
  439. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/bad/args +4 -0
  440. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/bad/emit.txt +14 -0
  441. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/bad/expect.txt +1 -0
  442. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/bad/projection.txt +7 -0
  443. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/args +4 -0
  444. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/emit.txt +14 -0
  445. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/expect.txt +1 -0
  446. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/projection.txt +14 -0
  447. package/payload/gate-sdk/gate-tests/check-exec-bit/bad/args +1 -0
  448. package/payload/gate-sdk/gate-tests/check-exec-bit/bad/dump.txt +7 -0
  449. package/payload/gate-sdk/gate-tests/check-exec-bit/bad/expect.txt +1 -0
  450. package/payload/gate-sdk/gate-tests/check-exec-bit/good/args +1 -0
  451. package/payload/gate-sdk/gate-tests/check-exec-bit/good/dump.txt +7 -0
  452. package/payload/gate-sdk/gate-tests/check-exec-bit/good/expect.txt +1 -0
  453. package/payload/gate-sdk/gate-tests/check-exec-bit.test.sh +46 -0
  454. package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/args +1 -0
  455. package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/expect.txt +1 -0
  456. package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/scripts/SPEC.md +13 -0
  457. package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/scripts/check-baz.sh +13 -0
  458. package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/scripts/check-foo.sh +10 -0
  459. package/payload/gate-sdk/gate-tests/check-gate-assertions/good/args +1 -0
  460. package/payload/gate-sdk/gate-tests/check-gate-assertions/good/expect.txt +1 -0
  461. package/payload/gate-sdk/gate-tests/check-gate-assertions/good/scripts/SPEC.md +20 -0
  462. package/payload/gate-sdk/gate-tests/check-gate-assertions/good/scripts/check-baz.sh +12 -0
  463. package/payload/gate-sdk/gate-tests/check-gate-assertions/good/scripts/check-foo.sh +9 -0
  464. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/TASK-QUEUE.md +9 -0
  465. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/args +1 -0
  466. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/expect.txt +1 -0
  467. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/gates/check-sample.sh +11 -0
  468. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/TASK-QUEUE.md +9 -0
  469. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/args +1 -0
  470. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/expect.txt +1 -0
  471. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/gates/check-sample.sh +11 -0
  472. package/payload/gate-sdk/gate-tests/check-gate-fail-closed/bad/args +1 -0
  473. package/payload/gate-sdk/gate-tests/check-gate-fail-closed/bad/expect.txt +1 -0
  474. package/payload/gate-sdk/gate-tests/check-gate-fail-closed/bad/gates/check-sample.sh +8 -0
  475. package/payload/gate-sdk/gate-tests/check-gate-fail-closed/good/args +1 -0
  476. package/payload/gate-sdk/gate-tests/check-gate-fail-closed/good/expect.txt +1 -0
  477. package/payload/gate-sdk/gate-tests/check-gate-fail-closed/good/gates/check-sample.sh +8 -0
  478. package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/args +1 -0
  479. package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/check-gamma.sh +4 -0
  480. package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/expect.txt +1 -0
  481. package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/gate-tests/check-alpha/bad/.keep +0 -0
  482. package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/gate-tests/check-alpha/good/.keep +0 -0
  483. package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/gates.list +4 -0
  484. package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/args +1 -0
  485. package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/check-beta.sh +5 -0
  486. package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/expect.txt +1 -0
  487. package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/gate-tests/check-alpha/bad/.keep +0 -0
  488. package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/gate-tests/check-alpha/good/.keep +0 -0
  489. package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/gates.list +5 -0
  490. package/payload/gate-sdk/gate-tests/check-gate-output/bad/args +1 -0
  491. package/payload/gate-sdk/gate-tests/check-gate-output/bad/check-sample.sh +4 -0
  492. package/payload/gate-sdk/gate-tests/check-gate-output/bad/expect.txt +1 -0
  493. package/payload/gate-sdk/gate-tests/check-gate-output/bad/gates.list +2 -0
  494. package/payload/gate-sdk/gate-tests/check-gate-output/good/args +1 -0
  495. package/payload/gate-sdk/gate-tests/check-gate-output/good/check-sample.sh +9 -0
  496. package/payload/gate-sdk/gate-tests/check-gate-output/good/expect.txt +1 -0
  497. package/payload/gate-sdk/gate-tests/check-gate-output/good/gates.list +3 -0
  498. package/payload/gate-sdk/gate-tests/check-graph/bad/SPEC-example-gate.md +12 -0
  499. package/payload/gate-sdk/gate-tests/check-graph/bad/args +1 -0
  500. package/payload/gate-sdk/gate-tests/check-graph/bad/expect.txt +1 -0
  501. package/payload/gate-sdk/gate-tests/check-graph/good/SPEC-example-gate.md +20 -0
  502. package/payload/gate-sdk/gate-tests/check-graph/good/args +3 -0
  503. package/payload/gate-sdk/gate-tests/check-graph/good/expect.txt +1 -0
  504. package/payload/gate-sdk/gate-tests/check-graph-cap.test.sh +51 -0
  505. package/payload/gate-sdk/gate-tests/check-graph-refs.test.sh +55 -0
  506. package/payload/gate-sdk/gate-tests/check-graph-theme.test.sh +63 -0
  507. package/payload/gate-sdk/gate-tests/check-hook-exec-bit/bad/args +1 -0
  508. package/payload/gate-sdk/gate-tests/check-hook-exec-bit/bad/expect.txt +1 -0
  509. package/payload/gate-sdk/gate-tests/check-hook-exec-bit/bad/hooks/pre-commit +2 -0
  510. package/payload/gate-sdk/gate-tests/check-hook-exec-bit/good/args +1 -0
  511. package/payload/gate-sdk/gate-tests/check-hook-exec-bit/good/expect.txt +1 -0
  512. package/payload/gate-sdk/gate-tests/check-hook-exec-bit/good/hooks/pre-commit +2 -0
  513. package/payload/gate-sdk/gate-tests/check-identity/bad/args +1 -0
  514. package/payload/gate-sdk/gate-tests/check-identity/bad/expect.txt +1 -0
  515. package/payload/gate-sdk/gate-tests/check-identity/bad/git-config-email +1 -0
  516. package/payload/gate-sdk/gate-tests/check-identity/bad/git-remotes +2 -0
  517. package/payload/gate-sdk/gate-tests/check-identity/bad/identity.conf +4 -0
  518. package/payload/gate-sdk/gate-tests/check-identity/good/args +1 -0
  519. package/payload/gate-sdk/gate-tests/check-identity/good/expect.txt +1 -0
  520. package/payload/gate-sdk/gate-tests/check-identity/good/git-config-email +1 -0
  521. package/payload/gate-sdk/gate-tests/check-identity/good/git-remotes +3 -0
  522. package/payload/gate-sdk/gate-tests/check-identity/good/identity.conf +5 -0
  523. package/payload/gate-sdk/gate-tests/check-kit-enum/bad/args +1 -0
  524. package/payload/gate-sdk/gate-tests/check-kit-enum/bad/check-sample.sh +5 -0
  525. package/payload/gate-sdk/gate-tests/check-kit-enum/bad/expect.txt +1 -0
  526. package/payload/gate-sdk/gate-tests/check-kit-enum/bad/gates.list +4 -0
  527. package/payload/gate-sdk/gate-tests/check-kit-enum/good/args +1 -0
  528. package/payload/gate-sdk/gate-tests/check-kit-enum/good/check-sample.sh +5 -0
  529. package/payload/gate-sdk/gate-tests/check-kit-enum/good/expect.txt +1 -0
  530. package/payload/gate-sdk/gate-tests/check-kit-enum/good/gates.list +3 -0
  531. package/payload/gate-sdk/gate-tests/check-kit-registration/bad/args +4 -0
  532. package/payload/gate-sdk/gate-tests/check-kit-registration/bad/expect.txt +1 -0
  533. package/payload/gate-sdk/gate-tests/check-kit-registration/bad/registry-doc.md +20 -0
  534. package/payload/gate-sdk/gate-tests/check-kit-registration/good/args +5 -0
  535. package/payload/gate-sdk/gate-tests/check-kit-registration/good/expect.txt +1 -0
  536. package/payload/gate-sdk/gate-tests/check-kit-registration.test.sh +75 -0
  537. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/alpha-kit/README.md +14 -0
  538. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/alpha-kit/checks/check-alpha-one.sh +3 -0
  539. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/alpha-kit/checks/check-alpha-two.sh +3 -0
  540. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/args +4 -0
  541. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/expect.txt +1 -0
  542. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/gamma-kit/README.md +5 -0
  543. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/gamma-kit/checks/check-gamma-one.sh +3 -0
  544. package/payload/gate-sdk/gate-tests/check-readme-roster/bad/scripts/gate-sdk-config.sh +5 -0
  545. package/payload/gate-sdk/gate-tests/check-readme-roster/good/alpha-kit/README.md +16 -0
  546. package/payload/gate-sdk/gate-tests/check-readme-roster/good/alpha-kit/checks/check-alpha-one.sh +3 -0
  547. package/payload/gate-sdk/gate-tests/check-readme-roster/good/alpha-kit/checks/check-alpha-two.sh +3 -0
  548. package/payload/gate-sdk/gate-tests/check-readme-roster/good/args +6 -0
  549. package/payload/gate-sdk/gate-tests/check-readme-roster/good/beta-kit/smoke/install.sh +3 -0
  550. package/payload/gate-sdk/gate-tests/check-readme-roster/good/expect.txt +1 -0
  551. package/payload/gate-sdk/gate-tests/check-readme-roster/good/scripts/gate-sdk-config.sh +5 -0
  552. package/payload/gate-sdk/gate-tests/check-reads-couples/bad/args +2 -0
  553. package/payload/gate-sdk/gate-tests/check-reads-couples/bad/corpus/sub/deep.md +1 -0
  554. package/payload/gate-sdk/gate-tests/check-reads-couples/bad/corpus/top.md +1 -0
  555. package/payload/gate-sdk/gate-tests/check-reads-couples/bad/expect.txt +1 -0
  556. package/payload/gate-sdk/gate-tests/check-reads-couples/bad/sandbox-gate.sh +6 -0
  557. package/payload/gate-sdk/gate-tests/check-reads-couples/good/args +3 -0
  558. package/payload/gate-sdk/gate-tests/check-reads-couples/good/corpus/sub/deep.md +1 -0
  559. package/payload/gate-sdk/gate-tests/check-reads-couples/good/corpus/top.md +1 -0
  560. package/payload/gate-sdk/gate-tests/check-reads-couples/good/expect.txt +1 -0
  561. package/payload/gate-sdk/gate-tests/check-reads-couples/good/sandbox-gate.sh +8 -0
  562. package/payload/gate-sdk/gate-tests/check-root-tiering/bad/allow.list +1 -0
  563. package/payload/gate-sdk/gate-tests/check-root-tiering/bad/args +1 -0
  564. package/payload/gate-sdk/gate-tests/check-root-tiering/bad/expect.txt +1 -0
  565. package/payload/gate-sdk/gate-tests/check-root-tiering/bad/root/README.md +1 -0
  566. package/payload/gate-sdk/gate-tests/check-root-tiering/bad/root/stray.txt +1 -0
  567. package/payload/gate-sdk/gate-tests/check-root-tiering/good/allow.list +3 -0
  568. package/payload/gate-sdk/gate-tests/check-root-tiering/good/args +1 -0
  569. package/payload/gate-sdk/gate-tests/check-root-tiering/good/expect.txt +1 -0
  570. package/payload/gate-sdk/gate-tests/check-root-tiering/good/root/LICENSE +1 -0
  571. package/payload/gate-sdk/gate-tests/check-root-tiering/good/root/README.md +1 -0
  572. package/payload/gate-sdk/gate-tests/check-root-tiering/good/root/somedir/keep.txt +1 -0
  573. package/payload/gate-sdk/gate-tests/check-shellcheck/bad/args +1 -0
  574. package/payload/gate-sdk/gate-tests/check-shellcheck/bad/expect.txt +1 -0
  575. package/payload/gate-sdk/gate-tests/check-shellcheck/bad/warn.sh +5 -0
  576. package/payload/gate-sdk/gate-tests/check-shellcheck/good/args +1 -0
  577. package/payload/gate-sdk/gate-tests/check-shellcheck/good/expect.txt +1 -0
  578. package/payload/gate-sdk/gate-tests/check-shellcheck/good/ok.sh +4 -0
  579. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/bad/alpha-kit/smoke/install.sh +4 -0
  580. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/bad/alpha-kit/smoke/violation.sh +7 -0
  581. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/bad/args +4 -0
  582. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/bad/expect.txt +1 -0
  583. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/bad/scripts/gate-sdk-config.sh +5 -0
  584. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/alpha-kit/smoke/install.sh +4 -0
  585. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/alpha-kit/smoke/violation.sh +4 -0
  586. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/args +6 -0
  587. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/beta-kit/smoke/install.sh +4 -0
  588. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/expect.txt +1 -0
  589. package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/scripts/gate-sdk-config.sh +5 -0
  590. package/payload/gate-sdk/gate-tests/check-template-copy-parity/bad/args +9 -0
  591. package/payload/gate-sdk/gate-tests/check-template-copy-parity/bad/delegation-kit/templates/agent-budget-guard.sh +16 -0
  592. package/payload/gate-sdk/gate-tests/check-template-copy-parity/bad/expect.txt +1 -0
  593. package/payload/gate-sdk/gate-tests/check-template-copy-parity/bad/scripts/agent-budget-guard.sh +17 -0
  594. package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/args +8 -0
  595. package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/delegation-kit/templates/agent-budget-guard.sh +16 -0
  596. package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/delegation-kit/templates/delegation-config.sh +3 -0
  597. package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/delegation-kit/templates/usage-poller.sh +6 -0
  598. package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/expect.txt +1 -0
  599. package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/scripts/agent-budget-guard.sh +16 -0
  600. package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/scripts/delegation-config.sh +4 -0
  601. package/payload/gate-sdk/gate-tests/check-test-hermetic/bad/args +3 -0
  602. package/payload/gate-sdk/gate-tests/check-test-hermetic/bad/expect.txt +1 -0
  603. package/payload/gate-sdk/gate-tests/check-test-hermetic/bad/leaky.test.sh +5 -0
  604. package/payload/gate-sdk/gate-tests/check-test-hermetic/good/args +3 -0
  605. package/payload/gate-sdk/gate-tests/check-test-hermetic/good/exempt.test.sh +4 -0
  606. package/payload/gate-sdk/gate-tests/check-test-hermetic/good/expect.txt +1 -0
  607. package/payload/gate-sdk/gate-tests/check-test-hermetic/good/sourced.test.sh +5 -0
  608. package/payload/gate-sdk/gate-tests/check-test-hermetic-smoke.test.sh +84 -0
  609. package/payload/gate-sdk/gate-tests/check-tree-terms/bad/args +2 -0
  610. package/payload/gate-sdk/gate-tests/check-tree-terms/bad/expect.txt +1 -0
  611. package/payload/gate-sdk/gate-tests/check-tree-terms/bad/patterns.list +3 -0
  612. package/payload/gate-sdk/gate-tests/check-tree-terms/bad/tree/leak.txt +1 -0
  613. package/payload/gate-sdk/gate-tests/check-tree-terms/good/args +2 -0
  614. package/payload/gate-sdk/gate-tests/check-tree-terms/good/expect.txt +1 -0
  615. package/payload/gate-sdk/gate-tests/check-tree-terms/good/patterns.list +3 -0
  616. package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/clean.txt +1 -0
  617. package/payload/gate-sdk/gate-tests/check-workflow-tiering/bad/.workflow/payload.txt +1 -0
  618. package/payload/gate-sdk/gate-tests/check-workflow-tiering/bad/.workflow/projection.txt +1 -0
  619. package/payload/gate-sdk/gate-tests/check-workflow-tiering/bad/expect.txt +1 -0
  620. package/payload/gate-sdk/gate-tests/check-workflow-tiering/good/.workflow/projection.txt +1 -0
  621. package/payload/gate-sdk/gate-tests/check-workflow-tiering/good/.workflow/wire.txt +1 -0
  622. package/payload/gate-sdk/gate-tests/check-workflow-tiering/good/expect.txt +1 -0
  623. package/payload/gate-sdk/gate-tests/enforcement-map.test.sh +87 -0
  624. package/payload/gate-sdk/gate-tests/lib-gate.test.sh +78 -0
  625. package/payload/gate-sdk/gate-tests/run-for-path.test.sh +77 -0
  626. package/payload/gate-sdk/lib/consumer-smoke.sh +32 -0
  627. package/payload/gate-sdk/lib/gate.sh +216 -0
  628. package/payload/gate-sdk/lib/inject.sh +35 -0
  629. package/payload/gate-sdk/lib/test-hermetic.sh +11 -0
  630. package/payload/gate-sdk/smoke/install.sh +84 -0
  631. package/payload/gate-sdk/smoke/violation.sh +13 -0
  632. package/payload/gate-sdk/templates/check-skeleton.sh +23 -0
  633. package/payload/gate-sdk/templates/gates-workflow.yml +55 -0
  634. package/payload/gate-sdk/templates/msg-patterns.list +21 -0
  635. package/payload/guard-kit/README.md +65 -0
  636. package/payload/guard-kit/SPEC.md +590 -0
  637. package/payload/guard-kit/bin/compare-settings-allow.sh +58 -0
  638. package/payload/guard-kit/bin/run-guard-tests.sh +86 -0
  639. package/payload/guard-kit/bin/scan-prompts.sh +166 -0
  640. package/payload/guard-kit/bin/scratch-run.sh +34 -0
  641. package/payload/guard-kit/gate-tests/scan-prompts.test.sh +70 -0
  642. package/payload/guard-kit/gate-tests/scratch-run.test.sh +62 -0
  643. package/payload/guard-kit/guard-tests/cases.tsv +117 -0
  644. package/payload/guard-kit/guard-tests/escalation-cases.tsv +13 -0
  645. package/payload/guard-kit/lib/guard.sh +448 -0
  646. package/payload/guard-kit/smoke/install.sh +26 -0
  647. package/payload/guard-kit/templates/bash-guard.sh +18 -0
  648. package/payload/guard-kit/templates/close-triage.md +31 -0
  649. package/payload/guard-kit/templates/escalation-guard.sh +27 -0
  650. package/payload/guard-kit/templates/guard-config.sh +2 -0
  651. package/payload/guard-kit/templates/settings-hooks.json +19 -0
  652. package/payload/guard-kit/templates/wakeup-guard.sh +20 -0
  653. package/payload/lifecycle-kit/README.md +106 -0
  654. package/payload/lifecycle-kit/SPEC.md +1469 -0
  655. package/payload/lifecycle-kit/bin/close-surfaces.sh +94 -0
  656. package/payload/lifecycle-kit/bin/enter-stage.sh +215 -0
  657. package/payload/lifecycle-kit/bin/file-gap.sh +43 -0
  658. package/payload/lifecycle-kit/bin/install-lifecycle.sh +36 -0
  659. package/payload/lifecycle-kit/bin/session-id.sh +75 -0
  660. package/payload/lifecycle-kit/checks/check-close-surfaces.sh +63 -0
  661. package/payload/lifecycle-kit/checks/check-lesson-disposition.sh +98 -0
  662. package/payload/lifecycle-kit/checks/check-lifecycle-registration.sh +54 -0
  663. package/payload/lifecycle-kit/checks/check-merge-attrs.sh +69 -0
  664. package/payload/lifecycle-kit/checks/check-shim-restatement.sh +97 -0
  665. package/payload/lifecycle-kit/checks/check-skill-binding.sh +59 -0
  666. package/payload/lifecycle-kit/checks/check-stage-entry.sh +197 -0
  667. package/payload/lifecycle-kit/checks/check-stage-evidence.sh +81 -0
  668. package/payload/lifecycle-kit/checks/check-stage-skill-coverage.sh +47 -0
  669. package/payload/lifecycle-kit/gate-tests/boundary-scratch-wipe.test.sh +96 -0
  670. package/payload/lifecycle-kit/gate-tests/check-close-surfaces/bad/args +1 -0
  671. package/payload/lifecycle-kit/gate-tests/check-close-surfaces/bad/expect.txt +1 -0
  672. package/payload/lifecycle-kit/gate-tests/check-close-surfaces/bad/owners/inbox.md +5 -0
  673. package/payload/lifecycle-kit/gate-tests/check-close-surfaces/bad/scripts/lifecycle-config.sh +4 -0
  674. package/payload/lifecycle-kit/gate-tests/check-close-surfaces/good/args +1 -0
  675. package/payload/lifecycle-kit/gate-tests/check-close-surfaces/good/expect.txt +1 -0
  676. package/payload/lifecycle-kit/gate-tests/check-close-surfaces/good/owners/inbox.md +5 -0
  677. package/payload/lifecycle-kit/gate-tests/check-close-surfaces/good/scripts/lifecycle-config.sh +4 -0
  678. package/payload/lifecycle-kit/gate-tests/check-close-surfaces.test.sh +66 -0
  679. package/payload/lifecycle-kit/gate-tests/check-lesson-disposition/bad/args +2 -0
  680. package/payload/lifecycle-kit/gate-tests/check-lesson-disposition/bad/evidence.txt +2 -0
  681. package/payload/lifecycle-kit/gate-tests/check-lesson-disposition/bad/expect.txt +1 -0
  682. package/payload/lifecycle-kit/gate-tests/check-lesson-disposition/bad/queue-head.md +8 -0
  683. package/payload/lifecycle-kit/gate-tests/check-lesson-disposition/bad/queue-work.md +5 -0
  684. package/payload/lifecycle-kit/gate-tests/check-lesson-disposition/good/args +2 -0
  685. package/payload/lifecycle-kit/gate-tests/check-lesson-disposition/good/evidence.txt +3 -0
  686. package/payload/lifecycle-kit/gate-tests/check-lesson-disposition/good/expect.txt +1 -0
  687. package/payload/lifecycle-kit/gate-tests/check-lesson-disposition/good/queue-head.md +8 -0
  688. package/payload/lifecycle-kit/gate-tests/check-lesson-disposition/good/queue-work.md +5 -0
  689. package/payload/lifecycle-kit/gate-tests/check-lesson-disposition.test.sh +56 -0
  690. package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration/bad/AGENT.md +11 -0
  691. package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration/bad/args +1 -0
  692. package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration/bad/expect.txt +1 -0
  693. package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration/good/AGENT.md +11 -0
  694. package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration/good/args +1 -0
  695. package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration/good/expect.txt +1 -0
  696. package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration.test.sh +59 -0
  697. package/payload/lifecycle-kit/gate-tests/check-merge-attrs/bad/.gitattributes +6 -0
  698. package/payload/lifecycle-kit/gate-tests/check-merge-attrs/bad/expect.txt +1 -0
  699. package/payload/lifecycle-kit/gate-tests/check-merge-attrs/good/.gitattributes +5 -0
  700. package/payload/lifecycle-kit/gate-tests/check-merge-attrs/good/expect.txt +1 -0
  701. package/payload/lifecycle-kit/gate-tests/check-merge-attrs.test.sh +113 -0
  702. package/payload/lifecycle-kit/gate-tests/check-shim-restatement/bad/args +2 -0
  703. package/payload/lifecycle-kit/gate-tests/check-shim-restatement/bad/commands/build.md +6 -0
  704. package/payload/lifecycle-kit/gate-tests/check-shim-restatement/bad/corpus.md +4 -0
  705. package/payload/lifecycle-kit/gate-tests/check-shim-restatement/bad/expect.txt +1 -0
  706. package/payload/lifecycle-kit/gate-tests/check-shim-restatement/good/args +2 -0
  707. package/payload/lifecycle-kit/gate-tests/check-shim-restatement/good/commands/build.md +5 -0
  708. package/payload/lifecycle-kit/gate-tests/check-shim-restatement/good/corpus.md +4 -0
  709. package/payload/lifecycle-kit/gate-tests/check-shim-restatement/good/expect.txt +1 -0
  710. package/payload/lifecycle-kit/gate-tests/check-shim-restatement.test.sh +80 -0
  711. package/payload/lifecycle-kit/gate-tests/check-skill-binding/bad/args +1 -0
  712. package/payload/lifecycle-kit/gate-tests/check-skill-binding/bad/commands/build.md +5 -0
  713. package/payload/lifecycle-kit/gate-tests/check-skill-binding/bad/expect.txt +1 -0
  714. package/payload/lifecycle-kit/gate-tests/check-skill-binding/bad/templates/build.md +7 -0
  715. package/payload/lifecycle-kit/gate-tests/check-skill-binding/good/args +1 -0
  716. package/payload/lifecycle-kit/gate-tests/check-skill-binding/good/commands/build.md +7 -0
  717. package/payload/lifecycle-kit/gate-tests/check-skill-binding/good/expect.txt +1 -0
  718. package/payload/lifecycle-kit/gate-tests/check-skill-binding/good/templates/build.md +7 -0
  719. package/payload/lifecycle-kit/gate-tests/check-skill-binding.test.sh +84 -0
  720. package/payload/lifecycle-kit/gate-tests/check-stage-entry/bad/.workflow/WORKFLOW-STATE.txt +7 -0
  721. package/payload/lifecycle-kit/gate-tests/check-stage-entry/bad/TASK-QUEUE.md +13 -0
  722. package/payload/lifecycle-kit/gate-tests/check-stage-entry/bad/expect.txt +1 -0
  723. package/payload/lifecycle-kit/gate-tests/check-stage-entry/good/.workflow/WORKFLOW-STATE.txt +7 -0
  724. package/payload/lifecycle-kit/gate-tests/check-stage-entry/good/TASK-QUEUE.md +13 -0
  725. package/payload/lifecycle-kit/gate-tests/check-stage-entry/good/expect.txt +1 -0
  726. package/payload/lifecycle-kit/gate-tests/check-stage-entry.test.sh +251 -0
  727. package/payload/lifecycle-kit/gate-tests/check-stage-evidence/bad/.workflow/WORKFLOW-STATE.txt +6 -0
  728. package/payload/lifecycle-kit/gate-tests/check-stage-evidence/bad/TASK-QUEUE.md +13 -0
  729. package/payload/lifecycle-kit/gate-tests/check-stage-evidence/bad/expect.txt +1 -0
  730. package/payload/lifecycle-kit/gate-tests/check-stage-evidence/good/.workflow/WORKFLOW-STATE.txt +6 -0
  731. package/payload/lifecycle-kit/gate-tests/check-stage-evidence/good/TASK-QUEUE.md +13 -0
  732. package/payload/lifecycle-kit/gate-tests/check-stage-evidence/good/expect.txt +1 -0
  733. package/payload/lifecycle-kit/gate-tests/check-stage-evidence.test.sh +115 -0
  734. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/args +1 -0
  735. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/align.md +2 -0
  736. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/build.md +2 -0
  737. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/scope.md +2 -0
  738. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/validate.md +2 -0
  739. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/expect.txt +1 -0
  740. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/args +1 -0
  741. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/align.md +2 -0
  742. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/build.md +2 -0
  743. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/close.md +2 -0
  744. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/scope.md +2 -0
  745. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/validate.md +2 -0
  746. package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/expect.txt +1 -0
  747. package/payload/lifecycle-kit/lib/stages.sh +179 -0
  748. package/payload/lifecycle-kit/smoke/install.sh +341 -0
  749. package/payload/lifecycle-kit/smoke/violation.sh +8 -0
  750. package/payload/lifecycle-kit/templates/lead.md +271 -0
  751. package/payload/lifecycle-kit/templates/lifecycle-config.sh +2 -0
  752. package/payload/lifecycle-kit/templates/skills/align.md +65 -0
  753. package/payload/lifecycle-kit/templates/skills/build.md +78 -0
  754. package/payload/lifecycle-kit/templates/skills/close.md +122 -0
  755. package/payload/lifecycle-kit/templates/skills/release-sweep.md +39 -0
  756. package/payload/lifecycle-kit/templates/skills/scope.md +112 -0
  757. package/payload/lifecycle-kit/templates/skills/spec.md +91 -0
  758. package/payload/lifecycle-kit/templates/skills/upgrade.md +41 -0
  759. package/payload/lifecycle-kit/templates/skills/validate.md +54 -0
  760. package/payload/queue-kit/README.md +62 -0
  761. package/payload/queue-kit/SPEC.md +366 -0
  762. package/payload/queue-kit/bin/lesson-sink.sh +28 -0
  763. package/payload/queue-kit/bin/queue-index.sh +131 -0
  764. package/payload/queue-kit/checks/check-queue-hygiene.sh +81 -0
  765. package/payload/queue-kit/checks/check-queue-prose-precondition.sh +63 -0
  766. package/payload/queue-kit/checks/check-queue-sections.sh +44 -0
  767. package/payload/queue-kit/checks/check-queue-slug-liveness.sh +63 -0
  768. package/payload/queue-kit/checks/check-queue-wrap.sh +56 -0
  769. package/payload/queue-kit/checks/check-tag-lead-line.sh +66 -0
  770. package/payload/queue-kit/checks/check-task-conservation.sh +50 -0
  771. package/payload/queue-kit/checks/check-task-names.sh +128 -0
  772. package/payload/queue-kit/gate-tests/check-queue-hygiene/bad/TASK-QUEUE.md +17 -0
  773. package/payload/queue-kit/gate-tests/check-queue-hygiene/bad/expect.txt +1 -0
  774. package/payload/queue-kit/gate-tests/check-queue-hygiene/good/TASK-QUEUE.md +25 -0
  775. package/payload/queue-kit/gate-tests/check-queue-hygiene/good/expect.txt +1 -0
  776. package/payload/queue-kit/gate-tests/check-queue-prose-precondition/bad/TASK-QUEUE.md +15 -0
  777. package/payload/queue-kit/gate-tests/check-queue-prose-precondition/bad/expect.txt +1 -0
  778. package/payload/queue-kit/gate-tests/check-queue-prose-precondition/good/TASK-QUEUE.md +25 -0
  779. package/payload/queue-kit/gate-tests/check-queue-prose-precondition/good/expect.txt +1 -0
  780. package/payload/queue-kit/gate-tests/check-queue-sections/bad/TASK-QUEUE.md +13 -0
  781. package/payload/queue-kit/gate-tests/check-queue-sections/bad/expect.txt +1 -0
  782. package/payload/queue-kit/gate-tests/check-queue-sections/good/TASK-QUEUE.md +15 -0
  783. package/payload/queue-kit/gate-tests/check-queue-sections/good/expect.txt +1 -0
  784. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/TASK-QUEUE.md +17 -0
  785. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/docs/page.md +4 -0
  786. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/expect.txt +1 -0
  787. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/scripts/queue-config.sh +3 -0
  788. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/TASK-QUEUE.md +19 -0
  789. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/docs/page.md +5 -0
  790. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/expect.txt +1 -0
  791. package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/scripts/queue-config.sh +3 -0
  792. package/payload/queue-kit/gate-tests/check-queue-wrap/bad/TASK-QUEUE.md +15 -0
  793. package/payload/queue-kit/gate-tests/check-queue-wrap/bad/expect.txt +1 -0
  794. package/payload/queue-kit/gate-tests/check-queue-wrap/good/TASK-QUEUE.md +25 -0
  795. package/payload/queue-kit/gate-tests/check-queue-wrap/good/expect.txt +1 -0
  796. package/payload/queue-kit/gate-tests/check-tag-lead-line/bad/TASK-QUEUE.md +22 -0
  797. package/payload/queue-kit/gate-tests/check-tag-lead-line/bad/expect.txt +1 -0
  798. package/payload/queue-kit/gate-tests/check-tag-lead-line/good/TASK-QUEUE.md +29 -0
  799. package/payload/queue-kit/gate-tests/check-tag-lead-line/good/expect.txt +1 -0
  800. package/payload/queue-kit/gate-tests/check-task-names/bad/TASK-QUEUE.md +18 -0
  801. package/payload/queue-kit/gate-tests/check-task-names/bad/expect.txt +1 -0
  802. package/payload/queue-kit/gate-tests/check-task-names/good/TASK-QUEUE.md +25 -0
  803. package/payload/queue-kit/gate-tests/check-task-names/good/expect.txt +1 -0
  804. package/payload/queue-kit/gate-tests/queue-index.test.sh +118 -0
  805. package/payload/queue-kit/lib/queue.sh +107 -0
  806. package/payload/queue-kit/smoke/install.sh +21 -0
  807. package/payload/queue-kit/smoke/violation.sh +8 -0
  808. package/payload/queue-kit/templates/TASK-QUEUE.md +43 -0
  809. package/payload/queue-kit/templates/queue-config.sh +2 -0
  810. package/payload/site-kit/README.md +61 -0
  811. package/payload/site-kit/SPEC.md +263 -0
  812. package/payload/site-kit/checks/check-docs-cname-parity.sh +80 -0
  813. package/payload/site-kit/checks/check-docs-render-fidelity.sh +167 -0
  814. package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/args +4 -0
  815. package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/expect.txt +1 -0
  816. package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/site-config.sh +7 -0
  817. package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/tree/CNAME +1 -0
  818. package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/tree/README.md +5 -0
  819. package/payload/site-kit/gate-tests/check-docs-cname-parity/good/args +5 -0
  820. package/payload/site-kit/gate-tests/check-docs-cname-parity/good/expect.txt +1 -0
  821. package/payload/site-kit/gate-tests/check-docs-cname-parity/good/site-config.sh +7 -0
  822. package/payload/site-kit/gate-tests/check-docs-cname-parity/good/tree/CNAME +1 -0
  823. package/payload/site-kit/gate-tests/check-docs-cname-parity/good/tree/docs/posts/2026-01-01-legacy.md +4 -0
  824. package/payload/site-kit/gate-tests/check-docs-cname-parity/good/tree/index.md +4 -0
  825. package/payload/site-kit/gate-tests/check-docs-cname-parity/good/tree/pkg/gate-tests/fixture.md +5 -0
  826. package/payload/site-kit/gate-tests/check-docs-render-fidelity/bad/args +8 -0
  827. package/payload/site-kit/gate-tests/check-docs-render-fidelity/bad/expect.txt +1 -0
  828. package/payload/site-kit/gate-tests/check-docs-render-fidelity/bad/tree/docs/install.md +38 -0
  829. package/payload/site-kit/gate-tests/check-docs-render-fidelity/good/args +6 -0
  830. package/payload/site-kit/gate-tests/check-docs-render-fidelity/good/expect.txt +1 -0
  831. package/payload/site-kit/gate-tests/check-docs-render-fidelity/good/tree/docs/install.md +35 -0
  832. package/payload/site-kit/gate-tests/check-docs-render-fidelity-foreign.test.sh +87 -0
  833. package/payload/site-kit/gate-tests/check-docs-render-fidelity-span.test.sh +80 -0
  834. package/payload/site-kit/gate-tests/check-docs-render-fidelity-table.test.sh +90 -0
  835. package/payload/site-kit/lib/site.sh +29 -0
  836. package/payload/site-kit/smoke/install.sh +26 -0
  837. package/payload/site-kit/smoke/violation.sh +20 -0
  838. package/payload/site-kit/templates/site-health.yml +164 -0
  839. package/profiles.list +53 -0
@@ -0,0 +1,62 @@
1
+ # queue-kit
2
+
3
+ A git-native, agent-readable task tracker: one Markdown file where `##`
4
+ sections are queues, bold kebab-case slugs are the task handles, and
5
+ square-bracket tags (`[blocked-by:]`, `[needs-spec]`, `[spec:]`,
6
+ `[drain-exempt:]`, `[precondition-ok:]`, plus the Lessons Learned channel's
7
+ `[attend]` and the consumer-named harvest tags) are the state machine. Gates hold the grammar a coding agent selects work by, and a
8
+ `queue-index.sh` tool renders the compact selection surface.
9
+
10
+ Why: an agent picks work by *parsing*, not reading — so everything selection
11
+ trusts (section position, slugs, tags) must be grammar a gate can enforce, and
12
+ everything a human writes freely (task prose) must stay off the parse path.
13
+ Drift between what the prose says and what the parser sees is the failure mode;
14
+ all but one of the gates each close one instance of it — a tag reflowed off its
15
+ lead line, a duplicate slug, a lost task, a forward precondition stated in
16
+ prose but never tagged. See [SPEC.md](SPEC.md) for the full contracts.
17
+
18
+ ## Install
19
+
20
+ Vendor the kit beside [gate-sdk](../gate-sdk/) (required), then:
21
+
22
+ 1. Register the gates — add to your `gates.list`:
23
+
24
+ <!-- gate-roster:begin -->
25
+ ```
26
+ check-queue-hygiene
27
+ check-queue-sections
28
+ check-queue-wrap
29
+ check-tag-lead-line
30
+ check-task-names
31
+ check-task-conservation
32
+ check-queue-prose-precondition
33
+ check-queue-slug-liveness
34
+ ```
35
+ <!-- gate-roster:end -->
36
+
37
+ They resolve through gate-sdk's registry path (your gates dir first, then
38
+ each kit's `checks/`), and their `# graph:` manifests put them in the
39
+ generated pre-commit hook: `bash gate-sdk/bin/gen-pre-commit.sh --write`.
40
+
41
+ 2. Give your queue file the section skeleton — copy
42
+ `templates/TASK-QUEUE.md` and fill it in (it shows one example entry per
43
+ grammar shape). The default sections are `New Features` / `Technical Debt`
44
+ (active), `Deferred`, `Done`.
45
+
46
+ 3. Optional — reshape the grammar: copy `templates/queue-config.sh` into your
47
+ gates dir and override section names, the wrap budget, prose-lead tokens, or
48
+ the precondition trigger set. Defaults are this repo's layout.
49
+
50
+ ## Use
51
+
52
+ ```bash
53
+ bash queue-kit/bin/queue-index.sh # header + active (• ready / ✗ blocked) + deferred
54
+ bash queue-kit/bin/queue-index.sh --collapse-deferred # deferred as a per-### tally
55
+ bash queue-kit/bin/queue-index.sh --extent <slug> # inclusive line range of one entry's subtree
56
+ ```
57
+
58
+ ## Test
59
+
60
+ ```bash
61
+ bash gate-sdk/bin/run-gate-tests.sh queue-kit/gate-tests queue-kit/checks
62
+ ```
@@ -0,0 +1,366 @@
1
+ # queue-kit — a git-native, agent-readable task tracker
2
+
3
+ One Markdown file is the tracker: sections are queues, bullets are tasks,
4
+ bold kebab-case slugs are the task handles, and square-bracket tags are the
5
+ state machine. The problem the kit solves: a coding agent selects work by
6
+ parsing, not by reading — so everything selection trusts (position, slugs,
7
+ tags) is grammar a gate can enforce, and everything a human writes freely
8
+ (task prose) is kept out of the parse path. Drift between what the prose says
9
+ and what a parser sees is the failure mode; all but one of the gates exist to
10
+ close one instance of it each.
11
+
12
+ The kit carries the queue grammar and its gates only; a consumer's section
13
+ names, wrap budget, and protocol vocabulary are config, with this repo's
14
+ layout as the defaults. Requires [gate-sdk](../gate-sdk/) (the gates follow
15
+ its four contracts and resolve through its registry).
16
+
17
+ ## The queue format
18
+
19
+ The governed surface is one queue file (default `TASK-QUEUE.md`), structured
20
+ as `##` sections over column-0 bullets:
21
+
22
+ - **Active sections** (default `New Features`, `Technical Debt`) — the
23
+ pickable queue, in work-order. Selection discipline: pick the first entry
24
+ carrying no `[blocked-by:]` tag, in section order; do not invent work order.
25
+ - **The deferred section** (default `Deferred`) — parked tasks, excluded from
26
+ selection; `###` subsections are presentation, not semantics. An entry's
27
+ prose may carry a `Surfaced <date>` mark — an ungated convention recording
28
+ when the premise was filed; drift-kit's deferred-age KPI is its reader.
29
+ - **The done section** (default `Done`) — one line per completed task, the
30
+ bare slug only; prose about what happened lives in git history.
31
+ - Any other section (an iteration header, a lessons section) is outside the
32
+ grammar and ignored by every gate except the file-wide hygiene axes.
33
+
34
+ An entry is a column-0 `- **slug** — prose…` bullet; continuation lines are
35
+ indented, never column 0. An *indented* bullet with a bold lead-in is a
36
+ sub-task (same grammar); with a plain or italic lead-in it is a prose note
37
+ and is left alone. Slugs match `[a-z0-9][a-z0-9-]*` in one global, unique
38
+ namespace across active + deferred + sub-tasks — a slug is the task's stable
39
+ handle for its whole life: `[blocked-by:]` references it and the done-section
40
+ line carries it verbatim. The slug grammar is kit mechanism, not config.
41
+
42
+ ### The tag algebra
43
+
44
+ Tags are square-bracket literals with fixed spelling (mechanism, not config
45
+ — the one exception is the consumer-named harvest vocabulary below); every tag
46
+ sits on its bullet's **lead line** — the only line the parsing tools scan
47
+ (enforced by `check-tag-lead-line`).
48
+
49
+ Outside the queue file, living prose claims a task's queue membership with one
50
+ grammar: a **bold-code token** — `` **`<slug>`** `` whose token matches the
51
+ slug grammar — which `check-queue-slug-liveness` resolves against the live
52
+ slug set on the configured prose surfaces (§check-queue-slug-liveness).
53
+
54
+ - `[blocked-by: <slug>]` — the entry is unpickable until `<slug>` completes.
55
+ Repeat per blocker. Must resolve to a live task (active or deferred — a
56
+ deferred blocker stands; it is unbuilt); a blocker in the done section is a
57
+ *stale* tag that must be removed, because the tag alone marks a task
58
+ unpickable.
59
+ - `[needs-spec]` — design-pending marker. queue-kit parses and displays it;
60
+ the placement semantics (deferred-section-wide enforcement, promotion
61
+ rules) are canon-kit's amendment lifecycle and land with that kit.
62
+ - `[spec: <file>]` — spec-ready pointer. Same split: syntax here, amendment
63
+ semantics in canon-kit.
64
+ - `[drain-exempt: <reason>]` — drain-stage residue marker: the entry
65
+ legitimately stays active into the drain stage (a drain-spanning feature
66
+ whose remaining half *is* drain-stage work). Same split: syntax here;
67
+ placement semantics — the drain-entry exemption, the non-empty-reason
68
+ grammar, the successor-entry backstop — are lifecycle-kit's
69
+ `check-stage-entry` assertion B. The Done move takes the tag with it
70
+ (done entries drop their lifecycle tags; every reader scans live task
71
+ sections only). The lead-line reason is a terse marker, not the audit
72
+ trail: `check-tag-lead-line` pins the tag to the lead line while
73
+ `check-queue-wrap` caps its width, so a long slug can squeeze the reason
74
+ to a few columns — keep it a keyword and carry the full exemption
75
+ rationale in the entry body.
76
+ - `[precondition-ok: <reason>]` — per-entry opt-out valve for
77
+ `check-queue-prose-precondition`.
78
+
79
+ Two tags ride **Lessons Learned** entries — a lesson is a top-level bullet
80
+ under the fixed-spelling `## Lessons Learned` heading, and `bin/queue-index.sh`
81
+ plus `check-tag-lead-line` read that section's lead lines too. That section is
82
+ one of close's inbound triage surfaces, and its forcing function is the sibling
83
+ of the gap inbox's — the first-stage entry refuses while it holds entries — so it
84
+ declares itself on the close-surface roster here:
85
+
86
+ close-surface: TASK-QUEUE.md#Lessons-Learned forced=lifecycle-kit/SPEC.md §bin/enter-stage.sh
87
+
88
+ - `[attend]` — fixed spelling, kit mechanism (the inbound channel): the filing
89
+ session marks a lesson as a live attention point for later sessions *of the
90
+ same iteration*. `queue-index.sh` emits an attention block of `[attend]`
91
+ lead lines (§bin/queue-index.sh); the injection dies at the iteration
92
+ boundary because lifecycle-kit's first-stage entry refuses a non-empty
93
+ Lessons section.
94
+ - **Harvest tags** — `QUEUE_KIT_LESSON_TAGS` (array of bare tag names, default
95
+ empty) is the *one* configured exception to fixed spelling (the outbound
96
+ channel): the tag names, their sinks, and their handling are consumer rule
97
+ content — a kit literal carrying them would publish a private vocabulary
98
+ (the provenance seam, `check-graph`/`graph-vocab` pattern). The close ritual
99
+ streams a tagged entry's body through `bin/lesson-sink.sh <tag>`
100
+ (§bin/lesson-sink.sh), which resolves the sink from `QUEUE_KIT_LESSON_SINKS`;
101
+ the tracked close skill names that mechanism, never a sink value. queue-kit
102
+ only parses the tag's placement.
103
+
104
+ ## Layout and configuration
105
+
106
+ The kit is vendored beside gate-sdk (conventionally at `queue-kit/`); its
107
+ gates are registered in the consumer's `gates.list` by name and resolve
108
+ through gate-sdk's multi-kit path. `bin/queue-index.sh` is a tool, not a gate
109
+ (no `# graph:` manifest).
110
+
111
+ Config follows lifecycle-kit's pattern: copy `templates/queue-config.sh`
112
+ into the gates dir as `queue-config.sh` (or point `QUEUE_KIT_CONFIG_FILE`
113
+ elsewhere) and override any knob; defaults fill what the consumer left unset,
114
+ and the loader exits 2 on a malformed config — a broken grammar must not gate
115
+ anything. A gitignored `queue-config.local.sh` beside that file sources last
116
+ (§lib/queue.sh) — the home for a private value a tracked config cannot carry.
117
+ Knobs:
118
+
119
+ - `QUEUE_KIT_QUEUE_FILE` — default `${GATE_SDK_QUEUE_FILE:-TASK-QUEUE.md}`;
120
+ every gate also takes the file as `$1` (fixture capability).
121
+ - `QUEUE_KIT_ACTIVE_SECTIONS` — array, default
122
+ `("New Features" "Technical Debt")`, order = selection order.
123
+ - `QUEUE_KIT_DEFERRED_SECTION` / `QUEUE_KIT_DONE_SECTION` — defaults
124
+ `Deferred` / `Done`.
125
+ - `QUEUE_KIT_WRAP_BUDGET` — default `100` (`check-queue-wrap` gate floor).
126
+ - `QUEUE_KIT_PROSE_LEADS` — array of column-0 lead tokens exempt from the
127
+ hygiene gate's no-prose axis, default `("Protocol:")`.
128
+ - `QUEUE_KIT_PROSE_SURFACE_GLOBS` — array of repo-root-relative globs naming
129
+ the living-prose surfaces `check-queue-slug-liveness` scans, default empty
130
+ (no surface makes queue claims until the consumer opts one in). Which pages
131
+ claim queue membership is the consumer's editorial posture — a kit literal
132
+ would presume a docs layout — so the kit ships none; a bold-code token on a
133
+ named surface is then a checked membership claim (§check-queue-slug-liveness).
134
+ - `QUEUE_KIT_PRECONDITION_REGEX` — the forward-precondition trigger set for
135
+ `check-queue-prose-precondition`, default = the shipped phrase set.
136
+ - `QUEUE_KIT_REQUIRED_SECTIONS` — array of `##` headings that must each appear
137
+ exactly once (`check-queue-sections`), default = the iteration header
138
+ (`Iteration:`, prefix-matched for its dynamic suffix) plus `New Features` /
139
+ `Technical Debt` / `Deferred` / `Done` / `Lessons Learned`. A trailing `:`
140
+ marks a prefix-matched heading; every other entry is matched exactly.
141
+ - `QUEUE_KIT_LESSON_TAGS` — array of bare harvest-tag names, default empty; the
142
+ consumer-named outbound lesson vocabulary (§The tag algebra), read by
143
+ `check-tag-lead-line` for placement. Names, sinks, and handling are consumer
144
+ rule content — the kit ships none.
145
+ - `QUEUE_KIT_LESSON_SINKS` — associative array, harvest tag → sink command,
146
+ default empty; read by `bin/lesson-sink.sh`, which owns resolution and the
147
+ fail-open default (§bin/lesson-sink.sh). A private sink value belongs in the
148
+ local overlay, not this tracked file.
149
+ - `QUEUE_KIT_ATTEND_CAP` — positive integer, default `3`; the maximum `[attend]`
150
+ lead lines `bin/queue-index.sh` emits in its attention block before folding
151
+ the rest into an overflow note.
152
+
153
+ Cross-kit note: lifecycle-kit's `LIFECYCLE_KIT_ACTIVE_SECTIONS` carries the same
154
+ default. The knobs are independent (either kit runs without the other); a
155
+ consumer renaming its active sections sets both.
156
+
157
+ ## Per-component contracts
158
+
159
+ ### lib/queue.sh
160
+
161
+ The sourced config loader plus shared adapters: the section-regex builders
162
+ the gates pass to awk (both sides of every section boundary must parse
163
+ identically — a shared adapter removes that drift axis), and the slug/tag
164
+ extraction helpers. Values and adapters only, never gate structure
165
+ (gate-sdk's `lib/gate.sh` rule).
166
+
167
+ The loader sources the consumer config, then a `<config>.local.sh` overlay
168
+ beside it when present — last write wins. This is the tracked-name /
169
+ gitignored-value split (the `msg-patterns.local.list` precedent): a private
170
+ sink value tracked in `queue-config.sh` would itself be the leak, so it lands
171
+ in the gitignored overlay instead. The overlay is optional — its absence is
172
+ fail-open, not an error.
173
+
174
+ ### bin/queue-index.sh
175
+
176
+ Compact surface of the queue for task selection — the iteration header line
177
+ if present, then every top-level active entry as a one-line title plus tags,
178
+ ready (`•`) vs blocked (`✗`) marked from the `[blocked-by:]` tag alone. Tags
179
+ are stripped from the one-line title; `[blocked-by:]` and
180
+ `[drain-exempt: <reason>]` are re-echoed after it — the two tags a picking
181
+ session acts on without opening the entry body.
182
+ `--extent <slug>` prints the inclusive line range of one entry's body (parent
183
+ slug → whole subtree; boundary = next sibling-or-shallower bullet, heading,
184
+ `---`, or EOF, including the trailing blank so a range deletion leaves no
185
+ double blank). `--collapse-deferred` replaces the deferred listing with a
186
+ per-`###`-subsection tally — generic over whatever subsection names the file
187
+ has (a hardcoded tally table would be consumer rule content), with
188
+ entries under no subsection tallied as `(top)`.
189
+
190
+ Both modes append an **attention block** when the `## Lessons Learned` section
191
+ carries `[attend]` entries (§The tag algebra): each such entry's lead line,
192
+ capped at `QUEUE_KIT_ATTEND_CAP` (default 3) with overflow noted as
193
+ `(+N more [attend])`. Lead lines only, never bodies — the block is
194
+ always-loaded through the session-context hook that embeds this output, so the
195
+ cap is its token budget. This is the inbound lesson channel reaching every
196
+ later session of the iteration with zero consumer-hook edits.
197
+
198
+ ### bin/lesson-sink.sh
199
+
200
+ The outbound channel's router: reads a lesson body on stdin and resolves the
201
+ sink for its `<tag>` argument from `QUEUE_KIT_LESSON_SINKS`. A configured entry
202
+ runs as a **command** with the body streamed to its stdin — a command, not a
203
+ path, so the sink may reformat the body into a downstream backlog's own
204
+ grammar; the command's exit status becomes the tool's, so a failing sink is a
205
+ red close step and harvest material is never half-routed to a silent fallback.
206
+ An unconfigured tag falls **open** to appending the body to
207
+ `${GATE_SDK_WORKFLOW_DIR:-.workflow}/<tag>-harvest.md` — the honest
208
+ manual-drain default that keeps a fresh clone (no overlay) closing cleanly and
209
+ preserves the staging file's documented reclaim path. A tool, not a gate (no
210
+ `# graph:` manifest); the consumer close skill invokes it so the tracked skill
211
+ names the mechanism, never a sink value, and a private sink command lives in
212
+ the `queue-config.local.sh` overlay (§lib/queue.sh).
213
+
214
+ ### check-queue-hygiene
215
+
216
+ Invariant: the queue contains only tasks, tags, and section structure — no
217
+ HTML comments (provenance belongs in git history), no exact-duplicate
218
+ non-blank non-`---` lines (copy-paste artifacts), no column-0 prose (every
219
+ column-0 line is a heading, a bullet, `---`, or a configured
220
+ `QUEUE_KIT_PROSE_LEADS` token — the shape that carries protocol duplication
221
+ is banned, not semantic duplication, which is not mechanizable).
222
+
223
+ Calibration: indented lines are never flagged on the prose axis; the
224
+ lead-token allowance is a whole-line lead match, not a substring. Division of
225
+ labour with `check-queue-sections`: hygiene owns line *shape* (what a column-0
226
+ line may be), the sections gate owns heading *presence* (that each required
227
+ `##` heading exists exactly once) — neither subsumes the other.
228
+
229
+ ### check-queue-sections
230
+
231
+ Invariant: the queue file carries each `QUEUE_KIT_REQUIRED_SECTIONS` heading
232
+ exactly once — zero occurrences (missing/typo'd) and two-or-more (accidental
233
+ paste) are both red. This is the fail-closed floor under every section-scoped
234
+ scanner: `check-amendment-queue`, `check-task-names`, `check-task-conservation`,
235
+ and the session-context index all locate work by `## <section>` boundaries and
236
+ silently find *nothing* — passing open — when a heading is dropped or
237
+ misspelled. A trailing `:` on a required entry marks a dynamic-suffix heading
238
+ (the iteration header, whose suffix is its iteration name) and is
239
+ prefix-matched; every other entry is matched exactly. A grep error (not a
240
+ no-match) is fail-closed (exit 2). The `# graph:` couples the queue file at
241
+ `tier=precommit`.
242
+
243
+ ### check-queue-wrap
244
+
245
+ Invariant: no line exceeds the `QUEUE_KIT_WRAP_BUDGET` gate floor (default
246
+ 100 columns; the authoring target is ~80). The tools key on the column-0
247
+ `- ` lead, so an unwrapped runaway that reflows to column 0 corrupts the
248
+ parse; the tripwire fires before that lands.
249
+
250
+ Calibration: three exemptions mirror the wrapping convention — table rows,
251
+ fenced-code blocks, and lines over budget solely due to one unbreakable token
252
+ (URL, path). Width is Unicode code points, not bytes.
253
+
254
+ ### check-tag-lead-line
255
+
256
+ Invariant: every **lead-line-scoped** tag sits on its bullet's lead line — the
257
+ only line *its* readers scan; such a tag pushed to a continuation line by a
258
+ reflow silently unblocks a task, masks a needs-spec state, voids a drain
259
+ exemption, or drops a lesson out of the attention block. Membership tracks reader semantics, not §The tag
260
+ algebra: a tag is governed here when its readers scan lead lines alone, so the
261
+ set is narrower than the algebra's and `[precondition-ok:]` is deliberately
262
+ outside it — `check-queue-prose-precondition` honors that tag anywhere in the
263
+ entry, leaving it no lead-line requirement to enforce. The governed set and
264
+ scanned surface both widen with the lesson channels: `[blocked-by:]` /
265
+ `[spec:]` / `[needs-spec]` / `[drain-exempt:]` in the task sections
266
+ (active + deferred), plus
267
+ `[attend]` and every `QUEUE_KIT_LESSON_TAGS` name in the `## Lessons Learned`
268
+ section — the section `queue-index.sh` now reads, which retires the old "parsed
269
+ by no reader" exemption for it. Couples
270
+ the width-only wrap gate to the tag-parsing tools over the same surface: gate
271
+ the coupling, not just each side.
272
+
273
+ Calibration: lead-class rule — a tag of class C on a continuation line is a
274
+ violation only when the lead line lacks class C (prose that mentions a tag
275
+ the lead already carries is tolerated); tags outside the scanned sections are
276
+ parsed by no reader and ignored. Fenced-code and table lines exempt.
277
+ Residual accepted gap: a same-class duplicate sliding off while one stays on
278
+ the lead — negligible severity, not reflow-realistic.
279
+
280
+ ### check-task-names
281
+
282
+ Invariant: every active-section and deferred-section entry (and every
283
+ sub-task) leads with a valid kebab-case slug, unique across the file; every
284
+ done-section entry is a bare slug only; every `[blocked-by: X]` resolves to a
285
+ live task, and one pointing at a done slug is flagged stale.
286
+
287
+ Calibration: active and deferred share one namespace so resolution works
288
+ regardless of where the target lives; the non-bold indented bullet is the
289
+ documented prose-note escape; done slugs are validated as tokens but not
290
+ cross-checked against the live namespace. Help texts cite this SPEC.
291
+
292
+ ### check-task-conservation
293
+
294
+ Invariant: every live slug (active + deferred, sub-tasks included) present at
295
+ HEAD is still present in the working tree — live or done. A slug vanishing
296
+ from both is a lost task: the absence class diff-review reliably misses (you
297
+ notice wrong things present, not right things missing). Half-applied moves,
298
+ botched renames, and undocumented withdrawals all fire.
299
+
300
+ Calibration: diffs `git show HEAD:<queue>` against the worktree, hence
301
+ `no-fixture:` (a committed fixture has HEAD == worktree; the bad case needs
302
+ an uncommitted deletion — infeasible, not a stopgap). No git baseline ⇒ clean
303
+ exit (nothing to compare is not a violation). Clearing the done section is
304
+ safe: only HEAD's *live* slugs are conserved. A rename intentionally fires —
305
+ move the old slug to done, sweep refs.
306
+
307
+ ### check-queue-prose-precondition
308
+
309
+ Invariant: no active-section entry states a forward precondition in prose
310
+ ("revisit when …", "once X lands", "gated on …") without a `[blocked-by:]`
311
+ tag — such an entry is latently blocked yet mechanically pickable as "first
312
+ unblocked", because selection trusts tags, not prose. Resolution: tag the
313
+ real blocker, move the entry to the deferred section, rephrase past-tense if
314
+ the precondition is met, or the `[precondition-ok: <reason>]` opt-out (a
315
+ queue tag, not an HTML comment, so it survives the hygiene gate).
316
+
317
+ Calibration: the trigger set (`QUEUE_KIT_PRECONDITION_REGEX`) is deliberately
318
+ narrow — forward-looking phrasing only, past-tense narration stripped before
319
+ matching — and scoped to the active sections (the deferred section uses
320
+ "revisit when" as normal vocabulary and is exempt). FP-bearing by
321
+ construction (parsing prose intent); the blocking grade is justified by a
322
+ silent pick attested in production use and the bounded scope.
323
+
324
+ ### check-queue-slug-liveness
325
+
326
+ Invariant: on every prose surface named by `QUEUE_KIT_PROSE_SURFACE_GLOBS`,
327
+ every slug-shaped bold-code token — `` **`<token>`** `` whose token matches the
328
+ slug grammar (`[a-z0-9][a-z0-9-]*`, so a `--flag` mention falls outside) —
329
+ resolves against the queue's live slug set (`lib/queue.sh`'s `queue_live_slugs`,
330
+ active + deferred). A token naming no live task is a dead membership claim,
331
+ reported by file, line, and slug. The slug set excludes done tasks by
332
+ construction: prose about landed work must drop the bold-code form and cite the
333
+ owning SPEC instead, so a living page can never keep calling a landed task
334
+ queued.
335
+
336
+ The bold-code token is prose's *only* sanctioned queue-membership claim
337
+ (§The tag algebra) — a grammar narrow enough for a gate to read, so the
338
+ living-page current-state rule stops being a standing duty and becomes a
339
+ checked contract. Default-empty knob: a consumer with no configured surface
340
+ no-ops clean; the surfaces are consumer editorial config, never a kit literal
341
+ (the provenance seam). Resolution direction is one-way (`dir=one`): the queue
342
+ is ground truth, the prose the audited follower.
343
+
344
+ ### templates/
345
+
346
+ `queue-config.sh` — the consumer config template documenting every knob (the
347
+ `# spec:` pointer to the §Layout knob table, which now includes
348
+ `QUEUE_KIT_LESSON_SINKS` and its local-overlay reminder).
349
+ `TASK-QUEUE.md` — a starter queue skeleton: the sections in default order,
350
+ one example entry per grammar shape shown under `Technical Debt` (the
351
+ `[spec:]`-gated `New Features` carries teaching prose only, since a spec-ready
352
+ example would dangle a ref). It ships battery-clean when copied verbatim — the
353
+ starter-template conformance contract owned by gate-sdk/SPEC.md §Consumer smoke
354
+ — and carries lifecycle-kit's iteration header as inert scaffold so a
355
+ combined-tree copy clears the stage gates too.
356
+
357
+ ## Out of scope
358
+
359
+ <!-- prose-enum-exempt: names the two amendment-lifecycle tags specifically; [blocked-by:] is a dependency tag outside that lifecycle, not a dropped task-tag member -->
360
+ The amendment lifecycle around `[needs-spec]`/`[spec:]` (section-wide
361
+ enforcement, promotion procedure, `check-amendment-queue`) is canon-kit's
362
+ scope. Code-comment TODO scanning (`TODO(task:<slug>)` resolution against
363
+ the queue) couples to source-file conventions and is canon-kit's, on the
364
+ governed comment surface (`check-todo-task-liveness`). Task-output readers and delegation tooling are delegation-kit's
365
+ scope. A consumer's protocol prose, deferred-subsection taxonomy, and task
366
+ bodies are rule content and never ship.
@@ -0,0 +1,28 @@
1
+ #!/usr/bin/env bash
2
+ # spec: queue-kit/SPEC.md §bin/lesson-sink.sh — resolve a harvest tag's sink and stream the lesson body into it (a tool, not a gate; no # graph: manifest)
3
+ #
4
+ # usage: lesson-sink.sh <tag>
5
+ # reads the lesson body on stdin; runs the QUEUE_KIT_LESSON_SINKS command for
6
+ # <tag>, or appends to <workflow-dir>/<tag>-harvest.md when none is configured
7
+ set -uo pipefail
8
+
9
+ KIT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
10
+ # shellcheck source=../lib/queue.sh
11
+ source "$KIT/lib/queue.sh"
12
+
13
+ tag=""
14
+ while (($#)); do
15
+ case "$1" in
16
+ -h|--help) sed -n '4,6p' "${BASH_SOURCE[0]}" | sed 's/^# \{0,1\}//'; exit 0 ;;
17
+ -*) echo "lesson-sink: unknown option: $1" >&2; exit 2 ;;
18
+ *) tag="$1"; shift ;;
19
+ esac
20
+ done
21
+ [[ -n "$tag" ]] || { echo "lesson-sink: needs a <tag>" >&2; exit 2; }
22
+
23
+ if [[ -v QUEUE_KIT_LESSON_SINKS[$tag] ]]; then
24
+ # spec: queue-kit/SPEC.md §bin/lesson-sink.sh — a configured sink that fails is a red close step, never a silent fallback to staging
25
+ exec bash -c "${QUEUE_KIT_LESSON_SINKS[$tag]}"
26
+ fi
27
+
28
+ exec cat >> "${GATE_SDK_WORKFLOW_DIR:-.workflow}/${tag}-harvest.md"
@@ -0,0 +1,131 @@
1
+ #!/usr/bin/env bash
2
+ # spec: queue-kit/SPEC.md §bin/queue-index.sh — compact queue surface for task selection (a tool, not a gate; no # graph: manifest)
3
+ #
4
+ # usage: queue-index.sh [--collapse-deferred] [--extent <slug>] [queue-file]
5
+ # default: iteration header + active (• ready / ✗ blocked) + deferred titles;
6
+ # --collapse-deferred: per-### tally; --extent <slug>: "<start> <end>" line range
7
+ set -uo pipefail
8
+
9
+ KIT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
10
+ # shellcheck source=../lib/queue.sh
11
+ source "$KIT/lib/queue.sh"
12
+
13
+ mode=index; collapse=0; slug=""; file=""
14
+ while (($#)); do
15
+ case "$1" in
16
+ --collapse-deferred) collapse=1; shift ;;
17
+ --extent) mode=extent; slug="${2:-}"; shift 2 || true ;;
18
+ -h|--help) sed -n '3,9p' "${BASH_SOURCE[0]}" | sed 's/^# \{0,1\}//'; exit 0 ;;
19
+ -*) echo "queue-index: unknown option: $1" >&2; exit 2 ;;
20
+ *) file="$1"; shift ;;
21
+ esac
22
+ done
23
+ FILE="${file:-$QUEUE_KIT_QUEUE_FILE}"
24
+ [[ -f "$FILE" ]] || { echo "queue-index: file not found: $FILE" >&2; exit 2; }
25
+
26
+ if [[ "$mode" == extent ]]; then
27
+ [[ -n "$slug" ]] || { echo "queue-index: --extent needs a <slug>" >&2; exit 2; }
28
+ range="$(awk -v slug="$slug" '
29
+ !found && $0 ~ /^[[:space:]]*-[[:space:]]+\*\*[a-z0-9][a-z0-9-]*\*\*/ {
30
+ match($0, /\*\*[a-z0-9][a-z0-9-]*\*\*/)
31
+ if (substr($0, RSTART + 2, RLENGTH - 4) == slug) {
32
+ found = 1; start = NR; ind = match($0, /[^[:space:]]/) - 1; next
33
+ }
34
+ }
35
+ found {
36
+ if ($0 ~ /^#/ || $0 ~ /^---[[:space:]]*$/) { print start, NR - 1; done = 1; exit }
37
+ if ($0 ~ /^[[:space:]]*-[[:space:]]/ && (match($0, /[^[:space:]]/) - 1) <= ind) {
38
+ print start, NR - 1; done = 1; exit
39
+ }
40
+ }
41
+ END { if (found && !done) print start, NR }
42
+ ' "$FILE")"
43
+ [[ -n "$range" ]] || { echo "queue-index: slug not found: $slug" >&2; exit 1; }
44
+ echo "$range"
45
+ exit 0
46
+ fi
47
+
48
+ hdr="$(grep -m1 '^## Iteration:' "$FILE" || true)"
49
+ [[ -n "$hdr" ]] && { echo "$hdr"; echo ""; }
50
+
51
+ awk -v activere="$QUEUE_ACTIVE_RE" -v deferredre="$QUEUE_DEFERRED_RE" \
52
+ -v lessonsre="$QUEUE_LESSONS_RE" -v cap="$QUEUE_KIT_ATTEND_CAP" \
53
+ -v sectre="$QUEUE_SECTION_RE" -v collapse="$collapse" '
54
+ function title(line, t) {
55
+ t = line
56
+ sub(/^[[:space:]]*-[[:space:]]+/, "", t)
57
+ sub(/^\*\*[a-z0-9][a-z0-9-]*\*\*[[:space:]]*(—[[:space:]]*)?/, "", t)
58
+ gsub(/\[[^]]*\]/, "", t)
59
+ sub(/[[:space:]]+$/, "", t)
60
+ if (length(t) > 64) t = substr(t, 1, 63) "…"
61
+ return t
62
+ }
63
+ function drainex(line, d) {
64
+ if (!match(line, /\[drain-exempt:[[:space:]]*[^]]+\]/)) return ""
65
+ d = substr(line, RSTART, RLENGTH)
66
+ sub(/\[drain-exempt:[[:space:]]*/, "", d); sub(/\][[:space:]]*$/, "", d)
67
+ return d
68
+ }
69
+ function blockers(line, s, r, b) {
70
+ s = line; r = ""
71
+ while (match(s, /\[blocked-by:[[:space:]]*[a-z0-9][a-z0-9-]*/)) {
72
+ b = substr(s, RSTART, RLENGTH); sub(/\[blocked-by:[[:space:]]*/, "", b)
73
+ r = r (r == "" ? "" : ", ") b
74
+ s = substr(s, RSTART + RLENGTH)
75
+ }
76
+ return r
77
+ }
78
+ $0 ~ activere { sec = "active"; next }
79
+ $0 ~ deferredre { sec = "deferred"; next }
80
+ $0 ~ lessonsre { sec = "lessons"; next }
81
+ $0 ~ sectre { sec = "other"; next }
82
+
83
+ sec == "lessons" && /^-[[:space:]]/ && /\[attend\]/ {
84
+ nl++
85
+ if (nl <= cap) { line = $0; sub(/[[:space:]]+$/, "", line); att[nl] = line }
86
+ next
87
+ }
88
+
89
+ sec == "active" && /^-[[:space:]]/ && match($0, /\*\*[a-z0-9][a-z0-9-]*\*\*/) {
90
+ sl = substr($0, RSTART + 2, RLENGTH - 4)
91
+ bl = blockers($0); de = drainex($0)
92
+ na++; amark[na] = (bl == "" ? "•" : "✗"); aslug[na] = sl
93
+ atitle[na] = title($0) (bl == "" ? "" : " [blocked-by: " bl "]") \
94
+ (de == "" ? "" : " [drain-exempt: " de "]")
95
+ next
96
+ }
97
+ sec == "deferred" && /^###[[:space:]]/ {
98
+ cur = $0; sub(/^###[[:space:]]+/, "", cur); sub(/[[:space:]]+$/, "", cur); next
99
+ }
100
+ sec == "deferred" && /^-[[:space:]]/ && match($0, /\*\*[a-z0-9][a-z0-9-]*\*\*/) {
101
+ sl = substr($0, RSTART + 2, RLENGTH - 4)
102
+ key = (cur == "" ? "(top)" : cur)
103
+ if (!(key in seen)) { seen[key] = 1; dord[++nd] = key }
104
+ cnt[key]++
105
+ dn++; dsub[dn] = key; dtitle[dn] = sl " — " title($0)
106
+ next
107
+ }
108
+
109
+ END {
110
+ print "Active (pick the first •):"
111
+ if (na == 0) print " (none — active queue empty)"
112
+ for (i = 1; i <= na; i++) printf " %s %s — %s\n", amark[i], aslug[i], atitle[i]
113
+ print ""
114
+ if (collapse == 1) {
115
+ print "Deferred (tally):"
116
+ if (nd == 0) print " (none)"
117
+ for (i = 1; i <= nd; i++) printf " %s: %d\n", dord[i], cnt[dord[i]]
118
+ } else {
119
+ print "Deferred:"
120
+ if (dn == 0) print " (none)"
121
+ for (i = 1; i <= dn; i++) printf " %s\n", dtitle[i]
122
+ }
123
+ if (nl > 0) {
124
+ print ""
125
+ print "Attention (Lessons [attend], this iteration):"
126
+ lim = (nl < cap ? nl : cap)
127
+ for (i = 1; i <= lim; i++) printf " %s\n", att[i]
128
+ if (nl > cap) printf " (+%d more [attend])\n", nl - cap
129
+ }
130
+ }
131
+ ' "$FILE"
@@ -0,0 +1,81 @@
1
+ #!/usr/bin/env bash
2
+ # graph: couples=TASK-QUEUE.md dir=one valve=none tier=precommit
3
+ # spec: queue-kit/SPEC.md §check-queue-hygiene — the queue holds only tasks, tags, and structure: no HTML comments, no duplicate lines, no column-0 prose
4
+ #
5
+ # usage: check-queue-hygiene.sh [queue-file]
6
+ # Defaults to the configured queue file (QUEUE_KIT_QUEUE_FILE).
7
+ set -uo pipefail
8
+
9
+ KIT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
10
+ SDK="${GATE_SDK_ROOT:-$KIT/../gate-sdk}"
11
+ # shellcheck source=../../gate-sdk/lib/gate.sh
12
+ source "$SDK/lib/gate.sh"
13
+ # shellcheck source=../lib/queue.sh
14
+ source "$KIT/lib/queue.sh"
15
+
16
+ FILE="${1:-$QUEUE_KIT_QUEUE_FILE}"
17
+ [[ -f "$FILE" ]] || { echo "check-queue-hygiene: file not found: $FILE" >&2; exit 2; }
18
+
19
+ out="$(awk -v leads="$(printf '%s\n' "${QUEUE_KIT_PROSE_LEADS[@]+"${QUEUE_KIT_PROSE_LEADS[@]}"}")" '
20
+ BEGIN { nl = split(leads, L, "\n") }
21
+ {
22
+ if ($0 ~ /<!--/ || $0 ~ /-->/)
23
+ printf "html\t%d\t%s\n", FNR, $0
24
+
25
+ if ($0 ~ /^[^[:space:]]/) { # column-0, non-blank line
26
+ ok = 0
27
+ if ($0 ~ /^#/) ok = 1 # heading
28
+ else if ($0 ~ /^-[[:space:]]/) ok = 1 # bullet
29
+ else if ($0 ~ /^---[[:space:]]*$/) ok = 1 # rule
30
+ else {
31
+ for (i = 1; i <= nl; i++)
32
+ if (L[i] != "" && index($0, L[i]) == 1) { ok = 1; break }
33
+ }
34
+ if (!ok) printf "prose\t%d\t%s\n", FNR, $0
35
+ }
36
+
37
+ if ($0 !~ /^[[:space:]]*$/ && $0 !~ /^---[[:space:]]*$/) {
38
+ if ($0 in seen)
39
+ printf "dup\t%d\t%s (first seen at line %d)\n", FNR, $0, seen[$0]
40
+ else
41
+ seen[$0] = FNR
42
+ }
43
+ }
44
+ ' "$FILE")"; st=$?
45
+ fail_closed "$st" QUEUE-HYGIENE awk
46
+
47
+ html=(); prose=(); dup=()
48
+ while IFS=$'\t' read -r class ln text; do
49
+ [[ -n "$class" ]] || continue
50
+ case "$class" in
51
+ html) html+=("$FILE:$ln: $text") ;;
52
+ prose) prose+=("$FILE:$ln: $text") ;;
53
+ dup) dup+=("$FILE:$ln: $text") ;;
54
+ esac
55
+ done <<< "$out"
56
+
57
+ if [[ ${#html[@]} -gt 0 || ${#prose[@]} -gt 0 || ${#dup[@]} -gt 0 ]]; then
58
+ if [[ ${#html[@]} -gt 0 ]]; then
59
+ echo "check-queue-hygiene: HTML comment(s) in the queue (provenance belongs in git history):"
60
+ printf ' %s\n' "${html[@]}"
61
+ echo " help: delete the comment; record the why in the commit message, not the queue."
62
+ fi
63
+ if [[ ${#dup[@]} -gt 0 ]]; then
64
+ [[ ${#html[@]} -gt 0 ]] && echo ""
65
+ echo "check-queue-hygiene: exact-duplicate line(s) (copy-paste artifact):"
66
+ printf ' %s\n' "${dup[@]}"
67
+ echo " help: remove the duplicate; if two tasks genuinely share wording, differentiate them."
68
+ fi
69
+ if [[ ${#prose[@]} -gt 0 ]]; then
70
+ { [[ ${#html[@]} -gt 0 ]] || [[ ${#dup[@]} -gt 0 ]]; } && echo ""
71
+ echo "check-queue-hygiene: column-0 prose (every column-0 line must be a heading,"
72
+ echo "a '- ' bullet, '---', or a configured QUEUE_KIT_PROSE_LEADS lead):"
73
+ printf ' %s\n' "${prose[@]}"
74
+ echo " help: indent the prose to a continuation line under its bullet, or (for a"
75
+ echo " recurring protocol lead) add its token to QUEUE_KIT_PROSE_LEADS."
76
+ fi
77
+ exit 1
78
+ fi
79
+
80
+ echo "QUEUE-HYGIENE: clean (no HTML comments, no duplicate lines, no column-0 prose in $FILE)"
81
+ exit 0