checkwright 0.17.0 → 0.18.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 (78) hide show
  1. package/package.json +2 -2
  2. package/payload/canon-kit/README.md +1 -0
  3. package/payload/canon-kit/SPEC.md +162 -16
  4. package/payload/canon-kit/checks/check-amendment-queue.sh +17 -16
  5. package/payload/canon-kit/checks/check-install-claim.sh +146 -0
  6. package/payload/canon-kit/gate-tests/check-amendment-queue/good/TASK-QUEUE.md +1 -1
  7. package/payload/canon-kit/gate-tests/check-deprecation-task/good/TASK-QUEUE.md +1 -1
  8. package/payload/canon-kit/gate-tests/check-install-claim/bad/README.md +12 -0
  9. package/payload/canon-kit/gate-tests/check-install-claim/bad/expect.txt +1 -0
  10. package/payload/canon-kit/gate-tests/check-install-claim/bad/install.md +24 -0
  11. package/payload/canon-kit/gate-tests/check-install-claim/bad/posts/note.md +7 -0
  12. package/payload/canon-kit/gate-tests/check-install-claim/bad/scripts/canon-config.sh +10 -0
  13. package/payload/canon-kit/gate-tests/check-install-claim/bad/scripts/install-transports.sh +7 -0
  14. package/payload/canon-kit/gate-tests/check-install-claim/good/README.md +12 -0
  15. package/payload/canon-kit/gate-tests/check-install-claim/good/expect.txt +1 -0
  16. package/payload/canon-kit/gate-tests/check-install-claim/good/install.md +24 -0
  17. package/payload/canon-kit/gate-tests/check-install-claim/good/posts/note.md +7 -0
  18. package/payload/canon-kit/gate-tests/check-install-claim/good/scripts/canon-config.sh +10 -0
  19. package/payload/canon-kit/gate-tests/check-install-claim/good/scripts/install-transports.sh +7 -0
  20. package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/TASK-QUEUE.md +1 -1
  21. package/payload/canon-kit/lib/spec.sh +32 -2
  22. package/payload/context-kit/SPEC.md +5 -0
  23. package/payload/context-kit/checks/check-footprint-fresh.sh +1 -1
  24. package/payload/delegation-kit/SPEC.md +12 -0
  25. package/payload/drift-kit/README.md +4 -4
  26. package/payload/drift-kit/SPEC.md +58 -5
  27. package/payload/drift-kit/bin/drift-report.sh +14 -11
  28. package/payload/drift-kit/bin/overhead-meter.sh +1 -1
  29. package/payload/drift-kit/kpis/kpi-deferred-age.sh +7 -5
  30. package/payload/drift-kit/kpis/kpi-queue-net-delta.sh +74 -0
  31. package/payload/drift-kit/smoke/install.sh +1 -1
  32. package/payload/gate-sdk/SPEC.md +17 -2
  33. package/payload/lifecycle-kit/README.md +2 -2
  34. package/payload/lifecycle-kit/SPEC.md +57 -34
  35. package/payload/lifecycle-kit/bin/enter-stage.sh +1 -1
  36. package/payload/lifecycle-kit/checks/check-shim-restatement.sh +1 -1
  37. package/payload/lifecycle-kit/checks/check-skill-binding.sh +1 -1
  38. package/payload/lifecycle-kit/templates/{skills → stages}/close.md +8 -8
  39. package/payload/lifecycle-kit/templates/{skills → stages}/scope.md +1 -1
  40. package/payload/queue-kit/README.md +26 -10
  41. package/payload/queue-kit/SPEC.md +463 -32
  42. package/payload/queue-kit/bin/queue-index.sh +62 -11
  43. package/payload/queue-kit/bin/roadmap.sh +76 -0
  44. package/payload/queue-kit/checks/check-queue-entry-budget.sh +104 -0
  45. package/payload/queue-kit/checks/check-roadmap-fresh.sh +110 -0
  46. package/payload/queue-kit/checks/check-tag-lead-line.sh +12 -8
  47. package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/TASK-QUEUE.md +33 -0
  48. package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/expect.txt +4 -0
  49. package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/scripts/queue-config.sh +6 -0
  50. package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/TASK-QUEUE.md +35 -0
  51. package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/scripts/queue-config.sh +6 -0
  52. package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/TASK-QUEUE.md +24 -0
  53. package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/args +5 -0
  54. package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/emit.txt +8 -0
  55. package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/expect.txt +1 -0
  56. package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/projection.txt +16 -0
  57. package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/scripts/queue-config.sh +6 -0
  58. package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/TASK-QUEUE.md +22 -0
  59. package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/args +5 -0
  60. package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/emit.txt +7 -0
  61. package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/expect.txt +1 -0
  62. package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/projection.txt +16 -0
  63. package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/scripts/queue-config.sh +6 -0
  64. package/payload/queue-kit/gate-tests/check-tag-lead-line/bad/TASK-QUEUE.md +3 -0
  65. package/payload/queue-kit/gate-tests/check-tag-lead-line/bad/expect.txt +1 -0
  66. package/payload/queue-kit/gate-tests/check-tag-lead-line/good/TASK-QUEUE.md +2 -1
  67. package/payload/queue-kit/gate-tests/queue-index.test.sh +45 -4
  68. package/payload/queue-kit/gate-tests/roadmap.test.sh +197 -0
  69. package/payload/queue-kit/lib/queue.sh +87 -1
  70. package/payload/queue-kit/smoke/install.sh +1 -0
  71. package/payload/queue-kit/templates/TASK-QUEUE.md +1 -1
  72. package/payload/site-kit/SPEC.md +6 -0
  73. /package/payload/lifecycle-kit/templates/{skills/release-sweep.md → release-sweep.md} +0 -0
  74. /package/payload/lifecycle-kit/templates/{skills → stages}/align.md +0 -0
  75. /package/payload/lifecycle-kit/templates/{skills → stages}/build.md +0 -0
  76. /package/payload/lifecycle-kit/templates/{skills → stages}/spec.md +0 -0
  77. /package/payload/lifecycle-kit/templates/{skills → stages}/validate.md +0 -0
  78. /package/payload/lifecycle-kit/templates/{skills/upgrade.md → upgrade.md} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "checkwright",
