checkwright 0.21.0 → 0.22.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 (236) hide show
  1. package/README.md +385 -19
  2. package/lib/common/digest.sh +18 -0
  3. package/lib/common/lock.sh +11 -0
  4. package/lib/common/recipe.sh +8 -11
  5. package/lib/doctor.sh +49 -0
  6. package/lib/init.sh +152 -29
  7. package/package.json +2 -2
  8. package/payload/artifact/targets.list +30 -0
  9. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates +0 -0
  10. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates.sha256 +1 -0
  11. package/payload/canon-kit/README.md +1 -0
  12. package/payload/canon-kit/SPEC.md +279 -24
  13. package/payload/canon-kit/checks/check-comment-tier.sh +7 -2
  14. package/payload/canon-kit/checks/check-docs-link-convention.sh +11 -4
  15. package/payload/canon-kit/checks/check-payload-claim.sh +133 -0
  16. package/payload/canon-kit/checks/check-prose-enum.sh +1 -1
  17. package/payload/canon-kit/checks/check-spec-pointer.sh +9 -2
  18. package/payload/canon-kit/gate-tests/check-comment-tier/good/good.sh +3 -0
  19. package/payload/canon-kit/gate-tests/check-comment-tier.test.sh +26 -3
  20. package/payload/canon-kit/gate-tests/check-docs-link-convention/bad/OUTSIDE.md +4 -0
  21. package/payload/canon-kit/gate-tests/check-docs-link-convention/bad/docs/index.md +3 -0
  22. package/payload/canon-kit/gate-tests/check-docs-link-convention/good/OUTSIDE.md +4 -0
  23. package/payload/canon-kit/gate-tests/check-docs-link-convention/good/docs/methodology.md +8 -0
  24. package/payload/canon-kit/gate-tests/check-docs-link-convention.test.sh +94 -0
  25. package/payload/canon-kit/gate-tests/check-manifest-count.test.sh +5 -3
  26. package/payload/canon-kit/gate-tests/check-payload-claim/bad/README.md +15 -0
  27. package/payload/canon-kit/gate-tests/check-payload-claim/bad/expect.txt +2 -0
  28. package/payload/canon-kit/gate-tests/check-payload-claim/bad/install.md +19 -0
  29. package/payload/canon-kit/gate-tests/check-payload-claim/bad/posts/note.md +6 -0
  30. package/payload/canon-kit/gate-tests/check-payload-claim/bad/scripts/canon-config.sh +8 -0
  31. package/payload/canon-kit/gate-tests/check-payload-claim/bad/scripts/payload-claims.sh +7 -0
  32. package/payload/canon-kit/gate-tests/check-payload-claim/good/README.md +15 -0
  33. package/payload/canon-kit/gate-tests/check-payload-claim/good/expect.txt +2 -0
  34. package/payload/canon-kit/gate-tests/check-payload-claim/good/install.md +20 -0
  35. package/payload/canon-kit/gate-tests/check-payload-claim/good/posts/note.md +6 -0
  36. package/payload/canon-kit/gate-tests/check-payload-claim/good/scripts/canon-config.sh +8 -0
  37. package/payload/canon-kit/gate-tests/check-payload-claim/good/scripts/payload-claims.sh +7 -0
  38. package/payload/canon-kit/gate-tests/check-prose-enum.test.sh +24 -1
  39. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/expect.txt +1 -0
  40. package/payload/canon-kit/gate-tests/check-spec-pointer/bad/widget.sh +1 -0
  41. package/payload/canon-kit/gate-tests/check-spec-pointer/good/widget.sh +1 -0
  42. package/payload/canon-kit/lib/spec.sh +22 -12
  43. package/payload/canon-kit/smoke/install.sh +20 -1
  44. package/payload/canon-kit/templates/SPEC-amendment.md +5 -1
  45. package/payload/context-kit/SPEC.md +25 -1
  46. package/payload/context-kit/lib/toolfloor.sh +1 -1
  47. package/payload/context-kit/smoke/install.sh +3 -1
  48. package/payload/delegation-kit/SPEC.md +383 -13
  49. package/payload/delegation-kit/bin/run-dispatch-guard-tests.sh +97 -0
  50. package/payload/delegation-kit/checks/check-gate-tamper.sh +1 -1
  51. package/payload/delegation-kit/lib/delegation.sh +1 -0
  52. package/payload/delegation-kit/smoke/install.sh +2 -1
  53. package/payload/delegation-kit/templates/agent-dispatch-guard.sh +61 -0
  54. package/payload/delegation-kit/templates/agent-execution.md +103 -12
  55. package/payload/delegation-kit/templates/delegation-config.sh +4 -0
  56. package/payload/delegation-kit/templates/dispatch-checklists.md +1 -1
  57. package/payload/delegation-kit/usage-tests/dispatch-guard-cases.tsv +30 -0
  58. package/payload/doctrine-kit/DOCTRINE.md +27 -0
  59. package/payload/doctrine-kit/README.md +5 -0
  60. package/payload/doctrine-kit/SPEC.md +62 -3
  61. package/payload/doctrine-kit/bin/install-doctrine.sh +84 -4
  62. package/payload/doctrine-kit/smoke/install.sh +77 -1
  63. package/payload/drift-kit/README.md +3 -2
  64. package/payload/drift-kit/SPEC.md +253 -20
  65. package/payload/drift-kit/bin/stage-economics.sh +157 -3
  66. package/payload/drift-kit/kpis/kpi-incident-recurrence.sh +42 -0
  67. package/payload/drift-kit/smoke/install.sh +155 -1
  68. package/payload/drift-kit/templates/economics.md +9 -0
  69. package/payload/drift-kit/templates/kpis.list +6 -1
  70. package/payload/evidence-kit/README.md +20 -6
  71. package/payload/evidence-kit/SPEC.md +355 -17
  72. package/payload/evidence-kit/bin/run-validate.sh +51 -9
  73. package/payload/evidence-kit/checks/check-battery-roster.sh +86 -0
  74. package/payload/evidence-kit/checks/check-producer-liveness.sh +34 -0
  75. package/payload/evidence-kit/gate-tests/check-battery-roster/bad/args +1 -0
  76. package/payload/evidence-kit/gate-tests/check-battery-roster/bad/expect.txt +1 -0
  77. package/payload/evidence-kit/gate-tests/check-battery-roster/bad/runner.md +14 -0
  78. package/payload/evidence-kit/gate-tests/check-battery-roster/bad/scripts/evidence-config.sh +7 -0
  79. package/payload/evidence-kit/gate-tests/check-battery-roster/good/args +1 -0
  80. package/payload/evidence-kit/gate-tests/check-battery-roster/good/expect.txt +1 -0
  81. package/payload/evidence-kit/gate-tests/check-battery-roster/good/runner.md +14 -0
  82. package/payload/evidence-kit/gate-tests/check-battery-roster/good/scripts/evidence-config.sh +7 -0
  83. package/payload/evidence-kit/gate-tests/check-battery-roster.test.sh +68 -0
  84. package/payload/evidence-kit/gate-tests/check-producer-liveness/bad/args +1 -0
  85. package/payload/evidence-kit/gate-tests/check-producer-liveness/bad/expect.txt +1 -0
  86. package/payload/evidence-kit/gate-tests/check-producer-liveness/bad/run-validate.lock +1 -0
  87. package/payload/evidence-kit/gate-tests/check-producer-liveness/good/args +1 -0
  88. package/payload/evidence-kit/gate-tests/check-producer-liveness/good/expect.txt +2 -0
  89. package/payload/evidence-kit/gate-tests/check-producer-liveness/good/run-validate.lock +1 -0
  90. package/payload/evidence-kit/gate-tests/producer-lock.test.sh +109 -0
  91. package/payload/evidence-kit/lib/evidence.sh +18 -0
  92. package/payload/evidence-kit/smoke/install.sh +17 -3
  93. package/payload/gate-sdk/README.md +4 -1
  94. package/payload/gate-sdk/SPEC.md +1949 -74
  95. package/payload/gate-sdk/bin/gen-pre-commit.sh +12 -2
  96. package/payload/gate-sdk/bin/run-consumer-smoke.sh +121 -1
  97. package/payload/gate-sdk/bin/run-gate-tests.sh +40 -9
  98. package/payload/gate-sdk/bin/run-gates.sh +31 -2
  99. package/payload/gate-sdk/bin/upgrade-smoke.sh +3 -3
  100. package/payload/gate-sdk/checks/check-action-gh-repo.gate +2 -0
  101. package/payload/gate-sdk/checks/check-action-pinning.gate +2 -0
  102. package/payload/gate-sdk/checks/check-action-run-shell.sh +3 -1
  103. package/payload/gate-sdk/checks/check-core-files.sh +27 -4
  104. package/payload/gate-sdk/checks/check-exec-bit.sh +20 -1
  105. package/payload/gate-sdk/checks/check-gate-binary-fresh.sh +106 -0
  106. package/payload/gate-sdk/checks/check-gate-exemption-tasks.sh +6 -7
  107. package/payload/gate-sdk/checks/check-gate-output.sh +9 -1
  108. package/payload/gate-sdk/checks/check-gate-substrate-parity.sh +302 -0
  109. package/payload/gate-sdk/checks/check-graph.sh +4 -5
  110. package/payload/gate-sdk/checks/check-readme-roster.sh +5 -0
  111. package/payload/gate-sdk/checks/check-reads-couples.sh +70 -21
  112. package/payload/gate-sdk/checks/check-template-registry-parity.sh +81 -0
  113. package/payload/gate-sdk/gate-tests/check-action-run-shell.test.sh +16 -1
  114. package/payload/gate-sdk/gate-tests/check-core-files.test.sh +64 -0
  115. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/args +2 -0
  116. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/expect.txt +5 -0
  117. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/kitroot/checks/check-vendored.gate +2 -0
  118. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/check-ported.gate +2 -0
  119. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/gate-sdk-config.sh +2 -0
  120. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/gates.list +4 -0
  121. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/stamp.txt +1 -0
  122. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/stub-bin +6 -0
  123. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/args +2 -0
  124. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/expect.txt +5 -0
  125. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/kitroot/checks/check-vendored.gate +2 -0
  126. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/check-ported.gate +2 -0
  127. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/gate-sdk-config.sh +2 -0
  128. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/gates.list +4 -0
  129. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/stamp.txt +1 -0
  130. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/stub-bin +5 -0
  131. package/payload/gate-sdk/gate-tests/check-gate-binary-fresh.test.sh +81 -0
  132. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/TASK-QUEUE.md +3 -1
  133. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/expect.txt +3 -1
  134. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/gates/check-sample.sh +3 -1
  135. package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/expect.txt +1 -0
  136. package/payload/gate-sdk/gate-tests/check-gate-output/bad/check-sample.sh +1 -0
  137. package/payload/gate-sdk/gate-tests/check-gate-output/good/check-sample.sh +1 -0
  138. package/payload/gate-sdk/gate-tests/check-gate-output/good/expect.txt +1 -0
  139. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/args +2 -0
  140. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/conservation.md +7 -0
  141. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/expect.txt +12 -0
  142. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/impl/gate.rs +2 -0
  143. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/kitroot/check-orphan.rs +3 -0
  144. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/publish.yml +15 -0
  145. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-alpha.sh +3 -0
  146. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-dup.gate +1 -0
  147. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-dup.sh +3 -0
  148. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-orphan.gate +1 -0
  149. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gate-sdk-config.sh +6 -0
  150. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gates.list +3 -0
  151. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/stub-bin +3 -0
  152. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/targets.list +3 -0
  153. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/args +2 -0
  154. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/conservation.md +8 -0
  155. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/expect.txt +7 -0
  156. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/impl/gate.rs +2 -0
  157. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/kitroot/check-other.rs +3 -0
  158. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/publish.yml +15 -0
  159. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-alpha.sh +3 -0
  160. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-ported.gate +2 -0
  161. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gate-sdk-config.sh +6 -0
  162. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gates.list +2 -0
  163. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/stub-bin +3 -0
  164. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/targets.list +2 -0
  165. package/payload/gate-sdk/gate-tests/check-gate-substrate-parity.test.sh +123 -0
  166. package/payload/gate-sdk/gate-tests/check-reads-couples.test.sh +139 -0
  167. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/alpha-kit/templates/widgets.list +4 -0
  168. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/alpha-kit/widgets/widget-one.sh +3 -0
  169. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/alpha-kit/widgets/widget-two.sh +3 -0
  170. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/args +4 -0
  171. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/expect.txt +1 -0
  172. package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/scripts/gate-sdk-config.sh +5 -0
  173. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/alpha-kit/templates/widgets.list +4 -0
  174. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/alpha-kit/widgets/widget-one.sh +3 -0
  175. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/alpha-kit/widgets/widget-two.sh +3 -0
  176. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/args +8 -0
  177. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/beta-kit/templates/rules.list +5 -0
  178. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/beta-kit/templates/table.tsv +4 -0
  179. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/expect.txt +1 -0
  180. package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/scripts/gate-sdk-config.sh +5 -0
  181. package/payload/gate-sdk/gate-tests/lib-declaration.test.sh +4 -4
  182. package/payload/gate-sdk/gate-tests/lib-gate.test.sh +41 -1
  183. package/payload/gate-sdk/gate-tests/run-gate-tests.test.sh +144 -0
  184. package/payload/gate-sdk/lib/consumer-smoke.sh +26 -1
  185. package/payload/gate-sdk/lib/gate.sh +75 -0
  186. package/payload/gate-sdk/lib/inject.sh +21 -1
  187. package/payload/gate-sdk/smoke/install.sh +19 -1
  188. package/payload/guard-kit/README.md +4 -3
  189. package/payload/guard-kit/SPEC.md +88 -10
  190. package/payload/guard-kit/bin/compare-settings-allow.sh +40 -7
  191. package/payload/guard-kit/gate-tests/compare-settings-allow.test.sh +64 -0
  192. package/payload/guard-kit/lib/guard.sh +1 -0
  193. package/payload/guard-kit/templates/close-triage.md +35 -7
  194. package/payload/guard-kit/templates/guard-config.sh +3 -0
  195. package/payload/lifecycle-kit/README.md +1 -0
  196. package/payload/lifecycle-kit/SPEC.md +575 -29
  197. package/payload/lifecycle-kit/bin/enter-stage.sh +13 -3
  198. package/payload/lifecycle-kit/bin/file-gap.sh +42 -1
  199. package/payload/lifecycle-kit/bin/file-survey.sh +50 -0
  200. package/payload/lifecycle-kit/checks/check-merge-attrs.sh +1 -1
  201. package/payload/lifecycle-kit/checks/check-skill-binding.sh +1 -1
  202. package/payload/lifecycle-kit/checks/check-survey-record.sh +102 -0
  203. package/payload/lifecycle-kit/gate-tests/check-merge-attrs/bad/.gitattributes +1 -0
  204. package/payload/lifecycle-kit/gate-tests/check-merge-attrs/good/.gitattributes +1 -0
  205. package/payload/lifecycle-kit/gate-tests/check-merge-attrs.test.sh +1 -0
  206. package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/args +2 -0
  207. package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/expect.txt +4 -0
  208. package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/record.md +18 -0
  209. package/payload/lifecycle-kit/gate-tests/check-survey-record/good/args +2 -0
  210. package/payload/lifecycle-kit/gate-tests/check-survey-record/good/expect.txt +1 -0
  211. package/payload/lifecycle-kit/gate-tests/check-survey-record/good/record.md +13 -0
  212. package/payload/lifecycle-kit/gate-tests/check-survey-record.test.sh +84 -0
  213. package/payload/lifecycle-kit/gate-tests/file-gap-recurrence.test.sh +94 -0
  214. package/payload/lifecycle-kit/gate-tests/survey-record-entry.test.sh +102 -0
  215. package/payload/lifecycle-kit/lib/stages.sh +8 -2
  216. package/payload/lifecycle-kit/smoke/install.sh +17 -1
  217. package/payload/lifecycle-kit/templates/consult.md +73 -0
  218. package/payload/lifecycle-kit/templates/lead.md +103 -7
  219. package/payload/lifecycle-kit/templates/stages/align.md +12 -0
  220. package/payload/lifecycle-kit/templates/stages/build.md +8 -0
  221. package/payload/lifecycle-kit/templates/stages/close.md +25 -4
  222. package/payload/lifecycle-kit/templates/stages/scope.md +34 -0
  223. package/payload/lifecycle-kit/templates/stages/spec.md +8 -0
  224. package/payload/lifecycle-kit/templates/stages/validate.md +8 -0
  225. package/payload/queue-kit/README.md +4 -1
  226. package/payload/queue-kit/SPEC.md +230 -6
  227. package/payload/queue-kit/bin/queue-edges.sh +78 -0
  228. package/payload/queue-kit/checks/check-queue-entry-budget.sh +5 -3
  229. package/payload/queue-kit/gate-tests/check-queue-hygiene/good/TASK-QUEUE.md +5 -0
  230. package/payload/queue-kit/gate-tests/queue-edges.test.sh +130 -0
  231. package/payload/queue-kit/smoke/install.sh +4 -1
  232. package/payload/queue-kit/templates/TASK-QUEUE.md +3 -0
  233. package/payload/site-kit/SPEC.md +41 -27
  234. package/payload/site-kit/smoke/install.sh +9 -1
  235. package/payload/gate-sdk/checks/check-action-gh-repo.sh +0 -321
  236. package/payload/gate-sdk/checks/check-action-pinning.sh +0 -55
