checkwright 0.55.0 → 0.56.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 (36) hide show
  1. package/package.json +2 -2
  2. package/payload/artifact/aarch64-apple-darwin/checkwright-gates +0 -0
  3. package/payload/artifact/aarch64-apple-darwin/checkwright-gates.sha256 +1 -1
  4. package/payload/artifact/aarch64-pc-windows-msvc/checkwright-gates.exe +0 -0
  5. package/payload/artifact/aarch64-pc-windows-msvc/checkwright-gates.exe.sha256 +1 -1
  6. package/payload/artifact/aarch64-unknown-linux-gnu/checkwright-gates +0 -0
  7. package/payload/artifact/aarch64-unknown-linux-gnu/checkwright-gates.sha256 +1 -1
  8. package/payload/artifact/aarch64-unknown-linux-musl/checkwright-gates +0 -0
  9. package/payload/artifact/aarch64-unknown-linux-musl/checkwright-gates.sha256 +1 -1
  10. package/payload/artifact/x86_64-apple-darwin/checkwright-gates +0 -0
  11. package/payload/artifact/x86_64-apple-darwin/checkwright-gates.sha256 +1 -1
  12. package/payload/artifact/x86_64-pc-windows-msvc/checkwright-gates.exe +0 -0
  13. package/payload/artifact/x86_64-pc-windows-msvc/checkwright-gates.exe.sha256 +1 -1
  14. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates +0 -0
  15. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates.sha256 +1 -1
  16. package/payload/artifact/x86_64-unknown-linux-musl/checkwright-gates +0 -0
  17. package/payload/artifact/x86_64-unknown-linux-musl/checkwright-gates.sha256 +1 -1
  18. package/payload/canon-kit/README.md +1 -0
  19. package/payload/canon-kit/checks/check-procedure-declaration.gate +4 -0
  20. package/payload/canon-kit/gate-tests/check-procedure-declaration/bad/bin/tool.sh +2 -0
  21. package/payload/canon-kit/gate-tests/check-procedure-declaration/bad/expect.txt +14 -0
  22. package/payload/canon-kit/gate-tests/check-procedure-declaration/bad/scripts/canon-config.knobs +4 -0
  23. package/payload/canon-kit/gate-tests/check-procedure-declaration/bad/scripts/verbs.txt +1 -0
  24. package/payload/canon-kit/gate-tests/check-procedure-declaration/bad/site/page.md +44 -0
  25. package/payload/canon-kit/gate-tests/check-procedure-declaration/good/bin/tool.sh +2 -0
  26. package/payload/canon-kit/gate-tests/check-procedure-declaration/good/expect.txt +1 -0
  27. package/payload/canon-kit/gate-tests/check-procedure-declaration/good/scripts/canon-config.knobs +4 -0
  28. package/payload/canon-kit/gate-tests/check-procedure-declaration/good/scripts/verbs.txt +2 -0
  29. package/payload/canon-kit/gate-tests/check-procedure-declaration/good/site/page.md +46 -0
  30. package/payload/doctrine-kit/DOCTRINE.md +6 -6
  31. package/payload/evidence-kit/README.md +1 -1
  32. package/payload/guard-kit/close-surfaces.txt +1 -0
  33. package/payload/guard-kit/gate-tests/guard-config-knobs.test.sh +62 -2
  34. package/payload/guard-kit/guard-tests/cases.tsv +4 -0
  35. package/payload/guard-kit/templates/guard-config.knobs +6 -0
  36. package/payload/lifecycle-kit/templates/lead.md +7 -5
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "checkwright-pwsh": "bin/checkwright.ps1"
5
5
  },
6
6
  "checkwright": {
7
- "commit": "a55f0ac6ee3acdebb57ef98a44664999e28c59a3",
7
+ "commit": "04c393352f2c0f7c302253613531cf07048e2d6c",
8
8
  "spec_base_url": "https://checkwright.dev"
9
9
  },
10
10
  "description": "Reproducible checks that catch unsupported claims in coding-agent delivery before merge: a task marked done with no recorded test run, a skipped lifecycle stage, a spec naming a file the tree lacks. They prove the evidence a claim rests on exists, not that the code is correct.",
@@ -30,5 +30,5 @@
30
30
  "type": "git",
31
31
  "url": "git+https://github.com/checkwright/checkwright.git"
32
32
  },
33
- "version": "0.55.0"
33
+ "version": "0.56.0"
34
34
  }