3
- "version": "0.17.0",
3
+ "version": "0.18.0",
4
4
  "description": "Vendors pinned Checkwright kit source into your repository and commits it — a coding-agent-assisted delivery methodology (gate SDK, evidence-stamped lifecycle, agent context economics).",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -19,6 +19,6 @@
19
19
  "README.md"
20
20
  ],
21
21
  "checkwright": {
22
- "commit": "ebaa8a4739f00e6755be9e278cf8488c807e7398"
22
+ "commit": "34f2c6ec76213852bf599d74047546b670099fcd"
23
23
  }
24
24
  }
@@ -41,6 +41,7 @@ reads the tag syntax [queue-kit](../queue-kit/) defines.
41
41
  check-tracking-claim # a path's tracking status in prose agrees with git
42
42
  check-prose-enum # partial enumeration of a governed set
43
43
  check-md-refs # internal markdown links resolve
44
+ check-install-claim # one declared primary install transport, led with everywhere
44
45
  check-spec-fence-balance # even fence counts, parsers never desync
45
46
  check-docs-link-convention # needs a docs site (cite-downward links)
46
47
  check-prose-tells # needs prose surfaces (mechanical AI-prose tells)
@@ -56,9 +56,16 @@ the roster splits one out).
56
56
  A feature task is therefore in exactly one of two states, marked with the
57
57
  queue tags whose syntax queue-kit defines:
58
58
 
59
- - **Design-pending** — no amendment yet; the entry sits in the deferred
60
- section tagged `[needs-spec]`, excluded from selection. Every deferred
61
- entry carries the tag: all deferred work is design-pending by definition.
59
+ - **Design-pending** — no amendment yet; the entry sits in a **design-pending
60
+ section** tagged `[design-pending]`, excluded from selection. That set is
61
+ the deferred section plus, where the consumer configures one, queue-kit's
62
+ optional icebox tier (`CANON_KIT_ICEBOX_SECTION`; the tier is
63
+ queue-kit/SPEC.md §The icebox tier). A dormant entry is unbuilt design, so
64
+ the state and its tag reach it unchanged. Every entry in the set carries the
65
+ tag — all such work is design-pending by definition.
66
+ The token names the *state*, not a promised artifact — a deferred **debt**
67
+ entry promotes with the tag deleted rather than converted, and the tag has
68
+ to be true of that entry too.
62
69
  - **Spec-ready** — the amendment exists; the entry sits in the feature
63
70
  section tagged `[spec: <ref>]`, eligible for selection.
64
71
 
@@ -69,9 +76,18 @@ the deferred entry — without the pairing, design rationale and ruled-out
69
76
  alternatives get re-derived under build pressure. Technical debt needs no
70
77
  amendment (it fixes behavior to an existing spec); a debt task that needs a
71
78
  design *ruling* is design work — it goes to the deferred section
72
- `[needs-spec]` until scope rules on it. Enforced by
79
+ `[design-pending]` until scope rules on it. Enforced by
73
80
  `check-amendment-queue`.
74
81
 
82
+ The tag is a **checksum on the promotion move**, not a second source of the
83
+ state its section already carries. Its redundancy is the mechanism: a
84
+ promotion crosses a section boundary *and* swaps the tag, so
85
+ forbidden-in-active catches a move that dropped the swap and
86
+ `[spec:]`-in-design-pending catches a swap that dropped the move. That is
87
+ also the test a further tag has to pass: a tag marking a move that crosses no
88
+ pending/ready boundary adds a state name without adding a caught error class,
89
+ and is refused.
90
+
75
91
  The feature/debt litmus is **new names**: a task that adds any name to a
76
92
  governed surface — a script, a config knob, a file or directory convention,
77
93
  a tag, a contract another component must honor — is a feature and needs the
