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
@@ -50,7 +50,17 @@ Widening, not replacing: `Surfaced` records when the premise was observed and
50
50
  is the better premise-rot datum, `Filed` is the honest available fallback, so
51
51
  no entry owes a migration. drift-kit re-implements the definition rather than
52
52
  sourcing `lib/queue.sh`, because a kit dependency the other way would close a
53
- cross-kit cycle; both implementations cite this section.
53
+ cross-kit cycle; both implementations cite this section. That is the general
54
+ rule for this format, not a one-off for drift-kit: **a kit that cannot depend on
55
+ queue-kit re-implements the predicate and both ends cite this section.**
56
+ gate-sdk's `check-gate-exemption-tasks` re-implements it for a reason stronger
57
+ than a cycle — gate-sdk is the substrate every kit vendors, so depending on
58
+ queue-kit would invert the layering and make a queue format a precondition for
59
+ running any gate. The holder roster and the residue accounting for the whole set
60
+ live at gate-sdk/SPEC.md §check-gate-exemption-tasks, and are deliberately not
61
+ restated here: two hand-maintained copies of one roster are worse than one,
62
+ because a holder added or dropped is then owed two edits in two SPECs and only
63
+ the one that prompted the change is likely to get it.
54
64
  - Any other section (an iteration header, a lessons section) is outside the
55
65
  grammar and ignored by every gate except the file-wide hygiene axes.
56
66
 
@@ -150,6 +160,11 @@ entry, the same exemption the deferred section already carries.
150
160
  entry necessarily contains the removed body in its own diff, so recovery is
151
161
  `git log -p -S'<slug>' -- <queue-file>` — a pickaxe that depends on no
152
162
  commit-message convention. Nothing is copied into the queue to point at it.
163
+ **Recovery is mandatory before any ruling on the entry**, not merely
164
+ available: the lead line is a one-clause summary that carries neither the
165
+ deliverable nor the blocking design question, so promoting a dormant entry,
166
+ or ruling a build has subsumed one, is judged against the recovered body.
167
+ Ruling off the line alone is ruling off a summary written to be dropped.
153
168
 
154
169
  **Eligibility**, judged at the closing stage: the entry's cost field opens in
155
170
  the low class; it carries no `[roadmap:]` tag; and it has **no live promotion
@@ -185,6 +200,52 @@ grammar: a **bold-code token** — `` **`<slug>`** `` whose token matches the
185
200
  slug grammar — which `check-queue-slug-liveness` resolves against the live
186
201
  slug set on the configured prose surfaces (§check-queue-slug-liveness).
187
202
 
203
+ Inside the queue file, that same token in **single backticks** — matching the
204
+ slug grammar, appearing in an entry's **body** rather than on its lead line —
205
+ is a **citation** of the named entry: the relation an author already drew while
206
+ writing about something else. The two forms are deliberately different claims.
207
+ The bold-code form is a *membership* claim, and a dead one is a false statement
208
+ `check-queue-slug-liveness` reds on; the in-body citation is a *reference*,
209
+ aggregated by `bin/queue-edges.sh` (§bin/queue-edges.sh) and audited by
210
+ nothing. The rules below make citations parseable, each covering a shape a live
211
+ corpus contains:
212
+
213
+ - **Resolution is against the live slug set** — `queue_live_slugs`: active,
214
+ deferred, and a configured icebox, the existing source of truth.
215
+ - **An unresolved token is not an error; it is simply not an edge.** This is the
216
+ load-bearing rule. Entries legitimately name *landed* work — a closed defect
217
+ class, a shipped contract, a settled ruling — and that citation is valuable
218
+ prose no gate may punish, which is why no liveness assertion reaches inward
219
+ from the configured prose surfaces (§check-queue-slug-liveness).
220
+ - **Self-citation is not an edge** — an entry naming its own slug in its own
221
+ body is narration, not a relation.
222
+ - **`[blocked-by: <slug>]` is an edge too**, and the one already-structured
223
+ class: including it makes an inbound set complete rather than merely
224
+ prose-derived.
225
+
226
+ **No relational vocabulary is declared, and that refusal is the design.** Prose
227
+ phrases a relation many ways and keeps inventing more, so an enumerated verb set
228
+ would be brittle the day it landed — and, decisively, a kit literal spelling one
229
+ project's relational verbs would ship that project's vocabulary as everyone's.
230
+ That is the provenance seam, the same reason `[roadmap:]`'s horizons and tracks
231
+ are consumer-configured arrays rather than kit literals. Declaring no vocabulary
232
+ means there is no vocabulary to leak and no consumer config to invent: a
233
+ relation's *kind* rides the citing line itself, quoted verbatim
234
+ (§bin/queue-edges.sh).
235
+
236
+ **A `relates: <kind> <slug>` declaration on the `roadmap-summary:` pattern was
237
+ weighed and refused.** It is precise and it carries a kind — and it is wrong
238
+ here on three counts. Every citation a corpus has already written would need
239
+ hand-authoring, the maintained-roster anti-pattern derivation-first forbids;
240
+ those lines would land inside entries measured against
241
+ `check-queue-entry-budget`'s raw-line cap, where sub-tasks do not relieve a
242
+ parent's budget, so precision would be paid for in evictions; and a
243
+ hand-declared edge can be forgotten in exactly the moment it matters, whereas a
244
+ citation written in prose is written because the author was already thinking
245
+ about the relation. The derived grammar costs zero lines in every entry and is
246
+ satisfied by any corpus that already cross-references — no migration, and no
247
+ adoption step between landing it and reading it.
248
+
188
249
  - `[blocked-by: <slug>]` — the entry is unpickable until `<slug>` completes.