@@ -1 +1 @@
1
- c8229f5ef4f6db2ef70cd868b75591585fc1afd99d552a40cd3583aeda1ce54e checkwright-gates
1
+ a77daaead4f703ee5c89ced0880530a313989d912a03f998ab682e7a392cb86a checkwright-gates
@@ -1 +1 @@
1
- 9aeafad2082ed47f2734297494d4160c00be43213504fc405541ae1c20ba8b98 *checkwright-gates.exe
1
+ 83038d8da141092237b5909d69b566b319e7117b24642f1082db1e28195a909c *checkwright-gates.exe
@@ -1 +1 @@
1
- dcc251691b378a8f65a1cac2329825e7b0557bd8b31348d7450be72946c115f5 checkwright-gates
1
+ 07af0d978656e6f3d184a1f95555d75632b78d46cb099faefa00d0182f30e65c checkwright-gates
@@ -1 +1 @@
1
- 43194fa4544593f822e560f6b3c72406e13c92d650833e2d4ada01df59cfb8b1 checkwright-gates
1
+ c300a0928f9b18d9a81d314ee65e8051b4ab932b65ea07774c7ff119755b136a checkwright-gates
@@ -1 +1 @@
1
- 64558b0a3062175c5815468401c97c801ea0a54df3bc54344b38d7337e3460ff checkwright-gates
1
+ b9b9f3c39bcfd442361e2201e695a6f7dd6f41cfd395bcd7fcd7e905345b8a9e checkwright-gates
@@ -1 +1 @@
1
- b54ace62ab8beab29f622b237bd23ca81bd78340394a087b826f868a4af84fb1 *checkwright-gates.exe
1
+ 085017da17d3f654bfc5336a190065f0c3943d9ad9656ad2602b0bc8b202ec82 *checkwright-gates.exe
@@ -1 +1 @@
1
- 6de4cdce0cc69f26be382183faec80d88aea878ec886147e4c82a32189869cf1 checkwright-gates
1
+ 601e0401832e828d5b0298d4921084a92b2b9dea469e127f7b608ecb547fc9de checkwright-gates
@@ -1 +1 @@
1
- ffa588c301cffda10d5a323f56cee85085d58fe24cf04419d8c09cd36f9be9cd checkwright-gates
1
+ 8d86b27b747d7edaf5619ed86e1e6e2890650cf2c8266977f62f01b66ae69b48 checkwright-gates
@@ -34,6 +34,7 @@ Vendor the kit beside [gate-sdk](../gate-sdk/) (required); the queue-facing gate
34
34
  check-fence-command-head # every shell-fence command starts with a word that can run
35
35
  check-fence-run # every shell fence marked runnable runs and exits as declared
36
36
  check-fence-paste-unit # needs declared pages (every code block is one paste)
37
+ check-procedure-declaration # needs declared files (a procedure section declares its command or its short steps)
37
38
  check-knob-citation # knob values stated only in the owning SPEC
38
39
  check-knob-default-coupling # source knob defaults agree with the owning SPEC
39
40
  check-manifest-count # no bare cardinal over a governed collection, no lead-in count off its list
