checkwright 0.35.0 → 0.37.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 (113) hide show
  1. package/README.md +3 -0
  2. package/package.json +2 -2
  3. package/payload/artifact/aarch64-apple-darwin/checkwright-gates +0 -0
  4. package/payload/artifact/aarch64-apple-darwin/checkwright-gates.sha256 +1 -1
  5. package/payload/artifact/aarch64-pc-windows-msvc/checkwright-gates.exe +0 -0
  6. package/payload/artifact/aarch64-pc-windows-msvc/checkwright-gates.exe.sha256 +1 -1
  7. package/payload/artifact/aarch64-unknown-linux-gnu/checkwright-gates +0 -0
  8. package/payload/artifact/aarch64-unknown-linux-gnu/checkwright-gates.sha256 +1 -1
  9. package/payload/artifact/aarch64-unknown-linux-musl/checkwright-gates +0 -0
  10. package/payload/artifact/aarch64-unknown-linux-musl/checkwright-gates.sha256 +1 -1
  11. package/payload/artifact/x86_64-apple-darwin/checkwright-gates +0 -0
  12. package/payload/artifact/x86_64-apple-darwin/checkwright-gates.sha256 +1 -1
  13. package/payload/artifact/x86_64-pc-windows-msvc/checkwright-gates.exe +0 -0
  14. package/payload/artifact/x86_64-pc-windows-msvc/checkwright-gates.exe.sha256 +1 -1
  15. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates +0 -0
  16. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates.sha256 +1 -1
  17. package/payload/artifact/x86_64-unknown-linux-musl/checkwright-gates +0 -0
  18. package/payload/artifact/x86_64-unknown-linux-musl/checkwright-gates.sha256 +1 -1
  19. package/payload/canon-kit/README.md +1 -0
  20. package/payload/canon-kit/checks/check-comment-tier.gate +1 -1
  21. package/payload/canon-kit/checks/check-rule-id-coverage.gate +4 -0
  22. package/payload/canon-kit/gate-tests/check-amendment-queue.test.sh +39 -0
  23. package/payload/canon-kit/gate-tests/check-comment-tier/bad/expect.txt +1 -0
  24. package/payload/canon-kit/gate-tests/check-comment-tier/bad/lib/rules.rs +5 -0
  25. package/payload/canon-kit/gate-tests/check-comment-tier/bad/scripts/canon-config.knobs +5 -0
  26. package/payload/canon-kit/gate-tests/check-comment-tier/good/expect.txt +1 -1
  27. package/payload/canon-kit/gate-tests/check-comment-tier/good/good.rs +1 -0
  28. package/payload/canon-kit/gate-tests/check-comment-tier/good/scripts/canon-config.knobs +5 -0
  29. package/payload/canon-kit/gate-tests/check-comment-tier/good/src/rules.rs +5 -0
  30. package/payload/canon-kit/gate-tests/check-rule-id-coverage/bad/expect.txt +3 -0
  31. package/payload/canon-kit/gate-tests/check-rule-id-coverage/bad/scripts/canon-config.knobs +5 -0
  32. package/payload/canon-kit/gate-tests/check-rule-id-coverage/bad/specs/access.md +7 -0
  33. package/payload/canon-kit/gate-tests/check-rule-id-coverage/bad/specs/export.md +3 -0
  34. package/payload/canon-kit/gate-tests/check-rule-id-coverage/bad/src/rules.rs +5 -0
  35. package/payload/canon-kit/gate-tests/check-rule-id-coverage/good/expect.txt +1 -0
  36. package/payload/canon-kit/gate-tests/check-rule-id-coverage/good/scripts/canon-config.knobs +7 -0
  37. package/payload/canon-kit/gate-tests/check-rule-id-coverage/good/specs/access.md +9 -0
  38. package/payload/canon-kit/gate-tests/check-rule-id-coverage/good/specs/export.md +3 -0
  39. package/payload/canon-kit/gate-tests/check-rule-id-coverage/good/src/rules.rs +7 -0
  40. package/payload/canon-kit/gate-tests/check-unmarked-claim.test.sh +2 -2
  41. package/payload/context-kit/gate-tests/check-settings-paths/bad/expect.txt +5 -0
  42. package/payload/context-kit/gate-tests/check-settings-paths/bad/settings.json +35 -0
  43. package/payload/context-kit/gate-tests/check-settings-paths/good/expect.txt +2 -2
  44. package/payload/context-kit/gate-tests/check-settings-paths/good/settings.json +26 -0
  45. package/payload/delegation-kit/README.md +1 -1
  46. package/payload/delegation-kit/usage-tests/cases.tsv +13 -0
  47. package/payload/doctrine-kit/DOCTRINE.md +1 -1
  48. package/payload/evidence-kit/README.md +8 -5
  49. package/payload/evidence-kit/checks/check-test-control.gate +4 -0
  50. package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/validate-evidence.txt +2 -2
  51. package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/validate-evidence.txt +2 -2
  52. package/payload/evidence-kit/gate-tests/check-evidence-manifest.test.sh +56 -7
  53. package/payload/evidence-kit/gate-tests/check-test-control/bad/TASK-QUEUE.md +1 -0
  54. package/payload/evidence-kit/gate-tests/check-test-control/bad/WORKFLOW-STATE.txt +4 -0
  55. package/payload/evidence-kit/gate-tests/check-test-control/bad/args +5 -0
  56. package/payload/evidence-kit/gate-tests/check-test-control/bad/expect.txt +2 -0
  57. package/payload/evidence-kit/gate-tests/check-test-control/bad/scripts/evidence-config.knobs +4 -0
  58. package/payload/evidence-kit/gate-tests/check-test-control/bad/since-baseline.txt +2 -0
  59. package/payload/evidence-kit/gate-tests/check-test-control/bad/validate-baseline.txt +4 -0
  60. package/payload/evidence-kit/gate-tests/check-test-control/bad/validate-evidence.txt +3 -0
  61. package/payload/evidence-kit/gate-tests/check-test-control/good/TASK-QUEUE.md +1 -0
  62. package/payload/evidence-kit/gate-tests/check-test-control/good/WORKFLOW-STATE.txt +4 -0
  63. package/payload/evidence-kit/gate-tests/check-test-control/good/args +5 -0
  64. package/payload/evidence-kit/gate-tests/check-test-control/good/expect.txt +1 -0
  65. package/payload/evidence-kit/gate-tests/check-test-control/good/scripts/evidence-config.knobs +4 -0
  66. package/payload/evidence-kit/gate-tests/check-test-control/good/since-baseline.txt +2 -0
  67. package/payload/evidence-kit/gate-tests/check-test-control/good/validate-baseline.txt +3 -0
  68. package/payload/evidence-kit/gate-tests/check-test-control/good/validate-evidence.txt +3 -0
  69. package/payload/evidence-kit/gate-tests/check-test-control.test.sh +121 -0
  70. package/payload/evidence-kit/gate-tests/pre-hook.test.sh +18 -2
  71. package/payload/evidence-kit/gate-tests/producer-lock.test.sh +1 -1
  72. package/payload/evidence-kit/gate-tests/run-member-door.test.sh +1 -1
  73. package/payload/evidence-kit/gate-tests/statement-store.test.sh +64 -0
  74. package/payload/evidence-kit/gate-tests/test-control-run.test.sh +91 -0
  75. package/payload/evidence-kit/gate-tests/verify-gate-run-strict.test.sh +121 -0
  76. package/payload/evidence-kit/templates/evidence-config.knobs +7 -0
  77. package/payload/gate-sdk/README.md +1 -0
  78. package/payload/gate-sdk/checks/check-hook-knobs-fresh.gate +5 -0
  79. package/payload/gate-sdk/gate-tests/binary-only-recipe.test.sh +125 -0
  80. package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/docs/enforcement.md +1 -0
  81. package/payload/gate-sdk/gate-tests/check-hook-knobs-fresh/bad/args +2 -0
  82. package/payload/gate-sdk/gate-tests/check-hook-knobs-fresh/bad/expect.txt +5 -0
  83. package/payload/gate-sdk/gate-tests/check-hook-knobs-fresh/bad/hooks/not-a-hook.md +4 -0
  84. package/payload/gate-sdk/gate-tests/check-hook-knobs-fresh/bad/hooks/shell-guard.md +3 -0
  85. package/payload/gate-sdk/gate-tests/check-hook-knobs-fresh/bad/hooks/subagent-stop-liveness.md +12 -0
  86. package/payload/gate-sdk/gate-tests/check-hook-knobs-fresh/good/args +2 -0
  87. package/payload/gate-sdk/gate-tests/check-hook-knobs-fresh/good/expect.txt +1 -0
  88. package/payload/gate-sdk/gate-tests/check-hook-knobs-fresh/good/hooks/subagent-stop-liveness.md +16 -0
  89. package/payload/gate-sdk/gate-tests/lib-test-hermetic.test.sh +19 -1
  90. package/payload/gate-sdk/gate-tests/run-for-path.test.sh +16 -1
  91. package/payload/gate-sdk/lib/test-hermetic.sh +6 -1
  92. package/payload/guard-kit/gate-tests/git-mutation-under-producer.test.sh +11 -1
  93. package/payload/lifecycle-kit/README.md +4 -0
  94. package/payload/lifecycle-kit/gate-tests/check-survey-record.test.sh +1 -1
  95. package/payload/lifecycle-kit/gate-tests/peer-channel.test.sh +150 -0
  96. package/payload/lifecycle-kit/templates/stages/close.md +2 -2
  97. package/payload/lifecycle-kit/templates/stages/scope.md +2 -0
  98. package/payload/lifecycle-kit/templates/stages/validate.md +1 -1
  99. package/payload/queue-kit/gate-tests/roadmap.test.sh +1 -1
  100. package/payload/site-kit/README.md +3 -0
  101. package/payload/site-kit/checks/check-docs-since.gate +4 -0
  102. package/payload/site-kit/gate-tests/check-docs-since/bad/expect.txt +6 -0
  103. package/payload/site-kit/gate-tests/check-docs-since/bad/notes/2026-01-01-v99-1-0.md +7 -0
  104. package/payload/site-kit/gate-tests/check-docs-since/bad/scripts/site-config.knobs +3 -0
  105. package/payload/site-kit/gate-tests/check-docs-since/bad/site/bare.md +7 -0
  106. package/payload/site-kit/gate-tests/check-docs-since/bad/site/odd.md +8 -0
  107. package/payload/site-kit/gate-tests/check-docs-since/bad/site/open.md +8 -0
  108. package/payload/site-kit/gate-tests/check-docs-since/bad/site/twice.md +9 -0
  109. package/payload/site-kit/gate-tests/check-docs-since/good/expect.txt +1 -0
  110. package/payload/site-kit/gate-tests/check-docs-since/good/notes/announce.md +3 -0
  111. package/payload/site-kit/gate-tests/check-docs-since/good/scripts/site-config.knobs +3 -0
  112. package/payload/site-kit/gate-tests/check-docs-since/good/site/done.md +8 -0
  113. package/payload/site-kit/gate-tests/check-docs-since/good/site/open.md +8 -0