189
250
  Repeat per blocker. Must resolve to a live task (active or deferred — a
190
251
  deferred blocker stands; it is unbuilt); a blocker in the done section is a
@@ -251,6 +312,50 @@ comfortably a sentence, and needing no block-end rule a reflow could silently
251
312
  truncate. `check-roadmap-fresh`'s assertion C makes the tag and the declaration
252
313
  mandatory for each other in both directions.
253
314
 
315
+ An entry that has been **re-filed** carries a second declaration on the same
316
+ pattern, `recurrence: <slug> <YYYY-MM-DD> [<YYYY-MM-DD>…]` — one indented body
317
+ line naming the entry's own slug, then one date per re-filing, appended in order
318
+ and never rewritten. The initial filing is not a recurrence and is not listed, so
319
+ the count is the number of dates. It is a declaration rather than a tag for the
320
+ reasons the paragraph above gives: its readers scan a line of its own, and it
321
+ marks no move across a pending/ready boundary, so it fails canon-kit's
322
+ further-tag test. `check-tag-lead-line` does not govern it, and it cannot collide
323
+ with the bracket scans.
324
+
325
+ The **self-naming slug field is mechanism, not decoration**. `check-queue-hygiene`
326
+ rejects any exact-duplicate non-blank line across the whole file, unnormalized, so
327
+ a slug-free `recurrence: <date>` on two entries stamped the same day would red the
328
+ gate — and same-day recurrence on two entries is exactly the case the declaration
329
+ exists to record. Naming the slug makes the line unique by construction. It also
330
+ makes the declaration resolvable by one anchored grep with no entry-boundary
331
+ parsing, which is what lets its two readers — lifecycle-kit's scope pre-emption
332
+ rule (lifecycle-kit/SPEC.md §Layout and configuration,
333
+ `LIFECYCLE_KIT_RECURRENCE_THRESHOLD`) and drift-kit's `kpi-incident-recurrence`
334
+ (drift-kit/SPEC.md §Bundled KPIs) — each read it without depending on the other's
335
+ kit. Self-citation is already narration rather than an edge (above), so the field
336
+ costs no new rule. That one-grep property is also why **no `bin/queue-index.sh`
337
+ recurrence mode exists** — the obvious home, refused: drift-kit could not call it
338
+ without the cycle its own KPI already records, which would leave lifecycle-kit's
339
+ rule as the only caller, and §bin/queue-index.sh already resists a further mode on
340
+ the grounds that folding jobs together gives one tool two output grammars.
341
+
342
+ **One line with appended dates, not one line per recurrence.** The per-recurrence
343
+ form is byte-unique on the (slug, date) pair and is refused anyway: it grows an
344
+ entry linearly against `check-queue-entry-budget`'s cap, so a *machine* writer
345
+ could push a deferred entry past that cap and red some later, unrelated session's
346
+ commit — and the cap's remedy is authorization-gated (§check-queue-entry-budget: a
347
+ session blocked by it does not self-serve the split). The single-line form costs
348
+ one entry line forever regardless of count. Its own ceiling is
349
+ `check-queue-wrap`'s budget, reached after a handful of dates on a long slug, and
350
+ reaching it is the *correct* complaint: a slug recorded as recurring that many
351
+ times without anyone promoting it is a governance failure, surfaced loudly rather
352
+ than absorbed.
353
+
354
+ Unlike the `relates:` declaration refused above, no corpus needs migrating. The
355
+ line is **machine-written** by the closing stage's gap-inbox drain
356
+ (lifecycle-kit/SPEC.md §The committed gap inbox) and hand-read; an entry with no
357
+ declaration is simply an entry that has not recurred.
358
+
254
359
  Two tags ride **Lessons Learned** entries — a lesson is a top-level bullet
255
360
  under the fixed-spelling `## Lessons Learned` heading, and `bin/queue-index.sh`
256
361
  plus `check-tag-lead-line` read that section's lead lines too. That section is
@@ -403,6 +508,12 @@ rather than empty, because a tab counts as IFS whitespace: a reader splitting on
403
508
  it coalesces an empty column and silently shifts every field after it, so a
404
509
  fixed-arity line must never carry one.
405
510
 