@@ -147,7 +163,11 @@ own instance); the kit's rules are the topology itself:
147
163
  instead (`check-manifest-count` bans a bare cardinal quantifying a
148
164
  governed collection in a manifest — the collection is the count's owner).
149
165
  A literal stays verbatim only when load-bearing, and then only
150
- gate-coupled. A path's **version-control tracking status** is code-owned in
166
+ gate-coupled. A **user-facing** claim takes the same treatment when a reader
167
+ acts on it: `check-install-claim` gives the primary-install-path claim one
168
+ declared owner and holds every governed install section to it, so the topology
169
+ reaches beyond the internal facts the rules above are stated over.
170
+ A path's **version-control tracking status** is code-owned in
151
171
  the same sense a count is — git owns it — so prose states the rule and
152
172
  `check-tracking-claim` verifies it, rather than prose transcribing membership.
153
173
  - **Comments cite, never restate.** The code surface is a tier too: a
@@ -180,7 +200,7 @@ docs-site page dir (`docs/canon-kit/`). Generic vocabulary names the spec
180
200
  *artifact* discipline rather than the brand and is fixed regardless of the
181
201
  kit's name: the `SPEC.md` canonical-spec filename, the `SPEC-*.md` amendment
182
202
  glob, the `spec:` and `contract:` source directives, the `[spec:]` and
183
- `[needs-spec]` queue tags, the `check-spec-*` gate names, and the internal
203
+ `[design-pending]` queue tags, the `check-spec-*` gate names, and the internal
184
204
  `lib/spec.sh` loader (where "spec" names the discipline). The consumer gate
185
205
  `check-kit-ref-liveness` (a check-skeleton copy in `scripts/` — the
186
206
  dangling-reference hazard is a kit author's, so it is not templated into
@@ -204,10 +224,15 @@ unset, and the loader exits 2 on a malformed config. Knobs:
204
224
  - `CANON_KIT_FEATURE_SECTIONS` — array, default `("New Features")`: active
205
225
  sections whose entries require `[spec:]`.
206
226
  - `CANON_KIT_ACTIVE_SECTIONS` — array, default
207
- `("New Features" "Technical Debt")`: sections where `[needs-spec]` is a
227
+ `("New Features" "Technical Debt")`: sections where `[design-pending]` is a
208
228
  violation.
209
229
  - `CANON_KIT_DEFERRED_SECTION` — default `Deferred`: the section whose
210
- every entry requires `[needs-spec]`.
230
+ every entry requires `[design-pending]`.
231
+ - `CANON_KIT_ICEBOX_SECTION` — scalar, default **empty**: the second
232
+ design-pending section, queue-kit's optional icebox tier. Empty means the
233
+ set is the deferred section alone. Naming the deferred section is malformed
234
+ config. What generalizes here is the section **set**, not the tag set — no
235
+ icebox-specific tag exists or is wanted.
211
236
  - `CANON_KIT_DOD_HEADING` — default `Definition of Done`;
212
237
  `CANON_KIT_DOD_MODE` — `exactly-one` (the default) or `at-most-one`
213
238
  (a reference-spec corpus like this repo's kits carries no DoD).
@@ -262,6 +287,18 @@ unset, and the loader exits 2 on a malformed config. Knobs:
262
287
  default empty ⇒ clean skip (no declared sets). This repo sets
263
288
  `bash scripts/enum-sets.sh`, which derives the queue tag sets from
264
289
  queue-kit's own parser rather than restating them.
290
+ - `CANON_KIT_INSTALL_TRANSPORTS_CMD` — a consumer command emitting the install
291
+ transports `check-install-claim` holds, one `<transport-id>`⇥`<ERE>` line per
292
+ transport, default empty ⇒ clean skip. `CANON_KIT_INSTALL_SECTION_RE` — an ERE
293
+ matched against `##`-or-deeper heading text to select the sections that gate
294
+ scans, default empty ⇒ clean skip; either knob left empty skips the whole gate,
295
+ since neither assertion has a vocabulary to judge against without the other.
296
+ `CANON_KIT_INSTALL_CLAIM_EXCLUDE` — array of globs dropped from that gate's
297
+ scanned set on top of `CANON_KIT_MDREF_EXCLUDE`, default empty. A transport
298
+ vocabulary is one project's distribution model, so no spelling of it ships as a
299
+ kit literal (the provenance seam). This repo sets
300
+ `bash scripts/install-transports.sh`, `^(Quick start|Install)`, and
301
+ `("docs/posts/*")`.
265
302
  - `CANON_KIT_COMMENT_MACHINE` / `CANON_KIT_COMMENT_REASON` — arrays, default
266
303
  empty: extra directive prefixes appended to the built-in kit-mechanism
267
304
  roster (a consumer's product vocabulary). `CANON_KIT_COMMENT_SURFACE` —
@@ -306,8 +343,11 @@ unset, and the loader exits 2 on a malformed config. Knobs:
306
343
 
307
344
  Cross-kit note: the section knobs carry the same defaults as queue-kit's;
308
345
  the knobs are independent (either kit runs without the other), so a
309
- consumer renaming its sections sets both. Valve and marker spellings <!-- prose-enum-exempt: names the two amendment-lifecycle tags specifically; [blocked-by:] is a dependency tag outside that lifecycle, not a dropped task-tag member -->
310
- (`[needs-spec]`, `[spec:]`, `vision-introduces` / `spec-introduces`,
346
+ consumer renaming its sections sets both — and the icebox section name spans
347
+ every kit that reads the tier on that same shape (queue-kit's
348
+ `QUEUE_KIT_ICEBOX_SECTION`, this knob, drift-kit's `DRIFT_KIT_ICEBOX_SECTION`),
349
+ each degrading to "no icebox" rather than to a wrong section when left unset. Valve and marker spellings <!-- prose-enum-exempt: names the two amendment-lifecycle tags specifically; [blocked-by:] is a dependency tag outside that lifecycle, not a dropped task-tag member -->
350
+ (`[design-pending]`, `[spec:]`, `vision-introduces` / `spec-introduces`,
311
351
  `spec-embedded-source-exempt: <reason>`) are mechanism, not config.
312
352
 
313
353
  ## Per-component contracts
@@ -322,8 +362,10 @@ same shapes:
322
362
  - **Section grammar and queue resolution:** the section-regex builders the
323
363
  queue-facing gates use (queue-kit's rule — both sides of a section boundary
324
364
  must parse identically), and the one queue walk that emits a live slug for a
325
- bold lead-in bullet in an active or deferred section and a done slug for a
326
- bare-slug bullet outside them — the single grammar `check-todo-task-liveness`
365
+ bold lead-in bullet in an active or **design-pending** section — deferred
366
+ plus a configured icebox, built as one regex so the tag rule and the walk can
367
+ never disagree on the set — and a done slug for a bare-slug bullet outside
368
+ them; the single grammar `check-todo-task-liveness`
327
369
  and `check-deprecation-task` resolve a `task: <slug>` binding through (each
328
370
  caller builds its own live/done map and fail-closes on the walk status).
329
371
  - **Finders:** the canonical-spec / amendment finders the spec-scanning gates
@@ -332,7 +374,7 @@ same shapes:
332
374
  members read one identical set. The finder then folds in each
333
375
  `CANON_KIT_PROSE_SURFACE_GLOBS` candidate that is **slot-free**: it bears no
334
376
  lifecycle-kit binding slot (`*<name: …>*`, slot-name `[a-z][a-z0-9-]*` — the
335
- grammar lifecycle-kit/SPEC.md §templates/skills/ owns) and no
377
+ grammar lifecycle-kit/SPEC.md §templates/stages/ owns) and no
336
378
  `CONSUMER BINDING` header. A slot-bearing candidate is silently excluded — a template still
337
379
  awaiting binding is a placeholder, not finished prose, and its coverage stays
338
380
  the shim/binding gates (§Layout and configuration states the knob). The
@@ -351,6 +393,13 @@ same shapes:
351
393
  - **The enum sets** arrive through the consumer's `CANON_KIT_ENUM_SETS_CMD`,
352
394
  validated and fail-closing (exit 2) on a command error or an unparsable line
353
395
  (§check-prose-enum).
396
+ - **The install transports** arrive the same way, through
397
+ `CANON_KIT_INSTALL_TRANSPORTS_CMD`, and `spec_install_transports` carries the
398
+ same fail-closed contract its enum-set sibling does — a command error, an
399
+ unparsable line, an id that is not slug-shaped, or a repeated id is exit 2. The
400
+ duplicate check is what a bare emit grammar cannot express and the gate needs:
401
+ two lines claiming one id would give a transport two patterns and make its
402
+ match order arbitrary (§check-install-claim).
354
403
  - **The comment-surface adapters:** the comment gates read *different* surfaces.
355
404
  `check-spec-pointer` scans the template-pruned surface — a template's `spec:`
356
405
  line is an unresolvable-by-design placeholder (§check-spec-pointer);
@@ -372,11 +421,11 @@ same shapes:
372
421
  ### check-amendment-queue
373
422
 
374
423
  Invariant: the bidirectional rule holds — (a) no feature-section entry
375
- without `[spec:]`, no `[needs-spec]` anywhere in the active sections
424
+ without `[spec:]`, no `[design-pending]` anywhere in the active sections
376
425
  (entries or prose; a prose mention masks the tag's absence), and no
377
426
  `[spec:]`-tagged entry in an active non-feature section (a spec-ready
378
- entry is misfiled there — it belongs in a feature section); (b) every
379
- deferred entry carries `[needs-spec]`, and a deferred entry already
427
+ entry is misfiled there — it belongs in a feature section); (b) every entry in
428
+ a **design-pending section** carries `[design-pending]`, and one already
380
429
  carrying `[spec:]` must be promoted; (c) every amendment on disk pairs
381
430
  with a `[spec:]` queue entry and every `[spec:]` ref resolves to a file.
382
431
 
@@ -386,6 +435,17 @@ consumer point a task at any design artifact, e.g. this repo's kit-SPEC
386
435
  drafts). Sub-bullets and prose notes are outside the entry grammar;
387
436
  `precommit` tier.
388
437
 
438
+ Coverage limit, stated because the tag's section-wide reach invites the
439
+ stronger claim: any heading that is not a feature, active, or deferred
440
+ section classifies as `other` and skips every arm, so the **done section is
441
+ an exempt population** — an entry moved out of design-pending into it still
442
+ carrying the tag reds nowhere, and queue-kit's lead-line gate misses it too
443
+ (its scanned surface is the task sections alone). In practice the done
444
+ grammar is a bare slug line, so the tag is dropped by that grammar rather
445
+ than by a gate. The guard is total over the *promotion* moves it exists to
446
+ catch — design-pending → an active section — and silent on the disposition
447
+ move.
448
+
389
449
  ### check-spec-dod-singleton
390
450
 
391
451
  Invariant: no canonical spec carries the configured Definition-of-Done
@@ -1180,6 +1240,92 @@ fixture runner invokes from a case directory. Not a git repository, or a
1180
1240
  the doc set to `scripts/*.sh` and every kit's shell sources (`kit:*.sh`), so a
1181
1241
  script rename or a knob retirement re-fires the gate over the docs.
1182
1242
 
1243
+ ### check-install-claim
1244
+
1245
+ Invariant: exactly one governed doc declares which install transport is primary,
1246
+ and no scanned install section leads with a different one. This is the star
1247
+ topology's first *user-facing* application — the same one-owner-per-fact rule the
1248
+ kit applies to internal facts, aimed at a claim a first-time reader acts on.
1249
+
1250
+ **What it does not attempt.** Whether a documented install command resolves
1251
+ against a live registry needs network egress at gate time and is out of a
1252
+ hermetic battery's reach. It is not built, and this paragraph says so rather than
1253
+ leaving a reader to over-read a green run: the command that drove this gate's
1254
+ filing was syntactically fine, and only a registry could have contradicted it.
1255
+ What is decidable from the tree alone is the consistency half — two surfaces
1256
+ cannot name different primary transports — and that is the whole of what runs.
1257
+
1258
+ The claim's machine-readable owner is a full-line
1259
+ `<!-- install-primary: <transport-id> -->` HTML comment. A marker rather than a
1260
+ visible sentence, because the reader-facing form of this claim already exists as
1261
+ prose and must stay prose; the marker is the tier beside it, not a replacement.
1262
+ The transport vocabulary is consumer config — one `<transport-id>`⇥`<ERE>` line
1263
+ per transport through `CANON_KIT_INSTALL_TRANSPORTS_CMD`, loaded by
1264
+ `spec_install_transports` (§lib/spec.sh) — because a kit literal spelling a
1265
+ transport publishes one project's distribution model as a kit fact.
1266
+
1267
+ The scanned set is `check-md-refs`' governed doc set (the manifest set minus
1268
+ `CANON_KIT_MDREF_EXCLUDE`) minus `CANON_KIT_INSTALL_CLAIM_EXCLUDE`. Two
1269
+ assertions:
1270
+
1271
+ - **(A) Singleton owner.** Exactly one declaration exists across the scanned set.
1272
+ Zero is the defect the gate was built for — nothing owns the claim, so two
1273
+ pages can drift apart with nothing watching — and two owners is that same
1274
+ defect wearing a different shape. An id outside the configured vocabulary is
1275
+ fail-closed (exit 2) rather than a violation: the gate then holds no primary to
1276
+ compare a section against, so it must not run rather than pass.
1277
+ - **(B) Leading transport.** Within each scanned document, for every
1278
+ `##`-or-deeper section whose heading text matches
1279
+ `CANON_KIT_INSTALL_SECTION_RE`, the **earliest** line matching any transport
1280
+ pattern must match the declared primary. Later matches are never flagged, and a
1281
+ section matching no transport pattern is silent. One line matching two patterns
1282
+ passes when either id is the primary — a sentence naming both transports is not
1283
+ leading with the secondary one. Fenced content is scanned, because a recipe is
1284
+ exactly where a transport shows, but a fenced line is never read as a heading;
1285
+ the declaration line is skipped, since a claim is not evidence for itself.
1286
+
1287
+ Assertion B is the answer to the leading-versus-mentioning question: naming a
1288
+ secondary transport is correct prose and must stay green, so the rule is
1289
+ positional. **The scope in which "leading" is well-defined is the install
1290
+ section, not the file**, and that calibration was verified rather than assumed —
1291
+ this repo's own install page names its npm path in the H1 preamble about 120
1292
+ lines above the tarball recipe, so a whole-file first-match rule would red the
1293
+ owner page on correct prose.
1294
+
1295
+ Three honest limits, each stated because a reader would otherwise over-trust a
1296
+ green run. Registry reachability is the first, above. **Pattern quality is the
1297
+ second, and it is the consumer's own drift to own:** the gate is only as sharp as
1298
+ the emitted EREs, and a loosely-written pattern wins matches by accident — the
1299
+ kit contract asks for the emit grammar, exactly as `check-prose-enum` says of a
1300
+ hand-listed set. **The third is bought by the section scope:** the prose tier of
1301
+ the declared claim may itself sit outside any scanned section, as this repo's
1302
+ does, in which case rewriting that prose to name a different transport while
1303
+ leaving the declaration alone stays green. That binding is documentary — held by
1304
+ this section and by a reader, not by the gate. It is the price of the scoping
1305
+ rather than an argument against it, since the alternative whole-file rule reds
1306
+ the owner page today, and the recurrence path that actually fired is unaffected:
1307
+ the drift was a `## Quick start` section leading with the wrong transport, which
1308
+ is in scope.
1309
+
1310
+ Producer: the maintainer editing the section that owns the claim, plus the
1311
+ consumer's transport command; both are live tracked configuration in this repo,
1312
+ not fixture-only. Consumer: the committing operator via the output contract —
1313
+ assertion B's report names the section, the offending line, and *which* transport
1314
+ it led with, because "wrong transport" alone would leave the reader grepping. The
1315
+ declaration carries exactly one field and both assertions read it; each emitted
1316
+ line's id is read at the membership check and in the report, its ERE at the
1317
+ per-line match.
1318
+
1319
+ The gate lands greenfield: the drift that filed it was fixed inline at the close
1320
+ that filed it, so this pins a currently-consistent claim and its value is
1321
+ recurrence. That claim drifted at two consecutive releases with nothing watching
1322
+ it, on the surface a first-time reader runs first. The good/bad pair covers the
1323
+ recurrence path itself — a quick-start section leading with the secondary
1324
+ transport — beside a silent no-transport section, a heading the regex does not
1325
+ select, and a published note the path valve keeps out of the scanned set. The
1326
+ `# graph:` manifest couples the gate to the doc set and `scripts/*.sh`, so a
1327
+ transport rename re-fires it over the docs. `precommit` tier.
1328
+
1183
1329
  ### check-prose-tells
1184
1330
 
1185
1331
  The mechanical subset of the AI-prose tells — the machine-detectable patterns
@@ -20,11 +20,12 @@ ROOT="${2:-.}"
20
20
 
21
21
  errors=""
22
22
 
23
- # (a) feature-section entries missing [spec:], any [needs-spec] in the
23
+ # (a) feature-section entries missing [spec:], any [design-pending] in the
24
24
  # active sections (entries, sub-bullets, or prose — a mention masks a
25
25
  # missing tag), and a [spec:]-tagged entry misfiled in an active
26
- # non-feature section; (b) deferred entries missing [needs-spec], and a
27
- # deferred entry already carrying [spec:] (promote it). One awk pass.
26
+ # non-feature section; (b) design-pending-section entries (deferred plus a
27
+ # configured icebox) missing [design-pending], and one already carrying
28
+ # [spec:] (promote it). One awk pass.
28
29
  qout="$(awk -v featre="$SPEC_FEATURE_RE" -v activere="$SPEC_ACTIVE_RE" \
29
30
  -v defre="$SPEC_DEFERRED_RE" -v sectre="$SPEC_SECTION_RE" '
30
31
  $0 ~ sectre {
@@ -36,19 +37,19 @@ qout="$(awk -v featre="$SPEC_FEATURE_RE" -v activere="$SPEC_ACTIVE_RE" \
36
37
  }
37
38
  (sec == "feature" || sec == "active") {
38
39
  if ($0 ~ /^- /) {
39
- if ($0 ~ /\[needs-spec\]/)
40
- printf "active-needs-spec\t%d\t%s\n", FNR, $0
40
+ if ($0 ~ /\[design-pending\]/)
41
+ printf "active-design-pending\t%d\t%s\n", FNR, $0
41
42
  else if (sec == "feature" && $0 !~ /\[spec:/)
42
43
  printf "missing-spec\t%d\t%s\n", FNR, $0
43
44
  else if (sec == "active" && $0 ~ /\[spec:/)
44
45
  printf "misfiled-ready\t%d\t%s\n", FNR, $0
45
- } else if ($0 ~ /\[needs-spec\]/) {
46
- printf "prose-needs-spec\t%d\t%s\n", FNR, $0
46
+ } else if ($0 ~ /\[design-pending\]/) {
47
+ printf "prose-design-pending\t%d\t%s\n", FNR, $0
47
48
  }
48
49
  next
49
50
  }
50
51
  sec == "deferred" && $0 ~ /^- / {
51
- if ($0 !~ /\[needs-spec\]/)
52
+ if ($0 !~ /\[design-pending\]/)
52
53
  printf "deferred-open\t%d\t%s\n", FNR, $0
53
54
  else if ($0 ~ /\[spec:/)
54
55
  printf "deferred-ready\t%d\t%s\n", FNR, $0
@@ -62,8 +63,8 @@ while IFS=$'\t' read -r class ln text; do
62
63
  [[ -n "$class" ]] || continue
63
64
  case "$class" in
64
65
  missing-spec) missing+=("$QUEUE:$ln: $text") ;;
65
- active-needs-spec) an+=("$QUEUE:$ln: $text") ;;
66
- prose-needs-spec) pn+=("$QUEUE:$ln: $text") ;;
66
+ active-design-pending) an+=("$QUEUE:$ln: $text") ;;
67
+ prose-design-pending) pn+=("$QUEUE:$ln: $text") ;;
67
68
  deferred-open) dopen+=("$QUEUE:$ln: $text") ;;
68
69
  deferred-ready) dready+=("$QUEUE:$ln: $text") ;;