@@ -51,7 +51,7 @@ function _sk_present(low, m, lm, start, idx, pp, bc, ac) {
51
51
  pp = start + idx - 1
52
52
  bc = (pp > 1) ? substr(low, pp - 1, 1) : " "
53
53
  ac = (pp + lm <= length(low)) ? substr(low, pp + lm, 1) : " "
54
- if (bc !~ /[[:alnum:]-]/ && ac !~ /[[:alnum:]-]/) return pp
54
+ if (bc !~ /[[:alnum:]_-]/ && ac !~ /[[:alnum:]_-]/) return pp
55
55
  start = pp + 1
56
56
  }
57
57
  }
@@ -106,6 +106,7 @@ while IFS= read -r -d '' _tf; do TRACKED["$_tf"]=1; done < <(git -C "$ROOT" ls-f
106
106
  errors=()
107
107
  scanned=0
108
108
  pointers=0
109
+ markers=0
109
110
  while IFS= read -r f; do
110
111
  [[ -n "$f" ]] || continue
111
112
  rel="${f#"$ROOT"/}"; rel="${rel#./}"
@@ -115,8 +116,14 @@ while IFS= read -r f; do
115
116
  fail_closed "$st" SPEC-POINTER "awk extract ($rel)"
116
117
  while IFS=$'\t' read -r _file lineno body; do
117
118
  [[ -n "$body" ]] || continue
118
- pointers=$((pointers + 1))
119
119
  if [[ "$body" == spec:* ]]; then after="${body#spec:}"; else after="${body#contract:}"; fi
120
+ # spec: gate-sdk/SPEC.md §The workflow directory — contract: rules two payloads, and the version-marker form is a wire-format version its owning gate parses rather than a doc pointer, so it names no path to resolve
121
+ payload="${after#"${after%%[![:space:]]*}"}"; payload="${payload%"${payload##*[![:space:]]}"}"
122
+ if [[ "$body" == contract:* && "$payload" =~ ^[a-z0-9-]+\ v[0-9]+$ ]]; then
123
+ markers=$((markers + 1))
124
+ continue
125
+ fi
126
+ pointers=$((pointers + 1))
120
127
  # comment-tier-exempt: a § inside the em-dash prose tail is not a heading marker
121
128
  sig="${after%% — *}"; sig="${sig%% -- *}"
122
129
  read -r path prest <<< "$sig"
@@ -176,5 +183,5 @@ if [[ ${#errors[@]} -gt 0 ]]; then
176
183
  echo " help: a spec:/contract: directive and a free-prose <path>.md §<heading> citation each bind a site to the requirement that governs it — the binding is only live if it resolves. Fix the <path> (repo-relative, tracked) or the §<heading> to name the current target, or drop the § fragment for a file-only pointer. A renamed heading updates every inbound pointer and citation in the same commit."
177
184
  exit 1
178
185
  fi
179
- echo "SPEC-POINTER: clean ($pointers directive pointer(s) across $scanned governed source(s); $prose_cites prose citation(s) across $manifests manifest file(s); every target file tracked and named §heading present)"
186
+ echo "SPEC-POINTER: clean ($pointers directive pointer(s) across $scanned governed source(s), $markers version-marker header(s) skipped as naming no path; $prose_cites prose citation(s) across $manifests manifest file(s); every target file tracked and named §heading present)"
180
187
  exit 0
@@ -22,6 +22,9 @@ EOF
22
22
  # comment-tier-exempt: a genuinely unavoidable note with no owning section
23
23
  bar() { echo bye; }
24
24
 
25
+ # smoke-unregistered: check-example — a machine directive run-consumer-smoke.sh parses off the vendored copy, so it is blessed by name like graph:/contract: rather than needing an exempt tag
26
+ baz() { echo sm; }
27
+
25
28
  # spec: some/SPEC.md §bounds — a directive blesses at most three checks per run,
26
29
  # a bound rather than a total; three of the twelve gates below stay partitive,
27
30
  # and the inline-code `six gates` reads as a meta-reference.
@@ -10,8 +10,9 @@
10
10
  # run-gate-tests passes to neither. The good/bad pair covers the shell classifier
11
11
  # (directive run, exempt, heredoc skip) and the count override's mainline; these
12
12
  # cover the mechanism a consumer activates by widening the surface, plus the
13
- # paragraph-join wrap the pair's single-substring expect.txt cannot pin —
14
- # which line a wrapped total reports at, and that the exempt valve reaches it.
13
+ # paragraph-join wrap — which line a wrapped total reports at, and that the
14
+ # exempt valve reaches it. Those two are here for the same config reason as the
15
+ # rest: each pins CANON_KIT_COMMENT_SURFACE to its own one-file roster.
15
16
  #
16
17
  # Run by run-gate-tests.sh (any <tests-dir>/*.test.sh; must exit 0).
17
18
  set -uo pipefail
@@ -94,6 +95,26 @@ cat >"$SANDBOX/tmpl-bad/templates/narration.sh" <<'EOF'
94
95
  #YOUR_KIT_KNOB=default
95
96
  EOF
96
97
 
98
+ # A workflow-dir markdown member whose records are '## ' blocks: the headings are
99
+ # the surface's own block grammar and must not be read as untagged comments, while
100
+ # a single-'#' line on the same member stays governed by the restricted roster.
101
+ mkdir -p "$SANDBOX/wf-good/.workflow" "$SANDBOX/wf-bad/.workflow"
102
+ cat >"$SANDBOX/wf-good/.workflow/record.md" <<'EOF'
103
+ # contract: some/SPEC.md §record — the md roster blesses this header
104
+
105
+ ## 2026-01-02 scope — a block heading is structure, not a comment
106
+ - corpus: checks/
107
+ - finding: carried across the stage boundary
108
+ EOF
109
+ cat >"$SANDBOX/wf-bad/.workflow/record.md" <<'EOF'
110
+ # contract: some/SPEC.md §record — the md roster blesses this header
111
+
112
+ ## 2026-01-02 scope — a block heading is structure, not a comment
113
+ - corpus: checks/
114
+ # this single-hash line on the md member is still an untagged comment
115
+ EOF
116
+ mkcfg "$SANDBOX/wfmd.sh" 'CANON_KIT_COMMENT_SURFACE=(.workflow/record.md)'
117
+
97
118
  check_case() { # $1=label $2=cfg $3=want-rc $4=want-substring $5=root(default SANDBOX)
98
119
  local label="$1" cfg="$2" want="$3" sub="$4" root="${5:-$SANDBOX}" out rc
99
120
  out="$(env CANON_KIT_CONFIG_FILE="$SANDBOX/$cfg" "$GATE" "$root" 2>&1)"; rc=$?
@@ -113,6 +134,8 @@ check_case "templates-thinned-ok" derived.sh 0 "COMMENT-TIER: clean" "
113
134
  check_case "templates-narration-red" derived.sh 1 "the tier gate scans templates" "$SANDBOX/tmpl-bad"
114
135
  check_case "count-exempt-valve" exempt-cfg.sh 0 "COMMENT-TIER: clean"
115
136
  check_case "count-survives-positional-rescue" pos-cfg.sh 1 "restated collection total: six gates"
137
+ check_case "workflow-md-headings-are-structure" wfmd.sh 0 "COMMENT-TIER: clean" "$SANDBOX/wf-good"
138
+ check_case "workflow-md-single-hash-governed" wfmd.sh 1 "still an untagged comment" "$SANDBOX/wf-bad"
116
139
 
117
140
  # The bad fixture's expect.txt asserts the count override, so the window-spill
118
141
  # half of the pair keeps its assertion here.
@@ -142,5 +165,5 @@ if [[ "$fails" -gt 0 ]]; then
142
165
  echo "check-comment-tier.test.sh: $fails case(s) failed"
143
166
  exit 1
144
167
  fi
145
- echo "check-comment-tier.test.sh: clean (slash surface + positional rescue + txt restricted roster + templates/ governance + count override edges + paragraph-join wrap)"
168
+ echo "check-comment-tier.test.sh: clean (slash surface + positional rescue + txt restricted roster + templates/ governance + count override edges + paragraph-join wrap + workflow-dir markdown headings as structure with its single-hash lines still governed)"
146
169
  exit 0
@@ -0,0 +1,4 @@
1
+ # A file outside the fixture's docs root
2
+
3
+ The bad tree reaches it with a bare relative link, which resolves on disk and
4
+ 404s on a site served from the docs root alone.
@@ -1,3 +1,6 @@
1
1
  # Fixture docs index
2
2
 
3
3
  Read the [demokit](demokit/index.md) page.
4
+
5
+ This one resolves outside the docs root with a bare relative link, which is the
6
+ third rule's violation: [the outside file](../OUTSIDE.md).
@@ -0,0 +1,4 @@
1
+ # A file outside the fixture's docs root
2
+
3
+ It exists, so a relative link reaching it resolves — which is the precondition
4
+ the off-root rule fires on. The good tree reaches it in the blob form instead.
@@ -1,3 +1,11 @@
1
1
  # Methodology
2
2
 
3
3
  A synthetic living page; its links stay file-targeted.
4
+
5
+ An off-root target is cited in the absolute self-repo blob form, which the gate
6
+ skips as an absolute URL — so the form the rule demands cannot itself red the
7
+ rule: [the outside file](https://github.com/owner/repo/blob/master/OUTSIDE.md).
8
+
9
+ A `../`-prefixed link that resolves back *under* the root is correct and stays
10
+ silent, because the rule turns on the resolved path rather than the link text:
11
+ [the index](../docs/index.md).
@@ -0,0 +1,94 @@
1
+ #!/usr/bin/env bash
2
+ # Behavioral test of the off-root rule in canon-kit/checks/check-docs-link-convention.sh.
3
+ # The good/bad pair grows a case per direction, but its single expect string
4
+ # cannot pin three rules at once, and the off-root rule's whole design is its
5
+ # boundary predicate — each edge below is a ruled edge, so each is tested rather
6
+ # than left to the implementer's reading.
7
+ #
8
+ # Run by run-gate-tests.sh (any <tests-dir>/*.test.sh; must exit 0).
9
+ set -uo pipefail
10
+ source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
11
+
12
+ ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
13
+ GATE="$ROOT/canon-kit/checks/check-docs-link-convention.sh"
14
+
15
+ fails=0
16
+ tmp="$(mktemp -d)"
17
+ trap 'rm -rf "$tmp"' EXIT
18
+
19
+ # $1=case dir $2=body of docs/page.md
20
+ scaffold() {
21
+ mkdir -p "$1/docs"
22
+ printf '# Outside\n' >"$1/OUTSIDE.md"
23
+ mkdir -p "$1/outsidedir"
24
+ printf '# Inside\n' >"$1/docs/other.md"
25
+ printf '%s\n' "$2" >"$1/docs/page.md"
26
+ }
27
+
28
+ # $1=label $2=dir $3=want-rc $4=want-substring
29
+ check_case() {
30
+ local out rc
31
+ out="$(cd "$2" && "$GATE" docs 2>&1)"; rc=$?
32
+ if [[ "$rc" -ne "$3" ]]; then
33
+ echo " FAIL [$1]: want exit $3, got $rc -- $out"; fails=$((fails + 1)); return
34
+ fi
35
+ if [[ -n "$4" ]] && ! grep -qF -- "$4" <<<"$out"; then
36
+ echo " FAIL [$1]: exit $rc OK but output lacks '$4': $out"; fails=$((fails + 1))
37
+ fi
38
+ }
39
+
40
+ # A — the violation itself: a relative link resolving to an existing file outside
41
+ # the root. This is what 404s on a site served from the root alone.
42
+ scaffold "$tmp/a" 'See [outside](../OUTSIDE.md).'
43
+ check_case "off-root-file-reds" "$tmp/a" 1 "off-root relative link"
44
+
45
+ # B — resolving back under the root is silent. Keying on the '../' text instead of
46
+ # the resolved path would red the majority of correct links in a real corpus.
47
+ scaffold "$tmp/b" 'See [other](../docs/other.md).'
48
+ check_case "resolves-back-under-root-silent" "$tmp/b" 0 "DOCS-LINK-CONVENTION: clean"
49
+
50
+ # C — the blob form the rule demands cannot itself red the rule: it is an
51
+ # absolute URL, already outside this gate's scope.
52
+ scaffold "$tmp/c" 'See [outside](https://github.com/owner/repo/blob/master/OUTSIDE.md).'
53
+ check_case "blob-form-silent" "$tmp/c" 0 "DOCS-LINK-CONVENTION: clean"
54
+
55
+ # D — a pure anchor has no path to resolve.
56
+ scaffold "$tmp/d" 'See [a section](#somewhere).'
57
+ check_case "pure-anchor-silent" "$tmp/d" 0 "DOCS-LINK-CONVENTION: clean"
58
+
59
+ # E — anti-double-report: a relative target that resolves to nothing is
60
+ # check-md-refs' finding and must stay only its finding.
61
+ scaffold "$tmp/e" 'See [nothing](../NOSUCHFILE.md).'
62
+ check_case "nonexistent-target-not-ours" "$tmp/e" 0 "DOCS-LINK-CONVENTION: clean"
63
+
64
+ # F — a directory target outside the root satisfies the first rule's predicate
65
+ # first, is reported there once, and this rule does not double-report it.
66
+ scaffold "$tmp/f" 'See [a dir](../outsidedir).'
67
+ check_case "off-root-directory-is-rule-one" "$tmp/f" 1 "directory-target link"
68
+ out_f="$(cd "$tmp/f" && "$GATE" docs 2>&1)"
69
+ if grep -qF -- "off-root relative link" <<<"$out_f"; then
70
+ echo " FAIL [off-root-directory-not-double-reported]: rule three also fired: $out_f"
71
+ fails=$((fails + 1))
72
+ fi
73
+
74
+ # G — the existing valve suppresses this rule as it does the other two; no second
75
+ # valve and no rule-specific escape.
76
+ scaffold "$tmp/g" '<!-- docs-link-exempt: deliberate, for the test -->
77
+ See [outside](../OUTSIDE.md).'
78
+ check_case "existing-valve-suppresses" "$tmp/g" 0 "DOCS-LINK-CONVENTION: clean"
79
+
80
+ # H — a generated mirror page is in scope deliberately: its conformance is a
81
+ # property of the generator, and a generator can regress.
82
+ scaffold "$tmp/h" '---
83
+ generated: true
84
+ ---
85
+
86
+ See [outside](../OUTSIDE.md).'
87
+ check_case "generated-page-in-scope" "$tmp/h" 1 "off-root relative link"
88
+
89
+ if [[ "$fails" -gt 0 ]]; then
90
+ echo "check-docs-link-convention.test: $fails assertion(s) failed"
91
+ exit 1
92
+ fi
93
+ echo "check-docs-link-convention.test: ok (an off-root relative link to an existing target reds; a ../ link resolving back under the root, the blob form, a pure anchor, and a target that resolves to nothing are all silent; an off-root directory target stays the directory rule's single finding; the existing docs-link-exempt valve suppresses it; a generated mirror page is in scope)"
94
+ exit 0
@@ -7,9 +7,11 @@
7
7
  # fixture. The good/bad pair covers the cardinal+noun shapes (adjacent, wedged,
8
8
  # noun-then-range, wrapped) and the mechanical exemptions (threshold, per,
9
9
  # partition, partitive, inline-code, fence, per-site marker); these cases cover
10
- # the knobs, plus the paragraph-join edges the pair's expect.txt substring
11
- # cannot pin: which physical line a wrapped span reports at, that the join never
12
- # double-reports a same-line hit, and that a paragraph break blocks the join.
10
+ # the knobs, plus the paragraph-join edges. Two reasons hold those here, and
11
+ # neither is expect.txt's old single-substring limit (lines are a conjunction
12
+ # now): they need their own scan root, which run-gate-tests gives no fixture
13
+ # beyond the one pair, and "the join never double-reports a same-line hit" is a
14
+ # negative — expect.txt asserts presence only, so absence has no pair spelling.
13
15
  #
14
16
  # Run by run-gate-tests.sh (any <tests-dir>/*.test.sh; must exit 0).
15
17
  set -uo pipefail
@@ -0,0 +1,15 @@
1
+ # widget
2
+
3
+ The section that rules what a widget gate puts in front of the consumer it
4
+ judges, and the one owner of that claim.
5
+
6
+ ## Consumer payload
7
+
8
+ A gate whose rule is compiled reaches you as its declaration, the specification
9
+ section behind it, its fixture pair, and a prebuilt binary checked against a
10
+ published digest before it is written. Its implementation source does not ship.
11
+
12
+ <!-- payload-discloses: predicate-withheld -->
13
+
14
+ The marker above is the machine tier of the sentence beside it. The claim is
15
+ raised cost of analysis relative to running, never secrecy.
@@ -0,0 +1,2 @@
1
+ install.md:15: asserts 'all-source', not the declared 'predicate-withheld'
2
+ help:
@@ -0,0 +1,19 @@
1
+ # Install widget
2
+
3
+ The kit directories live in your repository as committed source, and a gate
4
+ whose implementation is compiled arrives as a binary instead — the near miss
5
+ this case pins, since a sentence about what the vendoring model copies stays
6
+ true and must not match the overclaiming class.
7
+
8
+ Two more near misses, both silent: alongside readable source the fixture pair
9
+ was a convenience, and there is a difference between vendored source that is
10
+ merely committed and vendored source that is auditable.
11
+
12
+ ## Quick start
13
+
14
+ Download, verify, extract, run. One command, and what governs your tree
15
+ afterwards is committed source you can read.
16
+
17
+ ```bash
18
+ tar -xzf widget.tgz && bash package/bin/widget.sh init
19
+ ```
@@ -0,0 +1,6 @@
1
+ # widget vX.Y.Z
2
+
3
+ A published dated note, immutable by nature: it states what was true when it was
4
+ published, and what was true then is that what governs your tree afterwards is
5
+ committed source you can read. The path valve is what keeps that out of the
6
+ scanned set — without it this line alone would red the case.
@@ -0,0 +1,8 @@
1
+ # shellcheck shell=bash
2
+ # spec: canon-kit/SPEC.md §check-payload-claim — fixture consumer config: two disclosure classes and the published-notes valve the pair proves is load-bearing
3
+ # shellcheck disable=SC2034 # consumed by canon-kit/lib/spec.sh after sourcing
4
+ CANON_KIT_MANIFEST_FILES=("*.md" "posts/*.md")
5
+ # shellcheck disable=SC2034 # consumed by canon-kit/lib/spec.sh after sourcing
6
+ CANON_KIT_PAYLOAD_CLAIMS_CMD="bash scripts/payload-claims.sh"
7
+ # shellcheck disable=SC2034 # consumed by canon-kit/lib/spec.sh after sourcing
8
+ CANON_KIT_PAYLOAD_CLAIM_EXCLUDE=("posts/*")
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env bash
2
+ # spec: canon-kit/SPEC.md §check-payload-claim — fixture disclosure vocabulary: one pattern per class, each recognizing its own class's phrasings without reaching into a sentence about what the vendoring model copies
3
+ set -uo pipefail
4
+
5
+ printf '%s\t%s\n' \
6
+ predicate-withheld 'implementation source does not ship|verified against a published digest' \
7
+ all-source 'you read (before|all of it)|(source|copy) you can read'
@@ -0,0 +1,15 @@
1
+ # widget
2
+
3
+ The section that rules what a widget gate puts in front of the consumer it
4
+ judges, and the one owner of that claim.
5
+
6
+ ## Consumer payload
7
+
8
+ A gate whose rule is compiled reaches you as its declaration, the specification
9
+ section behind it, its fixture pair, and a prebuilt binary checked against a
10
+ published digest before it is written. Its implementation source does not ship.
11
+
12
+ <!-- payload-discloses: predicate-withheld -->
13
+
14
+ The marker above is the machine tier of the sentence beside it. The claim is
15
+ raised cost of analysis relative to running, never secrecy.
@@ -0,0 +1,2 @@
1
+ PAYLOAD-CLAIM: clean
2
+ 'predicate-withheld' declared at
@@ -0,0 +1,20 @@
1
+ # Install widget
2
+
3
+ The kit directories live in your repository as committed source, and a gate
4
+ whose implementation is compiled arrives as a binary instead — the near miss
5
+ this case pins, since a sentence about what the vendoring model copies stays
6
+ true and must not match the overclaiming class.
7
+
8
+ Two more near misses, both silent: alongside readable source the fixture pair
9
+ was a convenience, and there is a difference between vendored source that is
10
+ merely committed and vendored source that is auditable.
11
+
12
+ ## Quick start
13
+
14
+ Download, verify, extract, run. Every artifact written to your tree is verified
15
+ against a published digest first, and what governs your tree afterwards is
16
+ committed and auditable on the terms §Consumer payload sets.
17
+
18
+ ```bash
19
+ tar -xzf widget.tgz && bash package/bin/widget.sh init
20
+ ```
@@ -0,0 +1,6 @@
1
+ # widget vX.Y.Z
2
+
3
+ A published dated note, immutable by nature: it states what was true when it was
4
+ published, and what was true then is that what governs your tree afterwards is
5
+ committed source you can read. The path valve is what keeps that out of the
6
+ scanned set — without it this line alone would red the case.
@@ -0,0 +1,8 @@
1
+ # shellcheck shell=bash
2
+ # spec: canon-kit/SPEC.md §check-payload-claim — fixture consumer config: two disclosure classes and the published-notes valve the pair proves is load-bearing
3
+ # shellcheck disable=SC2034 # consumed by canon-kit/lib/spec.sh after sourcing
4
+ CANON_KIT_MANIFEST_FILES=("*.md" "posts/*.md")
5
+ # shellcheck disable=SC2034 # consumed by canon-kit/lib/spec.sh after sourcing
6
+ CANON_KIT_PAYLOAD_CLAIMS_CMD="bash scripts/payload-claims.sh"
7
+ # shellcheck disable=SC2034 # consumed by canon-kit/lib/spec.sh after sourcing
8
+ CANON_KIT_PAYLOAD_CLAIM_EXCLUDE=("posts/*")
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env bash
2
+ # spec: canon-kit/SPEC.md §check-payload-claim — fixture disclosure vocabulary: one pattern per class, each recognizing its own class's phrasings without reaching into a sentence about what the vendoring model copies
3
+ set -uo pipefail
4
+
5
+ printf '%s\t%s\n' \
6
+ predicate-withheld 'implementation source does not ship|verified against a published digest' \
7
+ all-source 'you read (before|all of it)|(source|copy) you can read'
@@ -119,9 +119,32 @@ The fast pair alpha/beta short-circuits.
119
119
  EOF
120
120
  check_case "per-site-exempt-escape" 0 "PROSE-ENUM: clean" CANON_KIT_CONFIG_FILE="$SANDBOX/three.sh"
121
121
 
122
+ # The identifier boundary: an underscore separates two names, so a member must
123
+ # not read as present inside a longer sibling. Only a declared set can hold
124
+ # underscore members, so the pair — which runs on the repo's own hyphenated
125
+ # config — cannot reach this at all.
126
+ cat >"$SANDBOX/guards.sh" <<'EOF'
127
+ CANON_KIT_ENUM_SETS_CMD='printf "guard\tguard_allow\nguard\tguard_allow_match\nguard\tguard_deny\n"'
128
+ EOF
129
+ cat >"$SANDBOX/SPEC.md" <<'EOF'
130
+ # prefix sibling
131
+
132
+ The guard_allow_match, guard_deny pair covers the whole surface.
133
+ EOF
134
+ check_case "prefix-sibling-trips" 1 "but omits: guard_allow" CANON_KIT_CONFIG_FILE="$SANDBOX/guards.sh"
135
+
136
+ # The mirror: spelled in its own right the member is present, so the boundary is
137
+ # a boundary and not a blanket non-match.
138
+ cat >"$SANDBOX/SPEC.md" <<'EOF'
139
+ # prefix sibling complete
140
+
141
+ The guard_allow, guard_allow_match, guard_deny trio is the whole surface.
142
+ EOF
143
+ check_case "prefix-sibling-complete-clean" 0 "PROSE-ENUM: clean" CANON_KIT_CONFIG_FILE="$SANDBOX/guards.sh"
144
+
122
145
  if [[ "$fails" -gt 0 ]]; then
123
146
  echo "check-prose-enum.test.sh: $fails case(s) failed"
124
147
  exit 1
125
148
  fi
126
- echo "check-prose-enum.test.sh: clean (empty-skip + fail-closed error/parse + bracketed match + scattered non-engage + multiset independence + subset/partitive/per-site escapes)"
149
+ echo "check-prose-enum.test.sh: clean (empty-skip + fail-closed error/parse + bracketed match + scattered non-engage + multiset independence + subset/partitive/per-site escapes + identifier boundary)"
127
150
  exit 0
@@ -1 +1,2 @@
1
1
  §heading not found in SPEC-target.md
2
+ target file not found: widget-manifest
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
2
  # graph: couples=X dir=one valve=none tier=precommit
3
3
  # spec: SPEC-widget.md §The missing contract — points at a heading the file lacks
4
+ # spec: widget-manifest v2 — the version-marker payload is a contract: form only, so a spec: directive wearing its shape still resolves as a path
4
5
  set -uo pipefail
5
6
  echo hi
@@ -2,5 +2,6 @@
2
2
  # graph: couples=X dir=one valve=none tier=precommit
3
3
  # spec: SPEC-widget.md §The widget contract — a live pointer: file tracked, heading present
4
4
  # contract: SPEC-widget.md — a file-only pointer resolves without a § fragment
5
+ # contract: widget-manifest v1
5
6
  set -uo pipefail
6
7
  echo hi
@@ -97,6 +97,9 @@ declare -p CANON_KIT_COUNT_ALLOWED_PHRASES &>/dev/null || CANON_KIT_COUNT_ALLOWE
97
97
  [[ -v CANON_KIT_INSTALL_SECTION_RE ]] || CANON_KIT_INSTALL_SECTION_RE=""
98
98
  declare -p CANON_KIT_INSTALL_CLAIM_EXCLUDE &>/dev/null || CANON_KIT_INSTALL_CLAIM_EXCLUDE=()
99
99
 
100
+ [[ -v CANON_KIT_PAYLOAD_CLAIMS_CMD ]] || CANON_KIT_PAYLOAD_CLAIMS_CMD=""
101
+ declare -p CANON_KIT_PAYLOAD_CLAIM_EXCLUDE &>/dev/null || CANON_KIT_PAYLOAD_CLAIM_EXCLUDE=()
102
+
100
103
  declare -p CANON_KIT_COMMENT_MACHINE &>/dev/null || CANON_KIT_COMMENT_MACHINE=()
101
104
  declare -p CANON_KIT_COMMENT_REASON &>/dev/null || CANON_KIT_COMMENT_REASON=()
102
105
  declare -p CANON_KIT_COMMENT_SURFACE &>/dev/null || CANON_KIT_COMMENT_SURFACE=()
@@ -236,10 +239,12 @@ _spec_comment_surface() { # $1=root $2=1 keeps templates/ shell sources, else
236
239
  done
237
240
  shopt -u nullglob globstar
238
241
  else
242
+ # spec: canon-kit/SPEC.md §lib/spec.sh — the governed-source corpus spans
243
+ # both gate declaration spellings and the ported implementation
239
244
  if [[ "$incl" == "1" ]]; then
240
- gate_find "$root" -name '*.sh' -type f 2>/dev/null | _spec_prune_kit_roots "$root" | sort
245
+ gate_find "$root" \( -name '*.sh' -o -name '*.gate' -o -name '*.rs' \) -type f 2>/dev/null | _spec_prune_kit_roots "$root" | sort
241
246
  else
242
- gate_find "$root" -name '*.sh' -type f 2>/dev/null | grep -v '/templates/' | _spec_prune_kit_roots "$root" | sort
247
+ gate_find "$root" \( -name '*.sh' -o -name '*.gate' -o -name '*.rs' \) -type f 2>/dev/null | grep -v '/templates/' | _spec_prune_kit_roots "$root" | sort
243
248
  fi
244
249
  # spec: canon-kit/SPEC.md §check-spec-pointer — the workflow directory's
245
250
  # tracked tier, whatever the extension: the capture tier is gitignored
@@ -451,25 +456,30 @@ spec_enum_sets() {
451
456
  return 0
452
457
  }
453
458
 
454
- # spec: canon-kit/SPEC.md §check-install-claim — run the consumer's transport command and echo its validated <transport-id><TAB><ERE> lines; a command that fails, a line that does not parse, or a duplicate id returns 2 (fail-closed), the same contract spec_enum_sets carries. Empty CANON_KIT_INSTALL_TRANSPORTS_CMD is the caller's clean-skip signal, handled before this is called.
455
- spec_install_transports() {
456
- local out st line id ere seen=""
457
- out="$(bash -c "$CANON_KIT_INSTALL_TRANSPORTS_CMD")"; st=$?
458
- [[ $st -eq 0 ]] || { echo "spec_install_transports: CANON_KIT_INSTALL_TRANSPORTS_CMD exited $st" >&2; return 2; }
459
+ # spec: canon-kit/SPEC.md §lib/spec.sh — run a consumer's claim-vocabulary command and echo its validated <id><TAB><ERE> lines; a command that fails, a line that does not parse, an id that is not slug-shaped, or a repeated id returns 2 (fail-closed), the same contract spec_enum_sets carries. $2 labels the vocabulary in every message, so a fail-closed exit says which one failed. An empty command is the caller's clean-skip signal, handled before this is called.
460
+ spec_claim_vocabulary() { # $1=command $2=label naming the vocabulary in messages
461
+ local cmd="$1" label="$2" out st line id ere seen=""
462
+ out="$(bash -c "$cmd")"; st=$?
463
+ [[ $st -eq 0 ]] || { echo "spec_claim_vocabulary: $label exited $st" >&2; return 2; }
459
464
  while IFS= read -r line; do
460
465
  [[ -n "$line" ]] || continue
461
- [[ "$line" == *$'\t'* ]] || { echo "spec_install_transports: line has no tab: '$line'" >&2; return 2; }
466
+ [[ "$line" == *$'\t'* ]] || { echo "spec_claim_vocabulary: $label: line has no tab: '$line'" >&2; return 2; }
462
467
  id="${line%%$'\t'*}"; ere="${line#*$'\t'}"
463
- [[ -n "$id" && -n "$ere" ]] || { echo "spec_install_transports: empty id or pattern: '$line'" >&2; return 2; }
464
- [[ "$ere" == *$'\t'* ]] && { echo "spec_install_transports: extra tab in line: '$line'" >&2; return 2; }
465
- [[ "$id" =~ ^[a-z0-9][a-z0-9-]*$ ]] || { echo "spec_install_transports: id is not slug-shaped: '$id'" >&2; return 2; }
466
- [[ " $seen " == *" $id "* ]] && { echo "spec_install_transports: duplicate transport id: '$id'" >&2; return 2; }
468
+ [[ -n "$id" && -n "$ere" ]] || { echo "spec_claim_vocabulary: $label: empty id or pattern: '$line'" >&2; return 2; }
469
+ [[ "$ere" == *$'\t'* ]] && { echo "spec_claim_vocabulary: $label: extra tab in line: '$line'" >&2; return 2; }
470
+ [[ "$id" =~ ^[a-z0-9][a-z0-9-]*$ ]] || { echo "spec_claim_vocabulary: $label: id is not slug-shaped: '$id'" >&2; return 2; }
471
+ [[ " $seen " == *" $id "* ]] && { echo "spec_claim_vocabulary: $label: duplicate id: '$id'" >&2; return 2; }
467
472
  seen="$seen $id"
468
473
  printf '%s\t%s\n' "$id" "$ere"
469
474
  done <<< "$out"
470
475
  return 0
471
476
  }
472
477
 
478
+ # spec: canon-kit/SPEC.md §check-install-claim — the install-transport vocabulary, one caller of the general loader above; the fail-closed contract is that function's and is not restated here.
479
+ spec_install_transports() {
480
+ spec_claim_vocabulary "$CANON_KIT_INSTALL_TRANSPORTS_CMD" CANON_KIT_INSTALL_TRANSPORTS_CMD
481
+ }
482
+
473
483
  _sk_errs=()
474
484
  [[ -n "$CANON_KIT_SPEC_NAME" ]] || _sk_errs+=("CANON_KIT_SPEC_NAME is empty")
475
485
  [[ -n "$CANON_KIT_AMENDMENT_GLOB" ]] || _sk_errs+=("CANON_KIT_AMENDMENT_GLOB is empty")
@@ -11,8 +11,27 @@ check-amendment-queue
11
11
  check-spec-dod-singleton
12
12
  check-spec-derivable-section
13
13
  check-spec-embedded-source
14
+ check-comment-tier
15
+ check-deprecation-task
16
+ check-docs-cmd
17
+ check-docs-link-convention
18
+ check-install-claim
19
+ check-knob-citation
20
+ check-knob-default-coupling
21
+ check-manifest-count
22
+ check-manifest-temporal
23
+ check-md-refs
24
+ check-payload-claim
25
+ check-prose-enum
26
+ check-prose-tells
27
+ check-spec-fence-balance
28
+ check-spec-pointer
29
+ check-todo-task-liveness
30
+ check-tracking-claim
14
31
  EOF
15
32
 
33
+ # smoke-unregistered: check-surface-duplication — the glossary topology it reads (CANON_KIT_GLOSSARY_FILE, default GLOSSARY.md) is optional and this tree ships none, so its exit 2 is uncorroborated only because the invoking repo lacks the same optional surface, not because the gate is broken
34
+
16
35
  # spec: gate-sdk/SPEC.md §Consumer smoke — seed check-amendment-queue's surface (guarded; carries lifecycle-kit's inert header so the seed composes with the stage gates)
17
36
  if [[ ! -f TASK-QUEUE.md ]]; then
18
37
  cat > TASK-QUEUE.md <<'EOF'
@@ -33,4 +52,4 @@ EOF
33
52
  fi
34
53
 
35
54
  bash "$SDK/bin/gen-pre-commit.sh" --write >/dev/null
36
- bash "$SDK/checks/check-graph.sh" --emit > .workflow/CHECK-GRAPH.html
55
+ bash "$SDK/checks/check-graph.sh" --emit > scripts/CHECK-GRAPH.html
@@ -5,7 +5,11 @@
5
5
  change. Name it after the feature (SPEC-<feature>.md, e.g. SPEC-sqlite.md —
6
6
  never SPEC-PHASE3-SQLITE.md), place it in the owning component's directory
7
7
  (a governance/workflow ruling with no owning component lives at the repo
8
- root), and pair it with a queue entry tagged [spec: SPEC-<feature>.md]. It
8
+ root), and pair it with a queue entry tagged [spec: SPEC-<feature>.md]. The
9
+ basename need not match that entry's slug: the ref resolves as a bare
10
+ basename tree-wide, and swapping a long slug into the tag can push the
11
+ entry's lead line past the queue's wrap budget — so a shorter basename than
12
+ the slug is the fix, not a mismatch to avoid. It
9
13
  describes ONLY what is added or changed — do not restate the canonical spec.
10
14
  It is a transition artifact: merged into the canonical spec and deleted when
11
15
  the work completes (an amendment never outlives its implementation).
@@ -282,6 +282,24 @@ The constrained members and what forces each:
282
282
  the battery at all rather than failing one gate. The representative member is
283
283
  the binary carrying a forcing construct, which is also the floor predicate's
284
284
  own comparison tool.
285
+ - `cargo:1.56` — a **contributor-side** floor, never a runtime one, and it carries
286
+ two tiers because two kinds of tree read it. Where a `.gate` descriptor is live
287
+ it is a **commit-time** floor — `gate_command` puts the binary on the pre-commit
288
+ path and is fail-closed on an absent one, so the battery will not run without a
289
+ built crate (gate-sdk/SPEC.md §What the dispatch seam does not settle); that is
290
+ this repo, once its first cohort lands. Everywhere else it stays the weaker
291
+ **contributor/build** floor: a consumer tree receives a prebuilt binary and never
292
+ a crate, so nothing there compiles at commit time. Both tiers rest on the same
293
+ forcing fact —
294
+ the `native/` crate's `edition = "2021"`, the first edition rustc accepts at
295
+ 1.56. `cargo` is the member rather than `rustc` because `cargo build` is what the
296
+ contributor routine and the `gates` workflow actually invoke, and the two ship as
297
+ one toolchain sharing a version banner — the representative-member rule the
298
+ `sort::coreutils` entry above states. The floor tracks the edition the crate
299
+ declares, not whatever rustc a given box happens to carry; pinning the latter
300
+ would be exactly the aspiration this section's rule forbids. Runtime is
301
+ unaffected: git remains the sole runtime dependency of a ported gate, shelled out
302
+ rather than embedded (TRAJECTORY.md §The closed rulings owns that constraint).
285
303
  Every other member is a bare name — no construct in the battery forces a version
286
304
  on it (the `jq` usage is 1.5-era throughout), so none is pinned.
287
305
 
@@ -628,6 +646,7 @@ context-kit/
628
646
  gate-tests/check-settings-pins/{good,bad}/
629
647
  gate-tests/check-memory-off/{good,bad}/
630
648
  gate-tests/check-footprint-fresh/{good,bad}/
649
+ gate-tests/check-brevity.test.sh # the unmatched-section axis the pair cannot hold
631
650
  gate-tests/check-memory-off.test.sh # the local-override axis the pair cannot hold
632
651
  index-tests/ # fixture corpus + expected outputs
633
652
  templates/session-context.sh # consumer copy: marked consumer sections
@@ -746,7 +765,12 @@ fixture pair; the footprint pair drives the hermetic two-argument mode
746
765
  memory-off gates take a `--fixture <dir>` injection (the check-identity
747
766
  precedent): the settings-pins pair reads `<dir>/settings.json` against
748
767
  `<dir>/settings-pins.conf`; the memory-off pair scans `<dir>/memory` for
749
- content. The memory-off local-override axis — an untracked
768
+ content. Two direct unit tests hold the axes the pairs fix and so cannot
769
+ express: `check-brevity.test.sh` holds the unmatched-section resolution (the
770
+ pair fixes `CONTEXT_KIT_BREVITY_SECTION` at the stock default and always
771
+ supplies a file carrying it, so neither case can express a section that
772
+ resolves to nothing — an unmatched section is exit 2, a broken machine rather
773
+ than a clean tree). The memory-off local-override axis — an untracked
750
774
  `settings.local.json` that re-enables a pinned key past an empty dir — cannot
751
775
  be a good/bad pair (the pair fixes the dir axis), so `check-memory-off.test.sh`
752
776
  holds it.
@@ -3,7 +3,7 @@
3
3
 
4
4
  # spec: context-kit/SPEC.md §bin/env-probe — the roster, `<name>[:<min-version>[:<impl-token>]]`; a member gains a floor only where a construct the battery runs forces one, and the SPEC records that construct beside the token
5
5
  # shellcheck disable=SC2034 # read by whoever sources this file (bin/env-probe.sh), never here
6
- PROBE_SET=(bash:4.3 git jq awk::GNU sort::coreutils shellcheck)
6
+ PROBE_SET=(bash:4.3 git jq awk::GNU sort::coreutils shellcheck cargo:1.56)
7
7
 
8
8
  # spec: context-kit/SPEC.md §bin/env-probe — positional fields, an empty field meaning unconstrained on that axis exactly as an omitted trailing one does, so `awk`, `awk:` and `awk::` parse to one member
9
9
  tool_floor_parse() { # $1 = roster element -> TOOL_FLOOR_NAME / _MIN / _IMPL