511
+ The in-body citation scan (§The tag algebra) is deliberately **not** here: it
512
+ has one reader, and this library holds adapters two or more readers share. It
513
+ lives in `bin/queue-edges.sh`, which sources this library for the section
514
+ regexes and `queue_live_slugs` it does share. A second reader of body-position
515
+ slug tokens is what would promote the scan into this roster.
516
+
406
517
  The loader sources the consumer config, then a `<config>.local.sh` overlay
407
518
  beside it when present — last write wins. This is the tracked-name /
408
519
  gitignored-value split (the `msg-patterns.local.list` precedent): a private
@@ -467,6 +578,81 @@ always-loaded through the session-context hook that embeds this output, so the
467
578
  cap is its token budget. This is the inbound lesson channel reaching every
468
579
  later session of the iteration with zero consumer-hook edits.
469
580
 
581
+ This is a *task-selection* surface, walking bullet lead lines. Its sibling
582
+ `bin/queue-edges.sh` walks entry **bodies** to aggregate citations — a
583
+ different question over the same file (§bin/queue-edges.sh). They stay two
584
+ tools rather than one tool with a fourth mode, because folding them would give
585
+ one tool two jobs and two output grammars.
586
+
587
+ ### bin/queue-edges.sh
588
+
589
+ The inbound-citation aggregator: a tool, not a gate (no `# graph:` manifest),
590
+ following `bin/queue-index.sh`. It reads the queue, writes **stdout only**, and
591
+ mutates nothing.
592
+
593
+ ```
594
+ usage: queue-edges.sh [--inbound <slug>] [queue-file]
595
+ default: every live slug with at least one inbound edge, and its citing entries
596
+ --inbound <slug>: the inbound set for one slug
597
+ ```
598
+
599
+ **Inbound only.** An outbound view is refused for want of a reader: an entry's
600
+ outbound edges *are* its own body, which a session asking the question is
601
+ already reading. Inbound is the direction invisible without a scan of the whole
602
+ file — which is the entire finding this tool answers. Nothing anywhere sums an
603
+ entry's inbound edges into that entry's own cost and benefit, so a survey that
604
+ reads every sibling entry individually can still misrank a unit that several of
605
+ them separately depend on. The tool is that missing sum, which is also what
606
+ makes splitting an entry safe: a split scatters an entry's weight across
607
+ siblings, and this is what adds it back up.
608
+
609
+ Targets print in queue order — the order every other reader of this file walks
610
+ — each with its inbound count, then one line per citing edge. A slug with no
611
+ inbound edges is absent from the default listing and yields empty output under
612
+ `--inbound`; that is the normal case, not a finding. A `--inbound` slug that is
613
+ not live exits 1 with a message on stderr rather than printing nothing, because
614
+ silence from this tool has to mean "no inbound edges" and nothing else.
615
+
616
+ **Each edge carries the citing entry's slug and its citing line verbatim**
617
+ (surrounding whitespace stripped, since the output re-indents). This is what
618
+ buys a relation's *kind* without declaring a vocabulary for one: the nature of
619
+ the relation is already written, in the citing author's own words, by the
620
+ person who understood it. Quoting it beats a one-token classification from a
621
+ fixed set, and it is free. It also keeps the tool honest about precision — a
622
+ citation that is a passing mention rather than a relation is *visibly* a
623
+ passing mention once its line is on screen, so a reader discards it in the time
624
+ it takes to read one line. Recall is what the surface needs, and a
625
+ high-recall list whose noise self-identifies is the right trade.
626
+
627
+ A citation is attributed to the **nearest preceding slug bullet**, so a
628
+ sub-task cites in its own name rather than its parent's, and a lead line
629
+ contributes its `[blocked-by:]` tag alone — never its prose, which is title and
630
+ tags rather than relation.
631
+
632
+ The body-citation scan lives **in this tool, not in `lib/queue.sh`**: it has
633
+ exactly one reader, and the library's rule is shared adapters (§lib/queue.sh).
634
+ It reuses that library's section regexes and `queue_live_slugs`; a second
635
+ reader of body-position slugs is what would move it.
636
+
637
+ **No tracked projection, and no freshness gate.** A tracked artifact needs a
638
+ reader who cannot run the tool, and there is none — the one consumer is a
639
+ session with a shell. A generated public page like the roadmap is tracked
640
+ because its audience is outside the repo; this has no such audience. Against
641
+ that, a committed copy of derived edges over what is typically a repo's
642
+ highest-churn file would restale on essentially every queue edit, buying a
643
+ per-commit regeneration tax for zero benefit. Derivation-first is satisfied by
644
+ deriving on demand: that rule's "generate and freshness-gate" clause governs a
645
+ copy that is *needed*, and this one is not. `bin/queue-index.sh` writes nothing
646
+ and is gated by nothing, for the same reason.
647
+
648
+ **Not a gate, either.** There is nothing to red: an entry with no inbound edges
649
+ is normal, and an entry with many is not a defect. The adjacent temptation —
650
+ redding on a backticked token that resolves to no live slug — is refused
651
+ outright, because those are overwhelmingly legitimate citations of landed work
652
+ (§The tag algebra), and `check-queue-slug-liveness` already owns the liveness
653
+ invariant on the surfaces where a dead reference *is* a false claim. Extending
654
+ it inward would red on good prose.
655
+
470
656
  ### bin/roadmap.sh
