checkwright 0.29.0 → 0.31.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.
- package/README.md +19 -1
- package/package.json +2 -2
- package/payload/artifact/aarch64-apple-darwin/checkwright-gates +0 -0
- package/payload/artifact/aarch64-apple-darwin/checkwright-gates.sha256 +1 -1
- package/payload/artifact/aarch64-pc-windows-msvc/checkwright-gates.exe +0 -0
- package/payload/artifact/aarch64-pc-windows-msvc/checkwright-gates.exe.sha256 +1 -1
- package/payload/artifact/aarch64-unknown-linux-gnu/checkwright-gates +0 -0
- package/payload/artifact/aarch64-unknown-linux-gnu/checkwright-gates.sha256 +1 -1
- package/payload/artifact/aarch64-unknown-linux-musl/checkwright-gates +0 -0
- package/payload/artifact/aarch64-unknown-linux-musl/checkwright-gates.sha256 +1 -1
- package/payload/artifact/x86_64-apple-darwin/checkwright-gates +0 -0
- package/payload/artifact/x86_64-apple-darwin/checkwright-gates.sha256 +1 -1
- package/payload/artifact/x86_64-pc-windows-msvc/checkwright-gates.exe +0 -0
- package/payload/artifact/x86_64-pc-windows-msvc/checkwright-gates.exe.sha256 +1 -1
- package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates +0 -0
- package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates.sha256 +1 -1
- package/payload/artifact/x86_64-unknown-linux-musl/checkwright-gates +0 -0
- package/payload/artifact/x86_64-unknown-linux-musl/checkwright-gates.sha256 +1 -1
- package/payload/canon-kit/README.md +4 -2
- package/payload/canon-kit/checks/check-task-label-resolution.gate +4 -0
- package/payload/canon-kit/checks/check-task-path-claim.gate +4 -0
- package/payload/canon-kit/gate-tests/check-task-label-resolution/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-task-label-resolution/bad/scripts/canon-config.knobs +4 -0
- package/payload/canon-kit/gate-tests/check-task-label-resolution/bad/work/spec.md +5 -0
- package/payload/canon-kit/gate-tests/check-task-label-resolution/bad/work/tasks.md +4 -0
- package/payload/canon-kit/gate-tests/check-task-label-resolution/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-task-label-resolution/good/scripts/canon-config.knobs +4 -0
- package/payload/canon-kit/gate-tests/check-task-label-resolution/good/work/spec.md +9 -0
- package/payload/canon-kit/gate-tests/check-task-label-resolution/good/work/tasks.md +8 -0
- package/payload/canon-kit/gate-tests/check-task-path-claim/bad/expect.txt +2 -0
- package/payload/canon-kit/gate-tests/check-task-path-claim/bad/scripts/canon-config.knobs +2 -0
- package/payload/canon-kit/gate-tests/check-task-path-claim/bad/work/tasks.md +4 -0
- package/payload/canon-kit/gate-tests/check-task-path-claim/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-task-path-claim/good/scripts/canon-config.knobs +2 -0
- package/payload/canon-kit/gate-tests/check-task-path-claim/good/src/app.py +1 -0
- package/payload/canon-kit/gate-tests/check-task-path-claim/good/work/tasks.md +13 -0
- package/payload/context-kit/README.md +2 -2
- package/payload/delegation-kit/README.md +2 -2
- package/payload/delegation-kit/gate-tests/check-gate-tamper/good/staged-files +3 -1
- package/payload/delegation-kit/gate-tests/check-gate-tamper.test.sh +15 -1
- package/payload/doctrine-kit/README.md +2 -2
- package/payload/drift-kit/README.md +4 -3
- package/payload/drift-kit/templates/price-table.tsv +13 -9
- package/payload/evidence-kit/README.md +2 -2
- package/payload/gate-sdk/README.md +2 -2
- package/payload/gate-sdk/bin/run-gates.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-graph/bad/expect.txt +1 -1
- package/payload/gate-sdk/gate-tests/check-graph/good/SPEC-example-gate.md +2 -2
- package/payload/gate-sdk/gate-tests/check-graph-tree.test.sh +8 -33
- package/payload/gate-sdk/lib/gate.sh +0 -14
- package/payload/gate-sdk/templates/adopt.md +15 -0
- package/payload/guard-kit/README.md +2 -2
- package/payload/lifecycle-kit/README.md +2 -2
- package/payload/lifecycle-kit/checks/check-close-surfaces.gate +1 -1
- package/payload/lifecycle-kit/checks/check-skill-binding.gate +1 -1
- package/payload/lifecycle-kit/gate-tests/check-close-surfaces.test.sh +14 -8
- package/payload/lifecycle-kit/templates/lead.md +2 -0
- package/payload/queue-kit/README.md +2 -2
- package/payload/site-kit/README.md +2 -2
- package/payload/site-kit/checks/check-docs-cname-parity.gate +1 -1
- package/payload/site-kit/checks/check-docs-liquid-parse.gate +2 -2
- package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/expect.txt +1 -0
- package/payload/site-kit/gate-tests/check-docs-liquid-parse/bad/expect.txt +1 -1
- package/payload/site-kit/gate-tests/check-docs-liquid-parse/bad/scripts/site-config.knobs +3 -0
- package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/_layouts/stale.html +4 -0
- package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/scripts/site-config.knobs +3 -0
- package/recipes/openspec/canon-config.knobs +1 -0
- package/recipes/speckit/canon-config.knobs +3 -0
- /package/payload/site-kit/gate-tests/check-docs-liquid-parse/bad/docs/{_layouts → _templates}/default.html +0 -0
- /package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/{_layouts → _templates}/default.html +0 -0
package/README.md
CHANGED
|
@@ -41,6 +41,22 @@ Re-running is idempotent and non-destructive. `init` reads the per-file hash `ch
|
|
|
41
41
|
|
|
42
42
|
`uninstall` reverses an install against the roster `init` recorded, keeping and reporting any file you edited rather than removing it — which is what lets an evaluation you decide against leave nothing of its own behind.
|
|
43
43
|
|
|
44
|
+
The flags each verb takes, owned by the binary as the verbs are:
|
|
45
|
+
|
|
46
|
+
| flag | verbs | means |
|
|
47
|
+
| --- | --- | --- |
|
|
48
|
+
| `--profile` | `init`, `update` | vendor this profile |
|
|
49
|
+
| `--recipe` | `init`, `update` | apply this payload recipe; repeats |
|
|
50
|
+
| `--no-recipe` | `init`, `update` | clear the recorded recipes |
|
|
51
|
+
| `--dry-run` | `init`, `update`, `uninstall` | print the plan, write nothing |
|
|
52
|
+
| `--force` | `init`, `update`, `uninstall` | overwrite what the verb would otherwise protect |
|
|
53
|
+
| `--no-commit` | `init`, `update`, `uninstall` | stage the change and leave the commit to you |
|
|
54
|
+
| `--with-kit` | `init`, `update` | add this kit to the profile; repeats |
|
|
55
|
+
| `--without-kit` | `init`, `update` | take this kit out of the profile; repeats |
|
|
56
|
+
| `--with-gate` | `init`, `update` | register this gate too; repeats |
|
|
57
|
+
| `--without-gate` | `init`, `update` | drop this gate from the registry; repeats |
|
|
58
|
+
| `--no-selection` | `init`, `update` | clear the recorded kit and gate selection |
|
|
59
|
+
|
|
44
60
|
## Choosing a profile
|
|
45
61
|
|
|
46
62
|
`starter`, `delegation`, `prose`, `full`. Not four rungs on one ladder: the profiles are ordered by kit-set containment, so moving to one that contains yours only ever adds, and two that contain neither the other — `delegation` and `prose` — are alternatives rather than steps.
|
|
@@ -52,6 +68,8 @@ Re-running is idempotent and non-destructive. `init` reads the per-file hash `ch
|
|
|
52
68
|
|
|
53
69
|
`starter`, `delegation` and `prose` are rosters in `profiles.list`, each membership recorded beside the criterion behind it; `full` is derived from the payload at run time rather than listed. `--recipe <name>` applies a recipe the package carries, for a tree another tool lays out, such as a spec toolkit's.
|
|
54
70
|
|
|
71
|
+
`--with-kit`, `--without-kit`, `--with-gate` and `--without-gate` adjust a profile per install, and a gate file of your own under a kit gate's name, in your gates directory, replaces it ([SPEC.md §Selecting kits and gates](SPEC.md#selecting-kits-and-gates)).
|
|
72
|
+
|
|
55
73
|
## Where the design lives
|
|
56
74
|
|
|
57
75
|
`installer/SPEC.md` in the repository, published at
|
|
@@ -63,4 +81,4 @@ and the consumer smoke.
|
|
|
63
81
|
|
|
64
82
|
## License
|
|
65
83
|
|
|
66
|
-
Apache-2.0
|
|
84
|
+
Licensed under Apache-2.0, with the text in `LICENSE` beside this file in the package.
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"checkwright-pwsh": "bin/checkwright.ps1"
|
|
5
5
|
},
|
|
6
6
|
"checkwright": {
|
|
7
|
-
"commit": "
|
|
7
|
+
"commit": "dc23b0a4bd4a7988168c739dc0a7db4e0481d602",
|
|
8
8
|
"spec_base_url": "https://checkwright.dev"
|
|
9
9
|
},
|
|
10
10
|
"description": "Deterministic verification for coding-agent delivery. Checkwright is the verification layer under agent orchestration: spec drift, skipped stages, and unsupported done claims become failing checks before a merge, instead of review findings after one.",
|
|
@@ -23,5 +23,5 @@
|
|
|
23
23
|
"type": "git",
|
|
24
24
|
"url": "git+https://github.com/checkwright/checkwright.git"
|
|
25
25
|
},
|
|
26
|
-
"version": "0.
|
|
26
|
+
"version": "0.31.0"
|
|
27
27
|
}
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
6cf32a870fd534ad6b0eb5ebe9db15ef22cda8496275280055f34972be004a76 checkwright-gates
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
76549d8942c1e5aa722b6bfe2c79988ff6c89eac05f6c4be73a2b37f096aeba4 *checkwright-gates.exe
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
cb9c738fe3ef4bbc669a3ecae523e903ec705b116a4ae1ef3b4fca5e780bf13f checkwright-gates
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
950f2649da9d598226406d15b7cc71fe16956beed6251aad7aa912bceb19b2e8 checkwright-gates
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
2d61b4a07685a65ab261422ae278530bb97e96189b92b89912a60a8a1ed715cd checkwright-gates
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
d798017e4f0dbd7f03b8551af3da0c71fccb6a0695f68314daa469a363bce408 *checkwright-gates.exe
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
cecf37de068cc5ff482eadfedf770d4caffb58cf831892b8365fcd687d010514 checkwright-gates
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
2037f1b68ede99b21b3ffc54c1551f520dd479498b65d9b6e64d45bbf0567112 checkwright-gates
|
|
@@ -38,6 +38,8 @@ Vendor the kit beside [gate-sdk](../gate-sdk/) (required); the queue-facing gate
|
|
|
38
38
|
check-manifest-temporal # no temporal narration in manifest prose
|
|
39
39
|
check-provenance-seam # no publisher provenance in a kit SPEC or a declared seam surface
|
|
40
40
|
check-tracking-claim # a path's tracking status in prose agrees with git
|
|
41
|
+
check-task-path-claim # needs task lists (a ticked task names only paths that exist)
|
|
42
|
+
check-task-label-resolution # needs task lists and label families (a cited label resolves beside it)
|
|
41
43
|
check-prose-enum # partial enumeration of a governed set
|
|
42
44
|
check-md-refs # internal markdown links resolve
|
|
43
45
|
check-md-unwrapped # needs an unwrapped markdown set (no paragraph broken across lines)
|
|
@@ -50,7 +52,7 @@ Vendor the kit beside [gate-sdk](../gate-sdk/) (required); the queue-facing gate
|
|
|
50
52
|
check-deprecation-task # needs a deprecation-marker vocabulary
|
|
51
53
|
```
|
|
52
54
|
|
|
53
|
-
They resolve through gate-sdk's registry path (your gates dir first, then each kit's `checks/`), and
|
|
55
|
+
They resolve through gate-sdk's registry path (your gates dir first, then each kit's `checks/`), and the pre-commit hook runs the precommit-tier ones their `# graph:` manifests trigger, read at commit. `--emit git-hooks --write` on the gate binary `GATE_SDK_NATIVE_BIN` names writes that hook once, and again only to add the commit-msg hook when a first `tier=commit-msg` gate is registered.
|
|
54
56
|
|
|
55
57
|
2. Adopt the amendment lifecycle — copy `templates/SPEC-amendment.md` when a designed-but-unimplemented change needs a home. Name it after the feature (`SPEC-<feature>.md`), place it in the owning component's directory (a governance ruling with no component lives at the repo root), and pair it with a queue entry tagged `[spec: SPEC-<feature>.md]`. Merge it into the canonical spec and delete it when the work completes.
|
|
56
58
|
|
|
@@ -72,4 +74,4 @@ gates="${GATE_SDK_NATIVE_BIN:-./scripts/checkwright-gates}"
|
|
|
72
74
|
|
|
73
75
|
## License
|
|
74
76
|
|
|
75
|
-
Apache-2.0
|
|
77
|
+
Licensed under Apache-2.0, with the text in `LICENSE` beside this file in an installed copy and at the repository root in the source tree.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# graph: couples=knob:CANON_KIT_TASK_LIST_GLOBS,*.md dir=one valve=none tier=precommit
|
|
2
|
+
# install: zero-config
|
|
3
|
+
# armed-by: CANON_KIT_TASK_LABEL_CITES
|
|
4
|
+
# spec: canon-kit/SPEC.md §check-task-label-resolution — every label a task list cites resolves to its definition in a markdown file beside the list
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# graph: couples=knob:CANON_KIT_TASK_LIST_GLOBS,* dir=one valve=none tier=precommit
|
|
2
|
+
# install: zero-config
|
|
3
|
+
# armed-by: CANON_KIT_TASK_LIST_GLOBS
|
|
4
|
+
# spec: canon-kit/SPEC.md §check-task-path-claim — every ticked task in a task list CANON_KIT_TASK_LIST_GLOBS names holds only paths that exist
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
work/tasks.md:4: family `story` cites `2`, which no markdown file beside it defines
|
package/payload/canon-kit/gate-tests/check-task-label-resolution/bad/scripts/canon-config.knobs
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# spec: canon-kit/SPEC.md §check-task-label-resolution — fixture consumer config: the task lists under work/ cite stories their sibling spec defines
|
|
2
|
+
CANON_KIT_TASK_LIST_GLOBS[] = work/tasks.md
|
|
3
|
+
CANON_KIT_TASK_LABEL_CITES[story] = \[US([0-9]+)\]
|
|
4
|
+
CANON_KIT_TASK_LABEL_DEFINES[story] = ^### User Story ([0-9]+)[ ]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
TASK-LABEL-RESOLUTION: clean (1 task list(s), 1 label famil(ies), 3 citation(s) resolved, 0 valved
|
package/payload/canon-kit/gate-tests/check-task-label-resolution/good/scripts/canon-config.knobs
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# spec: canon-kit/SPEC.md §check-task-label-resolution — fixture consumer config: the task lists under work/ cite stories their sibling spec defines
|
|
2
|
+
CANON_KIT_TASK_LIST_GLOBS[] = work/tasks.md
|
|
3
|
+
CANON_KIT_TASK_LABEL_CITES[story] = \[US([0-9]+)\]
|
|
4
|
+
CANON_KIT_TASK_LABEL_DEFINES[story] = ^### User Story ([0-9]+)[ ]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
TASK-PATH-CLAIM: clean (1 task list(s), 4 ticked task(s), 3 path(s), 1 valved
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
print("app")
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Tasks
|
|
2
|
+
|
|
3
|
+
- [x] T001 Write the entry point in src/app.py
|
|
4
|
+
- [X] T002 Lay out the `src/` directory
|
|
5
|
+
- [ ] T003 Add the exporter in src/export.py
|
|
6
|
+
- [x] T004 Name each module after its role, as in src/<name>.py
|
|
7
|
+
|
|
8
|
+
<!-- task-path-exempt: the task deleted it -->
|
|
9
|
+
- [x] T005 Remove the old loader, src/loader.py
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
- [x] T006 An example task naming docs/absent.md
|
|
13
|
+
```
|
|
@@ -23,7 +23,7 @@ Vendor the kit beside [gate-sdk](../gate-sdk/) (required); the meter's default h
|
|
|
23
23
|
```
|
|
24
24
|
<!-- gate-roster:end -->
|
|
25
25
|
|
|
26
|
-
They resolve through gate-sdk's registry path (your gates dir first, then each kit's `checks/`), and their `# graph:` manifests
|
|
26
|
+
They resolve through gate-sdk's registry path (your gates dir first, then each kit's `checks/`), and the pre-commit hook runs those their `# graph:` manifests trigger, read at commit. `--emit git-hooks --write` on the gate binary `GATE_SDK_NATIVE_BIN` names writes that hook once, and again only to add the commit-msg hook when a first `tier=commit-msg` gate is registered. Three of them wait on a step of yours: `check-settings-pins` skips clean until you create `settings-pins.conf` naming the settings keys to hold, such as the auto-memory-disabling ones ([SPEC.md §check-settings-pins](https://checkwright.dev/context-kit/SPEC#check-settings-pins)); `check-footprint-fresh` is for when you publish the footprint page; and `check-surface-ratchet` arms once you commit the ceilings `--emit always-loaded --ceiling` stamps ([SPEC.md §The surface ratchet](https://checkwright.dev/context-kit/SPEC#the-surface-ratchet)).
|
|
27
27
|
|
|
28
28
|
2. Wire the session-start hook — copy `templates/session-context.sh` into your gates dir, edit its `[EDIT ME]` sections (layout judgment, not mechanism), and merge `templates/settings-sessionstart.json` into `.claude/settings.json`.
|
|
29
29
|
|
|
@@ -60,4 +60,4 @@ gates="${GATE_SDK_NATIVE_BIN:-./scripts/checkwright-gates}"
|
|
|
60
60
|
|
|
61
61
|
## License
|
|
62
62
|
|
|
63
|
-
Apache-2.0
|
|
63
|
+
Licensed under Apache-2.0, with the text in `LICENSE` beside this file in an installed copy and at the repository root in the source tree.
|
|
@@ -20,7 +20,7 @@ Vendor the kit beside [gate-sdk](../gate-sdk/) (required), then:
|
|
|
20
20
|
```
|
|
21
21
|
<!-- gate-roster:end -->
|
|
22
22
|
|
|
23
|
-
They resolve through gate-sdk's registry path and their `# graph:` manifests
|
|
23
|
+
They resolve through gate-sdk's registry path and the pre-commit hook runs those their `# graph:` manifests trigger, read at commit. `--emit git-hooks --write` on the gate binary `GATE_SDK_NATIVE_BIN` names writes that hook once, and again only to add the commit-msg hook when a first `tier=commit-msg` gate is registered.
|
|
24
24
|
|
|
25
25
|
2. Bind the protocol skill and add its resident pointer:
|
|
26
26
|
- Create `.claude/commands/agent-execution.md` as a binding shim naming `templates/agent-execution.md` and binding its two slots — the shared-file roster and the validate battery ([SPEC.md §One template, a resident pointer](https://checkwright.dev/delegation-kit/SPEC#one-template-a-resident-pointer)).
|
|
@@ -65,4 +65,4 @@ The `usage-verdict` decision table and the `usage-trend` assertions are not shel
|
|
|
65
65
|
|
|
66
66
|
## License
|
|
67
67
|
|
|
68
|
-
Apache-2.0
|
|
68
|
+
Licensed under Apache-2.0, with the text in `LICENSE` beside this file in an installed copy and at the repository root in the source tree.
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# a legitimate gate-only commit: gate file + meta-layer paths only,
|
|
2
|
-
# plus a newly added path exemption that matches nothing co-staged
|
|
2
|
+
# plus a newly added path exemption that matches nothing co-staged;
|
|
3
|
+
# the toplevel install manifest rides it as an update's commit does
|
|
3
4
|
scripts/check-foo.sh
|
|
4
5
|
scripts/SPEC.md
|
|
5
6
|
TASK-QUEUE.md
|
|
7
|
+
checkwright.lock
|
|
@@ -121,9 +121,23 @@ case_run "$d" a-registered-gate-outside-every-glob 1 "gate edit not isolated"
|
|
|
121
121
|
d="$(registered_outside_globs registered-alone)"
|
|
122
122
|
case_run "$d" a-registered-gate-outside-every-glob-staged-alone 0 "registered gate file(s) covered"
|
|
123
123
|
|
|
124
|
+
# H — the install manifest at the toplevel is meta-layer, so an update's commit co-staging it with a
|
|
125
|
+
# rewritten gate file is isolated; a file of that name anywhere below the toplevel is not.
|
|
126
|
+
d="$(new_repo manifest-beside-gate)"
|
|
127
|
+
printf '# edited\n' >>"$d/scripts/check-sample.sh"
|
|
128
|
+
printf '{}\n' >"$d/checkwright.lock"
|
|
129
|
+
git -C "$d" add scripts/check-sample.sh checkwright.lock
|
|
130
|
+
case_run "$d" the-install-manifest-beside-a-gate-edit 0 "GATE-TAMPER: clean"
|
|
131
|
+
|
|
132
|
+
d="$(new_repo nested-manifest-beside-gate)"
|
|
133
|
+
printf '# edited\n' >>"$d/scripts/check-sample.sh"
|
|
134
|
+
printf '{}\n' >"$d/product/checkwright.lock"
|
|
135
|
+
git -C "$d" add scripts/check-sample.sh product/checkwright.lock
|
|
136
|
+
case_run "$d" a-nested-manifest-namesake-beside-a-gate-edit 1 " product/checkwright.lock"
|
|
137
|
+
|
|
124
138
|
if [[ "$fails" -gt 0 ]]; then
|
|
125
139
|
echo "check-gate-tamper.test: $fails assertion(s) failed"
|
|
126
140
|
exit 1
|
|
127
141
|
fi
|
|
128
|
-
echo "check-gate-tamper.test: ok (live arm: HEAD-resident exemptions excluded, a newly added one excusing a co-staged file rejected, an unmatched one silent, a gate-file deletion read as empty, a registered gate outside every glob covered)"
|
|
142
|
+
echo "check-gate-tamper.test: ok (live arm: HEAD-resident exemptions excluded, a newly added one excusing a co-staged file rejected, an unmatched one silent, a gate-file deletion read as empty, a registered gate outside every glob covered, the toplevel install manifest meta-layer and a nested namesake not)"
|
|
129
143
|
exit 0
|
|
@@ -33,7 +33,7 @@ Vendor the kit beside [gate-sdk](../gate-sdk/) (required), then:
|
|
|
33
33
|
```
|
|
34
34
|
<!-- gate-roster:end -->
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
The pre-commit hook runs the gates their `# graph:` manifests trigger, read at commit; `--emit git-hooks --write` on the gate binary `GATE_SDK_NATIVE_BIN` names writes it once, and again only to add the commit-msg hook when a first `tier=commit-msg` gate is registered.
|
|
37
37
|
|
|
38
38
|
3. Edit the digest — to drop a rule your project does not keep resident, declare the trim in place: `<!-- doctrine-digest-trim: <rule name> — <reason> -->` inside the digest section. The gate holds the digest in per-rule lockstep with the doctrine modulo declared trims, so a silent omission stays red; point `DOCTRINE_KIT_DIGEST_SECTION` at your heading if it is not `## Delivery doctrine`. The declaration survives the next run: the installer reads your block before it rewrites it and carries each declared marker back into the trimmed rule's position, so re-vendoring never restores a rule you removed. That is the only customization it preserves — see [SPEC.md](https://checkwright.dev/doctrine-kit/SPEC#install-doctrine) for the bound and the two findings it reports.
|
|
39
39
|
|
|
@@ -49,4 +49,4 @@ gates="${GATE_SDK_NATIVE_BIN:-./scripts/checkwright-gates}"
|
|
|
49
49
|
|
|
50
50
|
## License
|
|
51
51
|
|
|
52
|
-
Apache-2.0
|
|
52
|
+
Licensed under Apache-2.0, with the text in `LICENSE` beside this file in an installed copy and at the repository root in the source tree.
|
|
@@ -44,7 +44,8 @@ gates="${GATE_SDK_NATIVE_BIN:-./scripts/checkwright-gates}"
|
|
|
44
44
|
"$gates" --emit queue-flow [<n>] # design-pending pool filed/drained per trailing iteration, plus mean-filed
|
|
45
45
|
"$gates" --emit overhead-meter # governance-vs-task byte proxy for this session's transcript (a delegated session passes its transcript or stamp id)
|
|
46
46
|
"$gates" --emit stage-economics # real spend by stage × model × iteration (stamps ⋈ transcripts ⋈ price table)
|
|
47
|
-
"$gates" --
|
|
47
|
+
"$gates" --price-coverage # which running model ids the price table cannot price; with a page command set, whether the pricing page moved
|
|
48
|
+
"$gates" --emit file-install [--author] [--] <kind> <field>... # record one observed install, red or check-in (three kinds, three arities); --author files the author seat's own
|
|
48
49
|
"$gates" --emit install-evidence # the aggregate-only projection over that record, for a consumer to pin behind a freshness gate
|
|
49
50
|
```
|
|
50
51
|
|
|
@@ -56,7 +57,7 @@ The `trajectory` emit arm is the published-evidence extractor ([drift-kit/SPEC.m
|
|
|
56
57
|
|
|
57
58
|
`--emit stage-economics` is the stage-economics meter ([drift-kit/SPEC.md §The stage-economics meter](https://checkwright.dev/drift-kit/SPEC#the-stage-economics-meter)): it prices real spend by lifecycle stage × model × iteration by joining WORKFLOW-STATE stamps to their session transcripts to a consumer-supplied price table, keeping the cache-read burn lever visible close-over-close. Copy `templates/price-table.tsv` beside your gates dir and fill your model roster (the roster is consumer config, never a kit literal — the provenance seam); absent it, cost degrades to `n/a` and tokens still report. The `/economics` skill (`templates/economics.md`, materialized as `.claude/commands/economics.md`) chains overhead-meter → stage-economics into one post-iteration cost narrative — a reporting ritual the close skill may invoke, not a lifecycle stage and not a gate. If your decisions read the log, run the meter at your terminal stage — its rows are dated by their stamps, so a re-run at every close re-dates nothing — and `kpi-stage-economics-lag` shows how many closes have gone unpriced when that feed is skipped.
|
|
58
59
|
|
|
59
|
-
`--emit file-install` and `--emit install-evidence` are the two halves of the install-observation channel ([drift-kit/SPEC.md §The install-observation record](https://checkwright.dev/drift-kit/SPEC#the-install-observation-record) and [§The install-evidence projection](https://checkwright.dev/drift-kit/SPEC#the-install-evidence-projection)): the first appends one dated line per install, per red a non-author hit, and per retention check-in to a private, gitignored record under your metric dir; the second emits an aggregate-only markdown table set over it — every figure with its denominator, no row keyed to a single install, and `<id>`, `<profile>` and `<floor>` never published. The field set is fixed before the first observation on purpose: a red nobody wrote down was never observed, so the evidence cannot be collected retrospectively. Closed-set fields are enforced at capture, so the arm's refusals are the whole observation protocol.
|
|
60
|
+
`--emit file-install` and `--emit install-evidence` are the two halves of the install-observation channel ([drift-kit/SPEC.md §The install-observation record](https://checkwright.dev/drift-kit/SPEC#the-install-observation-record) and [§The install-evidence projection](https://checkwright.dev/drift-kit/SPEC#the-install-evidence-projection)): the first appends one dated line per install, per red a non-author hit, and per retention check-in to a private, gitignored record under your metric dir (`--author` files an install you or someone acting for you ran into a separate record the projection never reads, so author evidence never reaches a published figure); the second emits an aggregate-only markdown table set over it — every figure with its denominator, no row keyed to a single install, and `<id>`, `<profile>` and `<floor>` never published. The field set is fixed before the first observation on purpose: a red nobody wrote down was never observed, so the evidence cannot be collected retrospectively. Closed-set fields are enforced at capture, so the arm's refusals are the whole observation protocol.
|
|
60
61
|
|
|
61
62
|
A KPI plugin is `kpi-<name>.sh`, resolved through `kpis.list` against your KPI dirs, then each vendored kit's `kpis/`, then the binary's built-in members — three tiers, consumer-first. Add your own by dropping a plugin in your gates dir and naming it in the registry; shadow a bundled one with a same-named file. Your plugin is executed directly and reads the exported `DRIFT_KIT_*` environment, both unchanged by the bundled set moving in-crate. The bundled set ([drift-kit/SPEC.md §Bundled KPIs](https://checkwright.dev/drift-kit/SPEC#bundled-kpis)) carries, as lead KPIs, `kpi-task-split`, `kpi-queue-net-delta`, `kpi-gate-backlog`, `kpi-amendment-age`, `kpi-deferred-age`, `kpi-prompt-friction`, `kpi-always-loaded`, `kpi-settings-local`, `kpi-gate-runtime`, `kpi-overhead`, `kpi-price-table-age` and `kpi-stage-economics-lag`; and as lag KPIs, `kpi-knowledge-friction` (fed by the loop below) and `kpi-incident-recurrence` (fed by the queue's `[recurrence:]` tags).
|
|
62
63
|
|
|
@@ -71,4 +72,4 @@ gates="${GATE_SDK_NATIVE_BIN:-./scripts/checkwright-gates}"
|
|
|
71
72
|
|
|
72
73
|
## License
|
|
73
74
|
|
|
74
|
-
Apache-2.0
|
|
75
|
+
Licensed under Apache-2.0, with the text in `LICENSE` beside this file in an installed copy and at the repository root in the source tree.
|
|
@@ -5,17 +5,21 @@
|
|
|
5
5
|
# provenance seam / graph-vocab pattern), so this template ships the schema and placeholders only.
|
|
6
6
|
#
|
|
7
7
|
# priced-as-of: 2000-01-01 — replace with the date you last transcribed these numbers.
|
|
8
|
-
# prices-valid-through: 2000-01-01 — optional; the
|
|
9
|
-
#
|
|
10
|
-
# scheduled change
|
|
11
|
-
#
|
|
12
|
-
# §Bundled KPIs): age alone cannot see
|
|
13
|
-
# freshest on the morning its prices stop
|
|
8
|
+
# prices-valid-through: 2000-01-01 — optional; the date the table is vouched for through:
|
|
9
|
+
# a cliff whose next rate is unpublished, or a re-check horizon. Drop this line if neither
|
|
10
|
+
# applies. A scheduled change whose next rate is published is a row dated for the change
|
|
11
|
+
# instead. The prose below cites this header rather than restating its date. Both headers
|
|
12
|
+
# are read by kpi-price-table-age (drift-kit/SPEC.md §Bundled KPIs): age alone cannot see
|
|
13
|
+
# a cliff, since a freshly retyped table reads freshest on the morning its prices stop
|
|
14
|
+
# being true.
|
|
15
|
+
# An optional price-page-hash: header carries the hash --price-coverage prints when
|
|
16
|
+
# DRIFT_KIT_PRICE_PAGE_CMD is set, transcribed with priced-as-of:.
|
|
14
17
|
#
|
|
15
|
-
# Tab-separated. One row per model id (the id as it appears in the
|
|
16
|
-
#
|
|
18
|
+
# Tab-separated. One row per model id and effective date (the id as it appears in the
|
|
19
|
+
# transcript's message.model; effective_from optional, an ISO day, empty for an open start).
|
|
20
|
+
# Columns are USD per single token (a $/MTok price ÷ 1,000,000). A model with no row in force
|
|
17
21
|
# degrades its cost cell to n/a — token counts still report; pricing is advisory, never required.
|
|
18
22
|
#
|
|
19
|
-
# model input output cache_read cache_creation
|
|
23
|
+
# model input output cache_read cache_creation effective_from
|
|
20
24
|
example-model-large 0.000015 0.000075 0.0000015 0.00001875
|
|
21
25
|
example-model-small 0.0000008 0.000004 0.00000008 0.000001
|
|
@@ -21,7 +21,7 @@ Vendor the kit beside [gate-sdk](../gate-sdk/) (required), then:
|
|
|
21
21
|
```
|
|
22
22
|
<!-- gate-roster:end -->
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
The pre-commit hook runs the gates their `# graph:` manifests trigger, read at commit; `--emit git-hooks --write` on the gate binary `GATE_SDK_NATIVE_BIN` names writes it once, and again only to add the commit-msg hook when a first `tier=commit-msg` gate is registered.
|
|
25
25
|
|
|
26
26
|
2. Seed the two surfaces — `.workflow/validate-baseline.txt`:
|
|
27
27
|
|
|
@@ -57,4 +57,4 @@ gates="${GATE_SDK_NATIVE_BIN:-./scripts/checkwright-gates}"
|
|
|
57
57
|
|
|
58
58
|
## License
|
|
59
59
|
|
|
60
|
-
Apache-2.0
|
|
60
|
+
Licensed under Apache-2.0, with the text in `LICENSE` beside this file in an installed copy and at the repository root in the source tree.
|
|
@@ -11,7 +11,7 @@ A **gate** is a small program checking one invariant across one or more governed
|
|
|
11
11
|
- the `--emit git-hooks` and `--install-hooks` arms — the `pre-commit` and `commit-msg` hooks *generated* from per-gate `# graph:` coupling manifests (`tier=precommit` vs `tier=commit-msg`); adding a gate to a hook is manifest-only, so hook membership cannot drift. A manifest's trigger reach is read with `--for`, never off the field ([SPEC.md §Reading a `couples=` field's reach](https://checkwright.dev/gate-sdk/SPEC#reading-a-couples-fields-reach)).
|
|
12
12
|
- `bin/build-native.sh` — the one spelling of the crate build for the binary substrate: resolves the crate from `GATE_SDK_NATIVE_CRATE`, passes trailing arguments to cargo (so a per-target build reuses it), and returns cargo's own exit code. Every reader of that command cites this script rather than copying it.
|
|
13
13
|
- `checks/` — the meta-gates that hold the family to its own standard: ShellCheck self-lint, the output contract, the fail-closed contract, fixture coverage, SPEC↔code assertion coupling, exemption-list hygiene, and manifest / hook / graph-artifact freshness (`check-graph`).
|
|
14
|
-
- `templates/check-skeleton.sh` — the copy-paste skeleton a new gate starts from; `templates/gates-workflow.yml` — the CI workflow a consumer copies to `.github/workflows/gates.yml
|
|
14
|
+
- `templates/check-skeleton.sh` — the copy-paste skeleton a new gate starts from; `templates/gates-workflow.yml` — the CI workflow a consumer copies to `.github/workflows/gates.yml`; `templates/adopt.md` — the walk an agent follows after `init`: knobs fitted to your layout, first reds triaged.
|
|
15
15
|
|
|
16
16
|
Enforcement runs in three concentric tiers, each an outer backstop for the one inside it: the generated `pre-commit` hook, the local and bypassable inner tier; `run-gates.sh`'s pre-push full battery, whole-tree before the work leaves the machine; and the CI workflow, the server-side backstop that catches a `--no-verify` or a clone that never opted in. Only CI is a guarantee — see [SPEC.md §Enforcement tiers](https://checkwright.dev/gate-sdk/SPEC#enforcement-tiers) for the full definition, including the deferred hosted-attestation rung beyond these three (so CI cannot be edited away in the same change) that is out of scope here.
|
|
17
17
|
|
|
@@ -115,4 +115,4 @@ The toolchain contract is the table in [`docs/install.md` §Requirements](https:
|
|
|
115
115
|
|
|
116
116
|
## License
|
|
117
117
|
|
|
118
|
-
Apache-2.0
|
|
118
|
+
Licensed under Apache-2.0, with the text in `LICENSE` beside this file in an installed copy and at the repository root in the source tree.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
#
|
|
5
5
|
# usage: run-gates.sh [gates-dir] | --only <name>... [-- <arg>...] | --for <path>... | --emit <arm> [args...] | --pack-installer [--version <semver>] [--out <dir>] [--artifacts <dir>] [--root <dir>] | -h | --help
|
|
6
6
|
# every arm, its refusals and the knobs print from the tool itself: run-gates.sh --help
|
|
7
|
-
# timings → $GATE_SDK_TMP_DIR/gate-timings.txt (default .tmp/); a measurement, never committed
|
|
7
|
+
# timings → $GATE_SDK_TMP_DIR/gate-timings.txt (default .tmp/); a measurement, never committed, written by an unfiltered run
|
|
8
8
|
set -uo pipefail
|
|
9
9
|
|
|
10
10
|
SDK="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
@@ -7,7 +7,7 @@ dir= must be bi|one (got 'mono')
|
|
|
7
7
|
valve= must be none|PROPOSED (got 'no-fixture')
|
|
8
8
|
tier= must be precommit|align-only|commit-msg (got 'postcommit')
|
|
9
9
|
mode= must be staged|whole-tree (got 'partial')
|
|
10
|
-
|
|
10
|
+
unknown manifest key/token 'gen=auto'
|
|
11
11
|
couples= is empty
|
|
12
12
|
couples token 'docs/[a].md' is not a syntactically valid glob/path
|
|
13
13
|
trigger token 'docs/(x).md' is not a syntactically valid glob/path
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# SPEC-example-gate — amendment fixture (good)
|
|
2
2
|
|
|
3
3
|
Every shape assertion G must accept, one per branch it can clear: the four
|
|
4
|
-
required keys alone, the full
|
|
4
|
+
required keys alone, the full six-key form with every optional value legal, a
|
|
5
5
|
`kit:<glob>` couples token, a `*` trigger, two manifests on one line, a manifest
|
|
6
6
|
inside a non-`proto` fence, a `# graph:` span carrying no manifest key at all,
|
|
7
7
|
and the two spans the extractor must not read as manifests in the first place.
|
|
@@ -14,7 +14,7 @@ and the two spans the extractor must not read as manifests in the first place.
|
|
|
14
14
|
existence is not required, only glob syntax.
|
|
15
15
|
- [ ] `check-two-gate.sh` (`# graph: couples=docs/two.md dir=one valve=none tier=precommit`) and `check-three-gate.sh` (`# graph: couples=docs/three.md dir=bi valve=PROPOSED tier=align-only`) land together — two manifests on one line, and the second must be validated as well as the first.
|
|
16
16
|
- [ ] `check-full-gate.sh` carries every optional key at a legal value
|
|
17
|
-
(`# graph: couples=kit:checks/*.sh,scripts/gates.list trigger=* dir=bi valve=PROPOSED tier=commit-msg mode=whole-tree
|
|
17
|
+
(`# graph: couples=kit:checks/*.sh,scripts/gates.list trigger=* dir=bi valve=PROPOSED tier=commit-msg mode=whole-tree`) —
|
|
18
18
|
the `kit:` prefix validates on its glob part, and a `*` trigger is exempt
|
|
19
19
|
from token validation because it covers every surface.
|
|
20
20
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# Behavioral test of check-graph's whole-registry path — assertions A (manifest
|
|
3
3
|
# well-formedness), B (couples<->trigger parity), C (the cycle-valve rule),
|
|
4
4
|
# D (pre-commit + commit-msg hook freshness), E (graph-artifact freshness) and
|
|
5
|
-
# F (emitted asset hrefs resolve), and the `gen
|
|
5
|
+
# F (emitted asset hrefs resolve), and the retired `gen=` field. None is
|
|
6
6
|
# reachable from the good/bad pair: the pair's cwd is a case dir and a `good/`
|
|
7
7
|
# case must exit 0, while D and E always run on the full path, so satisfying D
|
|
8
8
|
# from a case dir would need a committed byte-copy of the real repo's generated
|
|
@@ -148,7 +148,7 @@ want_red c-no-leading "check-epsilon is a dir=bi bijection with no leading desig
|
|
|
148
148
|
# --- assertion D: both generated hooks -----------------------------------------
|
|
149
149
|
seed; regen || true
|
|
150
150
|
printf '# hand-edited\n' >>"$repo/scripts/git-hooks/pre-commit"
|
|
151
|
-
run; want_red d-hook-stale "scripts/git-hooks/pre-commit is
|
|
151
|
+
run; want_red d-hook-stale "scripts/git-hooks/pre-commit is not its emitter's handoff"
|
|
152
152
|
|
|
153
153
|
seed; regen || true
|
|
154
154
|
rm -f "$repo/scripts/git-hooks/pre-commit"
|
|
@@ -156,7 +156,7 @@ run; want_red d-hook-absent "scripts/git-hooks/pre-commit does not exist"
|
|
|
156
156
|
|
|
157
157
|
seed; regen || true
|
|
158
158
|
printf '# hand-edited\n' >>"$repo/scripts/git-hooks/commit-msg"
|
|
159
|
-
run; want_red d-msg-hook-stale "scripts/git-hooks/commit-msg is
|
|
159
|
+
run; want_red d-msg-hook-stale "scripts/git-hooks/commit-msg is not its emitter's handoff"
|
|
160
160
|
|
|
161
161
|
# --- assertion E: the graph artifact -------------------------------------------
|
|
162
162
|
seed; regen || true
|
|
@@ -186,40 +186,15 @@ regen || true; run
|
|
|
186
186
|
want_green f-asset-href-resolves
|
|
187
187
|
unset GATE_SDK_GRAPH_THEME_DIR
|
|
188
188
|
|
|
189
|
-
# --- gen=
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
printf 'check-eta\n' >>"$repo/scripts/gates.list"
|
|
193
|
-
member check-eta 'couples=docs/site.md trigger=docs/*.md dir=one valve=none tier=precommit gen=manual'
|
|
194
|
-
}
|
|
195
|
-
hook="$repo/scripts/git-hooks/pre-commit"
|
|
196
|
-
todo=' # TODO: fill this manual region, then re-run --emit'
|
|
197
|
-
|
|
198
|
-
manual_member; regen || true; run
|
|
199
|
-
if ! grep -qxF -- "$todo" "$hook" || ! grep -qxF '# >>> manual: check-eta' "$hook" \
|
|
200
|
-
|| ! grep -qxF '# <<< manual: check-eta' "$hook"; then
|
|
201
|
-
echo " FAIL [manual-placeholder]: the hook lacks the sentinels around the TODO line"; fails=$((fails + 1))
|
|
202
|
-
fi
|
|
203
|
-
want_green manual-placeholder
|
|
204
|
-
|
|
205
|
-
manual_member; regen || true
|
|
206
|
-
filled="$(awk -v todo="$todo" '$0 == todo { print " echo hand-filled"; print ""; print " run_gate check-eta scripts/check-eta.sh"; next } { print }' "$hook")"
|
|
207
|
-
printf '%s\n' "$filled" >"$hook"
|
|
208
|
-
before="$(cat "$hook")"
|
|
189
|
+
# --- the retired gen= field: a manifest still carrying it reds, naming the migration
|
|
190
|
+
seed
|
|
191
|
+
member check-alpha 'couples=scripts/gates.list trigger=* dir=one valve=none tier=precommit gen=bespoke'
|
|
209
192
|
regen || true; run
|
|
210
|
-
|
|
211
|
-
echo " FAIL [manual-round-trip]: a second --write did not carry the filled region back byte for byte"; fails=$((fails + 1))
|
|
212
|
-
fi
|
|
213
|
-
want_green manual-round-trip
|
|
214
|
-
|
|
215
|
-
manual_member; regen || true
|
|
216
|
-
edited="$(awk -v todo="$todo" '$0 == todo { print " echo edited-in-place"; next } { print }' "$hook")"
|
|
217
|
-
printf '%s\n' "$edited" >"$hook"
|
|
218
|
-
run; want_green manual-stale-region
|
|
193
|
+
want_red a-gen-retired "carries gen=, which is retired"
|
|
219
194
|
|
|
220
195
|
if [[ "$fails" -gt 0 ]]; then
|
|
221
196
|
echo "check-graph-tree.test: $fails case(s) failed"
|
|
222
197
|
exit 1
|
|
223
198
|
fi
|
|
224
|
-
echo "check-graph-tree.test: ok (constructed consumer tree: A/B/C/D/E/F, both declaration spellings, 4 parity branches, 3 cycle-valve branches, the gen=
|
|
199
|
+
echo "check-graph-tree.test: ok (constructed consumer tree: A/B/C/D/E/F, both declaration spellings, 4 parity branches, 3 cycle-valve branches, the retired gen= field, 16 cases)"
|
|
225
200
|
exit 0
|
|
@@ -335,20 +335,6 @@ gate_check_dirs() {
|
|
|
335
335
|
done <<<"$roots"
|
|
336
336
|
}
|
|
337
337
|
|
|
338
|
-
# spec: gate-sdk/SPEC.md §lib/gate.sh — the staged-path matcher the emitted pre-commit hook splices verbatim, so its body is POSIX sh: true when a line of the caller's newline-separated staged_all matches one of the given globs as a `case` pattern (`*` spans '/').
|
|
339
|
-
# shellcheck disable=SC2154 # staged_all is the caller's newline-separated staged set
|
|
340
|
-
gate_staged_matches() {
|
|
341
|
-
while IFS= read -r _gsm_f; do
|
|
342
|
-
for _gsm_pat in "$@"; do
|
|
343
|
-
# shellcheck disable=SC2254
|
|
344
|
-
case "$_gsm_f" in $_gsm_pat) return 0 ;; esac
|
|
345
|
-
done
|
|
346
|
-
done <<_CHECKWRIGHT_STAGED_
|
|
347
|
-
$staged_all
|
|
348
|
-
_CHECKWRIGHT_STAGED_
|
|
349
|
-
return 1
|
|
350
|
-
}
|
|
351
|
-
|
|
352
338
|
# spec: gate-sdk/SPEC.md §check-commit-msg — resolve the banned-pattern file set shared by check-commit-msg and check-tree-terms: explicit positional args win; otherwise GATE_SDK_MSG_PATTERN_FILES (tracked, must exist — fail-closed) plus GATE_SDK_MSG_PATTERN_FILES_LOCAL (gitignored, skipped when absent). Both are whitespace lists split with no expansion. Emits one existing readable file path per line; returns 2 when a required tracked file is missing.
|
|
353
339
|
gate_msg_pattern_files() {
|
|
354
340
|
if [[ $# -gt 0 ]]; then
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
The `adopt` walk — fitting an installed Checkwright to this repository and triaging its first reds, with the user. Not an iteration stage: it stamps no state and runs in any session after `init`. Exit condition: the full battery is green, or every red carries a disposition the user accepted.
|
|
2
|
+
|
|
3
|
+
## Steps
|
|
4
|
+
|
|
5
|
+
1. **Confirm the install.** `checkwright.lock` exists at the repository root and the worktree is clean. If the lock is missing, Checkwright is not installed here: say so, and stop. Read the lock for the profile, the kits and any selection.
|
|
6
|
+
2. **Find the work.** Run `doctor` the way `init` was run. Each `disarmed` line names a gate that asserts nothing until the knob it names is set: a configuration item. Then run the battery on the gate binary `GATE_SDK_NATIVE_BIN` names, the one `init`'s `next:` block runs, with `--run` and `GATE_SDK_VERBOSE` set to any non-empty value so every gate prints its line, and keep the output. Each red is a triage item. Each clean line counting zero files, pages or entries names a gate that reads nothing on this tree, and is a configuration item too.
|
|
7
|
+
3. **Fit the knobs to the layout.** For each configuration item, and each red whose finding names a path the gate should not read, find the knob that sets its corpus or its exemptions: `--reads <gate>` names the knobs a gate reads, `--emit knob-roster` lists every knob with its type and default, and `--emit knob-values <NAME>` gives its resolved value here. Survey the tree for where its specs, docs, sources, and generated or third-party directories are. Tell the user each change and the paths that ground it, then write it into the `*-config.knobs` file in the gates directory named for the knob's kit: one `NAME = value` line for a scalar, one `NAME[] = element` line per element for an `indexed` knob. Never edit a vendored kit file.
|
|
8
|
+
4. **Triage each red that remains.** Read the finding, its `help:` line and the section its `spec:` pointer names. Then give it one disposition, in this order of preference:
|
|
9
|
+
- a defect in the tree: fix the tree;
|
|
10
|
+
- a legitimate exception the gate provides a valve for, which its `help:` line or its section names: apply the valve, with its reason;
|
|
11
|
+
- a gate of no value to this repository: remove it by re-running `init` with `--without-gate <gate>`, which the lock records, or replace it with a gate of the same name in the gates directory;
|
|
12
|
+
- a red the gate should not raise here: dispose of it as above, and report the finding to the kit's publisher, where its README says.
|
|
13
|
+
|
|
14
|
+
Never bypass a hook, and never edit a vendored gate. Tell the user each disposition before applying it.
|
|
15
|
+
5. **Re-run the battery**, and triage each new red as in step 4; a generated file a knob change left stale names its own regeneration command. **Commit** the knob changes and dispositions in one commit naming them, once the battery is green or each remaining red's disposition is accepted.
|
|
@@ -26,7 +26,7 @@ Vendor the kit beside [gate-sdk](../gate-sdk/), then:
|
|
|
26
26
|
```
|
|
27
27
|
<!-- gate-roster:end -->
|
|
28
28
|
|
|
29
|
-
It resolves through gate-sdk's registry path (your gates dir first, then each kit's `checks/`), and its `# graph:` manifest
|
|
29
|
+
It resolves through gate-sdk's registry path (your gates dir first, then each kit's `checks/`), and the pre-commit hook runs it when its `# graph:` manifest triggers, read at commit.
|
|
30
30
|
|
|
31
31
|
No guard script is copied: the shell guard, the optional wakeup-guard and escalation-guard are binary arms, wired by pointing a hook's `command` field at `bash gate-sdk/bin/run-gates.sh --hook shell-guard` (or `--hook wakeup-guard`, `--hook escalation-guard`). Where the binary is absent the front end fails open and the guard steers nothing.
|
|
32
32
|
|
|
@@ -67,4 +67,4 @@ gates="${GATE_SDK_NATIVE_BIN:-./scripts/checkwright-gates}"
|
|
|
67
67
|
|
|
68
68
|
## License
|
|
69
69
|
|
|
70
|
-
Apache-2.0
|
|
70
|
+
Licensed under Apache-2.0, with the text in `LICENSE` beside this file in an installed copy and at the repository root in the source tree.
|
|
@@ -34,7 +34,7 @@ Vendor the kit beside [gate-sdk](../gate-sdk/) (required), then:
|
|
|
34
34
|
```
|
|
35
35
|
<!-- gate-roster:end -->
|
|
36
36
|
|
|
37
|
-
They resolve through gate-sdk's registry path (your gates dir first, then each kit's `checks/`), and their `# graph:` manifests
|
|
37
|
+
They resolve through gate-sdk's registry path (your gates dir first, then each kit's `checks/`), and the hooks run those their `# graph:` manifests trigger, read at commit (`check-stamp-subject` and `check-dispatch-entry` in the commit-msg hook). `--emit git-hooks --write` on the gate binary `GATE_SDK_NATIVE_BIN` names writes the pre-commit hook once, and again only to add the commit-msg hook when a first `tier=commit-msg` gate is registered.
|
|
38
38
|
|
|
39
39
|
2. Give the queue file its header and each evidence file its skeleton — the stage-stamp file and the lesson-disposition file (`LIFECYCLE_KIT_LESSON_EVIDENCE_FILE`, both boundary-reset to their header). The queue header line:
|
|
40
40
|
|
|
@@ -94,4 +94,4 @@ gates="${GATE_SDK_NATIVE_BIN:-./scripts/checkwright-gates}"
|
|
|
94
94
|
|
|
95
95
|
## License
|
|
96
96
|
|
|
97
|
-
Apache-2.0
|
|
97
|
+
Licensed under Apache-2.0, with the text in `LICENSE` beside this file in an installed copy and at the repository root in the source tree.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
# graph: couples=knob:GATE_SDK_WORKFLOW_DIR/*,kit:SPEC.md,knob:LIFECYCLE_KIT_CLOSE_SURFACE_GLOBS,.gitignore dir=one valve=none tier=precommit
|
|
2
2
|
# install: on-surface
|
|
3
|
-
# spec: lifecycle-kit/SPEC.md §check-close-surfaces — the derived close-surface roster is complete and moded: no undeclared capture surface, every declaration carries a mode with a well-formed forced= citation, every capture-tier declaration names a reclaim command
|
|
3
|
+
# spec: lifecycle-kit/SPEC.md §check-close-surfaces — the derived close-surface roster is complete and moded: no undeclared capture surface, every declaration carries a mode with a well-formed forced= citation, every capture-tier declaration names a reclaim command that rotates
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# graph: couples=knob:LIFECYCLE_KIT_SKILLS_DIR/*.md,lifecycle-kit/templates/stages/*.md,lifecycle-kit/templates/lead.md,lifecycle-kit/templates/release-sweep.md,lifecycle-kit/templates/upgrade.md,lifecycle-kit/templates/consult.md,delegation-kit/templates/agent-execution.md dir=one valve=none tier=precommit
|
|
1
|
+
# graph: couples=knob:LIFECYCLE_KIT_SKILLS_DIR/*.md,lifecycle-kit/templates/stages/*.md,lifecycle-kit/templates/lead.md,lifecycle-kit/templates/release-sweep.md,lifecycle-kit/templates/upgrade.md,lifecycle-kit/templates/consult.md,delegation-kit/templates/agent-execution.md,gate-sdk/templates/adopt.md,drift-kit/templates/economics.md dir=one valve=none tier=precommit
|
|
2
2
|
# install: never
|
|
3
3
|
# spec: lifecycle-kit/SPEC.md §check-skill-binding — every binding-shim skill names an existing template and binds exactly that template's slot set
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# Behavioral test of check-close-surfaces over real git repos — the
|
|
3
|
-
#
|
|
3
|
+
# three assertions the good/bad pair cannot reach. A fixture case dir cannot ship
|
|
4
4
|
# a gitignored member: `git check-ignore` never reports a tracked path, and a
|
|
5
5
|
# fixture file must be tracked to survive a clone. So the capture-tier half —
|
|
6
|
-
# assertion A (an undeclared capture surface)
|
|
7
|
-
# with no reclaim command, inside or outside the workflow dir)
|
|
6
|
+
# assertion A (an undeclared capture surface), assertion C (a declared one
|
|
7
|
+
# with no reclaim command, inside or outside the workflow dir) and assertion D
|
|
8
|
+
# (a reclaim that truncates) — is exercised in sandbox repos here, the
|
|
8
9
|
# check-merge-attrs / check-exec-bit precedent. The pair covers assertion B.
|
|
9
10
|
#
|
|
10
11
|
# Run by the --run-gate-tests arm (any <tests-dir>/*.test.sh; must exit 0).
|
|
@@ -52,21 +53,26 @@ noreclaim="$SANDBOX/noreclaim"
|
|
|
52
53
|
seed_repo "$noreclaim" "close-surface: .workflow/capture.log advisory"
|
|
53
54
|
check_case "capture-without-reclaim" "$noreclaim" 1 "names no reclaim= command"
|
|
54
55
|
|
|
55
|
-
# ---
|
|
56
|
+
# --- assertion D: the reclaim is named, but truncates rather than rotates ---
|
|
57
|
+
truncating="$SANDBOX/truncating"
|
|
58
|
+
seed_repo "$truncating" "close-surface: .workflow/capture.log advisory reclaim=: > .workflow/capture.log"
|
|
59
|
+
check_case "capture-reclaimed-by-truncation" "$truncating" 1 "reclaim does not rotate the log"
|
|
60
|
+
|
|
61
|
+
# --- all satisfied: declared, moded, reclaimed by rotation ---
|
|
56
62
|
ok="$SANDBOX/ok"
|
|
57
|
-
seed_repo "$ok" "close-surface: .workflow/capture.log advisory reclaim
|
|
63
|
+
seed_repo "$ok" "close-surface: .workflow/capture.log advisory reclaim=run-gates.sh --emit capture-drain .workflow/capture.log"
|
|
58
64
|
check_case "capture-declared-and-reclaimed" "$ok" 0 "CLOSE-SURFACES: clean"
|
|
59
65
|
|
|
60
66
|
# --- assertion C reads <tracking>: a gitignored declared path outside the workflow dir, no reclaim ---
|
|
61
67
|
outside="$SANDBOX/outside"
|
|
62
|
-
seed_repo "$outside" $'close-surface: .workflow/capture.log advisory reclaim
|
|
68
|
+
seed_repo "$outside" $'close-surface: .workflow/capture.log advisory reclaim=run-gates.sh --emit capture-drain .workflow/capture.log\nclose-surface: notes/scratch.log advisory'
|
|
63
69
|
printf 'notes/\n' >>"$outside/.gitignore"
|
|
64
70
|
mkdir -p "$outside/notes"; printf 'x\n' >"$outside/notes/scratch.log"
|
|
65
71
|
check_case "ignored-outside-workflow-without-reclaim" "$outside" 1 "'close-surface: notes/scratch.log' is capture-tier"
|
|
66
72
|
|
|
67
73
|
# --- a declared log's drain companions fold into its row; a drain beside no declared log does not ---
|
|
68
74
|
drained="$SANDBOX/drained"
|
|
69
|
-
seed_repo "$drained" "close-surface: .workflow/capture.log advisory reclaim
|
|
75
|
+
seed_repo "$drained" "close-surface: .workflow/capture.log advisory reclaim=run-gates.sh --emit capture-drain .workflow/capture.log"
|
|
70
76
|
printf '.workflow/*.drain\n.workflow/*.drain.part\n' >>"$drained/.gitignore"
|
|
71
77
|
printf 'a drained line\n' >"$drained/.workflow/capture.log.drain"
|
|
72
78
|
printf 'a crashed line\n' >"$drained/.workflow/capture.log.drain.part"
|
|
@@ -78,5 +84,5 @@ if [[ "$fails" -gt 0 ]]; then
|
|
|
78
84
|
echo "check-close-surfaces.test.sh: $fails case(s) failed"
|
|
79
85
|
exit 1
|
|
80
86
|
fi
|
|
81
|
-
echo "check-close-surfaces.test.sh: clean (undeclared capture, declared-without-reclaim, the satisfied case, a gitignored declared path outside the workflow dir, a declared log's drain folded into its row, and a drain beside no declared log reported,
|
|
87
|
+
echo "check-close-surfaces.test.sh: clean (undeclared capture, declared-without-reclaim, a truncating reclaim, the satisfied case, a gitignored declared path outside the workflow dir, a declared log's drain folded into its row, and a drain beside no declared log reported, 7 cases)"
|
|
82
88
|
exit 0
|
|
@@ -14,6 +14,8 @@ The session-context hook reads it on each re-fire and suppresses its executor-fa
|
|
|
14
14
|
|
|
15
15
|
Then open your resume journal with `--enter-stage --open-lead-journal` on the gate binary `GATE_SDK_NATIVE_BIN` names before writing to it; never overwrite the file.
|
|
16
16
|
|
|
17
|
+
Then read the model roster: run `--price-coverage` on the gate binary `GATE_SDK_NATIVE_BIN` names (drift-kit/SPEC.md §The price-coverage arm; without drift-kit, skip this). An id it names unpriced is a harness roster churn. Re-judge every tier assignment before your first dispatch (§Economics), and file the missing row with `--emit file-gap`. File a `CHANGED` price page the same way.
|
|
18
|
+
|
|
17
19
|
## The lead model
|
|
18
20
|
|
|
19
21
|
The lead takes one of two postures; which one — and the model tier each session rides — is standing dispatch policy (the ruling-config slot below):
|
|
@@ -28,7 +28,7 @@ Vendor the kit beside [gate-sdk](../gate-sdk/) (required), then:
|
|
|
28
28
|
```
|
|
29
29
|
<!-- gate-roster:end -->
|
|
30
30
|
|
|
31
|
-
`check-queue-wrap` is for a queue you hard-wrap; if you keep it unwrapped, one line per paragraph as the template ships, leave it out and register canon-kit's `check-md-unwrapped` instead. They resolve through gate-sdk's registry path (your gates dir first, then each kit's `checks/`), and their `# graph:` manifests
|
|
31
|
+
`check-queue-wrap` is for a queue you hard-wrap; if you keep it unwrapped, one line per paragraph as the template ships, leave it out and register canon-kit's `check-md-unwrapped` instead. They resolve through gate-sdk's registry path (your gates dir first, then each kit's `checks/`), and the pre-commit hook runs those their `# graph:` manifests trigger, read at commit. `--emit git-hooks --write` on the gate binary `GATE_SDK_NATIVE_BIN` names writes that hook once, and again only to add the commit-msg hook when a first `tier=commit-msg` gate is registered.
|
|
32
32
|
|
|
33
33
|
2. Give your queue file the section skeleton — copy `templates/TASK-QUEUE.md` and fill it in (it shows one example entry per grammar shape). The default sections are `New Features` / `Technical Debt` (active), `Deferred`, `Done` — plus an optional `Icebox` tier between the last two for backlogs whose carry weight has become the problem, off by default (`QUEUE_KIT_ICEBOX_SECTION`).
|
|
34
34
|
|
|
@@ -80,4 +80,4 @@ gates="${GATE_SDK_NATIVE_BIN:-./scripts/checkwright-gates}"
|
|
|
80
80
|
|
|
81
81
|
## License
|
|
82
82
|
|
|
83
|
-
Apache-2.0
|
|
83
|
+
Licensed under Apache-2.0, with the text in `LICENSE` beside this file in an installed copy and at the repository root in the source tree.
|
|
@@ -32,7 +32,7 @@ Vendor the kit beside [gate-sdk](../gate-sdk/) (required), then:
|
|
|
32
32
|
```
|
|
33
33
|
<!-- gate-roster:end -->
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
The pre-commit hook runs the gates their `# graph:` manifests trigger, read at commit; `--emit git-hooks --write` on the gate binary `GATE_SDK_NATIVE_BIN` names writes it once, and again only to add the commit-msg hook when a first `tier=commit-msg` gate is registered. `check-docs-render-fidelity` needs ruby plus the kramdown-parser-gfm gem (the Pages parser), and `check-docs-liquid-parse` needs ruby with the `liquid` gem; a consumer without a published docs site simply omits both, and one whose host runs no Liquid omits the second.
|
|
36
36
|
|
|
37
37
|
2. Establish the host source of truth — a CNAME file holding exactly one host line, at the path `SITE_KIT_CNAME` names (site-kit/SPEC.md owns its fallback).
|
|
38
38
|
|
|
@@ -53,4 +53,4 @@ gates="${GATE_SDK_NATIVE_BIN:-./scripts/checkwright-gates}"
|
|
|
53
53
|
|
|
54
54
|
## License
|
|
55
55
|
|
|
56
|
-
Apache-2.0
|
|
56
|
+
Licensed under Apache-2.0, with the text in `LICENSE` beside this file in an installed copy and at the repository root in the source tree.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
# graph: couples=knob:SITE_KIT_CNAME dir=one valve=none tier=precommit trigger=*
|
|
2
2
|
# install: on-surface
|
|
3
|
-
# spec: site-kit/SPEC.md §check-docs-cname-parity — the
|
|
3
|
+
# spec: site-kit/SPEC.md §check-docs-cname-parity — the host in the CNAME file SITE_KIT_CNAME names is the single gated source of truth for the docs host; no tracked file names a configured host alias other than that host in a URL
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# graph: couples=knob:SITE_KIT_DOCS_DIR/*.md,knob:SITE_KIT_DOCS_DIR/*/index.md,knob:SITE_KIT_DOCS_DIR/posts/*.md,knob:
|
|
1
|
+
# graph: couples=knob:SITE_KIT_DOCS_DIR/*.md,knob:SITE_KIT_DOCS_DIR/*/index.md,knob:SITE_KIT_DOCS_DIR/posts/*.md,knob:SITE_KIT_LIQUID_TEMPLATES dir=one valve=none tier=precommit
|
|
2
2
|
# install: on-surface
|
|
3
|
-
# spec: site-kit/SPEC.md §check-docs-liquid-parse — every tracked docs file the Pages build runs Liquid over (markdown pages, front-matter files, and the
|
|
3
|
+
# spec: site-kit/SPEC.md §check-docs-liquid-parse — every tracked docs file the Pages build runs Liquid over (markdown pages, front-matter files, and the templates SITE_KIT_LIQUID_TEMPLATES names) parses under the parser SITE_KIT_LIQUID_PARSER names; a parser that fails its probe or returns a short count refuses
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
docs/span.md: Liquid syntax error (line 3): Variable '{{
|
|
2
|
-
docs/
|
|
2
|
+
docs/_templates/default.html: Liquid syntax error (line 5): 'if' tag was never closed
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
# spec: companion/SPEC.md §The OpenSpec recipe — composed by `init --recipe` into the consumer's scripts/canon-config.knobs
|
|
2
2
|
CANON_KIT_PROSE_SURFACE_GLOBS[] = openspec/**/*.md
|
|
3
3
|
CANON_KIT_TEMPORAL_EXEMPT_PATHS[] = openspec/changes/**
|
|
4
|
+
CANON_KIT_TASK_LIST_GLOBS[] = openspec/changes/*/tasks.md
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
# spec: companion/SPEC.md §The Spec Kit recipe — composed by `init --recipe` into the consumer's scripts/canon-config.knobs
|
|
2
2
|
CANON_KIT_PROSE_SURFACE_GLOBS[] = specs/**/*.md
|
|
3
3
|
CANON_KIT_FENCE_PROGRAMS_EXTRA[] = Task:
|
|
4
|
+
CANON_KIT_TASK_LIST_GLOBS[] = specs/*/tasks.md
|
|
5
|
+
CANON_KIT_TASK_LABEL_CITES[story] = \[US([0-9]+)\]
|
|
6
|
+
CANON_KIT_TASK_LABEL_DEFINES[story] = ^### User Story ([0-9]+)[ ]
|
|
File without changes
|
|
File without changes
|