69
70
  misfiled-ready) mready+=("$QUEUE:$ln: $text") ;;
@@ -71,10 +72,10 @@ while IFS=$'\t' read -r class ln text; do
71
72
  done <<< "$qout"
72
73
 
73
74
  (( ${#missing[@]} )) && errors+="feature-section entries without [spec:] (spec-writing is an authoring-stage activity — write the amendment, then promote):"$'\n'"$(printf ' %s\n' "${missing[@]}")"$'\n'
74
- (( ${#an[@]} )) && errors+="[needs-spec] tag in an active-queue entry (move it to $CANON_KIT_DEFERRED_SECTION):"$'\n'"$(printf ' %s\n' "${an[@]}")"$'\n'
75
- (( ${#pn[@]} )) && errors+="[needs-spec] tag in active-queue prose ($CANON_KIT_DEFERRED_SECTION-only tag; say \"needs design\" in prose):"$'\n'"$(printf ' %s\n' "${pn[@]}")"$'\n'
76
- (( ${#dopen[@]} )) && errors+="$CANON_KIT_DEFERRED_SECTION entries without [needs-spec] (all deferred work is design-pending):"$'\n'"$(printf ' %s\n' "${dopen[@]}")"$'\n'
77
- (( ${#dready[@]} )) && errors+="$CANON_KIT_DEFERRED_SECTION entries already carrying [spec:] (promote to a feature section):"$'\n'"$(printf ' %s\n' "${dready[@]}")"$'\n'
75
+ (( ${#an[@]} )) && errors+="[design-pending] tag in an active-queue entry (move it to $CANON_KIT_DEFERRED_SECTION):"$'\n'"$(printf ' %s\n' "${an[@]}")"$'\n'
76
+ (( ${#pn[@]} )) && errors+="[design-pending] tag in active-queue prose (a design-pending-section-only tag; say \"needs design\" in prose):"$'\n'"$(printf ' %s\n' "${pn[@]}")"$'\n'
77
+ (( ${#dopen[@]} )) && errors+="design-pending-section entries without [design-pending] (all deferred work is design-pending):"$'\n'"$(printf ' %s\n' "${dopen[@]}")"$'\n'
78
+ (( ${#dready[@]} )) && errors+="design-pending-section entries already carrying [spec:] (promote to a feature section):"$'\n'"$(printf ' %s\n' "${dready[@]}")"$'\n'
78
79
  (( ${#mready[@]} )) && errors+="[spec:]-tagged entries misfiled in an active non-feature section (a spec-ready entry belongs in a feature section):"$'\n'"$(printf ' %s\n' "${mready[@]}")"$'\n'
79
80
 
80
81
  # (c) bidirectional pairing on disk: every [spec:] ref resolves to a file, and
@@ -107,9 +108,9 @@ if [[ -n "$errors" ]]; then
107
108
  echo "check-amendment-queue: Task↔amendment bidirectional-rule violation(s):"
108
109
  echo ""
109
110
  printf '%s' "$errors"
110
- echo " help: pair every amendment with a [spec: …] queue entry and vice versa; tag every $CANON_KIT_DEFERRED_SECTION entry [needs-spec]; give every feature entry a [spec:] ref"
111
+ echo " help: pair every amendment with a [spec: …] queue entry and vice versa; tag every design-pending-section entry [design-pending]; give every feature entry a [spec:] ref"
111
112
  exit 1
112
113
  fi
113
114
 
114
- echo "AMENDMENT-QUEUE: clean (every amendment ↔ a queue entry; feature entries spec-ready; deferred entries design-pending)"
115
+ echo "AMENDMENT-QUEUE: clean (every amendment ↔ a queue entry; feature entries spec-ready; every design-pending-section entry tagged)"
115
116
  exit 0
@@ -0,0 +1,146 @@
1
+ #!/usr/bin/env bash
2
+ # graph: couples=*SPEC*.md,*README.md,CLAUDE.md,docs/*.md,scripts/*.sh dir=one valve=none tier=precommit
3
+ # spec: canon-kit/SPEC.md §check-install-claim — exactly one governed doc declares the primary install transport, and no scanned install section leads with a different one
4
+ #
5
+ # usage: check-install-claim.sh [scan-root] (default '.')
6
+ # Scans the manifest set (lib/spec.sh) minus CANON_KIT_MDREF_EXCLUDE and
7
+ # CANON_KIT_INSTALL_CLAIM_EXCLUDE. Unconfigured transports or section regex: no-op.
8
+ set -uo pipefail
9
+
10
+ KIT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
11
+ SDK="${GATE_SDK_ROOT:-$KIT/../gate-sdk}"
12
+ # shellcheck source=../../gate-sdk/lib/gate.sh
13
+ source "$SDK/lib/gate.sh"
14
+ # shellcheck source=../lib/spec.sh
15
+ source "$KIT/lib/spec.sh"
16
+
17
+ ROOT="${1:-.}"
18
+ [[ -d "$ROOT" ]] || { echo "check-install-claim: not a directory: $ROOT" >&2; exit 2; }
19
+
20
+ # spec: canon-kit/SPEC.md §check-install-claim — the transport vocabulary and the install-section regex are consumer config with no kit default, so either left empty is the clean skip for a consumer that documents no install path
21
+ if [[ -z "$CANON_KIT_INSTALL_TRANSPORTS_CMD" || -z "$CANON_KIT_INSTALL_SECTION_RE" ]]; then
22
+ echo "INSTALL-CLAIM: clean (no transport vocabulary or install-section regex configured — nothing to hold)"
23
+ exit 0
24
+ fi
25
+
26
+ transports="$(spec_install_transports)"; st=$?
27
+ fail_closed "$st" check-install-claim "CANON_KIT_INSTALL_TRANSPORTS_CMD"
28
+ [[ -n "$transports" ]] || { echo "INSTALL-CLAIM: clean (CANON_KIT_INSTALL_TRANSPORTS_CMD declared no transports)"; exit 0; }
29
+
30
+ excluded() {
31
+ local rel="$1" g
32
+ for g in "${CANON_KIT_MDREF_EXCLUDE[@]+"${CANON_KIT_MDREF_EXCLUDE[@]}"}" \
33
+ "${CANON_KIT_INSTALL_CLAIM_EXCLUDE[@]+"${CANON_KIT_INSTALL_CLAIM_EXCLUDE[@]}"}"; do
34
+ # shellcheck disable=SC2053 # $g is the exclude glob, matched unquoted on purpose
35
+ [[ "$rel" == $g ]] && return 0
36
+ done
37
+ return 1
38
+ }
39
+
40
+ files=()
41
+ while IFS= read -r f; do
42
+ rel="${f#./}"; rel="${rel#"$ROOT"/}"
43
+ excluded "$rel" || files+=("$f")
44
+ done < <(spec_manifest_files "$ROOT" | sort -u)
45
+ [[ ${#files[@]} -eq 0 ]] && { echo "INSTALL-CLAIM: clean (0 governed doc(s) found)"; exit 0; }
46
+
47
+ DECL_RE='^[[:space:]]*<!--[[:space:]]*install-primary:[[:space:]]*([a-z0-9][a-z0-9-]*)[[:space:]]*-->[[:space:]]*$'
48
+
49
+ decls="$(grep -nE "$DECL_RE" -- "${files[@]}" /dev/null)"; st=$?
50
+ [[ $st -le 1 ]] || { echo "check-install-claim: grep failed scanning the governed doc set" >&2; exit 2; }
51
+
52
+ ndecl=0
53
+ [[ -n "$decls" ]] && ndecl="$(printf '%s\n' "$decls" | wc -l)"
54
+
55
+ if [[ "$ndecl" -eq 0 ]]; then
56
+ echo "check-install-claim: no governed doc declares the primary install transport:"
57
+ echo " 0 'install-primary:' declarations across ${#files[@]} governed doc(s)"
58
+ echo " help: an unowned primary-path claim is how two pages drift into naming different"
59
+ echo " transports with nothing to catch it. Put one full-line"
60
+ echo " '<!-- install-primary: <transport-id> -->' in the section that owns the claim,"
61
+ echo " naming a transport CANON_KIT_INSTALL_TRANSPORTS_CMD emits."
62
+ exit 1
63
+ fi
64
+ if [[ "$ndecl" -gt 1 ]]; then
65
+ echo "check-install-claim: the primary-install-path claim has $ndecl owners; exactly one is required:"
66
+ printf '%s\n' "$decls" | sed 's/^/ /'
67
+ echo " help: keep the declaration on the page that owns the claim and delete the others;"
68
+ echo " two owners is the same unowned-claim defect wearing a different shape."
69
+ exit 1
70
+ fi
71
+
72
+ decl_site="${decls%%:*}"
73
+ decl_line="$(printf '%s\n' "$decls" | cut -d: -f2)"
74
+ primary="$(printf '%s\n' "$decls" | sed -E "s/.*install-primary:[[:space:]]*([a-z0-9][a-z0-9-]*).*/\1/")"
75
+
76
+ # spec: canon-kit/SPEC.md §check-install-claim — an id outside the configured vocabulary is fail-closed, not a violation: the gate then has no primary to compare a section's leading transport against, so it must not run rather than pass
77
+ if ! printf '%s\n' "$transports" | cut -f1 | grep -qxF -- "$primary"; then
78
+ echo "check-install-claim: declared primary '$primary' ($decl_site:$decl_line) is not a configured transport:" >&2
79
+ printf '%s\n' "$transports" | cut -f1 | sed 's/^/ /' >&2
80
+ exit 2
81
+ fi
82
+
83
+ export SK_TRANSPORTS="$transports"
84
+ export SK_SECTION_RE="$CANON_KIT_INSTALL_SECTION_RE"
85
+ export SK_PRIMARY="$primary"
86
+ export SK_DECL_RE="$DECL_RE"
87
+
88
+ # spec: canon-kit/SPEC.md §check-install-claim — assertion B: the earliest transport-matching line in a scanned section is that section's leading claim and later matches are never flagged; fenced content is scanned (a recipe is where a transport shows) but never read as a heading, and the declaration line is not evidence for itself
89
+ read -r -d '' AWKSRC <<'AWK' || true
90
+ BEGIN {
91
+ n = split(ENVIRON["SK_TRANSPORTS"], tl, "\n")
92
+ for (i = 1; i <= n; i++) {
93
+ if (tl[i] == "") continue
94
+ tp = index(tl[i], "\t")
95
+ nt++
96
+ tid[nt] = substr(tl[i], 1, tp - 1)
97
+ tre[nt] = substr(tl[i], tp + 1)
98
+ }
99
+ sectre = ENVIRON["SK_SECTION_RE"]
100
+ primary = ENVIRON["SK_PRIMARY"]
101
+ declre = ENVIRON["SK_DECL_RE"]
102
+ }
103
+ FNR == 1 { fence = 0; inscope = 0; settled = 0 }
104
+ {
105
+ if ($0 ~ /^[[:space:]]*(```|~~~)/) { fence = !fence; next }
106
+ if (!fence && match($0, /^#{2,6}[[:space:]]+/)) {
107
+ head = substr($0, RSTART + RLENGTH)
108
+ sub(/[[:space:]]+$/, "", head)
109
+ inscope = (head ~ sectre)
110
+ settled = 0
111
+ if (inscope) { scanned++; sect = head; sectfnr = FNR }
112
+ next
113
+ }
114
+ if (!inscope || settled || $0 ~ declre) next
115
+ led = ""
116
+ for (i = 1; i <= nt; i++) {
117
+ if ($0 !~ tre[i]) continue
118
+ if (tid[i] == primary) { led = primary; break }
119
+ if (led == "") led = tid[i]
120
+ }
121
+ if (led == "") next
122
+ settled = 1
123
+ if (led != primary)
124
+ printf " %s:%d: section '%s' (line %d) leads with '%s', not the declared primary '%s'\n", \
125
+ FILENAME, FNR, sect, sectfnr, led, primary
126
+ }
127
+ END { printf "%d sections scanned\n", scanned }
128
+ AWK
129
+
130
+ out="$(awk "$AWKSRC" "${files[@]}")"; st=$?
131
+ fail_closed "$st" check-install-claim awk
132
+
133
+ findings="$(printf '%s\n' "$out" | grep '^ ' || true)"
134
+ scanned="$(printf '%s\n' "$out" | tail -n1)"
135
+
136
+ if [[ -n "$findings" ]]; then
137
+ echo "check-install-claim: an install section leads with a transport the primary-path claim does not name:"
138
+ printf '%s\n' "$findings"
139
+ echo " help: the first transport a section names is the path it recommends. Lead with the"
140
+ echo " declared primary and name the others after it, or move the declaration"
141
+ echo " ($decl_site:$decl_line) to the transport the project actually leads with."
142
+ exit 1
143
+ fi
144
+
145
+ echo "INSTALL-CLAIM: clean (${#files[@]} governed doc(s), $scanned; '$primary' declared primary at $decl_site:$decl_line, and no scanned section leads with another transport)"
146
+ exit 0
@@ -10,6 +10,6 @@
10
10
 
11
11
  ## Deferred
12
12
 
13
- - **later-thing** [needs-spec] — a design-pending idea; needs a ruling first.
13
+ - **later-thing** [design-pending] — a design-pending idea; needs a ruling first.
14
14
 
15
15
  ## Done
@@ -12,7 +12,7 @@
12
12
 
13
13
  ## Deferred
14
14
 
15
- - **later-teardown** [needs-spec] — a deferred teardown.
15
+ - **later-teardown** [design-pending] — a deferred teardown.
16
16
 
17
17
  ## Done
18
18
 
@@ -0,0 +1,12 @@
1
+ # widget
2
+
3
+ ## Quick start
4
+
5
+ `npx widget init` vendors a profile into a clean repository and commits it. The
6
+ release tarball is the same vendoring without Node, for a consumer who would
7
+ rather not add it.
8
+
9
+ ## Vendoring by hand
10
+
11
+ Copy the directory into your repository. This section names no transport at all,
12
+ so the gate stays silent over it.
@@ -0,0 +1 @@
1
+ leads with 'npm', not the declared primary 'tarball'
@@ -0,0 +1,24 @@
1
+ # Install widget
2
+
3
+ The npm package is an installer rather than a dependency channel, and `npx
4
+ widget init` is what it runs. This preamble sits under the H1 alone, so no
5
+ section scope reaches it.
6
+
7
+ ## Install
8
+
9
+ <!-- install-primary: tarball -->
10
+
11
+ Download the asset and its checksum, verify, extract, run:
12
+
13
+ ```bash
14
+ curl -fsSL -o widget.tgz \
15
+ https://example.invalid/widget/releases/download/vX.Y.Z/widget.tgz
16
+ ```
17
+
18
+ If Node is already on your machine the same install is `npx widget init`. Same
19
+ payload, same result; only the fetch differs.
20
+
21
+ ## Requirements
22
+
23
+ A section the configured regex does not select. `npx widget init` here is out of
24
+ scope entirely.
@@ -0,0 +1,7 @@
1
+ # widget vX.Y.Z
2
+
3
+ ## Install
4
+
5
+ `npx widget init` is what this release announced, and a published note is an
6
+ immutable record of what was true when it shipped. The path valve keeps it out
7
+ of the scanned set rather than forcing an edit to history.
@@ -0,0 +1,10 @@
1
+ # shellcheck shell=bash
2
+ # spec: canon-kit/SPEC.md §check-install-claim — fixture consumer config: two transports, an anchored install-section regex, 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_INSTALL_TRANSPORTS_CMD="bash scripts/install-transports.sh"
7
+ # shellcheck disable=SC2034 # consumed by canon-kit/lib/spec.sh after sourcing
8
+ CANON_KIT_INSTALL_SECTION_RE='^(Quick start|Install)'
9
+ # shellcheck disable=SC2034 # consumed by canon-kit/lib/spec.sh after sourcing
10
+ CANON_KIT_INSTALL_CLAIM_EXCLUDE=("posts/*")
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env bash
2
+ # spec: canon-kit/SPEC.md §check-install-claim — fixture transport vocabulary: recipe form and prose form per transport, neither pattern reaching into the other's sentences
3
+ set -uo pipefail
4
+
5
+ printf '%s\t%s\n' \
6
+ tarball 'releases/download/|[Rr]elease tarball' \
7
+ npm 'npx( -y)? widget|npm (install|i)( -g)? widget'
@@ -0,0 +1,12 @@
1
+ # widget
2
+
3
+ ## Quick start
4
+
5
+ The primary path is the release tarball — download it and its checksum, verify,
6
+ extract, run `init`. `npx widget init` is the same vendoring over npm, for a
7
+ consumer who already has Node.
8
+
9
+ ## Vendoring by hand
10
+
11
+ Copy the directory into your repository. This section names no transport at all,
12
+ so the gate stays silent over it.
@@ -0,0 +1 @@
1
+ INSTALL-CLAIM: clean