471
657
 
472
658
  The public-roadmap emitter: a tool, not a gate (no `# graph:` manifest),
@@ -643,6 +829,41 @@ binds top-level entries only — a sub-task is covered by its parent's costing.
643
829
  entry's residency is one iteration by the drain rule, so it has no carry to
644
830
  cap. The carry problem is the deferred pool's alone.
645
831
 
832
+ **Compression is lossless, and the split is authorization-gated.** An entry
833
+ that will not fit is compressed by *answering* grounds, never by dropping or
834
+ summarizing them away; a ground that survives unanswered is relocated into a
835
+ distinct linked entry. The gate cannot hold this: it sees an entry's current
836
+ extent, and judging whether a removed line was answered or discarded is
837
+ semantic. So the rule is a stated authoring contract, and the remedy carries
838
+ its own authorization — a parent session (the iteration lead), or the operator
839
+ in the absence of one, grants permission to split and issues the recipe with
840
+ the ruling. A session blocked by the cap does not self-serve the split, the
841
+ same lineage as a `check-stage-entry` assertion C waiver
842
+ (lifecycle-kit/SPEC.md §check-stage-entry), and the gate's failure text
843
+ therefore cites this section rather than inlining the recipe.
844
+
845
+ *Why the cap is not widened for exceptional content.* Assertion A's bound is
846
+ the amendment-inlining line above, not a length preference, so raising the
847
+ number moves the number without moving the line — and the entries that would
848
+ claim an exception are the likeliest ungoverned amendments. A conditional cap
849
+ collapses back into authorization anyway, or it is the self-issued exemption
850
+ the delegation doctrine already names as the standard failure mode.
851
+
852
+ **A ruling the operator restates from memory is filed in the moment.** The
853
+ compression rule above is an authoring contract, so a break in it is silent, and
854
+ it surfaces in one recognisable form: the operator supplies a closed decision
855
+ from memory because no surface carries it any more. That restatement is the
856
+ moment the content is in hand and the cheapest it will ever be, so it is filed
857
+ *then*, as a **recording entry** — never noted for a later pass. Deferring the
858
+ filing is not a cheaper version of it: the ruling stays exactly where it was
859
+ lost from, and the next session pays the same restatement over again. A
860
+ recording entry is the queue's holding pen for a decision in flight, never its
861
+ home; its deliverable is the ruling landed in the surface that owns it, one
862
+ owner per fact as everywhere else, and the entry is done when that surface
863
+ carries it. The gate cannot hold this either, for the same reason it cannot hold
864
+ compression: nothing distinguishes a sentence that was recalled from one that
865
+ was read.
866
+
646
867
  ### check-queue-wrap
647
868
 