package/README.md CHANGED
@@ -58,6 +58,9 @@ The flags each verb takes, owned by the binary as the verbs are:
58
58
  | `--with-gate` | `init`, `update` | register this gate too; repeats |
59
59
  | `--without-gate` | `init`, `update` | drop this gate from the registry; repeats |
60
60
  | `--no-selection` | `init`, `update` | clear the recorded kit and gate selection |
61
+ | `--user` | `init`, `update`, `uninstall` | manage one session-hook arm installed for you, not for a repository |
62
+
63
+ `init --user <arm>` installs one session-hook arm with no repository at all: the gate binary and the arm's knob file go in your per-user data dir (`~/.local/share/checkwright`, or `%LOCALAPPDATA%\checkwright`), the arm's scratch and log in your per-user state dir, and the harness settings entry for the arm is printed for you to merge, never written. `update --user` re-places every arm it recorded, and `uninstall --user` removes them, keeping the state dir and any knob file you edited ([`installer/SPEC.md` §The user install](SPEC.md#the-user-install)).
61
64
 
62
65
  ## Choosing a profile
63
66
 
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "checkwright-pwsh": "bin/checkwright.ps1"
5
5
  },
6
6
  "checkwright": {
7
- "commit": "fee297c7f1bb0d842ddf25a805e6076c9fed056b",
7
+ "commit": "d504ae4e87881881bf214e05521d475d1c874328",
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.35.0"
33
+ "version": "0.37.0"
34
34
  }
@@ -1 +1 @@
1
- 16c839da40775f5278a5e78679eda5b578009527ee31c26054049e9ed0d1737c checkwright-gates
1
+ a32df8289ae3f7b900d9497c110d40cb7baa78b3076b926373b6b3dae96c5557 checkwright-gates
@@ -1 +1 @@
1
- ca651cc4e7b8d1cf113b8543c46ebeb335a789f82cf50a5df9567360c8a78506 *checkwright-gates.exe
1
+ fc003cff11bb93bd3819618f0535a1e0c3fa3ef5252d416fcba44b676846a4aa *checkwright-gates.exe
@@ -1 +1 @@
1
- 111a9f9ff77dc6b744d0befb4fec9c2c1e4234e13582554339f130a1faa89b4d checkwright-gates
1
+ 578dce6e505f7405b20ed41a7160341088d45fc4eff046cb5d9aa0faac88c93a checkwright-gates
@@ -1 +1 @@
1
- b2382b209c73664e47c8bc095aa30895a4c80e65c28ff8e6f57f4920b9d2b817 checkwright-gates
1
+ 945b49d305b822ae7f982c2eb63f9a017e7d983df83557d16c889ce139a1635d checkwright-gates
@@ -1 +1 @@
1
- f651ef866003c62fc600b3c94d2cf450d67e6ce2a47ae05508a4b89c64e03832 checkwright-gates
1
+ 50ceec32d0fbe00b27884dbe25aba28d8f36f0c8c71bf0eb5637b8a18159bfbd checkwright-gates
@@ -1 +1 @@
1
- dc73a1009cbf6f34c287c51353d5c8baaeeb94064c66bba0370cf5a365d0af14 *checkwright-gates.exe
1
+ 03506ead66ccfcfea415195e4e0484f2681038139eb0fd4dd6b01dce148e0827 *checkwright-gates.exe
@@ -1 +1 @@
1
- 0646cadcd8e79d1a08c3035284619afcac64143d41dd00554473262f615bd14c checkwright-gates
1
+ 855372d495c45ef05686187b7234dd49fe81c7dd96c83d42c51339626ef18622 checkwright-gates
@@ -1 +1 @@
1
- 81ed97656247fdf2093a26eb7191d1d7acf363038cfe2c24bc58efa480c4f432 checkwright-gates
1
+ 44a607f52c4f6568af711b6e58d1b91ef0689661582e58ee7e7678d8b45fece4 checkwright-gates
@@ -43,6 +43,7 @@ Vendor the kit beside [gate-sdk](../gate-sdk/) (required); the queue-facing gate
43
43
  check-tracking-claim # a path's tracking status in prose agrees with git
44
44
  check-task-path-claim # needs task lists (a ticked task names only paths that exist)
45
45
  check-task-label-resolution # needs task lists and label families (a cited label resolves beside it)
46
+ check-rule-id-coverage # needs rule families (a declared id is cited once and a cited id is declared)
46
47
  check-delta-agreement # needs deltas and their families (a delta agrees with its base on which items exist)
47
48
  check-prose-enum # partial enumeration of a governed set
48
49
  check-md-refs # internal markdown links resolve
@@ -1,3 +1,3 @@
1
- # graph: couples=*.sh,*.gate,knob:GATE_SDK_WORKFLOW_DIR/*,knob:CANON_KIT_COMMENT_SURFACE,*.yml,*.yaml,knob:CANON_KIT_COMMENT_ACTIONS dir=one valve=none tier=precommit
1
+ # graph: couples=*.sh,*.gate,knob:GATE_SDK_WORKFLOW_DIR/*,knob:CANON_KIT_COMMENT_SURFACE,*.yml,*.yaml,knob:CANON_KIT_COMMENT_ACTIONS,knob:CANON_KIT_RULE_ID_DECLARE_GLOBS dir=one valve=none tier=precommit
2
2
  # install: on-surface
3
3
  # spec: canon-kit/SPEC.md §check-comment-tier — every full-line comment on a governed surface is a machine/reason directive, rides a directive's bounded window, is comment-tier-exempt, or justifies a positional construct
@@ -0,0 +1,4 @@
1
+ # graph: couples=knob:CANON_KIT_RULE_ID_DECLARE_GLOBS,knob:CANON_KIT_RULE_ID_SPEC_GLOBS dir=one valve=none tier=precommit
2
+ # install: zero-config
3
+ # armed-by: CANON_KIT_RULE_ID_DECLARES
4
+ # spec: canon-kit/SPEC.md §check-rule-id-coverage — every rule id the code declares is cited by exactly one spec file, and every id a spec cites is declared
@@ -0,0 +1,39 @@
1
+ #!/usr/bin/env bash
2
+ # spec: canon-kit/SPEC.md §check-amendment-queue — the absent-queue clean and the wrong-kind refusal,
3
+ # arms the pair cannot spell: its good/ holds a queue, and exit 2 has no pair spelling
4
+ #
5
+ # Run by the --run-gate-tests arm (any <tests-dir>/*.test.sh; must exit 0).
6
+ set -uo pipefail
7
+ source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
8
+
9
+ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
10
+ SANDBOX="$(mktemp -d)"
11
+ trap 'rm -rf "$SANDBOX"' EXIT
12
+
13
+ fails=0
14
+
15
+ check_case() { # $1=label $2=want-rc $3=want-substring $4=queue path
16
+ local label="$1" want="$2" sub="$3" queue="$4"
17
+ local out rc
18
+ out="$(cd "$SANDBOX" && gate_run check-amendment-queue "$DIR/checks" "$queue" "$SANDBOX" 2>&1)"
19
+ rc=$?
20
+ if [[ "$rc" -ne "$want" ]]; then
21
+ echo " FAIL [$label]: want exit $want, got $rc -- $out"; fails=$((fails + 1)); return
22
+ fi
23
+ if ! grep -qF -- "$sub" <<<"$out"; then
24
+ echo " FAIL [$label]: exit $rc OK but output lacks '$sub':"; printf ' %s\n' "$out"
25
+ fails=$((fails + 1))
26
+ fi
27
+ }
28
+
29
+ check_case "absent-queue-is-not-applicable" 0 "clean (not applicable: no queue file at" "$SANDBOX/TASK-QUEUE.md"
30
+
31
+ mkdir -p "$SANDBOX/dirqueue"
32
+ check_case "non-file-queue-fails-closed" 2 "not a file" "$SANDBOX/dirqueue"
33
+
34
+ if [[ "$fails" -gt 0 ]]; then
35
+ echo "check-amendment-queue.test.sh: $fails case(s) failed"
36
+ exit 1
37
+ fi
38
+ echo "check-amendment-queue.test.sh: clean (an absent queue is not applicable; a queue path naming a directory refuses)"
39
+ exit 0
@@ -2,6 +2,7 @@ restated collection total: rules 1-8
2
2
  bad.sh:27: port: the bare word is not a roster entry, so this line is prose and is flagged
3
3
  bad.gate:4: this descriptor comment cites no owning section and carries no directive
4
4
  bad.rs:3: this crate comment restates the line below it and cites no owning section
5
+ lib/rules.rs:1: rule R-1: a request carries one owner,
5
6
  templates/bad-tmpl.sh:2: this templates stub comment paraphrases its own body and carries no directive
6
7
  .workflow/fixture-state.txt:3: this workflow-tier comment is prose the txt surface never blesses
7
8
  .github/workflows/ci.yml:4: this workflow comment narrates the job below and carries no directive
@@ -0,0 +1,5 @@
1
+ // rule R-1: a request carries one owner,
2
+ // named when the request is filed
3
+ pub fn owner() -> usize {
4
+ 1
5
+ }
@@ -4,3 +4,8 @@ CANON_KIT_COMMENT_ACTIONS = on
4
4
  CANON_KIT_COMMENT_SURFACE[] = **/*.sh
5
5
  CANON_KIT_COMMENT_SURFACE[] = **/*.gate
6
6
  CANON_KIT_COMMENT_SURFACE[] = **/*.rs
7
+ # spec: canon-kit/SPEC.md §check-comment-tier — the same rule family, so a declaring comment outside src/ stays prose
8
+ CANON_KIT_RULE_ID_DECLARE_GLOBS[] = src/*.rs
9
+ CANON_KIT_RULE_ID_SPEC_GLOBS[] = specs/*.md
10
+ CANON_KIT_RULE_ID_DECLARES[rule] = rule (R-[0-9]+):
11
+ CANON_KIT_RULE_ID_CITES[rule] = \[(R-[0-9]+)\]
@@ -1 +1 @@
1
- COMMENT-TIER: clean (6 governed source(s)
1
+ COMMENT-TIER: clean (7 governed source(s)
@@ -1,5 +1,6 @@
1
1
  // spec: some/SPEC.md §thing — the crate arm of the governed corpus, on the slash surface
2
2
  pub fn widget() -> usize {
3
3
  /* spec: some/SPEC.md §thing — a block comment opens its own directive window */
4
+ // rule-id-exempt: the rule-id site valve is blessed by name
4
5
  1
5
6
  }