@@ -0,0 +1,4 @@
1
+ # graph: couples=knob:CANON_KIT_PROCEDURE_GLOBS,knob:CANON_KIT_COMMAND_LIVENESS_VERBS_FILE,knob:GATE_SDK_GATES_DIR/*.sh,kit:*.sh dir=one valve=none tier=precommit
2
+ # install: zero-config
3
+ # armed-by: CANON_KIT_PROCEDURE_GLOBS
4
+ # spec: canon-kit/SPEC.md §check-procedure-declaration — on a page CANON_KIT_PROCEDURE_GLOBS names, a procedure section opens with its declaration, a steps procedure stays within its bound, a selected heading's step list is declared, and a declared command still resolves where the tree decides it
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env bash
2
+ echo tool
@@ -0,0 +1,14 @@
1
+ site/page.md:3: 'Release': arm A: a steps procedure of 3 steps, past the bound of 2
2
+ site/page.md:10: 'Empty': arm A: a steps procedure with no step
3
+ site/page.md:15: 'Release undeclared': arm B: 2 step(s) under a selected heading, with no declaration
4
+ site/page.md:20: 'Later': arm C: a `Procedure:` line at line 24, past the section's first line
5
+ site/page.md:26: 'Blank': arm C: a command declaration with no command
6
+ site/page.md:29: 'Missing': arm D: path: `bin/missing.sh --all`: `bin/missing.sh` names no file the index tracks
7
+ site/page.md:32: 'Missing through bash': arm D: path: `bash -e bin/missing.sh`: `bin/missing.sh` names no file the index tracks
8
+ site/page.md:35: 'Dropped verb': arm D: arm: `bin/tool.sh gone`: `bin/tool.sh` has no verb `gone` (its verbs: run)
9
+ site/page.md:38: 'Multibyte path': arm D: path: `bin/café`: `bin/café` names no file the index tracks
10
+ site/page.md:41: 'Multibyte unclosed': arm C: a `Procedure:` line at line 44, past the section's first line
11
+ help: name the command that runs the steps: `Procedure: <command>`
12
+ help: open the section with `Procedure: <command>`, or `Procedure: steps` for a short list
13
+ help: move the declaration to the section's first line, with its command
14
+ help: correct the declared command to one the tree carries, or restore what it names
@@ -0,0 +1,4 @@
1
+ # spec: canon-kit/SPEC.md §check-procedure-declaration — fixture consumer config: every page under site/ is read, a Release heading is a procedure, and the verb list roots the tracked tool
2
+ CANON_KIT_PROCEDURE_GLOBS[] = site/*.md
3
+ CANON_KIT_PROCEDURE_HEADINGS[] = ^Release
4
+ CANON_KIT_COMMAND_LIVENESS_VERBS_FILE = scripts/verbs.txt
@@ -0,0 +1,44 @@
1
+ # Page
2
+
3
+ ## Release
4
+ Procedure: steps
5
+
6
+ 1. build
7
+ 2. tag
8
+ 3. publish
9
+
10
+ ## Empty
11
+ Procedure: steps
12
+
13
+ Nothing listed.
14
+
15
+ ## Release undeclared
16
+
17
+ 1. build
18
+ 2. tag
19
+
20
+ ## Later
21
+
22
+ Some text first.
23
+
24
+ Procedure: bin/tool.sh run
25
+
26
+ ## Blank
27
+ Procedure:
28
+
29
+ ## Missing
30
+ Procedure: bin/missing.sh --all
31
+
32
+ ## Missing through bash
33
+ Procedure: bash -e bin/missing.sh
34
+
35
+ ## Dropped verb
36
+ Procedure: `bin/tool.sh gone`
37
+
38
+ ## Multibyte path
39
+ Procedure: `bin/café`
40
+
41
+ ## Multibyte unclosed
42
+ Procedure: `bin/tool.sh café
43
+
44
+ Procedure: bin/tool.sh run
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env bash
2
+ echo tool
@@ -0,0 +1 @@
1
+ PROCEDURE-DECLARATION: clean (1 file(s); 4 command procedure(s), 1 steps procedure(s); 2 judged by the path check, 2 by the arm check (list scripts/verbs.txt))
@@ -0,0 +1,4 @@
1
+ # spec: canon-kit/SPEC.md §check-procedure-declaration — fixture consumer config: every page under site/ is read, a Release heading is a procedure, and the verb list roots the tracked tool
2
+ CANON_KIT_PROCEDURE_GLOBS[] = site/*.md
3
+ CANON_KIT_PROCEDURE_HEADINGS[] = ^Release
4
+ CANON_KIT_COMMAND_LIVENESS_VERBS_FILE = scripts/verbs.txt
@@ -0,0 +1,2 @@
1
+ bin/tool.sh run
2
+ bin/tool.sh check
@@ -0,0 +1,46 @@
1
+ # Page
2
+
3
+ Preamble text with a list no section owns:
4
+
5
+ 1. one
6
+ 2. two
7
+ 3. three
8
+
9
+ ## Release
10
+
11
+ Procedure: `bin/tool.sh run`
12
+
13
+ What the command does, in order:
14
+
15
+ 1. builds
16
+ 2. tags
17
+ 3. publishes
18
+
19
+ ## Release check
20
+ Procedure: bash bin/tool.sh check
21
+
22
+ ## Release tools
23
+ Procedure: TOOL_MODE=dist make dist
24
+
25
+ ## Release host
26
+ Procedure: /opt/release/run.sh --all
27
+
28
+ ## Release fenced
29
+
30
+ ```text
31
+ 1. a fenced list
32
+ 2. is no step list
33
+ 3. under a selected heading
34
+ ```
35
+
36
+ ## Build
37
+ Procedure: steps
38
+
39
+ 1. configure
40
+ 2. build
41
+
42
+ ## Notes
43
+
44
+ 1. an undeclared list
45
+ 2. under a heading
46
+ 3. the set does not select
@@ -74,15 +74,15 @@ Where a rule below is *Enforced by* judgment, what it asks is not machine-decida
74
74
 
75
75
  11. **Scope-gated intake.** Delivery work enters only through the scope gate. A new initiative raised mid-session — an operator or lead feature request, a design idea, a "while we're here" — is *filed* as a costed Deferred entry by default, never *started*: it becomes active work only by passing through scope as an iteration's chosen unit. The default is file, not act, because starting unscoped work skips the survey, the economic composition test, and the feature/debt triage scope exists to run. This is Gap disposition's intake-side sibling, guarding the *opposite* failure: that rule catches a gap flagged and skipped (under-action on something found), this one catches a want acted on before it is scoped (over-action on something raised). The rule licenses no self-exemption — editing a governance surface is itself delivery work, so codifying or amending this doctrine is done as a scoped unit, not the very out-of-band edit it forbids.
76
76
 
77
- **The one valve is the operator's hotfix ruling, and it is a ruling rather than a judgment call.**
77
+ **The one valve is the hotfix ruler's ruling, and it is a ruling rather than a judgment call.**
78
78
 
79
- An *impacting failure* (a defect that is paying a measured, recurring cost on the lifecycle's own default path right now, such that routing it through a whole iteration costs more than the fix) may be landed in-session when the operator rules it a hotfix. The valve is bounded three ways:
79
+ An *impacting failure* (a defect that is paying a measured, recurring cost on the lifecycle's own default path right now, such that routing it through a whole iteration costs more than the fix) may be landed in-session when the hotfix ruler rules it a hotfix. The valve is bounded three ways:
80
80
 
81
- - The operator rules, never the session.
81
+ - The ruler rules, never the session that found the failure or lands its fix. Who rules is the consumer's choice from a set: `operator`, the default, or `lead`, the iteration lead that dispatches the fix. The consumer binds it where its lead binds its dispatch policy ([lifecycle-kit/templates/lead.md](../lifecycle-kit/templates/lead.md), the `ruling-config` slot).
82
82
  - The fix is minimal and ships with its test and its owner-doc correction in the same commit, so the hotfix is not a second content tier waiting for the iteration to catch up. *Minimal* is measured against the failure modes the change itself creates, never against the smallest diff. So a fix reaching one site further to avoid introducing a failure mode its own diff would create is inside the valve rather than outside it.
83
- - The queue entry is **deleted in that commit, never moved to the done section** — the ruling and the entry's slug go in the commit message, which is the disposition.
83
+ - The queue entry **leaves through the queue's done exit in that commit** ([queue-kit/SPEC.md](../queue-kit/SPEC.md) §The queue verbs) — the ruling and the entry's slug go in the commit message, which is the disposition.
84
84
 
85
- The done section is the closing iteration's ledger, and a hotfix belongs to no iteration: a row left there is claimed by the next close as its own delivery and can red the next boundary entry. A session that sees an impacting failure *proposes* the hotfix with its cost against the iteration's, and files it if the operator does not rule — the default is still file.
85
+ A hotfix belongs to no iteration, but its entry still leaves the live pool, and the done exit is the one departure the queue's conservation gate accepts: a deleted section reds the commit as a lost task ([queue-kit/SPEC.md](../queue-kit/SPEC.md) §check-task-conservation). A session that sees an impacting failure *proposes* the hotfix with its cost against the iteration's, and files it if the ruler does not rule — the default is still file.
86
86
 
87
87
  **The closing stage's drain is outside this rule, because it takes only debt and debt is no initiative.** It is not a valve: it admits no initiative. A gap filed mid-iteration goes to the gap inbox, whether it is a defect a session found or an operator's request for a change that converges on names the governed surfaces already carry. The closing stage's drain fixes it inline, in the session that drains it. A bullet needing a new name, a design ruling, or more than that session holds is promoted to a costed Deferred entry instead, which is this rule's default. The test that routes an operator's request among scope, the drain and the hotfix is the iteration lead's ([lifecycle-kit/templates/lead.md](../lifecycle-kit/templates/lead.md) §Mid-iteration intake).
88
88
 
@@ -90,7 +90,7 @@ Where a rule below is *Enforced by* judgment, what it asks is not machine-decida
90
90
 
91
91
  *Enforced by:* judgment: no scanner tells a raised want that should have been filed from one rightly started. The intake it names is scope's — the survey that bounds an iteration's units ([lifecycle-kit/SPEC.md](../lifecycle-kit/SPEC.md) §The state machine) — and the filed form rides the queue's Deferred section.
92
92
 
93
- *Digest:* a mid-session initiative is filed as a costed Deferred entry by default, never started; work enters only through scope or an operator-ruled hotfix of an impacting failure, minimal and test-and-doc-complete in one commit; a debt-shaped gap is no initiative, fixed at close's drain.
93
+ *Digest:* a mid-session initiative is filed as a costed Deferred entry by default, never started; work enters only through scope or the bound ruler's hotfix of an impacting failure, minimal and test-and-doc-complete in one commit; a debt-shaped gap is no initiative, fixed at close's drain.
94
94
 
95
95
  12. **Probe-before-assertion.** A claim about the tree, the harness, or a tool's behavior that one cheap command would settle is probed before it is asserted, and what the probe returned travels with the claim. The bar is *availability, not confidence*: a claim is unprobed if a command that would have settled it was there to run and was not, however well-reasoned the assertion. **Labelling a claim inferred does not discharge the probe.** The label is for evidence out of reach: a transcript, log or artifact on disk that holds the answer is read before any hypothesis is stated or relayed.
96
96
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  A held-constant test baseline and a committed per-run evidence manifest for the validate stage: a stage stamp proves a stage was *invoked*, evidence-kit proves it produced its green result. The manifest is a versioned, hashable record (`# contract: evidence-manifest v2`), and a run can publish it as an in-toto Statement an attestation verifier reads, written to a file or handed to `EVIDENCE_KIT_STATEMENT_WRITE_CMD` to store outside the tree (a git-notes pair is documented in [SPEC.md §bin/run-validate.sh](https://checkwright.dev/evidence-kit/SPEC#binrun-validatesh)), so the kit is adoptable with or without an iteration lifecycle.
4
4
 
5
- The gates: `check-evidence-baseline` (baseline grammar, blocking-slug liveness, scenario coverage, flip causation), `check-evidence-manifest` (manifest grammar and, where lifecycle drives the tree, close-entry green block + validate-stamp coupling), `check-battery-roster` (the runner doc's battery block against the suite roster), `check-test-control` (every newly baselined test names a declared control, and every control was witnessed red before close) and `check-producer-liveness` (no stage entry while the producer is still running). The tools that drive it are non-gate arms of the gate binary, reached through gate-sdk's front end: `--run-validate` (the codified spine that runs the suites, re-runs each under its declared test controls, and records evidence), `--diff-baseline` (the situational runtime diff), `--verify-gate-run` and `--import-gate-run` (judge a gate-run Statement against the tree, the first in a versioned JSON document under `--json`, with `EVIDENCE_KIT_VERIFY_REQUIRE` selecting a merge predicate's run-of-`HEAD` and every-suite-clean requirements, and record a verified one produced elsewhere) `--emit baseline-claims` (each baseline row as a `measured:` oracle line, for prose that quotes one) and `--emit test-scope-plan` (a branch's tests ordered, the changed and dependent packages before the full suite, from a fed `cargo metadata` document). See [SPEC.md](https://checkwright.dev/evidence-kit/SPEC) for the full contracts.
5
+ The gates: `check-evidence-baseline` (baseline grammar, blocking-slug liveness, scenario coverage, flip causation), `check-evidence-manifest` (manifest grammar and, where lifecycle drives the tree, close-entry green block + validate-stamp coupling), `check-battery-roster` (the runner doc's battery block against the suite roster), `check-test-control` (every newly baselined test names a declared control, and every control was witnessed red before close) and `check-producer-liveness` (no stage entry while the producer is still running). The tools that drive it are non-gate arms of the gate binary, reached through gate-sdk's front end: `--run-validate` (the codified spine that runs the suites, re-runs each under its declared test controls, and records evidence), `--diff-baseline` (the situational runtime diff), `--verify-gate-run` and `--import-gate-run` (judge a gate-run Statement against the tree, the first in a versioned JSON document under `--json`, with `EVIDENCE_KIT_VERIFY_REQUIRE` selecting a merge predicate's run-of-`HEAD` and every-suite-clean requirements, and record a verified one produced elsewhere), `--emit baseline-claims` (each baseline row as a `measured:` oracle line, for prose that quotes one), `--emit test-scope-plan` (a branch's tests ordered, the changed and dependent packages before the full suite, from a fed `cargo metadata` document), and `--emit test-shard-plan` and `--merge-test-shards` (a caller-built test list split into N shards by a hash of each test's name, and the shards' results merged into one verdict that every listed test ran once). See [SPEC.md](https://checkwright.dev/evidence-kit/SPEC) for the full contracts.
6
6
 
7
7
  This file ships in the installer payload; what that payload withholds, and where this page's `SPEC.md` links then resolve, is [gate-sdk/SPEC.md §Consumer payload](https://checkwright.dev/gate-sdk/SPEC#consumer-payload).
8
8
 
@@ -1,3 +1,4 @@
1
1
  # Generated at pack time from this kit's spec; lifecycle-kit/SPEC.md §The close-surface roster.
2
+ close-surface: .workflow/prior-art-hits.log advisory reclaim=bash gate-sdk/bin/run-gates.sh --emit capture-drain .workflow/prior-art-hits.log
2
3
  close-surface: .workflow/wakeup-attempts.log advisory reclaim=bash gate-sdk/bin/run-gates.sh --emit capture-drain .workflow/wakeup-attempts.log
3
4
  close-surface: .workflow/prompt-friction.log advisory reclaim=bash gate-sdk/bin/run-gates.sh --emit capture-drain .workflow/prompt-friction.log
@@ -31,7 +31,7 @@ payload() {
31
31
  # One member call under a knob file, from a scratch checkout: stdout to $tmp/out, stderr to
32
32
  # $tmp/err, the exit status echoed — 2 = blocked, 0 = anything else.
33
33
  member() { # $1=config file $2=command
34
- (cd "${CWD:-$tmp/cwd}" && payload "$2" | GUARD_KIT_KNOB_FILE="$1" GUARD_KIT_LOG="$tmp/friction.log" "$BIN" --hook shell-guard >"$tmp/out" 2>"$tmp/err")
34
+ (cd "${CWD:-$tmp/cwd}" && payload "$2" | GUARD_KIT_KNOB_FILE="$1" GUARD_KIT_LOG="$tmp/friction.log" GUARD_KIT_PRIOR_ART_LOG="$tmp/hits.log" "$BIN" --hook shell-guard >"$tmp/out" 2>"$tmp/err")
35
35
  echo $?
36
36
  }
37
37
 
@@ -160,6 +160,66 @@ want "malformed-knob-file" "$tmp/malformed.knobs" "cat README.md" 2 "malformed.k
160
160
  checks=$((checks + 1))
161
161
  grep -qF "Read tool" "$tmp/err" && { echo " FAIL [no-rule-on-refusal]: a rule ran under a refused config: $(cat "$tmp/err")"; fails=$((fails + 1)); }
162
162
 
163
+ # --- the prior-art advisory: a word under a root and another word holding a mapped verb carry the
164
+ # note of the section owning the verb's procedure on whatever verdict decides, and never change it
165
+ mkdir -p "$tmp/home/old"
166
+ printf '## Cmd\n\nProcedure: bash run.sh\n\n## Steps\n\nProcedure: steps\n\n1. one\n\n## Plain\n\nText.\n' >"$tmp/cwd/P.md"
167
+ printf '\n## Multi\n\nProcedure: `make café`\n\n## Open\n\nProcedure: `make café\n' >>"$tmp/cwd/P.md"
168
+ {
169
+ printf 'GUARD_KIT_PRIOR_ART_ROOTS[] = rel-runs\nGUARD_KIT_PRIOR_ART_ROOTS[] = ~/old\nGUARD_KIT_PRIOR_ART_ROOTS[] = %s/runs\n' "$tmp"
170
+ printf 'GUARD_KIT_PRIOR_ART_MAP[release] = P.md§Cmd\nGUARD_KIT_PRIOR_ART_MAP[ship] = P.md§Steps\n'
171
+ printf 'GUARD_KIT_PRIOR_ART_MAP[deploy] = P.md§Plain\nGUARD_KIT_PRIOR_ART_MAP[gone] = P.md§Missing\n'
172
+ printf 'GUARD_KIT_PRIOR_ART_MAP[brew] = P.md§Multi\nGUARD_KIT_PRIOR_ART_MAP[bake] = P.md§Open\n'
173
+ } >"$tmp/pa.knobs"
174
+ printf 'GUARD_KIT_PRIOR_ART_ROOTS[] = rel-runs\nGUARD_KIT_PRIOR_ART_MAP[release] = P.md\n' >"$tmp/pa-bad.knobs"
175
+ pa() { # $1=label $2=command $3=want (allow|advise|block|fallthrough) $4=text the note carries, empty for no note
176
+ checks=$((checks + 1))
177
+ local rc got=fallthrough
178
+ rc="$(HOME="$tmp/home" member "$tmp/pa.knobs" "$2")"
179
+ if [[ "$rc" == 2 ]]; then got=block
180
+ elif grep -qF '"permissionDecision":"allow"' "$tmp/out"; then got=allow
181
+ elif grep -qF '"additionalContext"' "$tmp/out"; then got=advise
182
+ fi
183
+ if [[ "$got" != "$3" ]]; then
184
+ echo " FAIL [$1]: '$2' was $got, want $3 — $(cat "$tmp/out" "$tmp/err")"
185
+ fails=$((fails + 1))
186
+ elif [[ -n "$4" ]] && ! grep -qF -- "$4" "$tmp/out" "$tmp/err"; then
187
+ echo " FAIL [$1]: '$2' did not carry '$4': $(cat "$tmp/out" "$tmp/err")"
188
+ fails=$((fails + 1))
189
+ elif [[ -z "$4" ]] && grep -qF 'prior-art advisory' "$tmp/out" "$tmp/err"; then
190
+ echo " FAIL [$1]: '$2' carried a note: $(cat "$tmp/out" "$tmp/err")"
191
+ fails=$((fails + 1))
192
+ fi
193
+ }
194
+ cmd_note="\`P.md\` §\`Cmd\` runs this procedure with \`bash run.sh\`"
195
+ pa "pa-granted" "grep -rn release rel-runs/x" allow "$cmd_note"
196
+ : >"$tmp/friction.log"
197
+ pa "pa-fallthrough" "make release-notes $tmp/runs/2" advise "$cmd_note"
198
+ checks=$((checks + 1))
199
+ [[ "$(wc -l <"$tmp/friction.log")" -eq 1 ]] || { echo " FAIL [pa-fallthrough-logged]: the noted fall-through logged no line"; fails=$((fails + 1)); }
200
+ pa "pa-no-root" "grep -rn release src" allow ""
201
+ pa "pa-no-verb" "grep -rn tag rel-runs" allow ""
202
+ pa "pa-root-word-only" "grep -rn x rel-runs/release" allow ""
203
+ pa "pa-home-root" "make Release ~/old/a" advise "$cmd_note"
204
+ pa "pa-steps" "grep -rn ship rel-runs" allow "the procedure is the steps of \`P.md\` §\`Steps\`"
205
+ pa "pa-undeclared" "grep -rn deploy rel-runs" allow "\`P.md\` §\`Plain\` owns this procedure"
206
+ pa "pa-stale" "grep -rn gone rel-runs" allow "\`P.md\` holds no section headed \`Missing\`"
207
+ pa "pa-multibyte" "grep -rn brew rel-runs" allow "\`P.md\` §\`Multi\` runs this procedure with \`make café\`"
208
+ pa "pa-multibyte-open" "grep -rn bake rel-runs" allow "\`P.md\` §\`Open\` runs this procedure with \`\`make café\`"
209
+ pa "pa-block" 'grep -rn release rel-runs/$X' block "$cmd_note"
210
+ TOOL=PowerShell pa "pa-powershell" "Select-String release rel-runs/x" fallthrough ""
211
+ : >"$tmp/hits.log"
212
+ pa "pa-hits" "grep -rn -e release -e ship rel-runs/x" allow "$cmd_note"
213
+ checks=$((checks + 1))
214
+ want_hits="$(printf 'rel-runs\trelease\tP.md§Cmd\nrel-runs\tship\tP.md§Steps')"
215
+ [[ "$(cut -f2- "$tmp/hits.log")" == "$want_hits" ]] || { echo " FAIL [pa-hit-lines]: $(cat "$tmp/hits.log")"; fails=$((fails + 1)); }
216
+ : >"$tmp/hits.log"
217
+ pa "pa-private" "grep -rn release-SENTINEL7 rel-runs/deep/below build.host.invalid" allow "$cmd_note"
218
+ checks=$((checks + 1))
219
+ [[ "$(wc -l <"$tmp/hits.log")" -eq 1 ]] && ! grep -qE 'SENTINEL7|deep/below|host\.invalid' "$tmp/hits.log" \
220
+ || { echo " FAIL [pa-private]: a call word reached the hit log: $(cat "$tmp/hits.log")"; fails=$((fails + 1)); }
221
+ want "pa-map-refused" "$tmp/pa-bad.knobs" "git status" 2 "GUARD_KIT_PRIOR_ART_MAP[release] must be <file>§<heading>"
222
+
163
223
  # --- the steer door is gate-sdk's command spelling of GATE_SDK_NATIVE_BIN: './'-prefixed when
164
224
  # relative, as written when absolute
165
225
  door_case() { # $1=label $2=GATE_SDK_NATIVE_BIN value
@@ -179,5 +239,5 @@ if [[ "$fails" -gt 0 ]]; then
179
239
  echo "guard-config-knobs.test: $fails of $checks assertion(s) failed"
180
240
  exit 1
181
241
  fi
182
- echo "guard-config-knobs.test: ok ($checks assertions; GUARD_KIT_SEARCH_TOOLS fires rules \`find_glob\` and \`git_grep\` on its own member each and leaves them inert when empty, and each firing corrective names its bare fallback; GUARD_KIT_RO_FORMS grants an added roster member only once declared, and a consumer entry replaces the kit's declaration; an empty GUARD_KIT_WRITE_BINS withholds the write utilities and keeps the bounded redirect, and a member the grammar lacks is withheld; rule \`git_c_root\`'s arm (d) fires on a respelled path naming the knob's resolved file and not on a differing one; GUARD_KIT_SCRATCH_POWERSHELL steers a PowerShell scratch body to the runner's PowerShell path when set, to a bash body when empty, and refuses a value naming no PowerShell host; the member blocks with the refusal on a missing or malformed knob file and runs no rule; the steer door is gate_native_bin_spelled's spelling)"
242
+ echo "guard-config-knobs.test: ok ($checks assertions; GUARD_KIT_SEARCH_TOOLS fires rules \`find_glob\` and \`git_grep\` on its own member each and leaves them inert when empty, and each firing corrective names its bare fallback; GUARD_KIT_RO_FORMS grants an added roster member only once declared, and a consumer entry replaces the kit's declaration; an empty GUARD_KIT_WRITE_BINS withholds the write utilities and keeps the bounded redirect, and a member the grammar lacks is withheld; rule \`git_c_root\`'s arm (d) fires on a respelled path naming the knob's resolved file and not on a differing one; GUARD_KIT_SCRATCH_POWERSHELL steers a PowerShell scratch body to the runner's PowerShell path when set, to a bash body when empty, and refuses a value naming no PowerShell host; the prior-art advisory notes a call holding a root word and a mapped verb with its section's declaration on the verdict that decides it, a declared command ending on a multibyte character included, ~/-led and relative roots resolving, logs each fired key's root, verb and section and no word of the call, and a map value with no § refuses; the member blocks with the refusal on a missing or malformed knob file and runs no rule; the steer door is gate_native_bin_spelled's spelling)"
183
243
  exit 0
@@ -1291,3 +1291,7 @@ fallthrough touch ../outside
1291
1291
 
1292
1292
  # fall-through logging — anything else falls through to the friction log
1293
1293
  fallthrough make build
1294
+ # the prior-art advisory carries no note under the empty default, so a grep over a ~/-led path
1295
+ # still falls through (guard-kit/SPEC.md §The prior-art advisory); its noted cases run in
1296
+ # gate-tests/guard-config-knobs.test.sh
1297
+ fallthrough grep -rn release ~/old-runs/
@@ -6,6 +6,12 @@
6
6
  # spec: guard-kit/SPEC.md §compare-settings-allow — a breadth ruled intended, keyed on the exact local allow-rule string; the kit ships no declarations either
7
7
  # GUARD_KIT_BREADTH_DECLARED[Bash(mytool *)] = every subcommand is read-only
8
8
 
9
+ # spec: guard-kit/SPEC.md §The prior-art advisory — your past-evidence roots, each absolute, ~/-led or relative to the toplevel, set in guard-config.local.knobs; the kit ships none
10
+ # GUARD_KIT_PRIOR_ART_ROOTS[] = ~/old-runs
11
+
12
+ # spec: guard-kit/SPEC.md §The prior-art advisory — a verb mapped to the section owning its procedure, <file>§<heading>; the kit ships none
13
+ # GUARD_KIT_PRIOR_ART_MAP[deploy] = README.md§Deploy
14
+
9
15
  # spec: guard-kit/SPEC.md §check-door-binding — your own surfaces assertion C sweeps for undeclared doors, each a tracked file or a directory; the kit ships none, and with none set the assertion is inert
10
16
  # GUARD_KIT_DOOR_ROOTS[] = README.md
11
17
 
@@ -98,17 +98,19 @@ A stage session that hits a question inside its ruling classes ends its turn wit
98
98
 
99
99
  The lead answers by messaging the paused session, which resumes in place with its working state intact. That resume — not a cold restart — is the cost asymmetry the lead exists to close.
100
100
 
101
- Under the split posture the lead **routes** an escalation before answering it. A question the iteration's machinery already governs — which fixture, which surface, ordering, a helper's shape — the lead rules itself. A question about the iteration's *intent* — a scope boundary, an amendment's envelope, a seam ruling — is forwarded to the intent oracle and the oracle's answer relayed back. A forwarded question carries the excerpt of current working state it turns on: the oracle holds the iteration's intent, not the build's unfolding, so the lead supplies what the question needs read. When the oracle cannot be resumed, the lead answers from the governed surfaces the rulings already live in — the amendments, the queue entries — and a question not derivable there goes to the operator, never substituted by the lead's own judgment.
101
+ Under the split posture the lead **routes** an escalation before answering it. A question the iteration's machinery already governs — which fixture, which surface, ordering, a helper's shape — the lead rules itself. A question about the iteration's *intent* — a scope boundary, an amendment's envelope, a seam ruling — is forwarded to the intent oracle and the oracle's answer relayed back. A forwarded question carries the excerpt of current working state it turns on: the oracle holds the iteration's intent, not the build's unfolding, so the lead supplies what the question needs read. When the oracle cannot be resumed, the lead answers from the governed surfaces the rulings already live in — the amendments, the queue entries — and a question not derivable there goes to the operator, never substituted by the lead's own judgment. Where your ruling-config binds an **operator-reserved roster**, only a question on that roster goes, and you decide the rest alone, each landing as your decision. A roster narrows no operator-class rule this template states: the recorded ruling below, a stop (§A running session is asked, never instructed) and an open (§Opening an iteration) stay the operator's.
102
102
 
103
103
  **Every relayed answer arrives naming its class.** The classes are lifecycle-kit/SPEC.md §The steering vocabulary, and the lead is the one party that holds the fact: a stage session that was not told cannot recover it, and inventing it is the failure mode. So state in the relay whether what you carry is the operator's **direction** (an answer or agreement given in this session, revisable at a later scope or spec), your own **decision**, or a **grant** — and never a ruling, which arrives only through the consult skill and is already in the ruling record. Relaying your own decision as the operator's direction costs more than the reverse: it marks a call a later session may not revise alone, and it does so silently. What the recording session then writes, and where, is that session's contract to discharge.
104
104
 
105
+ **An operator direction that changes the collaboration terms is written into the binding that owns them.** A direction about who decides what, or about when to escalate, lands in the consumer's tracked binding that states it, never in your journal alone. Write it in the same session, at the first window in which no stage session is live, or dispatch a session to write it where you may not.
106
+
105
107
  **A split ask arrives with its own test already applied.** A session the queue's per-entry cap blocks may ask to split the entry, and that ask carries the session's statement of which side of `queue-kit/SPEC.md` §check-queue-entry-budget's split test its entry falls on. The lead rules against that test rather than re-deriving one; the authorization stays the lead's, on that section's own ground — a new entry is a new unit competing for the scope attention that ranks both.
106
108
 
107
- **One class the lead never rules, under either posture.** Reversing, demoting or re-scoping a **recorded operator ruling** or a stated objective is operator-class: the lead relays it, however well-grounded the escalating session's finding and however urgent the fix. Where the operator defers it, file it with `--emit file-consult` so it reaches the next consultation rather than your transcript. A direction question a stage's escalation carries for the operator you relay too, under either posture, never ruled by you or the oracle. One the operator defers you file with `--emit file-gap`, so the next stage to drain the gap inbox asks it again. Nor does it decline a threshold-proposed entry that scope's escalation marks operator-routed. That entry has been declined twice, and it is relayed.
109
+ **One class the lead never rules, under either posture.** Reversing, demoting or re-scoping a **recorded operator ruling** or a stated objective is operator-class: the lead relays it, however well-grounded the escalating session's finding and however urgent the fix. Where the operator defers it, file it with `--emit file-consult` so it reaches the next consultation rather than your transcript. A direction question a stage's escalation carries for the operator you relay too, under either posture, never ruled by you or the oracle, unless an operator-reserved roster your ruling-config binds leaves it off. One the operator defers you file with `--emit file-gap`, so the next stage to drain the gap inbox asks it again. Nor does it decline a threshold-proposed entry that scope's escalation marks operator-routed. That entry has been declined twice, and it is relayed.
108
110
 
109
111
  **Dispatch a consultation for the consult inbox only while no stage session is live.** At a point where no dispatched stage session is live and the inbox (`LIFECYCLE_KIT_CONSULT_INBOX_FILE`) meets the slot's threshold, dispatch the consult skill as the agent type the slot names, on the class `LIFECYCLE_KIT_CONSULT_CLASS` names, its prompt naming the inbox items and nothing else. It escalates to you as a stage session does. Relay each ruling-class escalation and each recommendation it sends to the operator, the recommendation as advice, and relay the answer back, stating its class: an accepted recommendation returns as a direction. Dispatch no stage session while it is live.
110
112
 
111
- **Dispatch an operator-ruled hotfix only while no stage session and no consultation is live.** When the operator rules a hotfix (doctrine-kit/DOCTRINE.md, Scope-gated intake), dispatch it as the hotfix type your ruling-config names. Its prompt names the ruling, the failure, and the queue entry or gap bullet the fix disposes, and nothing else, and grants its journal path. Verify its one commit as you verify any agent commit, and dispatch no stage session and no consultation while it is live. Where your ruling-config names no hotfix type, dispatch none: the operator lands the hotfix in a session of their own.
113
+ **Dispatch a hotfix only while no stage session and no consultation is live.** When the bound hotfix ruler rules a hotfix (doctrine-kit/DOCTRINE.md, Scope-gated intake), dispatch it as the hotfix type your ruling-config names. Its prompt names the ruling, the failure, and the queue entry or gap bullet the fix disposes, and nothing else, and grants its journal path. Verify its one commit as you verify any agent commit, and dispatch no stage session and no consultation while it is live. Your ruling-config names the ruler, `operator` or `lead`, and absent a name it is `operator`: you relay the proposal and dispatch on the answer. Under `lead` you rule it yourself, on the doctrine's impacting-failure test, and say so in the dispatch prompt as your decision. Where your ruling-config names no hotfix type, dispatch none: the hotfix lands in a session the operator runs.
112
114
 
113
115
  *<consult-dispatch: the agent type a lead dispatches a consultation as — never a stage-session type — and the batching threshold on the consult inbox: an item count, an oldest-item age, or off, which dispatches at the first quiet point after any item lands. Or the statement that this consumer's lead dispatches no consultation.>*
114
116
 
@@ -117,7 +119,7 @@ Under the split posture the lead **routes** an escalation before answering it. A
117
119
  **Route an operator's mid-iteration request by its shape, never by its wording.** Take the first route that fits. "Add it to this iteration" moves no request off its route.
118
120
 
119
121
  1. **A question rather than work** — answer it, or relay it to the operator as you relay an escalation (§The escalation protocol).
120
- 2. **An impacting failure** — propose the hotfix with its cost against the iteration's (doctrine-kit/DOCTRINE.md, Scope-gated intake). On the operator's ruling, dispatch it as §The escalation protocol says; without one, take the first later route that fits.
122
+ 2. **An impacting failure** — propose the hotfix with its cost against the iteration's (doctrine-kit/DOCTRINE.md, Scope-gated intake). On the bound ruler's ruling, dispatch it as §The escalation protocol says; without one, take the first later route that fits.
121
123
  3. **Debt** — a change converging on names the governed surfaces already carry, needing no design ruling: file it with `--emit file-gap` and tell the operator the closing stage's drain fixes it this iteration.
122
124
  4. **Anything else** — a new name, a design ruling, or more than one drain session holds: file it the same way. The drain promotes it and the next scope ranks it. Where the operator wanted it in this iteration, say it cannot enter before the next, and write their wish into the bullet's prose as their direction for the next scope.
123
125
 
@@ -155,7 +157,7 @@ All *standing* dispatch policy — everything true of every dispatch, not the ru
155
157
 
156
158
  The rule cuts both ways: policy binding the **lead itself** is standing too, and its tracked source is this template rather than the agent definition it dispatches. The completion-notification dispatch precondition (§The lead model) is standing policy of exactly that kind, named here so it is stated once and not re-improvised in each dispatch prompt.
157
159
 
158
- *<ruling-config: the tracked agent-definitions the lead dispatches and the roster each carries — for the stage-session type, and for a hotfix type where this consumer has one: its path, the subagent type the dispatch names, and where its ruling classes are stated.>*
160
+ *<ruling-config: the tracked agent-definitions the lead dispatches and the roster each carries — for the stage-session type, and for a hotfix type where this consumer has one: its path, the subagent type the dispatch names, and where its ruling classes are stated. Where this consumer has a hotfix type, its hotfix ruler, `operator` (the default) or `lead`. Optionally, the operator-reserved roster for the lead's own calls (§The escalation protocol).>*
159
161
 
160
162
  ## Stamps are authoritative (the load-bearing invariant)
161
163