648
869
  Invariant: no line exceeds the `QUEUE_KIT_WRAP_BUDGET` gate floor (default
@@ -651,8 +872,10 @@ Invariant: no line exceeds the `QUEUE_KIT_WRAP_BUDGET` gate floor (default
651
872
  parse; the tripwire fires before that lands.
652
873
 
653
874
  Calibration: three exemptions mirror the wrapping convention — table rows,
654
- fenced-code blocks, and lines over budget solely due to one unbreakable token
655
- (URL, path). Width is Unicode code points, not bytes.
875
+ fenced-code blocks, and lines whose own longest token itself exceeds the budget
876
+ (URL, path). That third one is narrower than "over budget because of one long
877
+ token": a 101-column line whose longest token is 55 is **not** exempt, because
878
+ the token still wraps. Width is Unicode code points, not bytes.
656
879
 
657
880
  ### check-tag-lead-line
658
881
 
@@ -774,9 +997,10 @@ is ground truth, the prose the audited follower.
774
997
 
775
998
  ### templates/
776
999
 
777
- `queue-config.sh` — the consumer config template documenting every knob (the
778
- `# spec:` pointer to the §Layout knob table, which now includes
779
- `QUEUE_KIT_LESSON_SINKS` and its local-overlay reminder).
1000
+ `queue-config.sh` — the consumer config template: a two-line `# spec:` pointer
1001
+ to the §Layout knob table (which now includes `QUEUE_KIT_LESSON_SINKS` and its
1002
+ local-overlay reminder), so the table stays the one owner of the knob roster
1003
+ rather than a parallel copy in the template drifting against it.
780
1004
  `TASK-QUEUE.md` — a starter queue skeleton: the sections in default order,
781
1005
  one example entry per grammar shape shown under `Technical Debt` (the
782
1006
  `[spec:]`-gated `New Features` carries teaching prose only, since a spec-ready
@@ -0,0 +1,78 @@
1
+ #!/usr/bin/env bash
2
+ # spec: queue-kit/SPEC.md §bin/queue-edges.sh — inbound citation aggregator (a tool, not a gate; no # graph: manifest)
3
+ #
4
+ # usage: queue-edges.sh [--inbound <slug>] [queue-file]
5
+ # default: every live slug with at least one inbound edge, and its citing entries
6
+ # --inbound <slug>: the inbound set for one slug
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
+ target=""; file=""
14
+ while (($#)); do
15
+ case "$1" in
16
+ --inbound) target="${2:-}"; shift 2 || true ;;
17
+ -h|--help) sed -n '4,6p' "${BASH_SOURCE[0]}" | sed 's/^# \{0,1\}//'; exit 0 ;;
18
+ -*) echo "queue-edges: unknown option: $1" >&2; exit 2 ;;
19
+ *) file="$1"; shift ;;
20
+ esac
21
+ done
22
+ FILE="${file:-$QUEUE_KIT_QUEUE_FILE}"
23
+ [[ -f "$FILE" ]] || { echo "queue-edges: file not found: $FILE" >&2; exit 2; }
24
+
25
+ live="$(queue_live_slugs "$FILE")"
26
+ # spec: queue-kit/SPEC.md §bin/queue-edges.sh — a dead --inbound slug is a caller error, not an empty set: silence has to mean "no inbound edges" and nothing else
27
+ if [[ -n "$target" ]] && ! grep -qxF -- "$target" <<<"$live"; then
28
+ echo "queue-edges: not a live slug: $target" >&2
29
+ exit 1
30
+ fi
31
+
32
+ awk -v taskre="$QUEUE_TASK_RE" -v sectre="$QUEUE_SECTION_RE" \
33
+ -v live="$live" -v want="$target" '
34
+ BEGIN { n = split(live, a, "\n"); for (i = 1; i <= n; i++) if (a[i] != "") L[a[i]] = 1 }
35
+ # spec: queue-kit/SPEC.md §The tag algebra — resolution against the live slug set, self-citation dropped; an unresolved token is silently not an edge, never a complaint
36
+ function emit(tgt, line) {
37
+ if (!(tgt in L) || tgt == cur || cur == "") return
38
+ if (want != "" && tgt != want) return
39
+ sub(/^[[:space:]]+/, "", line); sub(/[[:space:]]+$/, "", line)
40
+ if (!(tgt in seen)) { seen[tgt] = 1; ord[++nt] = tgt }
41
+ cnt[tgt]++
42
+ rec[tgt, cnt[tgt]] = sprintf(" %-46s %s", cur, line)
43
+ }
44
+ function scanblocked(line, s, b) {
45
+ s = line
46
+ while (match(s, /\[blocked-by:[[:space:]]*[a-z0-9][a-z0-9-]*/)) {
47
+ b = substr(s, RSTART, RLENGTH); sub(/\[blocked-by:[[:space:]]*/, "", b)
48
+ emit(b, line)
49
+ s = substr(s, RSTART + RLENGTH)
50
+ }
51
+ }
52
+ function scanbody(line, s, t) {
53
+ s = line
54
+ while (match(s, /`[a-z0-9][a-z0-9-]*`/)) {
55
+ t = substr(s, RSTART + 1, RLENGTH - 2)
56
+ emit(t, line)
57
+ s = substr(s, RSTART + RLENGTH)
58
+ }
59
+ }
60
+ $0 ~ taskre { inq = 1; cur = ""; next }
61
+ $0 ~ sectre { inq = 0; cur = ""; next }
62
+ !inq { next }
63
+ # spec: queue-kit/SPEC.md §bin/queue-edges.sh — a citation is attributed to the nearest preceding slug bullet, so a sub-task cites in its own name; the lead line yields its [blocked-by:] tag alone, never its prose
64
+ /^[[:space:]]*-[[:space:]]+\*\*[a-z0-9][a-z0-9-]*\*\*/ {
65
+ match($0, /\*\*[a-z0-9][a-z0-9-]*\*\*/)
66
+ cur = substr($0, RSTART + 2, RLENGTH - 4)
67
+ scanblocked($0)
68
+ next
69
+ }
70
+ cur != "" { scanbody($0) }
71
+ END {
72
+ for (i = 1; i <= nt; i++) {
73
+ t = ord[i]
74
+ printf "%s (%d inbound)\n", t, cnt[t]
75
+ for (j = 1; j <= cnt[t]; j++) print rec[t, j]
76
+ }
77
+ }
78
+ ' "$FILE"
@@ -94,9 +94,11 @@ if [[ -n "$out" ]]; then
94
94
  echo "membership in it is itself the cost declaration):"
95
95
  printf ' %s\n' "${shape[@]}"
96
96
  fi
97
- echo " help: compress the body to the cap, add the cost field, or evict the entry to"
98
- echo " the icebox as a one-line lead. The removed narrative stays recoverable"
99
- echo " from the evicting commit's own diff (git log -p -S'<slug>')."
97
+ echo " help: add the cost field, or evict the entry to the icebox as a one-line lead."
98
+ echo " Over the cap: compress by ANSWERING grounds, never by dropping them —"
99
+ echo " an unanswered ground is relocated to a linked entry, and that split is"
100
+ echo " authorization-gated, not self-served (queue-kit/SPEC.md"
101
+ echo " section check-queue-entry-budget)."
100
102
  exit 1
101
103
  fi
102
104
 
@@ -17,6 +17,11 @@
17
17
  ### Later
18
18
 
19
19
  - **gamma-feature** — revisit when the alpha surface settles.
20
+ recurrence: gamma-feature 2026-08-04
21
+ - **delta-feature** — re-filed the same day as gamma, which is the case the
22
+ recurrence declaration's self-naming slug field exists to keep unique: strip
23
+ the slugs and these two lines are byte-identical and this fixture reds.
24
+ recurrence: delta-feature 2026-08-04
20
25
 
21
26
  ## Done
22
27
 
@@ -0,0 +1,130 @@
1
+ #!/usr/bin/env bash
2
+ # Behavioral test of bin/queue-edges.sh: the citation grammar's four rules
3
+ # (live-set resolution, unresolved token is not an error, no self-citation,
4
+ # [blocked-by:] counts), the verbatim citing line, nearest-preceding-bullet
5
+ # attribution, and --inbound's silence-means-no-edges contract. queue-edges is a
6
+ # tool, not a gate, so it has no good/bad pair; this drives it directly. The
7
+ # repo's own corpus carries no live [blocked-by:] tag, so that path exists here
8
+ # or nowhere. Config is isolated via QUEUE_KIT_CONFIG_FILE so the repo's
9
+ # queue-config.sh does not leak in.
10
+ #
11
+ # Run by run-gate-tests.sh (any <tests-dir>/*.test.sh; must exit 0).
12
+ set -uo pipefail
13
+ source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
14
+
15
+ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" # queue-kit/
16
+ EDGES="$DIR/bin/queue-edges.sh"
17
+ SANDBOX="$(mktemp -d)"
18
+ trap 'rm -rf "$SANDBOX"' EXIT
19
+ : >"$SANDBOX/empty-config.sh"
20
+ export QUEUE_KIT_CONFIG_FILE="$SANDBOX/empty-config.sh"
21
+
22
+ fails=0
23
+ checks=0
24
+
25
+ want() { # $1=label $2=output $3=substring-that-must-be-present
26
+ checks=$((checks + 1))
27
+ grep -qF -- "$3" <<<"$2" || { echo " FAIL [$1]: output lacks '$3':"; printf ' %s\n' "$2"; fails=$((fails + 1)); }
28
+ }
29
+ absent() { # $1=label $2=output $3=substring-that-must-be-absent
30
+ checks=$((checks + 1))
31
+ grep -qF -- "$3" <<<"$2" && { echo " FAIL [$1]: output should not contain '$3':"; printf ' %s\n' "$2"; fails=$((fails + 1)); } || true
32
+ }
33
+ rc_is() { # $1=label $2=actual-rc $3=expected-rc
34
+ checks=$((checks + 1))
35
+ [[ "$2" == "$3" ]] || { echo " FAIL [$1]: exit $2, want $3"; fails=$((fails + 1)); }
36
+ }
37
+
38
+ cat >"$SANDBOX/TASK-QUEUE.md" <<'EOF'
39
+ # TASK-QUEUE.md
40
+
41
+ ## Iteration: demo
42
+
43
+ ## New Features
44
+
45
+ - **feat-a** — a feature citing `feat-b` on its lead line.
46
+ **Relation to `feat-b`:** this one subsumes it entirely.
47
+ It also mentions `landed-thing`, which is not a live slug, and `feat-a`.
48
+ - **feat-a-sub** — a sub-task.
49
+ It cites `def-a` in its own name.
50
+
51
+ - **feat-b** [blocked-by: def-a] — blocked, so it cites its blocker.
52
+
53
+ ## Technical Debt
54
+
55
+ - **debt-a** — an entry nobody cites.
56
+ It mentions `feat-b` once more.
57
+
58
+ ## Deferred
59
+
60
+ - **def-a** — a deferred entry is a live target.
61
+
62
+ ## Done
63
+
64
+ - done-slug
65
+
66
+ ## Lessons Learned
67
+ EOF
68
+
69
+ Q="$SANDBOX/TASK-QUEUE.md"
70
+
71
+ # Default listing: grouped by target, in queue order, with per-target counts.
72
+ out="$(bash "$EDGES" "$Q")"
73
+ want "count-feat-b" "$out" "feat-b (2 inbound)"
74
+ want "count-def-a" "$out" "def-a (2 inbound)"
75
+
76
+ # The citing line is carried verbatim, which is what supplies the relation's kind.
77
+ want "verbatim-kind" "$out" "**Relation to \`feat-b\`:** this one subsumes it entirely."
78
+
79
+ # Rule: an unresolved token is not an edge and not an error (exit 0, no mention).
80
+ rc=0; bash "$EDGES" "$Q" >/dev/null 2>&1 || rc=$?
81
+ rc_is "unresolved-rc" "$rc" 0
82
+ absent "unresolved-token" "$out" "landed-thing ("
83
+
84
+ # Rule: self-citation is not an edge -- feat-a cites only feat-b and never itself.
85
+ absent "no-self-target" "$out" "feat-a ("
86
+
87
+ # Rule: a done slug is not live, so it is never a target.
88
+ absent "done-not-live" "$out" "done-slug ("
89
+
90
+ # Rule: [blocked-by: <slug>] is an edge -- feat-b's tag cites def-a.
91
+ out_defa="$(bash "$EDGES" --inbound def-a "$Q")"
92
+ want "blocked-by-edge" "$out_defa" "feat-b"
93
+ want "blocked-by-line" "$out_defa" "[blocked-by: def-a]"
94
+
95
+ # Attribution is to the nearest preceding slug bullet: the sub-task cites in its
96
+ # own name, not its parent's.
97
+ want "subtask-cites" "$out_defa" "feat-a-sub"
98
+ absent "parent-not-credited" "$out_defa" " feat-a "
99
+
100
+ # A lead line yields its [blocked-by:] tag alone, never its prose: feat-a's lead
101
+ # line names feat-b, but only the body citation and debt-a's are edges.
102
+ out_featb="$(bash "$EDGES" --inbound feat-b "$Q")"
103
+ want "body-citation" "$out_featb" "subsumes it entirely"
104
+ want "other-citer" "$out_featb" "debt-a"
105
+ absent "lead-line-prose" "$out_featb" "a feature citing"
106
+
107
+ # --inbound on a live slug with no inbound edges: empty output, exit 0. Silence
108
+ # means "no inbound edges" -- so a dead slug must exit 1 instead, never print
109
+ # nothing.
110
+ rc=0; out_none="$(bash "$EDGES" --inbound debt-a "$Q" 2>/dev/null)" || rc=$?
111
+ rc_is "live-no-edges-rc" "$rc" 0
112
+ checks=$((checks + 1))
113
+ [[ -z "$out_none" ]] || { echo " FAIL [live-no-edges-empty]: want empty, got: $out_none"; fails=$((fails + 1)); }
114
+
115
+ rc=0; err="$(bash "$EDGES" --inbound no-such-slug "$Q" 2>&1 >/dev/null)" || rc=$?
116
+ rc_is "dead-slug-rc" "$rc" 1
117
+ want "dead-slug-msg" "$err" "not a live slug: no-such-slug"
118
+
119
+ # The tool mutates nothing.
120
+ before="$(cksum <"$Q")"
121
+ bash "$EDGES" "$Q" >/dev/null 2>&1
122
+ checks=$((checks + 1))
123
+ [[ "$(cksum <"$Q")" == "$before" ]] || { echo " FAIL [no-mutation]: the queue file changed"; fails=$((fails + 1)); }
124
+
125
+ if [[ "$fails" -gt 0 ]]; then
126
+ echo "queue-edges.test.sh: $fails case(s) failed"
127
+ exit 1
128
+ fi
129
+ echo "queue-edges.test.sh: clean (grammar: live-set resolution, unresolved token, self-citation, blocked-by, done-not-live; verbatim line; sub-task attribution; lead-line prose excluded; --inbound empty vs dead slug; no mutation; $checks checks)"
130
+ exit 0
@@ -14,9 +14,12 @@ check-task-names
14
14
  check-task-conservation
15
15
  check-queue-prose-precondition
16
16
  check-roadmap-fresh
17
+ check-queue-entry-budget
18
+ check-queue-sections
19
+ check-queue-slug-liveness
17
20
  EOF
18
21
 
19
22
  cp "$SMOKE_KIT_ROOT/templates/TASK-QUEUE.md" TASK-QUEUE.md
20
23
 
21
24
  bash "$SDK/bin/gen-pre-commit.sh" --write >/dev/null
22
- bash "$SDK/checks/check-graph.sh" --emit > .workflow/CHECK-GRAPH.html
25
+ bash "$SDK/checks/check-graph.sh" --emit > scripts/CHECK-GRAPH.html
@@ -35,6 +35,9 @@
35
35
  ### Someday
36
36
 
37
37
  - **example-deferred** — a design-pending entry. [design-pending]
38
+ **Cost while deferred:** what staying parked costs — a red gate, a stale
39
+ doc, a foregone lever — stated so a later scope can weigh it against the
40
+ work of landing it.
38
41
 
39
42
  ## Done
40
43
 
@@ -289,21 +289,32 @@ line) landed then, and this assertion mechanizes the channel. The good/bad
289
289
  fixture pair exercises the span-corruption symptom (a bad page whose severed span
290
290
  leaks a stray backtick and a raw placeholder tag, a good page whose faithful code
291
291
  spans render clean) alongside the fence/heading case. Because that bad page would
292
- red on its fence run alone, the span assertion also carries its own hermetic unit
293
- test isolating it — a page with no fence, no surplus heading and no table, whose
294
- only defect is the severed span, reds span-only and clears in the
295
- doubled-backtick form — so a widening that reds nothing new cannot pass. The
296
- table assertion likewise carries its own unit test (a collapsed table reds
297
- table-only, a trailing blank clears). The batch contract carries a unit test of
298
- its own for the same reason — the good/bad pair sets no renderer knob, so it
299
- already runs the batch path and cannot by itself distinguish that path from the
300
- fallback. That test asserts the kit's two renderer defaults render a corpus
301
- byte-identically, that a pinned `SITE_KIT_RENDERER` suppresses the batch default,
302
- that the batch path and the per-document fallback return the same verdict on the
303
- same pages, and that a wrong document count and an unresolvable batch command
304
- each exit 2. The count case uses a stub that always emits two documents, so it
305
- passes the two-document probe and is caught only by the corpus count — a stub the
306
- probe already rejected would never reach the assertion under test.
292
+ red on its fence run alone, every assertion the pair cannot isolate carries a
293
+ hermetic unit test of its own, named here rather than described:
294
+ `check-docs-render-fidelity-span.test.sh`,
295
+ `check-docs-render-fidelity-table.test.sh`,
296
+ `check-docs-render-fidelity-foreign.test.sh` and
297
+ `check-docs-render-fidelity-batch.test.sh`.
298
+
299
+ The span test runs a page with no fence, no surplus heading and no table, whose
300
+ only defect is the severed span: it reds span-only and clears in the
301
+ doubled-backtick form, so a widening that reds nothing new cannot pass. The table
302
+ test is that same shape — a collapsed table reds table-only, a trailing blank
303
+ clears. The foreign test holds the SVG/MathML exemption to its *scope*: a page
304
+ carrying inline `<svg>` clears, because the exemption follows the subtree by
305
+ open/close depth rather than a name list, while a bare `<path>` outside any
306
+ `<svg>` still reds — and that second half is what keeps the first from passing
307
+ under a blanket widening, which would clear the good page at the cost of the
308
+ placeholder tokens the assertion exists for. The batch test exists because the
309
+ good/bad pair sets no renderer knob, so it already runs the batch path and cannot
310
+ by itself distinguish that path from the fallback; it asserts that the kit's two
311
+ renderer defaults render a corpus byte-identically, that a pinned
312
+ `SITE_KIT_RENDERER` suppresses the batch default, that the batch path and the
313
+ per-document fallback return the same verdict on the same pages, and that a wrong
314
+ document count and an unresolvable batch command each exit 2. The count case uses
315
+ a stub that always emits two documents, so it passes the two-document probe and is
316
+ caught only by the corpus count — a stub the probe already rejected would never
317
+ reach the assertion under test.
307
318
  The positional form `check-docs-render-fidelity.sh [docs-dir] [config-file]`
308
319
  lets a fixture point the docs dir and renderer knobs at a synthetic tree without
309
320
  touching consumer config. `precommit` tier, coupling the docs tree.
@@ -501,18 +512,21 @@ Deliberately uncapped and unknobbed: a "newest N only" bound would stop probing
501
512
  exactly the old releases where this class of defect has actually been found.
502
513
 
503
514
  The kit's `smoke/install.sh` installs the template verbatim into the scratch tree
504
- as governed surface. **What that buys is narrower than the install suggests, and
505
- is stated here rather than inferred from it.** The scratch battery is the union of
506
- what each kit's `smoke/install.sh` registers, and of those gates only
507
- `check-tree-terms` and `check-docs-cname-parity` read the installed workflow at
508
- all — one for tree terms, the other for configured host aliases in `://` form.
509
- None of the gates that lint a workflow's *Actions shape* — its `run:` bodies, its
510
- action pins, its `gh` repository context — is registered in any kit's smoke
511
- `gates.list`, so none of them runs over the installed file. The smoke therefore
512
- catches a template that leaks a term or a host alias, and nothing else about it; a
513
- regression in the workflow's bash or its pinning surfaces at a consumer, not here.
514
- Closing that is a change to smoke wiring rather than to this template, and is
515
- carried as deferred work in the consumer's queue.
515
+ as governed surface, and registers the gates that read it. The scratch battery is
516
+ the union of what each kit's `smoke/install.sh` registers; this kit contributes
517
+ `check-docs-cname-parity` and — because it writes the only Actions-shaped surface
518
+ any install writes — the gates that lint a workflow's Actions shape:
519
+ `check-action-pinning`, `check-action-run-shell`, `check-action-gh-repo`.
520
+ `check-tree-terms` reads the installed file too, for tree terms. So a template
521
+ regression in the workflow's bash, its action pins, or its `gh` repository
522
+ context reds the smoke rather than surfacing at a consumer.
523
+
524
+ Those four qualify under the registration accounting's predicate — a gate earns a
525
+ scratch-battery slot when it reads a surface the install writes — because this
526
+ install writes the workflow they lint. The predicate binds every kit and is owned
527
+ by gate-sdk/SPEC.md §Consumer smoke, which also rules on the omissions: what this
528
+ kit leaves unregistered is decided by the accounting's probe, not by a judgment
529
+ recorded here.
516
530
 
517
531
  ## Out of scope
518
532