@@ -4,3 +4,8 @@ CANON_KIT_COMMENT_ACTIONS = on
4
4
  CANON_KIT_COMMENT_SURFACE[] = **/*.sh
5
5
  CANON_KIT_COMMENT_SURFACE[] = **/*.gate
6
6
  CANON_KIT_COMMENT_SURFACE[] = **/*.rs
7
+ # spec: canon-kit/SPEC.md §check-comment-tier — a rule family whose declaring comments under src/ are reason directives
8
+ CANON_KIT_RULE_ID_DECLARE_GLOBS[] = src/*.rs
9
+ CANON_KIT_RULE_ID_SPEC_GLOBS[] = specs/*.md
10
+ CANON_KIT_RULE_ID_DECLARES[rule] = rule (R-[0-9]+):
11
+ CANON_KIT_RULE_ID_CITES[rule] = \[(R-[0-9]+)\]
@@ -0,0 +1,5 @@
1
+ // rule R-1: a request carries one owner,
2
+ // named when the request is filed
3
+ pub fn owner() -> usize {
4
+ 1
5
+ }
@@ -0,0 +1,3 @@
1
+ specs/access.md:7: undeclared: family `rule` cites `R-9`, which no declaring file declares
2
+ src/rules.rs:3: uncited: family `rule` declares `R-2`, which no spec file cites
3
+ src/rules.rs:4: cited twice: family `rule` declares `R-3`, cited by 2 spec files: specs/access.md:5, specs/export.md:3
@@ -0,0 +1,5 @@
1
+ # spec: canon-kit/SPEC.md §check-rule-id-coverage — fixture consumer config: the code under src/ declares rule ids the specs under specs/ cite
2
+ CANON_KIT_RULE_ID_DECLARE_GLOBS[] = src/*.rs
3
+ CANON_KIT_RULE_ID_SPEC_GLOBS[] = specs/*.md
4
+ CANON_KIT_RULE_ID_DECLARES[rule] = rule\("(R-[0-9]+)"\)
5
+ CANON_KIT_RULE_ID_CITES[rule] = \[(R-[0-9]+)\]
@@ -0,0 +1,7 @@
1
+ # Access
2
+
3
+ [R-1] A reader reads.
4
+
5
+ [R-3] A reader may export.
6
+
7
+ [R-9] A reader may delete.
@@ -0,0 +1,3 @@
1
+ # Export
2
+
3
+ [R-3] A writer exports.
@@ -0,0 +1,5 @@
1
+ pub fn register() {
2
+ rule("R-1");
3
+ rule("R-2");
4
+ rule("R-3");
5
+ }
@@ -0,0 +1 @@
1
+ RULE-ID-COVERAGE: clean (1 declaring file(s), 2 spec file(s), 2 rule famil(ies), 3 declared id(s), 4 citation(s), 1 valved
@@ -0,0 +1,7 @@
1
+ # spec: canon-kit/SPEC.md §check-rule-id-coverage — fixture consumer config: the code under src/ declares rule and limit ids the specs under specs/ cite
2
+ CANON_KIT_RULE_ID_DECLARE_GLOBS[] = src/*.rs
3
+ CANON_KIT_RULE_ID_SPEC_GLOBS[] = specs/*.md
4
+ CANON_KIT_RULE_ID_DECLARES[rule] = rule\("(R-[0-9]+)"\)
5
+ CANON_KIT_RULE_ID_CITES[rule] = \[(R-[0-9]+)\]
6
+ CANON_KIT_RULE_ID_DECLARES[limit] = limit\("(L-[0-9]+)"\)
7
+ CANON_KIT_RULE_ID_CITES[limit] = \{(L-[0-9]+)\}
@@ -0,0 +1,9 @@
1
+ # Access
2
+
3
+ [R-1] A reader reads, and a second read is the same rule [R-1].
4
+
5
+ {L-1} A reader opens at most ten files.
6
+
7
+ ```text
8
+ [R-9] An example citing a rule no code declares.
9
+ ```
@@ -0,0 +1,3 @@
1
+ # Export
2
+
3
+ [R-2] A writer exports.
@@ -0,0 +1,7 @@
1
+ pub fn register() {
2
+ rule("R-1");
3
+ rule("R-2");
4
+ // rule-id-exempt: reserved for the export rule, specified next release
5
+ rule("R-3");
6
+ limit("L-1");
7
+ }
@@ -75,8 +75,8 @@ check_case "uncompilable-ere-fails-closed" 2 "does not compile" uncompilable.kno
75
75
  # at all, and one configured that declared nothing. Both are green and they are
76
76
  # green for different reasons, which is why the reader checks the command knob
77
77
  # before it spawns the command.
78
- check_case "no-vocabulary-is-clean" 0 "CANON_KIT_CLAIM_CLASSES_CMD unset" off.knobs
79
- check_case "declared-nothing-is-clean" 0 "declared no claim classes" nothing.knobs
78
+ check_case "no-vocabulary-is-clean" 0 "not applicable: CANON_KIT_CLAIM_CLASSES_CMD unset" off.knobs
79
+ check_case "declared-nothing-is-clean" 0 "not applicable: CANON_KIT_CLAIM_CLASSES_CMD declared no claim classes" nothing.knobs
80
80
 
81
81
  # A full-line marker discharges exactly the claim it binds, the claim
82
82
  # check-measured-claim reads: the span narrows it, off leaves the whole block
@@ -5,4 +5,9 @@ hooks.PreToolUse[0].hooks[1]: bash tools/removed-hook.sh — no such file: tools
5
5
  hooks.PreToolUse[0].hooks[2]: bash tools/run-gates.sh --hook no-such-guard — no such hook member: no-such-guard
6
6
  hooks.PreToolUse[0].hooks[3]: ${CLAUDE_PROJECT_DIR}/@GATE_SDK_NATIVE_BIN@ --hook shell-guard — unresolved placeholder: @GATE_SDK_NATIVE_BIN@
7
7
  hooks.PreToolUse[0].hooks[4]: ${CLAUDE_PROJECT_DIR}/tools/checkwright-gates --hook no-such-exec-guard — no such hook member: no-such-exec-guard
8
+ hooks.PreToolUse[0].hooks[5]: ${CLAUDE_PROJECT_DIR}/tools/checkwright-gates --hook shell-guard --obsrve — hook registration outside the --hook grammar: --obsrve
9
+ hooks.PreToolUse[0].hooks[6]: ${CLAUDE_PROJECT_DIR}/tools/checkwright-gates --hook shell-guard --knobs /opt/checkwright/knobs/shell-guard.knobs — hook registration outside the --hook grammar: --knobs
10
+ hooks.SubagentStop[0].hooks[0]: ${CLAUDE_PROJECT_DIR}/tools/checkwright-gates --hook subagent-stop-liveness --knobs knobs/subagent-stop-liveness.knobs — --knobs names a relative path: knobs/subagent-stop-liveness.knobs
11
+ help: the grammar: --hook <member> [--observe] [--binding <name>] [--knobs <absolute file>]
12
+ help: write --knobs <absolute file>; the arm reads no repository to resolve a relative one against
8
13
  help: a hook merged from a kit template skipped its placeholder step — replace @GATE_SDK_NATIVE_BIN@
@@ -41,6 +41,41 @@
41
41
  "--hook",
42
42
  "no-such-exec-guard"
43
43
  ]
44
+ },
45
+ {
46
+ "type": "command",
47
+ "command": "${CLAUDE_PROJECT_DIR}/tools/checkwright-gates",
48
+ "args": [
49
+ "--hook",
50
+ "shell-guard",
51
+ "--obsrve"
52
+ ]
53
+ },
54
+ {
55
+ "type": "command",
56
+ "command": "${CLAUDE_PROJECT_DIR}/tools/checkwright-gates",
57
+ "args": [
58
+ "--hook",
59
+ "shell-guard",
60
+ "--knobs",
61
+ "/opt/checkwright/knobs/shell-guard.knobs"
62
+ ]
63
+ }
64
+ ]
65
+ }
66
+ ],
67
+ "SubagentStop": [
68
+ {
69
+ "hooks": [
70
+ {
71
+ "type": "command",
72
+ "command": "${CLAUDE_PROJECT_DIR}/tools/checkwright-gates",
73
+ "args": [
74
+ "--hook",
75
+ "subagent-stop-liveness",
76
+ "--knobs",
77
+ "knobs/subagent-stop-liveness.knobs"
78
+ ]
44
79
  }
45
80
  ]
46
81
  }
@@ -1,2 +1,2 @@
1
- SETTINGS-PATHS: clean (4 literal .sh grant(s) and 6 hook path(s)
2
- 2 hook(s) skipped for a `$` root or an absolute path
1
+ SETTINGS-PATHS: clean (4 literal .sh grant(s) and 7 hook path(s)
2
+ 3 hook(s) skipped for a `$` root or an absolute path
@@ -57,6 +57,32 @@
57
57
  "--hook",
58
58
  "wakeup-guard"
59
59
  ]
60
+ },
61
+ {
62
+ "type": "command",
63
+ "command": "${CLAUDE_PROJECT_DIR}/tools/checkwright-gates",
64
+ "args": [
65
+ "--hook",
66
+ "shell-guard",
67
+ "--observe"
68
+ ]
69
+ }
70
+ ]
71
+ }
72
+ ],
73
+ "SubagentStop": [
74
+ {
75
+ "hooks": [
76
+ {
77
+ "type": "command",
78
+ "command": "/opt/checkwright/bin/checkwright-gates",
79
+ "args": [
80
+ "--hook",
81
+ "subagent-stop-liveness",
82
+ "--observe",
83
+ "--knobs",
84
+ "/opt/checkwright/knobs/subagent-stop-liveness.knobs"
85
+ ]
60
86
  }
61
87
  ]
62
88
  }
@@ -32,7 +32,7 @@ Vendor the kit beside [gate-sdk](../gate-sdk/) (required), then:
32
32
 
33
33
  5. Optional — bind your tiers: set one `DELEGATION_KIT_TIER_MODEL[] = <class>=<model>[,<effort>]` element per class in your delegation config, an alias to follow the newest model or an exact model id to pin one, the classes being `judgment`, `routing` and `mechanical` unless `DELEGATION_KIT_TIER_CLASSES` names your own; declare each agent definition's `tier:` in its frontmatter, then run the gate binary `GATE_SDK_NATIVE_BIN` names with `--emit agent-tiers --write` to generate its `model:`, and its `effort:` where the class binds one ([SPEC.md §The tier binding](https://checkwright.dev/delegation-kit/SPEC#the-tier-binding)).
34
34
 
35
- 6. Optional — wire the turn-end liveness hook: register the same binary as a hook's `command` under `SubagentStop` in your harness settings file (that event takes no matcher), with `--hook subagent-stop-liveness` as its `args`. It logs one line per subagent turn end saying whether any launch record named a live producer, and **refuses the turn end** — exit 2, its stderr the blocking reason — when that reading is a refusal verdict, or while the payload's live tasks show a running `shell` task of its own; it emits no hook JSON on either path, except an operator-notice warning when a knob it reads cannot resolve and the turn end went unguarded ([SPEC.md §The turn-end liveness hook](https://checkwright.dev/delegation-kit/SPEC#the-turn-end-liveness-hook); the roles are [gate-sdk/SPEC.md §The hook contract](https://checkwright.dev/gate-sdk/SPEC#the-hook-contract)'s). There is no knob: unwiring is the valve. Unwired, it is inert; wiring it is a permission-surface change, so it is yours to make. <!-- harness-binding: a wiring instruction an adopter pastes -->
35
+ 6. Optional — wire the turn-end liveness hook: register the same binary as a hook's `command` under `SubagentStop` in your harness settings file (that event takes no matcher), with `--hook subagent-stop-liveness` as its `args`. It logs one line per subagent turn end saying whether any launch record named a live producer, and **refuses the turn end** — exit 2, its stderr the blocking reason — when that reading is a refusal verdict, or while the payload's live tasks show a running `shell` task of its own; it emits no hook JSON on either path, except an operator-notice warning when a knob it reads cannot resolve and the turn end went unguarded ([SPEC.md §The turn-end liveness hook](https://checkwright.dev/delegation-kit/SPEC#the-turn-end-liveness-hook); the roles are [gate-sdk/SPEC.md §The hook contract](https://checkwright.dev/gate-sdk/SPEC#the-hook-contract)'s). No knob turns the refusal off and none overrides it per dispatch: `DELEGATION_KIT_STOP_WAIT` picks the waiting policy, one member of which suits a harness that resumes a session when its own background task completes ([SPEC.md §Layout and configuration](https://checkwright.dev/delegation-kit/SPEC#layout-and-configuration) owns the set). To trial it first, add `--observe` after the member in `args`: it then logs each refusal it would have issued to `GATE_SDK_HOOK_OBSERVE_LOG` and allows every turn end, until you remove the flag. Unwiring is the valve. Where your sessions run outside any repository, set `GATE_SDK_TMP_DIR` and `DELEGATION_KIT_STOP_LOG` to absolute paths, or it declines with that notice. Unwired, it is inert; wiring it is a permission-surface change, so it is yours to make. <!-- harness-binding: a wiring instruction an adopter pastes -->
36
36
 
37
37
  7. Optional — retune: copy `templates/delegation-config.knobs` into your gates dir and override the budget thresholds, the gate-file globs, or the meta-layer prefixes. Defaults are this repo's single-operator layout.
38
38
 
@@ -2,6 +2,8 @@
2
2
  # verdict exit pct age_off reset_off cred_age pct_7d reset7d_off account live append axis desc
3
3
  # Offsets are seconds from *now* (static fixtures would age into permanent STALE).
4
4
  # pct_7d '-' omits the seven_day keys (a three-line snapshot — today's behavior).
5
+ # pct 'empty' writes the five_hour pair present and empty (a source with no five-hour window;
6
+ # reset_off is then unread) and 'absent' omits both five_hour keys.
5
7
  # account is the snapshot's account key and live the oauthAccount.accountUuid the case
6
8
  # writes into a fixture account config; '-' omits each.
7
9
  # append is the sample-line count the run must leave in the history log (0 or 1);
@@ -52,3 +54,14 @@ PAUSE 1 95 0 3600 60 - 0 acctA acctB 1 5h mismatched account at or over threshol
52
54
  OK 0 40 0 3600 300 - 0 acctA acctA 1 - matched account past the settle floor inside the old window -> OK: the settle floor replaces the blanket window
53
55
  STALE 2 40 0 3600 60 - 0 acctA acctA 1 - matched account within the settle floor -> STALE: the server-fed pct may still lag the login
54
56
  STALE 2 40 0 3600 300 - 0 - acctA 1 - snapshot without account keeps the blanket window -> STALE inside LOGIN_WINDOW
57
+
58
+ # No five-hour window — the five_hour pair written empty is judged on the weekly axis alone
59
+ OK 0 empty 0 0 - 56 500000 - - 1 - empty 5h pair, weekly under its threshold -> OK on the weekly axis alone
60
+ OK 0 empty 0 0 - 94.999 500000 - - 1 - empty 5h pair, weekly just under its threshold -> the at-or-over boundary's non-firing side
61
+ PAUSE 1 empty 0 0 - 95 500000 - - 1 7d empty 5h pair, weekly exactly at its threshold -> PAUSE names the 7-day axis
62
+ PAUSE 1 empty 0 0 - 99 500000 - - 1 7d empty 5h pair, weekly over its threshold -> PAUSE names the 7-day axis
63
+ RESET-OK 0 empty 0 0 - 99 -100 - - 1 - empty 5h pair, dead weekly window -> RESET-OK on the weekly clock
64
+ STALE 2 empty 1200 0 - 56 500000 - - 1 - empty 5h pair, reading older than STALE_AGE -> STALE, parsed so it still logs
65
+ STALE 2 empty 0 0 60 56 500000 - - 1 - empty 5h pair, weekly under with a fresh login -> the reroute still suppresses the OK
66
+ STALE 2 empty 0 0 - - 0 - - 0 - both axes empty -> STALE (no pause axis to judge) and appends nothing
67
+ STALE 2 absent 0 0 - 56 500000 - - 0 - five_hour keys absent -> STALE (missing keys, never read as no window) and appends nothing
@@ -174,7 +174,7 @@ Where a rule below is *Enforced by* convention, no checkwright gate reads it yet
174
174
 
175
175
  *Under agent work:* an agent writes the check and reads its verdict in one motion, so the exit code is the only evidence it holds that the check bit. A predicate just rewritten (a regex carried between dialects, a path list narrowed) fails by matching nothing, which is indistinguishable from success. A printed count is the one signal that survives the rewrite.
176
176
 
177
- *Enforced by:* judgment, over a class only partly mechanizable — stated honestly rather than promised to a scanner. Shipped: the vacuous-pass tripwire in [gate-sdk/SPEC.md](../gate-sdk/SPEC.md) §run-gates, and the `good/`+`bad/` fixture pair every gate already owes ([gate-sdk/SPEC.md](../gate-sdk/SPEC.md) §The gate model), which exercises a predicate rather than trusting it. Buildable but unbuilt: a branch-coverage assertion over a check's fixture corpus, for the arm that ships with no fixture to run it. Unreachable: whether a session's mutation probe targeted something its assertion ranges over is a property of a session act that leaves no residue in the tree, so that third stays judgment.
177
+ *Enforced by:* judgment, over a class only partly mechanizable — stated honestly rather than promised to a scanner. Shipped: the vacuous-pass tripwire in [gate-sdk/SPEC.md](../gate-sdk/SPEC.md) §run-gates, and the `good/`+`bad/` fixture pair every gate already owes ([gate-sdk/SPEC.md](../gate-sdk/SPEC.md) §The gate model), which exercises a predicate rather than trusting it. Shipped too: the declared test controls in [evidence-kit/SPEC.md](../evidence-kit/SPEC.md) §Test controls, which witness a recorded test failing under the defect it names. Buildable but unbuilt: a branch-coverage assertion over a check's fixture corpus, for the arm that ships with no fixture to run it. Unreachable: whether a session's mutation probe targeted something its assertion ranges over is a property of a session act that leaves no residue in the tree, so that third stays judgment.
178
178
 
179
179
  *Stages:* build, validate
180
180
 
@@ -1,8 +1,8 @@
1
1
  # evidence-kit
2
2
 
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 wire contract (`# contract: evidence-manifest v1`) an external verifier can consume, so the kit is adoptable with or without an iteration lifecycle.
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) 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 and records evidence), `--diff-baseline` (the situational runtime diff) and `--emit baseline-claims` (each baseline row as a `measured:` oracle line, for prose that quotes one). 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) and `--emit baseline-claims` (each baseline row as a `measured:` oracle line, for prose that quotes one). 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
 
@@ -10,14 +10,15 @@ This file ships in the installer payload; what that payload withholds, and where
10
10
 
11
11
  Vendor the kit beside [gate-sdk](../gate-sdk/) (required), then:
12
12
 
13
- 1. Register the gates — add each to your `gates.list` except `check-producer-liveness`, which step 6 wires at stage entry instead:
13
+ 1. Register the gates — add each to your `gates.list` except `check-producer-liveness`, which you wire at stage entry instead, and `check-test-control`, which the optional test-controls step selects:
14
14
 
15
15
  <!-- gate-roster:begin -->
16
16
  ```
17
17
  check-evidence-baseline
18
18
  check-evidence-manifest
19
19
  check-battery-roster
20
- check-producer-liveness # entry hook only — never gates.list, see step 6
20
+ check-test-control # opt-in, with your first test control
21
+ check-producer-liveness # entry hook only — never gates.list
21
22
  ```
22
23
  <!-- gate-roster:end -->
23
24
 
@@ -32,7 +33,7 @@ Vendor the kit beside [gate-sdk](../gate-sdk/) (required), then:
32
33
  and `.workflow/validate-evidence.txt`:
33
34
 
34
35
  ```text
35
- # contract: evidence-manifest v1
36
+ # contract: evidence-manifest v2
36
37
  ```
37
38
 
38
39
  (override the paths with `EVIDENCE_KIT_BASELINE_FILE` / `EVIDENCE_KIT_MANIFEST_FILE`).
@@ -45,6 +46,8 @@ Vendor the kit beside [gate-sdk](../gate-sdk/) (required), then:
45
46
 
46
47
  6. Wire `check-producer-liveness` on `LIFECYCLE_KIT_ENTRY_PREFLIGHT` rather than in `gates.list`, its command naming the lock file through a name-resolving front end rather than a path (`<stage>=<front end> check-producer-liveness <lock-file>`; [SPEC.md §check-evidence-manifest](https://checkwright.dev/evidence-kit/SPEC#check-evidence-manifest) owns why a preflight entry names the gate), at whichever stage entries must not begin while `--run-validate` is still running. It asks whether a producer is in flight, not whether the tree is consistent, so a battery that `--run-validate` itself invokes would red every run against that run's own lock. See [SPEC.md §check-producer-liveness](https://checkwright.dev/evidence-kit/SPEC#check-producer-liveness).
47
48
 
49
+ 7. Optional test controls — to prove a recorded test can fail, name it in `EVIDENCE_KIT_CONTROLS` with an `EVIDENCE_KIT_CONTROL_<name> = <suite> <scenario> <VAR>=<value>` declaration whose assignments re-introduce the defect it catches, and register `check-test-control`. `--run-validate` then re-runs the suite under those assignments and records whether the test went red. See [SPEC.md §Test controls](https://checkwright.dev/evidence-kit/SPEC#test-controls).
50
+
48
51
  ## Test
49
52
 
50
53
  Run this arm with the gate binary `GATE_SDK_NATIVE_BIN` names, where `init` places it. In PowerShell, spell the line `./scripts/checkwright-gates <arm>` at the repository root, with `.exe` on native Windows:
@@ -0,0 +1,4 @@
1
+ # graph: couples=knob:EVIDENCE_KIT_BASELINE_FILE,knob:EVIDENCE_KIT_MANIFEST_FILE,knob:EVIDENCE_KIT_QUEUE_FILE,knob:EVIDENCE_KIT_STATE_FILE dir=one valve=none tier=precommit
2
+ # install: on-surface
3
+ # armed-by: EVIDENCE_KIT_CONTROLS
4
+ # spec: evidence-kit/SPEC.md §check-test-control — every declared control well-formed, every newly baselined pass row named by a control, and on a close cursor every control witnessed red by the current run
@@ -1,2 +1,2 @@
1
- # contract: evidence-manifest v1
2
- other-iter unit sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 pass=1 fail=0 ignore=0 verdict=clean 2026-07-06
1
+ # contract: evidence-manifest v2
2
+ other-iter unit sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 pass=1 fail=0 ignore=0 verdict=clean 2026-07-06 commit=0123456789abcdef0123456789abcdef01234567 tree=clean cmd=905824952f237b54064c7ed1b7f3fed04e83f320e50304a255afb6de608daea3 origin=local
@@ -1,2 +1,2 @@
1
- # contract: evidence-manifest v1
2
- demo-iter unit sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 pass=3 fail=0 ignore=0 verdict=clean 2026-07-06
1
+ # contract: evidence-manifest v2
2
+ demo-iter unit sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 pass=3 fail=0 ignore=0 verdict=clean 2026-07-06 commit=0123456789abcdef0123456789abcdef01234567 tree=clean cmd=905824952f237b54064c7ed1b7f3fed04e83f320e50304a255afb6de608daea3 origin=local