checkwright 0.22.0 → 0.24.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 +855 -96
- package/lib/common/lock.sh +45 -9
- package/lib/common/profile.sh +33 -0
- package/lib/common/recipe.sh +50 -34
- package/lib/diff.sh +66 -0
- package/lib/doctor.sh +67 -42
- package/lib/init.sh +62 -46
- package/lib/uninstall.sh +214 -0
- package/lib/update.sh +34 -0
- package/package.json +2 -2
- 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/canon-kit/README.md +1 -0
- package/payload/canon-kit/SPEC.md +527 -63
- package/payload/canon-kit/checks/check-amendment-queue.gate +3 -0
- package/payload/canon-kit/checks/check-comment-tier.gate +3 -0
- package/payload/canon-kit/checks/check-deprecation-task.gate +3 -0
- package/payload/canon-kit/checks/check-docs-cmd.gate +3 -0
- package/payload/canon-kit/checks/check-docs-link-convention.gate +3 -0
- package/payload/canon-kit/checks/check-install-claim.gate +3 -0
- package/payload/canon-kit/checks/check-knob-citation.gate +3 -0
- package/payload/canon-kit/checks/check-knob-default-coupling.gate +3 -0
- package/payload/canon-kit/checks/check-manifest-count.gate +3 -0
- package/payload/canon-kit/checks/check-manifest-temporal.gate +3 -0
- package/payload/canon-kit/checks/check-md-refs.gate +3 -0
- package/payload/canon-kit/checks/check-measured-claim.gate +3 -0
- package/payload/canon-kit/checks/check-payload-claim.gate +3 -0
- package/payload/canon-kit/checks/check-prose-enum.gate +3 -0
- package/payload/canon-kit/checks/check-prose-tells.gate +3 -0
- package/payload/canon-kit/checks/check-spec-derivable-section.gate +3 -0
- package/payload/canon-kit/checks/check-spec-dod-singleton.gate +3 -0
- package/payload/canon-kit/checks/check-spec-embedded-source.gate +3 -0
- package/payload/canon-kit/checks/check-spec-fence-balance.gate +3 -0
- package/payload/canon-kit/checks/check-spec-pointer.gate +3 -0
- package/payload/canon-kit/checks/check-surface-duplication.sh +1 -0
- package/payload/canon-kit/checks/check-todo-task-liveness.gate +3 -0
- package/payload/canon-kit/checks/check-tracking-claim.gate +3 -0
- package/payload/canon-kit/gate-tests/check-amendment-queue/bad/SPEC-orphan.md +6 -0
- package/payload/canon-kit/gate-tests/check-amendment-queue/bad/TASK-QUEUE.md +7 -2
- package/payload/canon-kit/gate-tests/check-amendment-queue/bad/expect.txt +8 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/bad/.workflow/fixture-state.txt +4 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/bad/bad.gate +4 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/bad/bad.rs +5 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/bad/bad.sh +3 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/bad/expect.txt +5 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/bad/templates/bad-tmpl.sh +4 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/good/.workflow/fixture-state.txt +3 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/good/expect.txt +1 -1
- package/payload/canon-kit/gate-tests/check-comment-tier/good/good.gate +4 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/good/good.rs +5 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/good/good.sh +3 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/good/templates/good-tmpl.sh +5 -0
- package/payload/canon-kit/gate-tests/check-comment-tier.test.sh +3 -2
- package/payload/canon-kit/gate-tests/check-deprecation-task/bad/.workflow/fixture-state.txt +3 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/bad/bad.gate +2 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/bad/bad.rs +4 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/bad/expect.txt +3 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/bad/scripts/canon-config.sh +6 -5
- package/payload/canon-kit/gate-tests/check-deprecation-task/bad/templates/tmpl.sh +5 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/good/.workflow/fixture-state.txt +3 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/good/expect.txt +1 -1
- package/payload/canon-kit/gate-tests/check-deprecation-task/good/good.gate +2 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/good/good.rs +4 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/good/scripts/canon-config.sh +6 -5
- package/payload/canon-kit/gate-tests/check-deprecation-task/good/templates/tmpl.sh +5 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task.test.sh +4 -3
- package/payload/canon-kit/gate-tests/check-docs-link-convention.test.sh +4 -4
- package/payload/canon-kit/gate-tests/check-knob-citation.test.sh +2 -2
- package/payload/canon-kit/gate-tests/check-knob-default-coupling.test.sh +2 -2
- package/payload/canon-kit/gate-tests/check-manifest-count/good/SPEC.md +4 -0
- package/payload/canon-kit/gate-tests/check-manifest-count.test.sh +27 -5
- package/payload/canon-kit/gate-tests/check-md-refs.test.sh +61 -9
- package/payload/canon-kit/gate-tests/check-measured-claim/bad/SPEC.md +12 -0
- package/payload/canon-kit/gate-tests/check-measured-claim/bad/expect.txt +3 -0
- package/payload/canon-kit/gate-tests/check-measured-claim/bad/scripts/canon-config.sh +6 -0
- package/payload/canon-kit/gate-tests/check-measured-claim/good/SPEC.md +23 -0
- package/payload/canon-kit/gate-tests/check-measured-claim/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-measured-claim/good/scripts/canon-config.sh +6 -0
- package/payload/canon-kit/gate-tests/check-measured-claim.test.sh +90 -0
- package/payload/canon-kit/gate-tests/check-prose-enum.test.sh +3 -3
- package/payload/canon-kit/gate-tests/check-spec-dod-singleton.test.sh +21 -7
- package/payload/canon-kit/gate-tests/check-spec-embedded-source/bad/SPEC-wire.md +18 -0
- package/payload/canon-kit/gate-tests/check-spec-embedded-source/bad/expect.txt +3 -1
- package/payload/canon-kit/gate-tests/check-spec-embedded-source/bad/widget.proto +13 -0
- package/payload/canon-kit/gate-tests/check-spec-embedded-source/good/SPEC-wire.md +22 -0
- package/payload/canon-kit/gate-tests/check-spec-embedded-source/good/SPEC.md +17 -0
- package/payload/canon-kit/gate-tests/check-spec-embedded-source/good/widget.proto +13 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/.workflow/fixture-state.txt +2 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/bad.gate +2 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/bad.rs +4 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/expect.txt +3 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/templates/tmpl.sh +5 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/.workflow/fixture-state.txt +2 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/expect.txt +1 -1
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/good.gate +2 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/good.rs +4 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/templates/tmpl.sh +5 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/.workflow/fixture-state.txt +3 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/bad.gate +2 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/bad.rs +4 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/expect.txt +3 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/templates/tmpl.sh +5 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/.workflow/fixture-state.txt +3 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/expect.txt +1 -1
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/good.gate +2 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/good.rs +4 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/templates/tmpl.sh +5 -0
- package/payload/canon-kit/gate-tests/check-tracking-claim.test.sh +1 -2
- package/payload/canon-kit/lib/spec.sh +91 -62
- package/payload/canon-kit/smoke/install.sh +2 -1
- package/payload/canon-kit/templates/SPEC-amendment.md +4 -1
- package/payload/context-kit/README.md +10 -5
- package/payload/context-kit/SPEC.md +364 -62
- package/payload/context-kit/bin/always-loaded.sh +5 -21
- package/payload/context-kit/bin/env-probe.sh +21 -23
- package/payload/context-kit/checks/check-brevity.gate +3 -0
- package/payload/context-kit/checks/check-footprint-fresh.gate +3 -0
- package/payload/context-kit/checks/check-memory-off.gate +3 -0
- package/payload/context-kit/checks/check-settings-paths.gate +3 -0
- package/payload/context-kit/checks/check-settings-pins.gate +3 -0
- package/payload/context-kit/gate-tests/check-brevity.test.sh +3 -2
- package/payload/context-kit/gate-tests/check-memory-off/bad/scripts/context-config.sh +4 -0
- package/payload/context-kit/gate-tests/check-memory-off/good/scripts/context-config.sh +4 -0
- package/payload/context-kit/gate-tests/check-memory-off.test.sh +18 -4
- package/payload/context-kit/gate-tests/check-settings-paths/bad/expect.txt +3 -0
- package/payload/context-kit/gate-tests/check-settings-paths/bad/settings.json +12 -0
- package/payload/context-kit/gate-tests/check-settings-paths/bad/tools/real-tool.sh +4 -0
- package/payload/context-kit/gate-tests/check-settings-paths/good/expect.txt +1 -0
- package/payload/context-kit/gate-tests/check-settings-paths/good/settings.json +16 -0
- package/payload/context-kit/gate-tests/check-settings-paths/good/tools/real-tool.sh +4 -0
- package/payload/context-kit/gate-tests/check-settings-pins.test.sh +70 -0
- package/payload/context-kit/index-tests/expected/toolfloor.txt +9 -0
- package/payload/context-kit/index-tests/toolfloor-cases.sh +20 -0
- package/payload/context-kit/lib/context.sh +56 -0
- package/payload/context-kit/lib/toolfloor.sh +15 -4
- package/payload/context-kit/smoke/agents-md.sh +27 -4
- package/payload/context-kit/smoke/install.sh +4 -2
- package/payload/context-kit/templates/session-context.sh +5 -5
- package/payload/delegation-kit/README.md +3 -3
- package/payload/delegation-kit/SPEC.md +400 -22
- package/payload/delegation-kit/checks/check-agent-tier-explicit.gate +3 -0
- package/payload/delegation-kit/checks/check-gate-tamper.gate +3 -0
- package/payload/delegation-kit/checks/check-rule-citation.gate +3 -0
- package/payload/delegation-kit/gate-tests/check-gate-tamper/bad/added-exemptions +5 -0
- package/payload/delegation-kit/gate-tests/check-gate-tamper/bad/expect.txt +2 -0
- package/payload/delegation-kit/gate-tests/check-gate-tamper.test.sh +108 -0
- package/payload/delegation-kit/smoke/install.sh +1 -1
- package/payload/delegation-kit/templates/agent-execution.md +109 -18
- package/payload/delegation-kit/templates/statusline-usage.sh +23 -1
- package/payload/doctrine-kit/DOCTRINE.md +86 -12
- package/payload/doctrine-kit/README.md +7 -3
- package/payload/doctrine-kit/SPEC.md +103 -10
- package/payload/doctrine-kit/bin/install-doctrine.sh +83 -13
- package/payload/doctrine-kit/checks/check-doctrine-registration.gate +3 -0
- package/payload/doctrine-kit/gate-tests/check-doctrine-registration/bad/DOCTRINE.md +3 -0
- package/payload/doctrine-kit/gate-tests/check-doctrine-registration/good/DOCTRINE.md +3 -0
- package/payload/doctrine-kit/gate-tests/check-doctrine-registration.test.sh +84 -5
- package/payload/doctrine-kit/smoke/install.sh +106 -3
- package/payload/drift-kit/README.md +2 -2
- package/payload/drift-kit/SPEC.md +84 -11
- package/payload/drift-kit/bin/kfric.sh +21 -2
- package/payload/drift-kit/bin/stage-economics.sh +1 -1
- package/payload/drift-kit/lib/drift.sh +43 -0
- package/payload/drift-kit/smoke/install.sh +49 -14
- package/payload/evidence-kit/README.md +3 -1
- package/payload/evidence-kit/SPEC.md +160 -19
- package/payload/evidence-kit/checks/check-battery-roster.gate +3 -0
- package/payload/evidence-kit/checks/check-evidence-baseline.gate +3 -0
- package/payload/evidence-kit/checks/check-evidence-manifest.gate +3 -0
- package/payload/evidence-kit/checks/check-producer-liveness.sh +43 -2
- package/payload/evidence-kit/gate-tests/check-battery-roster.test.sh +4 -3
- package/payload/evidence-kit/gate-tests/check-evidence-baseline.test.sh +8 -5
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/WORKFLOW-STATE.txt +1 -1
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/scripts/evidence-config.sh +9 -0
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/WORKFLOW-STATE.txt +1 -1
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/scripts/evidence-config.sh +9 -0
- package/payload/evidence-kit/gate-tests/check-evidence-manifest.test.sh +6 -4
- package/payload/evidence-kit/gate-tests/producer-lock.test.sh +42 -1
- package/payload/evidence-kit/lib/evidence.sh +2 -0
- package/payload/evidence-kit/smoke/install.sh +1 -1
- package/payload/gate-sdk/README.md +23 -7
- package/payload/gate-sdk/SPEC.md +6402 -291
- package/payload/gate-sdk/bin/build-native.sh +38 -0
- package/payload/gate-sdk/bin/gen-pre-commit.sh +23 -3
- package/payload/gate-sdk/bin/install-hooks.sh +14 -2
- package/payload/gate-sdk/bin/port-blockers.sh +473 -0
- package/payload/gate-sdk/bin/run-consumer-smoke.sh +8 -1
- package/payload/gate-sdk/bin/run-gate-tests.sh +27 -7
- package/payload/gate-sdk/bin/run-gates.sh +30 -2
- package/payload/gate-sdk/bin/upgrade-smoke.sh +70 -17
- package/payload/gate-sdk/checks/check-action-gh-repo.gate +1 -0
- package/payload/gate-sdk/checks/check-action-pinning.gate +1 -0
- package/payload/gate-sdk/checks/check-action-run-shell.sh +2 -0
- package/payload/gate-sdk/checks/check-assertion-strength.gate +3 -0
- package/payload/gate-sdk/checks/check-commit-msg.gate +3 -0
- package/payload/gate-sdk/checks/check-commit-subject.gate +3 -0
- package/payload/gate-sdk/checks/check-core-files.gate +3 -0
- package/payload/gate-sdk/checks/check-crate-arms.sh +62 -0
- package/payload/gate-sdk/checks/check-enforcement-fresh.gate +3 -0
- package/payload/gate-sdk/checks/check-exec-bit.gate +3 -0
- package/payload/gate-sdk/checks/check-gate-assertions.sh +32 -6
- package/payload/gate-sdk/checks/check-gate-binary-fresh.gate +3 -0
- package/payload/gate-sdk/checks/check-gate-exemption-tasks.gate +3 -0
- package/payload/gate-sdk/checks/check-gate-fail-closed.gate +3 -0
- package/payload/gate-sdk/checks/check-gate-fixture-coverage.gate +3 -0
- package/payload/gate-sdk/checks/check-gate-output.gate +3 -0
- package/payload/gate-sdk/checks/check-gate-substrate-parity.sh +109 -14
- package/payload/gate-sdk/checks/check-graph.gate +3 -0
- package/payload/gate-sdk/checks/check-hook-exec-bit.gate +3 -0
- package/payload/gate-sdk/checks/check-identity.gate +3 -0
- package/payload/gate-sdk/checks/check-install-disposition.sh +93 -0
- package/payload/gate-sdk/checks/check-kit-enum.gate +3 -0
- package/payload/gate-sdk/checks/check-kit-registration.gate +3 -0
- package/payload/gate-sdk/checks/check-readme-roster.gate +3 -0
- package/payload/gate-sdk/checks/check-reads-couples.gate +3 -0
- package/payload/gate-sdk/checks/check-root-tiering.gate +3 -0
- package/payload/gate-sdk/checks/check-shellcheck.sh +2 -0
- package/payload/gate-sdk/checks/check-smoke-entry-guard.gate +3 -0
- package/payload/gate-sdk/checks/check-template-copy-parity.gate +3 -0
- package/payload/gate-sdk/checks/check-template-registry-parity.gate +3 -0
- package/payload/gate-sdk/checks/check-test-hermetic.gate +3 -0
- package/payload/gate-sdk/checks/check-tree-terms.sh +2 -0
- package/payload/gate-sdk/checks/check-workflow-tiering.gate +3 -0
- package/payload/gate-sdk/gate-tests/check-commit-subject.test.sh +17 -12
- package/payload/gate-sdk/gate-tests/check-core-files.test.sh +4 -5
- package/payload/gate-sdk/gate-tests/check-crate-arms/bad/crate/Cargo.toml +7 -0
- package/payload/gate-sdk/gate-tests/check-crate-arms/bad/crate/src/lib.rs +12 -0
- package/payload/gate-sdk/gate-tests/check-crate-arms/bad/expect.txt +5 -0
- package/payload/gate-sdk/gate-tests/check-crate-arms/bad/scripts/gate-sdk-config.sh +2 -0
- package/payload/gate-sdk/gate-tests/check-crate-arms/good/crate/Cargo.toml +7 -0
- package/payload/gate-sdk/gate-tests/check-crate-arms/good/crate/src/lib.rs +11 -0
- package/payload/gate-sdk/gate-tests/check-crate-arms/good/expect.txt +2 -0
- package/payload/gate-sdk/gate-tests/check-crate-arms/good/scripts/gate-sdk-config.sh +2 -0
- package/payload/gate-sdk/gate-tests/check-exec-bit/bad/dump.txt +2 -1
- package/payload/gate-sdk/gate-tests/check-exec-bit/bad/expect.txt +2 -1
- package/payload/gate-sdk/gate-tests/check-exec-bit/good/dump.txt +3 -0
- package/payload/gate-sdk/gate-tests/check-exec-bit/good/expect.txt +1 -1
- package/payload/gate-sdk/gate-tests/check-exec-bit.test.sh +3 -4
- package/payload/gate-sdk/gate-tests/check-gate-assertions/good/expect.txt +1 -1
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh.test.sh +26 -4
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/args +6 -1
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/expect.txt +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/kitroot/checks/check-vendored-descriptor.gate +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/kitroot/checks/check-vendored.sh +14 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/scripts/check-descriptor.gate +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/scripts/check-held.sh +8 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/args +8 -1
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/expect.txt +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/kitroot/checks/check-vendored-descriptor.gate +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/kitroot/checks/check-vendored.sh +14 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/scripts/check-descriptor.gate +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/scripts/check-held.sh +8 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks.test.sh +77 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/bad/check-native-sample.gate +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/bad/expect.txt +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/bad/gates.list +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/bad/native/Cargo.toml +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/bad/native/src/gates/native_sample.rs +7 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/good/check-native-sample.gate +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/good/expect.txt +1 -1
- package/payload/gate-sdk/gate-tests/check-gate-output/good/gates.list +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/good/native/Cargo.toml +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/good/native/src/gates/native_sample.rs +11 -0
- package/payload/gate-sdk/gate-tests/check-gate-output.test.sh +110 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/expect.txt +7 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-alpha.sh +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-bare.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-both.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-heldtwice.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-orphan.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-twice.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gates.list +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/expect.txt +2 -1
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-alpha.sh +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-held.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gates.list +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity.test.sh +110 -4
- package/payload/gate-sdk/gate-tests/check-graph/bad/SPEC-example-gate.md +15 -5
- package/payload/gate-sdk/gate-tests/check-graph/bad/expect.txt +12 -0
- package/payload/gate-sdk/gate-tests/check-graph/good/SPEC-example-gate.md +27 -5
- package/payload/gate-sdk/gate-tests/check-graph/good/SPEC-second-gate.md +12 -0
- package/payload/gate-sdk/gate-tests/check-graph-cap.test.sh +5 -4
- package/payload/gate-sdk/gate-tests/check-graph-refs.test.sh +14 -12
- package/payload/gate-sdk/gate-tests/check-graph-theme.test.sh +43 -17
- package/payload/gate-sdk/gate-tests/check-graph-tree.test.sh +190 -0
- package/payload/gate-sdk/gate-tests/check-identity/bad/gh-hosts.yml +9 -0
- package/payload/gate-sdk/gate-tests/check-identity/bad/identity.conf +4 -2
- package/payload/gate-sdk/gate-tests/check-identity/bad/scripts/gate-sdk-config.sh +10 -0
- package/payload/gate-sdk/gate-tests/check-identity/good/gh-hosts.yml +11 -0
- package/payload/gate-sdk/gate-tests/check-identity/good/identity.conf +5 -1
- package/payload/gate-sdk/gate-tests/check-identity/good/scripts/gate-sdk-config.sh +10 -0
- package/payload/gate-sdk/gate-tests/check-identity.test.sh +114 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-alpha.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-delta.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-epsilon.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/smoke/install.sh +7 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/args +6 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/installer/lib/common/recipe.sh +9 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/scripts/gate-sdk-config.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-alpha.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-beta.gate +3 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-gamma.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/smoke/install.sh +8 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/args +6 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/installer/lib/common/recipe.sh +10 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/scripts/gate-sdk-config.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-kit-enum/bad/check-native-sample.gate +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-enum/bad/gates.list +4 -1
- package/payload/gate-sdk/gate-tests/check-kit-enum/good/check-native-sample.gate +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-enum/good/expect.txt +1 -1
- package/payload/gate-sdk/gate-tests/check-kit-enum/good/gates.list +5 -2
- package/payload/gate-sdk/gate-tests/check-kit-registration.test.sh +6 -5
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/args +3 -1
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/delta-kit/README.md +15 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/delta-kit/checks/check-delta-one.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/delta-kit/checks/check-delta-two.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/expect.txt +3 -1
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/scripts/gate-sdk-config.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/args +3 -1
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/delta-kit/README.md +13 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/delta-kit/checks/check-delta-one.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/epsilon-kit/README.md +14 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/epsilon-kit/checks/check-eps-one.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/epsilon-kit/checks/check-eps-two.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/scripts/gate-sdk-config.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-reads-couples.test.sh +87 -89
- package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/scripts/agent-budget-guard.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-template-copy-parity.test.sh +56 -0
- package/payload/gate-sdk/gate-tests/check-test-hermetic-smoke.test.sh +2 -3
- package/payload/gate-sdk/gate-tests/declaration-lib-parity.test.sh +211 -0
- package/payload/gate-sdk/gate-tests/enforcement-map.test.sh +16 -15
- package/payload/gate-sdk/gate-tests/lib-gate.test.sh +204 -1
- package/payload/gate-sdk/gate-tests/run-dispatch-streams.test.sh +73 -0
- package/payload/gate-sdk/lib/consumer-smoke.sh +24 -12
- package/payload/gate-sdk/lib/gate.sh +353 -22
- package/payload/gate-sdk/lib/inject.sh +25 -0
- package/payload/gate-sdk/lib/test-hermetic.sh +26 -0
- package/payload/gate-sdk/smoke/install.sh +47 -1
- package/payload/guard-kit/README.md +14 -11
- package/payload/guard-kit/SPEC.md +477 -82
- package/payload/guard-kit/bin/run-guard-tests.sh +7 -1
- package/payload/guard-kit/gate-tests/git-mutation-under-producer.test.sh +105 -0
- package/payload/guard-kit/gate-tests/guard-read-path.test.sh +52 -0
- package/payload/guard-kit/guard-tests/cases.tsv +84 -14
- package/payload/guard-kit/lib/guard.sh +440 -54
- package/payload/guard-kit/templates/close-triage.md +5 -5
- package/payload/guard-kit/templates/settings-hooks.json +7 -1
- package/payload/lifecycle-kit/README.md +14 -3
- package/payload/lifecycle-kit/SPEC.md +929 -93
- package/payload/lifecycle-kit/bin/cite-survey.sh +81 -0
- package/payload/lifecycle-kit/bin/enter-stage.sh +193 -38
- package/payload/lifecycle-kit/bin/file-gap.sh +29 -12
- package/payload/lifecycle-kit/bin/file-survey.sh +21 -2
- package/payload/lifecycle-kit/checks/check-close-surfaces.gate +3 -0
- package/payload/lifecycle-kit/checks/check-gap-inbox-neutrality.gate +3 -0
- package/payload/lifecycle-kit/checks/check-lesson-disposition.gate +3 -0
- package/payload/lifecycle-kit/checks/check-lifecycle-registration.gate +3 -0
- package/payload/lifecycle-kit/checks/check-merge-attrs.gate +3 -0
- package/payload/lifecycle-kit/checks/check-scratch-citation.gate +3 -0
- package/payload/lifecycle-kit/checks/check-shim-restatement.gate +3 -0
- package/payload/lifecycle-kit/checks/check-skill-binding.gate +3 -0
- package/payload/lifecycle-kit/checks/check-stage-entry.gate +3 -0
- package/payload/lifecycle-kit/checks/check-stage-evidence.gate +3 -0
- package/payload/lifecycle-kit/checks/check-stage-skill-coverage.gate +3 -0
- package/payload/lifecycle-kit/checks/check-survey-record.gate +3 -0
- package/payload/lifecycle-kit/gate-tests/boundary-scratch-wipe.test.sh +4 -4
- package/payload/lifecycle-kit/gate-tests/check-close-surfaces.test.sh +2 -3
- package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/bad/args +2 -0
- package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/bad/expect.txt +3 -0
- package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/bad/gap-inbox.md +5 -0
- package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/good/args +2 -0
- package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/good/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/good/gap-inbox.md +4 -0
- package/payload/lifecycle-kit/gate-tests/check-lesson-disposition.test.sh +2 -3
- package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration.test.sh +2 -3
- package/payload/lifecycle-kit/gate-tests/check-merge-attrs.test.sh +2 -3
- package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/scripts/lifecycle-config.sh +4 -0
- package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/surfaces/queue.md +13 -0
- package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/scripts/lifecycle-config.sh +4 -0
- package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/surfaces/queue.md +31 -0
- package/payload/lifecycle-kit/gate-tests/check-shim-restatement.test.sh +2 -3
- package/payload/lifecycle-kit/gate-tests/check-skill-binding.test.sh +2 -3
- package/payload/lifecycle-kit/gate-tests/check-stage-entry/bad/.workflow/WORKFLOW-STATE.txt +3 -3
- package/payload/lifecycle-kit/gate-tests/check-stage-entry/good/.workflow/WORKFLOW-STATE.txt +3 -3
- package/payload/lifecycle-kit/gate-tests/check-stage-entry.test.sh +24 -25
- package/payload/lifecycle-kit/gate-tests/check-stage-evidence/bad/.workflow/WORKFLOW-STATE.txt +2 -2
- package/payload/lifecycle-kit/gate-tests/check-stage-evidence/good/.workflow/WORKFLOW-STATE.txt +2 -2
- package/payload/lifecycle-kit/gate-tests/check-stage-evidence.test.sh +129 -15
- package/payload/lifecycle-kit/gate-tests/check-survey-record.test.sh +2 -3
- package/payload/lifecycle-kit/gate-tests/file-gap-recurrence.test.sh +54 -26
- package/payload/lifecycle-kit/gate-tests/gap-inbox-route.test.sh +123 -0
- package/payload/lifecycle-kit/gate-tests/rename-iteration.test.sh +142 -0
- package/payload/lifecycle-kit/gate-tests/survey-record-entry.test.sh +16 -5
- package/payload/lifecycle-kit/gate-tests/workflow-state-guard.test.sh +100 -0
- package/payload/lifecycle-kit/lib/stages.sh +9 -0
- package/payload/lifecycle-kit/smoke/install.sh +96 -19
- package/payload/lifecycle-kit/templates/lead.md +60 -0
- package/payload/lifecycle-kit/templates/stages/align.md +20 -2
- package/payload/lifecycle-kit/templates/stages/build.md +3 -3
- package/payload/lifecycle-kit/templates/stages/close.md +48 -15
- package/payload/lifecycle-kit/templates/stages/scope.md +29 -5
- package/payload/lifecycle-kit/templates/stages/spec.md +6 -2
- package/payload/lifecycle-kit/templates/stages/validate.md +1 -1
- package/payload/lifecycle-kit/templates/workflow-state-guard.sh +29 -0
- package/payload/queue-kit/README.md +12 -10
- package/payload/queue-kit/SPEC.md +411 -74
- package/payload/queue-kit/bin/queue-counts.sh +35 -0
- package/payload/queue-kit/checks/check-queue-entry-budget.gate +3 -0
- package/payload/queue-kit/checks/check-queue-hygiene.gate +3 -0
- package/payload/queue-kit/checks/check-queue-prose-precondition.gate +3 -0
- package/payload/queue-kit/checks/check-queue-sections.gate +3 -0
- package/payload/queue-kit/checks/check-queue-slug-liveness.gate +3 -0
- package/payload/queue-kit/checks/check-queue-wrap.gate +3 -0
- package/payload/queue-kit/checks/check-roadmap-fresh.gate +3 -0
- package/payload/queue-kit/checks/check-tag-lead-line.gate +3 -0
- package/payload/queue-kit/checks/check-task-conservation.gate +4 -0
- package/payload/queue-kit/checks/check-task-names.gate +3 -0
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/TASK-QUEUE.md +15 -0
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/expect.txt +2 -0
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/TASK-QUEUE.md +7 -0
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/expect.txt +4 -0
- package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/expect.txt +1 -1
- package/payload/queue-kit/gate-tests/queue-counts.test.sh +116 -0
- package/payload/queue-kit/gate-tests/queue-index.test.sh +55 -119
- package/payload/queue-kit/gate-tests/queue-lib-parity.test.sh +215 -0
- package/payload/queue-kit/gate-tests/roadmap.test.sh +22 -12
- package/payload/queue-kit/lib/queue.sh +4 -68
- package/payload/queue-kit/smoke/install.sh +1 -1
- package/payload/site-kit/SPEC.md +52 -2
- package/payload/site-kit/checks/check-docs-cname-parity.gate +3 -0
- package/payload/site-kit/checks/check-docs-render-fidelity.sh +2 -0
- package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/args +5 -4
- package/payload/site-kit/gate-tests/check-docs-cname-parity/good/args +6 -5
- package/payload/site-kit/gate-tests/check-docs-cname-parity/good/checks/check-sample.gate +3 -0
- package/payload/site-kit/gate-tests/check-docs-cname-parity/good/expect.txt +1 -1
- package/payload/site-kit/smoke/install.sh +1 -1
- package/profiles.list +36 -8
- package/payload/canon-kit/checks/check-amendment-queue.sh +0 -116
- package/payload/canon-kit/checks/check-comment-tier.sh +0 -216
- package/payload/canon-kit/checks/check-deprecation-task.sh +0 -90
- package/payload/canon-kit/checks/check-docs-cmd.sh +0 -153
- package/payload/canon-kit/checks/check-docs-link-convention.sh +0 -78
- package/payload/canon-kit/checks/check-install-claim.sh +0 -146
- package/payload/canon-kit/checks/check-knob-citation.sh +0 -117
- package/payload/canon-kit/checks/check-knob-default-coupling.sh +0 -239
- package/payload/canon-kit/checks/check-manifest-count.sh +0 -46
- package/payload/canon-kit/checks/check-manifest-temporal.sh +0 -83
- package/payload/canon-kit/checks/check-md-refs.sh +0 -128
- package/payload/canon-kit/checks/check-payload-claim.sh +0 -133
- package/payload/canon-kit/checks/check-prose-enum.sh +0 -115
- package/payload/canon-kit/checks/check-prose-tells.sh +0 -207
- package/payload/canon-kit/checks/check-spec-derivable-section.sh +0 -69
- package/payload/canon-kit/checks/check-spec-dod-singleton.sh +0 -45
- package/payload/canon-kit/checks/check-spec-embedded-source.sh +0 -133
- package/payload/canon-kit/checks/check-spec-fence-balance.sh +0 -42
- package/payload/canon-kit/checks/check-spec-pointer.sh +0 -187
- package/payload/canon-kit/checks/check-todo-task-liveness.sh +0 -80
- package/payload/canon-kit/checks/check-tracking-claim.sh +0 -136
- package/payload/context-kit/bin/footprint.sh +0 -144
- package/payload/context-kit/checks/check-brevity.sh +0 -123
- package/payload/context-kit/checks/check-footprint-fresh.sh +0 -38
- package/payload/context-kit/checks/check-memory-off.sh +0 -112
- package/payload/context-kit/checks/check-settings-pins.sh +0 -110
- package/payload/delegation-kit/checks/check-agent-tier-explicit.sh +0 -61
- package/payload/delegation-kit/checks/check-gate-tamper.sh +0 -139
- package/payload/delegation-kit/checks/check-rule-citation.sh +0 -76
- package/payload/doctrine-kit/checks/check-doctrine-registration.sh +0 -216
- package/payload/drift-kit/bin/trajectory.sh +0 -242
- package/payload/evidence-kit/checks/check-battery-roster.sh +0 -86
- package/payload/evidence-kit/checks/check-evidence-baseline.sh +0 -103
- package/payload/evidence-kit/checks/check-evidence-manifest.sh +0 -104
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/args +0 -3
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/args +0 -3
- package/payload/gate-sdk/bin/enforcement-map.sh +0 -272
- package/payload/gate-sdk/checks/check-assertion-strength.sh +0 -134
- package/payload/gate-sdk/checks/check-commit-msg.sh +0 -50
- package/payload/gate-sdk/checks/check-commit-subject.sh +0 -43
- package/payload/gate-sdk/checks/check-core-files.sh +0 -75
- package/payload/gate-sdk/checks/check-enforcement-fresh.sh +0 -37
- package/payload/gate-sdk/checks/check-exec-bit.sh +0 -95
- package/payload/gate-sdk/checks/check-gate-binary-fresh.sh +0 -106
- package/payload/gate-sdk/checks/check-gate-exemption-tasks.sh +0 -105
- package/payload/gate-sdk/checks/check-gate-fail-closed.sh +0 -84
- package/payload/gate-sdk/checks/check-gate-fixture-coverage.sh +0 -92
- package/payload/gate-sdk/checks/check-gate-output.sh +0 -73
- package/payload/gate-sdk/checks/check-graph.sh +0 -631
- package/payload/gate-sdk/checks/check-hook-exec-bit.sh +0 -45
- package/payload/gate-sdk/checks/check-identity.sh +0 -134
- package/payload/gate-sdk/checks/check-kit-enum.sh +0 -94
- package/payload/gate-sdk/checks/check-kit-registration.sh +0 -68
- package/payload/gate-sdk/checks/check-readme-roster.sh +0 -107
- package/payload/gate-sdk/checks/check-reads-couples.sh +0 -199
- package/payload/gate-sdk/checks/check-root-tiering.sh +0 -66
- package/payload/gate-sdk/checks/check-smoke-entry-guard.sh +0 -53
- package/payload/gate-sdk/checks/check-template-copy-parity.sh +0 -126
- package/payload/gate-sdk/checks/check-template-registry-parity.sh +0 -81
- package/payload/gate-sdk/checks/check-test-hermetic.sh +0 -119
- package/payload/gate-sdk/checks/check-workflow-tiering.sh +0 -84
- package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/args +0 -1
- package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/args +0 -1
- package/payload/gate-sdk/gate-tests/check-identity/bad/args +0 -1
- package/payload/gate-sdk/gate-tests/check-identity/good/args +0 -1
- package/payload/lifecycle-kit/bin/close-surfaces.sh +0 -94
- package/payload/lifecycle-kit/checks/check-close-surfaces.sh +0 -63
- package/payload/lifecycle-kit/checks/check-lesson-disposition.sh +0 -98
- package/payload/lifecycle-kit/checks/check-lifecycle-registration.sh +0 -54
- package/payload/lifecycle-kit/checks/check-merge-attrs.sh +0 -69
- package/payload/lifecycle-kit/checks/check-shim-restatement.sh +0 -97
- package/payload/lifecycle-kit/checks/check-skill-binding.sh +0 -59
- package/payload/lifecycle-kit/checks/check-stage-entry.sh +0 -197
- package/payload/lifecycle-kit/checks/check-stage-evidence.sh +0 -81
- package/payload/lifecycle-kit/checks/check-stage-skill-coverage.sh +0 -47
- package/payload/lifecycle-kit/checks/check-survey-record.sh +0 -102
- package/payload/queue-kit/bin/queue-index.sh +0 -182
- package/payload/queue-kit/bin/roadmap.sh +0 -76
- package/payload/queue-kit/checks/check-queue-entry-budget.sh +0 -106
- package/payload/queue-kit/checks/check-queue-hygiene.sh +0 -81
- package/payload/queue-kit/checks/check-queue-prose-precondition.sh +0 -63
- package/payload/queue-kit/checks/check-queue-sections.sh +0 -44
- package/payload/queue-kit/checks/check-queue-slug-liveness.sh +0 -63
- package/payload/queue-kit/checks/check-queue-wrap.sh +0 -56
- package/payload/queue-kit/checks/check-roadmap-fresh.sh +0 -110
- package/payload/queue-kit/checks/check-tag-lead-line.sh +0 -70
- package/payload/queue-kit/checks/check-task-conservation.sh +0 -50
- package/payload/queue-kit/checks/check-task-names.sh +0 -128
- package/payload/site-kit/checks/check-docs-cname-parity.sh +0 -80
- /package/payload/context-kit/gate-tests/{check-memory-off → check-settings-paths}/bad/args +0 -0
- /package/payload/context-kit/gate-tests/{check-memory-off → check-settings-paths}/good/args +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/{gates → scripts}/check-sample.sh +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/{gates → scripts}/check-sample.sh +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/{check-gamma.sh → scripts/check-gamma.sh} +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/{gate-tests → scripts/gate-tests}/check-alpha/bad/.keep +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/{gate-tests → scripts/gate-tests}/check-alpha/good/.keep +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/{gates.list → scripts/gates.list} +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/{check-beta.sh → scripts/check-beta.sh} +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/{gate-tests → scripts/gate-tests}/check-alpha/bad/.keep +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/{gate-tests → scripts/gate-tests}/check-alpha/good/.keep +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/{gates.list → scripts/gates.list} +0 -0
- /package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/{site-config.sh → scripts/site-config.sh} +0 -0
- /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{tree → docs}/CNAME +0 -0
- /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{tree → docs}/index.md +0 -0
- /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{tree/docs → docs}/posts/2026-01-01-legacy.md +0 -0
- /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{tree/pkg → pkg}/gate-tests/fixture.md +0 -0
- /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{site-config.sh → scripts/site-config.sh} +0 -0
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
# guard-kit — permission-friction reduction for agent sessions
|
|
2
2
|
|
|
3
|
-
A
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
A command no allowlist entry matches is not refused — it is decided **out of
|
|
4
|
+
band**, by whatever a harness does when nothing matches: interrupt a human, or
|
|
5
|
+
run a model to judge the call. Either way that decision is invisible to the
|
|
6
|
+
agent — nothing about it lands in the transcript, so the agent cannot notice,
|
|
7
|
+
count, or fix the friction it causes — and either way it is paid per call, out
|
|
8
|
+
of the operator's attention or out of latency and tokens, compounding as the
|
|
9
|
+
command surface grows. The kit closes the
|
|
7
10
|
loop: a `PreToolUse` guard decides at call time (block with a corrective
|
|
8
11
|
message, steer to a better form, auto-allow the provably safe, log every
|
|
9
12
|
fall-through), a scanner ranks the logged prompt sources, a curation pass
|
|
@@ -24,9 +27,9 @@ conventions without depending on its registry.
|
|
|
24
27
|
1. **Call time** — the consumer's `bash-guard.sh` (copied from
|
|
25
28
|
`templates/`, wired as the `PreToolUse(Bash)` hook) inspects each
|
|
26
29
|
command: block, steer, rewrite, auto-allow, or fall through. Every
|
|
27
|
-
fall-through — exactly the set of commands
|
|
28
|
-
appended to the friction log.
|
|
29
|
-
agent, so this log is the only record.
|
|
30
|
+
fall-through — exactly the set of commands whose decision was made out of
|
|
31
|
+
band — is appended to the friction log. That decision is invisible to the
|
|
32
|
+
agent whichever way it went, so this log is the only record.
|
|
30
33
|
2. **Close time** — `bin/scan-prompts.sh` filters the log against the
|
|
31
34
|
committed allowlist and ranks what survives (§scan-prompts states the
|
|
32
35
|
local-overlay upper bound), grouped by command
|
|
@@ -40,6 +43,40 @@ conventions without depending on its registry.
|
|
|
40
43
|
local `settings.local.json` stays near-empty, and the guard encodes the
|
|
41
44
|
steering rules no static glob can express.
|
|
42
45
|
|
|
46
|
+
### What the steering is buying
|
|
47
|
+
|
|
48
|
+
The guard's blocks **serialize**: a compound the agent wanted as one call becomes
|
|
49
|
+
several, and a convenient spelling becomes a written-out one. That cost is real
|
|
50
|
+
and paid every session, so the rationale is stated here rather than assumed — and
|
|
51
|
+
it is not "the agent would otherwise be interrupted". Steering does not stop a
|
|
52
|
+
decision from being *made*; it moves the call onto the path where the decision is
|
|
53
|
+
already made, the static match, and off the path where something else must decide.
|
|
54
|
+
Three things pay for the serialization, and none of them turns on *which* thing
|
|
55
|
+
decides:
|
|
56
|
+
|
|
57
|
+
- **The match short-circuits everything downstream.** An allow/ask/deny match
|
|
58
|
+
resolves the call there. Whatever a harness does with an unmatched command, the
|
|
59
|
+
matched form skips it — so the bare spelling is the cheaper one on every axis a
|
|
60
|
+
harness charges, without knowing which axis that is.
|
|
61
|
+
- **The match verdict is deterministic; the out-of-band one is not.** A steered
|
|
62
|
+
command's outcome is a property of a reviewed settings file, stable across
|
|
63
|
+
sessions and auditable without running anything. An unmatched command's outcome
|
|
64
|
+
is a judgment made per call. This is the half of the win that survives a harness
|
|
65
|
+
getting cheap at deciding.
|
|
66
|
+
- **The tool-hygiene rules are untouched by any of it.** Read over `cat`, Glob
|
|
67
|
+
over `find`, Grep over a working-tree `git grep`, `git rm` over `rm`, a scratch
|
|
68
|
+
dir over the repo root — each steers to a better tool or a safer form, and would
|
|
69
|
+
earn the guard's keep with no permission mechanism in the picture at all.
|
|
70
|
+
|
|
71
|
+
**The honest limit.** None of this is measured. Whether N matched calls beat one
|
|
72
|
+
unmatched call in wall-clock is an empirical question the kit does not answer, and
|
|
73
|
+
a harness whose unmatched path is cheap narrows the first bullet toward nothing.
|
|
74
|
+
The ruling therefore rests on the second and third, which do not turn on cost: the
|
|
75
|
+
guard is worth its serialization because it makes the outcome deterministic and
|
|
76
|
+
the tool choice better — not because it dodges an interrupt. A message that names
|
|
77
|
+
one harness's consequence is wrong in the same way whichever consequence it names,
|
|
78
|
+
which is why none of them do.
|
|
79
|
+
|
|
43
80
|
### The triage criterion
|
|
44
81
|
|
|
45
82
|
Allowlist and guard are two tools with distinct jobs — resolve each
|
|
@@ -59,7 +96,7 @@ exists, steer to it in the guard rather than permitting the worse one.
|
|
|
59
96
|
Note: the harness matches the allowlist **per segment** of a compound
|
|
60
97
|
command, so a glob on the core command does not cover the `echo` banners,
|
|
61
98
|
`wc`, redirects, or `;`-chained diagnostics wrapped around it — one
|
|
62
|
-
unmatched segment
|
|
99
|
+
unmatched segment takes the whole line off the match path. The read-only banner/diagnostic
|
|
63
100
|
tools an agent habitually chains (`echo`, `wc`, `grep`, `ls`, `command -v`)
|
|
64
101
|
are therefore themselves legitimate allowlist entries; allowlist them, or
|
|
65
102
|
run the core command bare.
|
|
@@ -72,6 +109,14 @@ Primitives a consumer guard composes; each emits the harness's
|
|
|
72
109
|
- `guard_read_command` — parse the hook JSON on stdin, emit the command;
|
|
73
110
|
**fail-open** on any parse problem (exit 0) so a guard can never wedge
|
|
74
111
|
the agent.
|
|
112
|
+
- `guard_read_path` — the same accessor for `.tool_input.file_path`, the field a
|
|
113
|
+
path-bearing tool call carries where a Bash call carries a command. It returns
|
|
114
|
+
**non-zero, emitting nothing**, when the field is absent, empty, or the payload
|
|
115
|
+
will not parse — so a matcher covering a call without one falls through instead
|
|
116
|
+
of blocking. That return contract is the whole design: an accessor returning
|
|
117
|
+
success on a missing field passes every happy path and wedges every other call
|
|
118
|
+
its matcher covers. Generic over any path-bearing tool; it names no path and no
|
|
119
|
+
rule, which is what keeps the rule in the kit that owns the file.
|
|
75
120
|
- `guard_block <msg>` — exit 2 with the message on stderr. Every block
|
|
76
121
|
message is self-describing: it names the offending pattern *and* the
|
|
77
122
|
corrective form, so the why of a rule rides to the agent in the rejection
|
|
@@ -87,17 +132,85 @@ Primitives a consumer guard composes; each emits the harness's
|
|
|
87
132
|
the string matches a committed allow pattern, with the harness `:*` prefix
|
|
88
133
|
idiom (`Bash(printf:*)` ≡ any `printf …`) normalized to a trailing `*`. Not a
|
|
89
134
|
hook primitive — a shared helper, one implementation behind
|
|
90
|
-
compare-settings-allow's redundancy detection and rule
|
|
135
|
+
compare-settings-allow's redundancy detection and rule 17's silent-grant
|
|
91
136
|
guard so the two never drift.
|
|
137
|
+
- `guard_skeleton <cmd> <inert-class>…` — the context-aware normalizer, and the
|
|
138
|
+
only place a rule learns what part of a command is live. It returns the command
|
|
139
|
+
with every region of the named inert classes replaced by a placeholder token,
|
|
140
|
+
leaving everything else byte-identical. Four classes: **`sq`** (single-quoted
|
|
141
|
+
spans), **`dq`** (double-quoted spans), **`hd`** (heredoc bodies, from the line
|
|
142
|
+
after an opener to its terminator line), and **`hdq`** — the subset of `hd`
|
|
143
|
+
whose **delimiter is quoted** (`<<'EOF'`), where the shell itself guarantees
|
|
144
|
+
the body does not expand. `hdq` exists because that guarantee is what lets the
|
|
145
|
+
one rule that must keep heredoc bodies live keep only the bodies that can
|
|
146
|
+
actually expand. Each rule names the classes inert **for it**, in one argument, at one
|
|
147
|
+
call site — the classes were never the disagreement, since every rule agrees
|
|
148
|
+
that *some* regions are inert; the disagreement was that each decided privately
|
|
149
|
+
and none recorded why. Not a hook primitive, and a pure function of its
|
|
150
|
+
arguments: no config read, no subprocess, no global.
|
|
92
151
|
- `guard_split_compound <skeleton>` — the compound splitter: emits one segment
|
|
93
152
|
per line, splitting on the harness's statement separators (`;`, `&&`, `||`,
|
|
94
153
|
`|`). Also not a hook primitive — the single implementation every consumer
|
|
95
|
-
that reasons *per segment* shares (rules 8/14/16, the read-compound
|
|
96
|
-
of rules 9/10, and scan-prompts' `allowed()`), so the harness's
|
|
97
|
-
matching surface is modelled in exactly one place and cannot drift
|
|
98
|
-
them. Fed a
|
|
99
|
-
|
|
100
|
-
|
|
154
|
+
that reasons *per segment* shares (rules 8/12/14/16/17/19, the read-compound
|
|
155
|
+
carve-out of rules 9/10, and scan-prompts' `allowed()`), so the harness's
|
|
156
|
+
per-segment matching surface is modelled in exactly one place and cannot drift
|
|
157
|
+
between them. Fed a `guard_skeleton` view, so a separator inside a quoted
|
|
158
|
+
argument is never mistaken for a statement break. Its separator class carries
|
|
159
|
+
**no newline**, and it does not need one: it *emits* segments as lines and
|
|
160
|
+
every consumer reads lines, so a newline already present in the input is
|
|
161
|
+
already a boundary before the substitution runs.
|
|
162
|
+
|
|
163
|
+
**Placeholder, never deletion, and this is a correctness point rather than
|
|
164
|
+
taste.** Deleting an inert span **fuses adjacent tokens**: a pattern glued to its
|
|
165
|
+
flag loses the boundary between them and the residue reads as one word that was
|
|
166
|
+
never in the command. The normalizer substitutes, so the skeleton has the same
|
|
167
|
+
token count and the same statement structure as the command it models.
|
|
168
|
+
|
|
169
|
+
**The heredoc class marks the body extent only.** The opener line and everything
|
|
170
|
+
after the terminator stay fully live, so a heredoc-bearing call is still matched
|
|
171
|
+
on its executable text — neither blanking everything after a `<<` (which blinds
|
|
172
|
+
the guard to real commands in the same call) nor stripping quotes alone (which
|
|
173
|
+
still refuses a double-quoted mention). The extent is decidable without a shell
|
|
174
|
+
parser because the terminator is a literal token alone on its line, which is the
|
|
175
|
+
property the class rests on.
|
|
176
|
+
|
|
177
|
+
**Two bounds, stated rather than discovered later.** A heredoc with an
|
|
178
|
+
**unquoted** delimiter does expand, so `hd` is not inert for the expansion rule
|
|
179
|
+
even though it is inert for every glyph rule — which is why classes are declared
|
|
180
|
+
per rule and not fixed per region, and why the rule that cannot take `hd` takes
|
|
181
|
+
`hdq` instead rather than going without. Only the delimiter's quoting decides
|
|
182
|
+
this, never the body's content, so the test is decidable at the opener; a
|
|
183
|
+
delimiter escaped rather than quoted (`<<\EOF`) is not recognized and its body
|
|
184
|
+
stays live, which is the conservative direction. And the normalizer models **quoting, not
|
|
185
|
+
shell semantics**: a construct that survives its scan and is not one of the three
|
|
186
|
+
classes is treated as live, the fail-toward-matching direction and the one a
|
|
187
|
+
guard should err in. That bound is why the command/process-substitution and
|
|
188
|
+
backtick tests in rules 9, 10, 11, 12, 13, 14, 16 and 19 read the **raw** command
|
|
189
|
+
rather than
|
|
190
|
+
a skeleton and must keep doing so — a `"$(…)"` inside double quotes still
|
|
191
|
+
executes, so a rule that declared `dq` inert for *that* test would hand an
|
|
192
|
+
auto-allow to a command substitution it could not see. Those tests are
|
|
193
|
+
conservative declines, not verdict matching.
|
|
194
|
+
|
|
195
|
+
**Rule 12 is the one rule that reaches its verdict off the raw command, and the
|
|
196
|
+
exception is forced rather than chosen.** Its predicate is *the pattern literal
|
|
197
|
+
`-f` will scan argv for*, and a skeleton replaces exactly that literal with a
|
|
198
|
+
placeholder — the quoted operand is the normal spelling — so a skeleton view
|
|
199
|
+
would blind the rule to the only thing it tests. It pays for the exception in the
|
|
200
|
+
same conservative direction every other clause takes: it declines outright on any
|
|
201
|
+
expansion, substitution or backtick (rule 6 blocks those shapes anyway), and a
|
|
202
|
+
pattern operand carrying a stray quote — the evidence that the compound split
|
|
203
|
+
landed *inside* a quoted span — declines rather than guesses at the operand.
|
|
204
|
+
|
|
205
|
+
**The payload carries the live permission mode, and no accessor above reads it.**
|
|
206
|
+
`PreToolUse` delivers `permission_mode` alongside the fields
|
|
207
|
+
`guard_read_command` and `guard_read_path` pick off, so a rule whose rationale is
|
|
208
|
+
mode-*conditional* — "no allowlist entry can suppress this prompt" is false under
|
|
209
|
+
an auto-approving mode and true under the others — currently asserts a mode
|
|
210
|
+
rather than reading one. Recorded here because it is a fact about this framework's
|
|
211
|
+
own inputs: without it, each session re-establishes it from the vendor hook
|
|
212
|
+
reference. Whether a guard *should* read the mode is a consumer decision and is
|
|
213
|
+
not settled here.
|
|
101
214
|
|
|
102
215
|
Fail-open is the default posture. The one sanctioned fail-closed shape is a
|
|
103
216
|
deny-guard whose hook *matcher* already proves the tool identity (see
|
|
@@ -126,6 +239,18 @@ dispatch-shape rules; guard-kit mechanism **does** move for that one, by
|
|
|
126
239
|
exactly one clause — the fail-open-but-loud posture above, which it is the
|
|
127
240
|
shipped instance of (delegation-kit/SPEC.md §The delegation model).
|
|
128
241
|
|
|
242
|
+
lifecycle-kit is the fourth consumer, on the same axis: its
|
|
243
|
+
`templates/workflow-state-guard.sh` is a `PreToolUse(Write|Edit)` hook refusing a
|
|
244
|
+
direct write to the lifecycle state file, and guard-kit mechanism **does** move
|
|
245
|
+
for it, again by exactly one clause — `guard_read_path` above. Nothing else was
|
|
246
|
+
missing: `guard_block` and `guard_advise` never read a command, so they were
|
|
247
|
+
already tool-agnostic. This is the rule the three consumers now make explicit —
|
|
248
|
+
**the kit owning the rule ships the guard**, riding `lib/guard.sh` through the
|
|
249
|
+
`GUARD_KIT_LIB` indirection, and guard-kit moves only where the lib lacks a
|
|
250
|
+
primitive. The state file's path lives with lifecycle-kit, never here, so
|
|
251
|
+
guard-kit gains no dependency on a kit it does not otherwise know about
|
|
252
|
+
(lifecycle-kit/SPEC.md §check-stage-evidence).
|
|
253
|
+
|
|
129
254
|
## Consumer rules
|
|
130
255
|
|
|
131
256
|
A consumer's project-specific block/steer/allow rules live in its copy of
|
|
@@ -140,18 +265,60 @@ and names none. What a project blocks or steers is its own toolchain knowledge
|
|
|
140
265
|
and stays in its copy, which is why the copy legitimately diverges from the
|
|
141
266
|
template here and why no rule content crosses into the kit.
|
|
142
267
|
|
|
268
|
+
**Placement is a verification decision before it is a seam one, and this is the
|
|
269
|
+
sentence that makes the contract usable.** The generic lane carries §Testing's
|
|
270
|
+
decision-table obligation — every rule there owes a firing and a non-firing case,
|
|
271
|
+
and the table is the only instrument that reads a *block* at all. The consumer
|
|
272
|
+
lane carries none: a rule in a consumer's copy is reachable by no table in this
|
|
273
|
+
kit, so it ships hand-verified and its narrowing cannot be measured. A rule that
|
|
274
|
+
qualifies for either lane therefore belongs in the generic one. That a consumer's
|
|
275
|
+
own rules have no verification lane at all is a real gap and a separate one; it
|
|
276
|
+
is named here rather than solved, since solving it designs a testing lane for
|
|
277
|
+
consumer copies.
|
|
278
|
+
|
|
143
279
|
## The generic ruleset
|
|
144
280
|
|
|
145
|
-
Rules that encode **harness behavior
|
|
146
|
-
|
|
147
|
-
load-bearing
|
|
281
|
+
Rules that encode **harness behavior, shell-substrate behavior, or behavior over
|
|
282
|
+
an artifact whose grammar a kit owns**, never any project's toolchain — shipped
|
|
283
|
+
as `lib/guard.sh` functions the template guard invokes. Order is load-bearing
|
|
284
|
+
where noted.
|
|
285
|
+
|
|
286
|
+
**The clause has taken two widenings, and each is recorded with the rule that
|
|
287
|
+
forced it, because a rule slipped in unremarked is what would rot it.**
|
|
288
|
+
|
|
289
|
+
- **The shell-substrate half was added for rule 12, and it admits nothing a
|
|
290
|
+
project owns.** A `-f` pattern match seeing the matcher's own argv is a
|
|
291
|
+
property of the shell substrate every consumer of this kit runs on — neither
|
|
292
|
+
harness behavior nor any project's toolchain — so the narrower sentence left
|
|
293
|
+
it in a gap it had no reason to leave.
|
|
294
|
+
- **The kit-artifact half was added for rule 14, and it takes the same form and
|
|
295
|
+
passes the same test.** Rule 14 is neither of the two earlier classes as they
|
|
296
|
+
were written: what it reads is evidence-kit's `pid=<n> run=<key>` record and
|
|
297
|
+
the OS's process table. It interprets **no project vocabulary at all** — it
|
|
298
|
+
reads a PID and asks whether it is alive — so the test rule 12's widening had
|
|
299
|
+
to pass is the test this one passes: **it admits nothing a project owns**. A
|
|
300
|
+
kit's own artifact grammar is shipped mechanism, which is exactly what
|
|
301
|
+
CLAUDE.md §The provenance seam distinguishes from private rule content.
|
|
302
|
+
|
|
303
|
+
A project's toolchain stays out on the same words as before, under both.
|
|
304
|
+
|
|
305
|
+
**Naming one harness's forms in a corrective costs portability, not privacy, and
|
|
306
|
+
the cost is recorded rather than pre-paid.** Rule 13's block message names a
|
|
307
|
+
backgrounded condition wait and the harness's event-stream form, because a
|
|
308
|
+
corrective that named neither would be unfollowable. A harness tool name is
|
|
309
|
+
public, documented, and shared by every consumer of that harness, so it is not
|
|
310
|
+
private rule content and the provenance seam — a privacy boundary over private
|
|
311
|
+
vocabularies (CLAUDE.md §The provenance seam) — does not reach it. What such a
|
|
312
|
+
literal does cost is portability: a second harness with different form names is
|
|
313
|
+
what would force these into a configurable slot, and building that slot before
|
|
314
|
+
that harness exists would be designing against no case.
|
|
148
315
|
|
|
149
|
-
1. **`cd` in a compound command** — blocked: cwd drift plus a
|
|
150
|
-
|
|
151
|
-
or `git -C <dir>` for git.
|
|
316
|
+
1. **`cd` in a compound command** — blocked: cwd drift, plus a compound the
|
|
317
|
+
allowlist cannot match, so the call is decided out of band. Corrective form:
|
|
318
|
+
absolute paths, or `git -C <dir>` for git.
|
|
152
319
|
2. **`git -C <repo-root>` when cwd is the root** — blocked: the absolute
|
|
153
|
-
`-C` target matches no allowlist entry and
|
|
154
|
-
`git` form is allowlisted. Pinned with a trailing space to the exact
|
|
320
|
+
`-C` target matches no allowlist entry and falls off the match path, while
|
|
321
|
+
the bare `git` form is allowlisted and resolves on it. Pinned with a trailing space to the exact
|
|
155
322
|
root, so `git -C <root>/subdir` and a foreign-repo `-C` are untouched.
|
|
156
323
|
3. **Bare-name scratch redirect** — a `>`/`>>` to a slash-free
|
|
157
324
|
`*.err`/`*.out`/`*.log` target is blocked (it lands in the tracked tree
|
|
@@ -168,16 +335,35 @@ load-bearing where noted.
|
|
|
168
335
|
the literal repo-root prefix is steered to the repo-relative spelling.
|
|
169
336
|
`git` is excluded — rule 2 already owns its `-C` handling.
|
|
170
337
|
6. **Shell expansion / assignment** — a residual `${…}`/`$(…)`/`<(…)`/
|
|
171
|
-
`$NAME`
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
338
|
+
`$NAME` in the skeleton is blocked (the harness's matcher refuses every
|
|
339
|
+
expansion before allowlist matching). **Declares `sq hdq`** for the expansion
|
|
340
|
+
check and **`sq dq hdq`** for the assignment check, and every part of that is
|
|
341
|
+
deliberate rather than inherited. `dq` stays live for the expansion check:
|
|
342
|
+
inside single quotes `$` is literal (`awk '$1'`), but a double-quoted `"$x"`
|
|
343
|
+
still expands and must stay visible. `hd` is **not** declared, since an
|
|
344
|
+
unquoted-delimiter heredoc body expands too — but `hdq` is, because a
|
|
345
|
+
**quoted** delimiter makes the shell itself the guarantee that the body
|
|
346
|
+
cannot expand. That is what stops the rule refusing prose that merely
|
|
347
|
+
*names* a substitution: a journal entry, a queue entry being appended, or a
|
|
348
|
+
commit message written through `git commit -F - <<'MSG'`. The assignment
|
|
349
|
+
check adds `dq` because a `NAME="value"` assigns whatever the quotes hold. A
|
|
350
|
+
standalone `NAME=value` assignment is
|
|
351
|
+
caught separately, since the expansion check only sees a *used* `$VAR`.
|
|
352
|
+
7. **Unquoted brace glyph** — the harness's matcher refuses the bare `{` glyph
|
|
178
353
|
before allowlist matching, the same behavior class rule 6 pre-empts for
|
|
179
|
-
`$`-expansions, so a `{` surviving
|
|
180
|
-
|
|
354
|
+
`$`-expansions, so a `{` surviving in the skeleton is handled by shape.
|
|
355
|
+
**Declares `sq dq hd`, and the difference from rule 6 is the point rather
|
|
356
|
+
than an accident of two adjacent lines.** Rule 6's reason to keep
|
|
357
|
+
double-quoted spans live does not carry here: `{` is a **matcher glyph, not a
|
|
358
|
+
shell expansion**, so a double-quoted brace is exactly as inert as a
|
|
359
|
+
single-quoted one, and a heredoc-body brace is inert whatever the delimiter.
|
|
360
|
+
This is what stops a working POSIX quantifier (`grep -rnE "^[a-z]{2,}"`)
|
|
361
|
+
being refused, and it is equally what stops the **wrong corrective**: a block
|
|
362
|
+
message owes the offending pattern *and* the corrective form, and *write out
|
|
363
|
+
the brace expansion, spell the members* is inapplicable to a quantifier that
|
|
364
|
+
has no members and to a heredoc body that has nothing to respell. A block
|
|
365
|
+
whose corrective cannot be followed fails that contract however right its
|
|
366
|
+
verdict. A **bare `{}` placeholder** (`find … -exec cmd {} +`,
|
|
181
367
|
`xargs -I{}`), when every residual brace is exactly `{}`, is rewritten
|
|
182
368
|
via `guard_rewrite` — each `{}` single-quoted to `'{}'`,
|
|
183
369
|
behavior-preserving (the shell passes a literal `{}` either way) and
|
|
@@ -186,12 +372,12 @@ load-bearing where noted.
|
|
|
186
372
|
git-ref shorthand (`@{u}`, `@{-n}`, `<ref>@{n}`) names the explicit
|
|
187
373
|
spelling (`origin/<branch>..HEAD`, or the resolved ref/hash);
|
|
188
374
|
list/range (`{a,b}`, `{a..b}`) names the spelled-out members or a loop;
|
|
189
|
-
any other residual `{` gets the generic corrective (
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
since every bare `{` already costs an
|
|
193
|
-
can suppress, block-and-steer strictly dominates;
|
|
194
|
-
|
|
375
|
+
any other residual `{` gets the generic corrective (quote it if literal —
|
|
376
|
+
an unquoted awk/sed program — write it out if it expands). There is no
|
|
377
|
+
legitimate brace-glob convenience to preserve:
|
|
378
|
+
since every bare `{` already costs an out-of-band decision no allowlist entry
|
|
379
|
+
can suppress, block-and-steer strictly dominates; a brace in any inert region
|
|
380
|
+
passes untouched. **Placed before both auto-allow rules**
|
|
195
381
|
so their literal-target premise holds for braces as well.
|
|
196
382
|
8. **`sed` reading or rewriting a file** — blocked with the steer to the
|
|
197
383
|
harness's file tools: `sed -i` (or any short bundle carrying `i`) to the
|
|
@@ -204,7 +390,7 @@ load-bearing where noted.
|
|
|
204
390
|
so `-e`/`-f` consume their argument and the first bare operand is the script
|
|
205
391
|
— a *second* bare operand is the file that fires the rule. **Placed before
|
|
206
392
|
both auto-allow rules:** a consumer that widens `GUARD_KIT_RO_BINS` with
|
|
207
|
-
`sed` would otherwise have rule
|
|
393
|
+
`sed` would otherwise have rule 16 silently grant an in-place rewrite.
|
|
208
394
|
9. **Listing-only `find`** — a bare `find` that only lists is blocked with
|
|
209
395
|
the steer to the harness's Glob tool (the same shape as rule 8's `sed`
|
|
210
396
|
read-steer: a better tool exists, and Glob returns paths registered for a
|
|
@@ -217,7 +403,7 @@ load-bearing where noted.
|
|
|
217
403
|
batch of independent listings, exactly what the Glob steer collapses into one
|
|
218
404
|
call. A literal `echo`/`printf` banner segment between them is the natural
|
|
219
405
|
separator of such a batch and is tolerated; at least one segment must be a
|
|
220
|
-
listing. A piped `find` is a legitimate producer (rule
|
|
406
|
+
listing. A piped `find` is a legitimate producer (rule 16 may still
|
|
221
407
|
auto-allow it), an action-predicate `find` is an executor, a redirected
|
|
222
408
|
`find` has a downstream reader, and a **mixed** compound (a segment that is
|
|
223
409
|
neither a listing nor a banner) all pass untouched. **Placed before both
|
|
@@ -259,42 +445,204 @@ load-bearing where noted.
|
|
|
259
445
|
this rule (the consumer disqualifies it). Conservative by construction: an
|
|
260
446
|
unrecognized option-with-argument or a glued pattern flag biases toward
|
|
261
447
|
passing, never a false steer of a history search.
|
|
262
|
-
12. **
|
|
263
|
-
|
|
264
|
-
|
|
448
|
+
12. **Self-matching process-liveness predicate** — a `pgrep`/`pkill -f` whose
|
|
449
|
+
pattern literal the command's own text repeats is **blocked**. `-f` matches
|
|
450
|
+
against full argv, and the waiter's own argv — the harness's wrapper included
|
|
451
|
+
— carries that literal, so `until ! pgrep -f '<script>'; do …; done` has a
|
|
452
|
+
permanently-true condition and never exits. It reds nothing: the work
|
|
453
|
+
completes correctly and the only symptom is the foreground cap absorbing an
|
|
454
|
+
unbounded loop, which reads from outside as a fixed cap-length wait. Fires on
|
|
455
|
+
the conjunction no allowlist glob expresses: a segment whose **command word**
|
|
456
|
+
is `pgrep` or `pkill` — read past a leading `until`/`while`/`if`/`!`, which do
|
|
457
|
+
not change which binary runs, so the loop-headed spelling the rule exists for
|
|
458
|
+
is reached — carrying `-f` (bare or bundled in a short cluster), whose pattern
|
|
459
|
+
operand is a literal occurring **elsewhere** in the same command. The
|
|
460
|
+
corrective names both sanctioned forms: wait on the work's own artifact, or
|
|
461
|
+
`kill -0` against a **recorded PID** where liveness genuinely is the condition
|
|
462
|
+
— whoever started that producer, a child the session backgrounded itself
|
|
463
|
+
included, whose PID it recorded at launch as a `<key>.run` record under its
|
|
464
|
+
scratch directory. That clause is owned by
|
|
465
|
+
delegation-kit/SPEC.md §The delegation model and this text carries it, the
|
|
466
|
+
record's naming convention included — rule 14 reads that same set, so a
|
|
467
|
+
corrective that named the PID but not where it lives would send a blocked
|
|
468
|
+
session to write the one artifact shape neither reader can find.
|
|
469
|
+
A PID is an identity; a pattern is a
|
|
470
|
+
guess about a process table that includes the guesser. The refusal of the
|
|
471
|
+
bracket-trick repair as the *sanctioned* form is delegation-kit's ruling and
|
|
472
|
+
its grounds live there (delegation-kit/SPEC.md §The delegation model); this
|
|
473
|
+
rule exists because a correct form one character from an incorrect one will be
|
|
474
|
+
got wrong. Conservative by construction, in this ruleset's established
|
|
475
|
+
directions: an expansion or substitution anywhere in the command declines
|
|
476
|
+
outright (rule 6 already blocks those shapes); a `pgrep` without `-f` matches
|
|
477
|
+
process **names** rather than argv and is untouched; an unrecognized option, an
|
|
478
|
+
option whose argument cannot be walked, or a second bare operand declines; and
|
|
479
|
+
a pattern occurring nowhere else in the command is a genuine query and passes.
|
|
480
|
+
Each biases toward passing rather than toward a false block. **Placed with the
|
|
481
|
+
read-steer rules and before both auto-allow rules**, on rule 8's stated
|
|
482
|
+
reasoning: `pgrep` is a plausible member of a widened `GUARD_KIT_RO_BINS` — it
|
|
483
|
+
is, after all, a read-only query — and a consumer who added it would otherwise
|
|
484
|
+
have rule 16 silently bless a waiter that can never exit.
|
|
485
|
+
13. **Bare foreground `sleep`** — a `sleep` standing in for a wait is
|
|
486
|
+
**blocked**, and the discriminator is the whole rule: a blanket `sleep` block
|
|
487
|
+
is wrong and is refused. The sanctioned wait *is* a condition loop, and
|
|
488
|
+
`until <cond>; do sleep N; done` is expressly legitimate. So the rule fires on
|
|
489
|
+
exactly one shape — a bare foreground `sleep` in command position, outside
|
|
490
|
+
every loop wrapper — and never on a `sleep` inside a loop body. *The
|
|
491
|
+
discriminator is new territory:* no other rule in this ruleset parses shell
|
|
492
|
+
keywords. This one takes the skeleton view (so a `sleep` merely *named* in a
|
|
493
|
+
quoted span or a heredoc body is already inert), then walks it for `do … done`
|
|
494
|
+
spans and treats a `sleep` inside one as **inert** — structurally the carve-out
|
|
495
|
+
`_guard_is_banner` already performs for `echo`/`printf` segments in the batched-read
|
|
496
|
+
rules, applied to a keyword span instead of a segment. A `sleep` outside every
|
|
497
|
+
such span fires. Where the wrapper cannot be resolved — an unbalanced `do`/`done`,
|
|
498
|
+
or a span the rule cannot attribute — it **declines**, the direction every
|
|
499
|
+
other conservative clause here takes; a `sleep` that is an *argument* rather
|
|
500
|
+
than a command word never fires at all. **Blocks** rather than advises, on
|
|
501
|
+
rule 17's reasoning: no consumer allowlist is presumed to grant a bare
|
|
502
|
+
`sleep`, so the rule fires on a command that would be decided out of band
|
|
503
|
+
anyway and converts that decision into a durable steer at no extra cost. *The
|
|
504
|
+
corrective names the property and both forms* rather than one spelling: a wait
|
|
505
|
+
must end when its condition goes true, not when a duration expires; a
|
|
506
|
+
backgrounded command that *exits* on the condition fires one notification the
|
|
507
|
+
moment the condition holds, while the harness's event-stream form stays armed
|
|
508
|
+
to its deadline even after its event fires and is therefore the wrong tool for
|
|
509
|
+
a single completion. Naming one form teaches a spelling; naming the property
|
|
510
|
+
and sorting both under it teaches the rule — the discriminator is owned by
|
|
511
|
+
delegation-kit/SPEC.md §The delegation model. **Placed with rule 12, before both
|
|
512
|
+
auto-allow rules,** for the same reason: `sleep` is not on the default
|
|
513
|
+
read-only roster, but the placement argument is about what a consumer may add
|
|
514
|
+
and the whole family of steer rules already sits there.
|
|
515
|
+
14. **Tracked-tree mutation under a live producer** — a `git` command that
|
|
516
|
+
writes the index, the worktree or a ref is **blocked** while a `*.run`
|
|
517
|
+
record under a `GUARD_KIT_SCRATCH_DIRS` member names a live PID. The record
|
|
518
|
+
is the launch-time liveness record a session writes when it backgrounds a
|
|
519
|
+
shell child (delegation-kit/SPEC.md §The delegation model owns that rule;
|
|
520
|
+
evidence-kit/SPEC.md §The producer-liveness lock owns the `pid=<n>
|
|
521
|
+
run=<key>` grammar and the PID predicate, and neither is re-decided here).
|
|
522
|
+
**The act set is bounded and named rather than gestured at**: `add`,
|
|
523
|
+
`commit`, `rm`, `mv`, `restore`, `checkout`, `switch`, `reset`, `stash`,
|
|
524
|
+
`merge`, `rebase`, `cherry-pick`, `revert`, `apply`, `am`, `clean`.
|
|
525
|
+
Read-only git — `status`, `log`, `diff`, `show`, `rev-parse`, `ls-files` —
|
|
526
|
+
passes, and so does every non-`git` command. **`Write`/`Edit` are
|
|
527
|
+
deliberately outside the rule**: a mutating session's mandated journal write
|
|
528
|
+
lands through them and the scratch directory is gitignored, so a rule
|
|
529
|
+
reaching them would refuse the very mechanic the resume-journal contract
|
|
530
|
+
requires *while a wait is in progress*.
|
|
531
|
+
**This is the enforcement half of the waiting rule, and it works by
|
|
532
|
+
relocation.** The turn-end itself passes no chokepoint and stays unreachable
|
|
533
|
+
(delegation-kit/SPEC.md §Operative residency); the **harm** it causes
|
|
534
|
+
arrives as an ordinary tool call at a chokepoint already wired, which is
|
|
535
|
+
what this rule fires on.
|
|
536
|
+
**Why the block is right even though it over-reaches, stated rather than
|
|
537
|
+
softened.** A read-only producer takes no harm from a commit, and the record
|
|
538
|
+
cannot say which kind it is. This ruleset's established direction is to bias
|
|
539
|
+
toward passing; that direction is **not** taken here, and the ground is that
|
|
540
|
+
the biased-toward-passing reading is what has failed every time this rule
|
|
541
|
+
fired. The corrective is cheap and names both exits: **wait for the producer
|
|
542
|
+
on its own artifact, or delete the record if the producer is done** — and
|
|
543
|
+
deleting a record whose producer has exited is not a workaround, it is the
|
|
544
|
+
statement of fact becoming false and being retracted.
|
|
545
|
+
**Conservative in this ruleset's other established directions**, which are
|
|
546
|
+
kept: an expansion or substitution anywhere in the command declines outright
|
|
547
|
+
(rule 6 already blocks those shapes); a record that does not parse declines
|
|
548
|
+
rather than blocks, because a guard is not the place a corruption verdict is
|
|
549
|
+
taken and `check-producer-liveness` already exits 2 on one; git's global
|
|
550
|
+
options are walked so `git -C <dir> commit` is reached, but an option the
|
|
551
|
+
walk does not recognize declines rather than guess which token is the
|
|
552
|
+
subcommand; and an unrecognized `git` subcommand declines. Each biases
|
|
553
|
+
toward passing rather than toward a false block, which is the calibration
|
|
554
|
+
the previous paragraph departs from **only** on the read-only producer.
|
|
555
|
+
**Placed with rules 12 and 13, before every auto-allow rule.** It is the
|
|
556
|
+
third member of the wait-discipline family and inherits their placement
|
|
557
|
+
argument (`git` is not on the default `GUARD_KIT_RO_BINS` roster, but a
|
|
558
|
+
consumer that widened it would otherwise have the read-only-pipeline rule
|
|
559
|
+
silently grant the mutation). **Two collisions make the placement necessary
|
|
560
|
+
rather than tidy**, and both are with rules that sit *after* the
|
|
561
|
+
auto-allows: rule 17 would block a chained `git commit` first and hand back
|
|
562
|
+
*run it bare* — a corrective that is wrong under a live producer and that
|
|
563
|
+
the session can follow; and rule 18 **advises** on `git commit --amend`, so
|
|
564
|
+
a rewrite under a live producer would proceed with a re-verification steer
|
|
565
|
+
instead of stopping.
|
|
566
|
+
15. **Auto-allow `: > file` truncation** — a leading `:` plus redirect
|
|
567
|
+
defeats the permission matcher, so it is always decided out of band. Granted
|
|
568
|
+
silently when the command is *only* `:` followed by redirects and every target is
|
|
265
569
|
gitignored (`git check-ignore`): truncating scratch is safe; a tracked
|
|
266
|
-
file must still
|
|
570
|
+
file must still take that decision. The `git` subprocess is gated behind the rare
|
|
267
571
|
`:`-redirect match; expansions (rule 6) and brace forms (rule 7) are
|
|
268
572
|
already blocked, so a surviving target is a literal path.
|
|
269
|
-
|
|
573
|
+
16. **Auto-allow read-only pipeline** — granted silently when every pipe
|
|
270
574
|
segment leads with a roster binary (`GUARD_KIT_RO_BINS`, default the
|
|
271
575
|
grep/head/cat/find/jq family) and every redirect target is `/dev/null`
|
|
272
|
-
or an fd-dup. Conservative by construction:
|
|
273
|
-
substitution, a leftover quote after
|
|
274
|
-
a non-`/dev/null` redirect, or a `find` with a write
|
|
275
|
-
and fall through.
|
|
276
|
-
|
|
576
|
+
or an fd-dup. Declares `sq dq hd`. Conservative by construction:
|
|
577
|
+
command/process substitution, a leftover quote after normalization, any
|
|
578
|
+
statement separator, a non-`/dev/null` redirect, or a `find` with a write
|
|
579
|
+
action all refuse and fall through. **`xargs` is on the roster but is not
|
|
580
|
+
a text filter — it executes a command** — so it carries a discriminator
|
|
581
|
+
rather than riding the leads-with test: an `xargs` segment counts read-only
|
|
582
|
+
only when the command it runs is itself a roster binary (or absent, since
|
|
583
|
+
bare `xargs` defaults to `echo`). Without it, roster membership alone would
|
|
584
|
+
silently grant `find . -type f | xargs rm -rf` and
|
|
585
|
+
`grep -rln foo src | xargs sed -i s/a/b/`. Unrecognized `xargs` options and
|
|
586
|
+
a nested `xargs` decline rather than guess. The discriminator makes an
|
|
587
|
+
`xargs` segment exactly as safe as the segment it runs and no safer, which
|
|
588
|
+
is the honest bound: roster membership does not by itself prove an
|
|
589
|
+
*invocation* read-only (`sort -o` writes a file), and that weaker predicate
|
|
590
|
+
is a separate, already-filed gap this rule inherits rather than introduces.
|
|
591
|
+
Two carve-outs widen the grant, and
|
|
592
|
+
neither widens it past what the segment-by-segment safety argument already
|
|
593
|
+
covers:
|
|
594
|
+
- **A literal `echo`/`printf` banner segment is skipped**, the tolerance
|
|
595
|
+
rules 9 and 10 already carry on the stated ground that a banner is the
|
|
596
|
+
natural separator of a batched read; `_guard_is_banner` is shared and this
|
|
597
|
+
is its third caller. The asymmetry was the accident, not the tolerance. At
|
|
598
|
+
least one non-banner roster segment must remain, so a banner-only pipeline
|
|
599
|
+
is not granted.
|
|
600
|
+
- **The lead segment may instead be a bare committed allow entry** — an
|
|
601
|
+
exact `Bash(<cmd>)` with no glob, on rule 17's own reasoning that a
|
|
602
|
+
glob-headed family coexists with allowlisted decorators and would admit
|
|
603
|
+
far more than the reviewed command. The shape this repairs is an
|
|
604
|
+
allowlisted script piped into `head`: the lead is statically allowlisted,
|
|
605
|
+
so it was reviewed; every tail segment leads with a roster binary, so it
|
|
606
|
+
is read-only. The widened lead applies **only where something decorates
|
|
607
|
+
it** (more than one segment): an undecorated allowlisted command already
|
|
608
|
+
resolves on the static match, and intercepting it here would take it off
|
|
609
|
+
the friction log for no gain. Reads `GUARD_KIT_SETTINGS`, and the
|
|
610
|
+
**fail-open contract travels with the read**: no `jq`, no settings file,
|
|
611
|
+
or a parse error and the lead-widening silently declines, leaving the rule
|
|
612
|
+
exactly as it behaves without it. A grant that depends on a settings read
|
|
613
|
+
must never turn a missing settings file into a grant, and declining is the
|
|
614
|
+
only direction that cannot.
|
|
615
|
+
17. **Decorated allowlisted command** — the leading command exactly matches a
|
|
277
616
|
committed **bare** allow entry (a `Bash(<cmd>)` with no `:*`/`*` glob) but
|
|
278
617
|
the command decorates it — `&&`/`;`/`|` chaining, a trailing redirect, or
|
|
279
|
-
`2>&1` — which
|
|
618
|
+
`2>&1` — which leaves a segment nothing grants, so the whole call falls off
|
|
619
|
+
the match path and is decided out of band, and no allowlist entry pre-empts that.
|
|
280
620
|
**Blocked** with the steer *run it bare — the bare form is statically
|
|
281
|
-
allowed; the decoration
|
|
282
|
-
only on commands that
|
|
283
|
-
into a durable steer at no extra
|
|
621
|
+
allowed; the decoration is what costs the decision.* Block, not advise: the rule fires
|
|
622
|
+
only on commands that were going to be decided out of band anyway, so blocking
|
|
623
|
+
converts that decision into a durable steer at no extra cost, and an advise would *grant* the
|
|
284
624
|
decorated command (its extra segments the allowlist never reviewed).
|
|
285
625
|
**Bare leads only:** a glob-headed family (`Bash(git log:*)`) coexists with
|
|
286
626
|
allowlisted decorators, so only an exact bare entry qualifies as the lead;
|
|
287
627
|
widening to glob leads is possible later without a new name. **Never
|
|
288
628
|
intercepts a silent grant:** the harness matches per segment, so a compound
|
|
289
|
-
whose every segment matches the committed allowlist
|
|
290
|
-
|
|
629
|
+
whose every segment matches the committed allowlist resolves on the match
|
|
630
|
+
and blocking it would regress — the rule therefore fires only when a
|
|
291
631
|
non-leading segment (or a redirect on the lead) fails to match any committed
|
|
292
632
|
allow entry, reusing `guard_allow_match`'s shell-glob semantics. Reads
|
|
293
633
|
`GUARD_KIT_SETTINGS`; **fail-open** — no `jq`, no settings file, or a
|
|
294
634
|
parse error and the rule silently declines and falls through. Placed after
|
|
295
|
-
the auto-allow rules (
|
|
296
|
-
reaches it
|
|
297
|
-
|
|
635
|
+
the auto-allow rules (15, 16) so a silently granted read-only pipeline never
|
|
636
|
+
reaches it — which is also **why the allowlisted-lead grant lives in rule 16
|
|
637
|
+
and not here**. Grant, not fall-through, is what removes the friction of an
|
|
638
|
+
allowlisted command decorated only by a read-only reduction of its own
|
|
639
|
+
output, and this rule's own text refuses to grant, correctly: granting here
|
|
640
|
+
would bless segments the allowlist never reviewed. Rule 16 is already the
|
|
641
|
+
sanctioned place for a grant of exactly that shape and is already ordered
|
|
642
|
+
ahead of this rule, so a granted pipeline never arrives and nothing
|
|
643
|
+
ungranted becomes granted that either half would not have granted alone.
|
|
644
|
+
Declares `sq dq hd`.
|
|
645
|
+
18. **Git history-rewrite advisory** — a `git commit` carrying `--amend`, `-F`,
|
|
298
646
|
or `--file`, or a `git reset --soft`, gets a `guard_advise` steer carrying
|
|
299
647
|
the checklist from DOCTRINE.md's *Re-verify volatile state before a git
|
|
300
648
|
history rewrite* rule (verify HEAD before amend/squash; re-stage and verify
|
|
@@ -302,31 +650,40 @@ load-bearing where noted.
|
|
|
302
650
|
this turn). Advisory, not a block: each is a legitimate command, so the rule
|
|
303
651
|
injects the re-verification context and lets the command proceed. The
|
|
304
652
|
DOCTRINE.md rule is cited by **name**, not number — the doctrine's craft
|
|
305
|
-
rules renumber as it grows, and this ruleset
|
|
306
|
-
|
|
653
|
+
rules renumber as it grows, and this ruleset renumbers on its own account
|
|
654
|
+
too — this rule's own number moved when rules 12 and 13 were inserted ahead
|
|
655
|
+
of it, and again when rule 14 was — so a
|
|
656
|
+
doc-qualified number would rot on either renumber and read ambiguously
|
|
307
657
|
against the local numbering. Placed
|
|
308
|
-
after the auto-allow rules (
|
|
658
|
+
after the auto-allow rules (15, 16) and the decorated-allowlist rule (17),
|
|
309
659
|
so it fires only on a bare rewrite command none of those claimed; a
|
|
310
|
-
decorated form meets rule
|
|
660
|
+
decorated form meets rule 17's block first and the advisory fires on the
|
|
311
661
|
re-issued bare command.
|
|
312
|
-
|
|
662
|
+
19. **Bare `rm` of a tracked path** — an `rm` statement naming a git-tracked
|
|
313
663
|
file (`git ls-files --error-unmatch`) is **blocked** with the steer to
|
|
314
664
|
`git rm -q <path>`, which deletes and stages that one deletion in a single
|
|
315
665
|
motion. The deletion is the point: a bare `rm` leaves it unstaged, so it
|
|
316
666
|
lands only via a later `git add -A` — the form the shared-index discipline
|
|
317
667
|
warns against, since it sweeps a concurrent session's foreign path into the
|
|
318
|
-
commit. Block, not advise, on rule
|
|
319
|
-
presumed to grant `rm`, so the rule fires on a command that would
|
|
320
|
-
anyway and converts
|
|
668
|
+
commit. Block, not advise, on rule 17's reasoning: no consumer allowlist is
|
|
669
|
+
presumed to grant `rm`, so the rule fires on a command that would be decided
|
|
670
|
+
out of band anyway and converts that decision into a durable steer. Fires per statement
|
|
321
671
|
(`;`/`&&`/`||`/`|` split), so a decorated form steers on the same premise as
|
|
322
672
|
the bare one. Conservative by construction: expansions and backticks decline
|
|
323
673
|
outright (rule 6 already blocks them), option words are skipped, and a
|
|
324
674
|
tracked *directory* under `rm -r` does not match `--error-unmatch` — each
|
|
325
675
|
biases toward passing rather than a false steer. An untracked or gitignored
|
|
326
676
|
target never matches, so scratch deletion is untouched.
|
|
327
|
-
|
|
677
|
+
20. **Fall-through logging** — anything neither blocked nor auto-allowed is
|
|
328
678
|
appended to the friction log. Always last; never affects the decision.
|
|
329
679
|
|
|
680
|
+
**Nothing above claims the sleep half was already enforced.** Before rule 13, no
|
|
681
|
+
rule in this ruleset enforced the never-poll rule's `sleep` half and rule 13 is
|
|
682
|
+
the first; whether a mechanism *outside* a consumer's tree blocks a foreground
|
|
683
|
+
`sleep` is an open question, unprobed as to cause, and no clause here rests a
|
|
684
|
+
coverage claim on one. The rule is built as though nothing outside the tree
|
|
685
|
+
enforced it — the only construction that is correct whichever way that resolves.
|
|
686
|
+
|
|
330
687
|
### Consumer rules
|
|
331
688
|
|
|
332
689
|
Project rules — build-cache hygiene, container-build concurrency,
|
|
@@ -339,9 +696,11 @@ steering rule must precede the broader rule that would catch the same
|
|
|
339
696
|
command less precisely. A third, on the match surface: a substring rule
|
|
340
697
|
sees the entire tool input, heredoc bodies included, so prose that merely
|
|
341
698
|
*names* a guarded command — a `git commit -F -` message describing one —
|
|
342
|
-
false-blocks. Match against a
|
|
343
|
-
|
|
344
|
-
|
|
699
|
+
false-blocks. Match against a `guard_skeleton` view naming the classes inert
|
|
700
|
+
for the rule (`sq dq hd` for any rule that does not itself test for an
|
|
701
|
+
expansion), which neutralizes quoted spans and heredoc bodies alike, and keep
|
|
702
|
+
longer prose out of the match surface via a quoted `-m` span or a `-F <file>`
|
|
703
|
+
the hook never reads.
|
|
345
704
|
|
|
346
705
|
## scratch-run
|
|
347
706
|
|
|
@@ -349,7 +708,7 @@ surface via a quoted `-m` span or a `-F <file>` the hook never reads.
|
|
|
349
708
|
themselves open. The generic ruleset pushes probes and multi-line sweeps
|
|
350
709
|
into the consumer's gitignored scratch dir (`GATE_SDK_TMP_DIR`) and refuses
|
|
351
710
|
the harness scratchpad by name — yet nothing allowlists *executing* what
|
|
352
|
-
lands there, so every run of a steered-to script
|
|
711
|
+
lands there, so every run of a steered-to script is decided out of band, forever. The
|
|
353
712
|
runner is the fixed, allowlistable path that ends it: given a target inside
|
|
354
713
|
the scratch dir it **echoes the script's contents to stdout** (a header
|
|
355
714
|
naming the path, then the body), then **executes it**, passing stdout,
|
|
@@ -359,7 +718,7 @@ without interpreting them.
|
|
|
359
718
|
The echo is the point, not a convenience. A bare scratch-glob allowlist
|
|
360
719
|
would auto-approve executing any script at that path with its contents
|
|
361
720
|
visible only in an earlier write call — turning a visible command into a
|
|
362
|
-
silent *and* opaque one, the opposite of what the
|
|
721
|
+
silent *and* opaque one, the opposite of what the permission decision was buying.
|
|
363
722
|
Echo-at-execution makes the silent run **self-documenting**: the executed
|
|
364
723
|
lines land in the transcript at the moment they run, which is the evidence
|
|
365
724
|
surface a supervisor's post-commit review reads. Steering the agent to
|
|
@@ -376,14 +735,14 @@ as a convenience: the generic rules that would refuse an expansion-bearing
|
|
|
376
735
|
one-liner do not reach the same code once it sits inside a scratch file.
|
|
377
736
|
The echoed body is the **compensating control**, and it relocates review
|
|
378
737
|
rather than removing it — from *before* execution, where the permission
|
|
379
|
-
|
|
738
|
+
decision put it, to *after*, in the transcript a supervisor reads. That is
|
|
380
739
|
the actual posture of the entry, and a consumer unwilling to move review
|
|
381
|
-
downstream should simply not add it: the tool still runs without it, and
|
|
382
|
-
still
|
|
740
|
+
downstream should simply not add it: the tool still runs without it, and its
|
|
741
|
+
runs still take that decision.
|
|
383
742
|
|
|
384
743
|
**Fail-closed on reach.** A target resolving outside the scratch dir is
|
|
385
744
|
refused before any echo or execution, so the tool cannot become a general
|
|
386
|
-
"run this arbitrary path
|
|
745
|
+
"run this arbitrary path unreviewed" bypass: its reach is exactly the
|
|
387
746
|
scratch surface the guard already steers into. The test reads the
|
|
388
747
|
*resolved* path, never the spelling, so a traversal out of the dir refuses
|
|
389
748
|
like any other outsider. Refusal, an absent target, and a missing argument
|
|
@@ -396,7 +755,7 @@ path is that consumer's settings, never a kit literal.
|
|
|
396
755
|
|
|
397
756
|
## scan-prompts
|
|
398
757
|
|
|
399
|
-
Advisory: surfaces recurring permission-
|
|
758
|
+
Advisory: surfaces recurring permission-friction sources from the friction
|
|
400
759
|
log, filtering against **both** settings files (`GUARD_KIT_SETTINGS` and
|
|
401
760
|
`GUARD_KIT_SETTINGS_LOCAL`) and the harness's built-in read-only git/docker
|
|
402
761
|
auto-allows. Matching is **per compound segment**, the same surface the
|
|
@@ -406,6 +765,13 @@ spans a compound the harness would split and refuse — `Bash(git status:*)`
|
|
|
406
765
|
against `git status && rm -rf x` — does not read as allowed and is counted as
|
|
407
766
|
prompting.
|
|
408
767
|
|
|
768
|
+
**What "prompting" names in this tool's output.** The word is the tool's shipped
|
|
769
|
+
vocabulary and stays as it is; what it counts is the set of calls **nothing in the
|
|
770
|
+
allowlist grants**, whose decision the harness therefore made out of band. On a
|
|
771
|
+
harness that interrupts, that set is literally the prompts; on one that decides
|
|
772
|
+
another way, it is the same set under an inherited name. The count is the same
|
|
773
|
+
number either way, and it is the number the triage criterion reads.
|
|
774
|
+
|
|
409
775
|
The friction log's fall-throughs split three ways:
|
|
410
776
|
- **Committed-covered** — every segment matches the committed allowlist or a
|
|
411
777
|
harness built-in. Silently granted, reinforced; off every list.
|
|
@@ -433,7 +799,7 @@ close-stage audit. A committed pattern subsumes a local entry when the
|
|
|
433
799
|
local string matches it under shell-glob semantics; the harness `:*` prefix
|
|
434
800
|
idiom (`Bash(printf:*)` ≡ any `printf …`) is normalized to a trailing `*`
|
|
435
801
|
so one glob test covers both forms — the match core is `guard_allow_match`
|
|
436
|
-
in `lib/guard.sh`, shared with rule
|
|
802
|
+
in `lib/guard.sh`, shared with rule 17. Read-only — reports candidates, never
|
|
437
803
|
mutates (the operator prunes). It is the detector, not the policy: a
|
|
438
804
|
non-redundant local entry can still be one-off junk worth pruning by
|
|
439
805
|
judgment.
|
|
@@ -467,6 +833,17 @@ place holds back for an attested miss. What replaces the gate is a scheduled
|
|
|
467
833
|
reader — §The close-stage triage step — the same mechanism the redundancy
|
|
468
834
|
criterion has relied on since it shipped.
|
|
469
835
|
|
|
836
|
+
**That ruling is about this subject, not about allow-list checking generally**,
|
|
837
|
+
and the boundary is stated because the section otherwise reads as covering the
|
|
838
|
+
whole surface and the next reader re-derives it. Both clauses are load-bearing
|
|
839
|
+
and both fail on the *committed* file: it is tracked, so CI sees it, and "does
|
|
840
|
+
this path exist" is a binary filesystem fact no operator intent can move. A
|
|
841
|
+
committed-allow-list predicate of that shape is therefore gated, and gated
|
|
842
|
+
elsewhere — context-kit/SPEC.md §check-settings-paths, with the kit that already
|
|
843
|
+
owns the committed settings file as a gate subject. This kit holds the three
|
|
844
|
+
`.permissions.allow[]` readers in the tree and still ships no gates; co-location
|
|
845
|
+
by parsing technique does not outrank placement by governed surface.
|
|
846
|
+
|
|
470
847
|
`--count` emits both bare counts on one line, redundancy first and breadth
|
|
471
848
|
second.
|
|
472
849
|
|
|
@@ -592,8 +969,9 @@ repo's layout as defaults):
|
|
|
592
969
|
consumer's vocabulary, never the kit's (CLAUDE.md §The provenance seam).
|
|
593
970
|
- `GUARD_KIT_RO_SCRIPTS` — array of globs eligible for the
|
|
594
971
|
absolute→relative rewrite (rule 4); default `("check-*.sh")`.
|
|
595
|
-
- `GUARD_KIT_RO_BINS` — read-only pipeline roster (rule
|
|
596
|
-
grep/head/cat/find/jq family
|
|
972
|
+
- `GUARD_KIT_RO_BINS` — read-only pipeline roster (rule 16); default the
|
|
973
|
+
grep/head/cat/find/jq family, plus `xargs`, whose membership is qualified by
|
|
974
|
+
rule 16's discriminator rather than granting on the leads-with test alone.
|
|
597
975
|
- `GUARD_KIT_SCRATCH_DIRS` — gitignored scratch dirs named in the
|
|
598
976
|
rule-3 corrective message; default `(".tmp")`.
|
|
599
977
|
|
|
@@ -609,7 +987,24 @@ decision (`block`/`advise`/`allow`/`rewrite`/`fallthrough`) with a command;
|
|
|
609
987
|
`bin/run-guard-tests.sh` feeds each through the template guard as hook JSON
|
|
610
988
|
on stdin and asserts the exit code and output class, failing on any
|
|
611
989
|
mismatch. Every generic rule carries at least one firing and one
|
|
612
|
-
non-firing case (the fixture-pair discipline, transplanted).
|
|
990
|
+
non-firing case (the fixture-pair discipline, transplanted). Two substitutions
|
|
991
|
+
make a command expressible in one tab-separated cell: `@ROOT@` becomes the git
|
|
992
|
+
sandbox root, and `@NL@` becomes a newline — without the second a heredoc case
|
|
993
|
+
cannot be written at all, and the heredoc class would ship untested.
|
|
994
|
+
|
|
995
|
+
**The decision table is the instrument for any change to what the guard
|
|
996
|
+
refuses, and its red condition is not monotone.** A change that *narrows*
|
|
997
|
+
refusal cannot be cleared by inspection, because the table fails on a verdict
|
|
998
|
+
mismatch **in either direction** rather than on a violation count: every
|
|
999
|
+
existing case whose command carries a double-quoted brace, a heredoc, a banner
|
|
1000
|
+
segment, or an allowlisted lead with a read-only tail must have its expected
|
|
1001
|
+
column **re-derived**, never assumed still correct. `bin/scan-prompts.sh` cannot
|
|
1002
|
+
substitute for it, and the reason is structural rather than a matter of
|
|
1003
|
+
precision: `guard_block` exits 2 before `guard_log_fallthrough` runs, so a
|
|
1004
|
+
blocked command never reaches `GUARD_KIT_LOG` and that report is blind to every
|
|
1005
|
+
block the guard makes. A change converting a block into a grant therefore reads
|
|
1006
|
+
as a pure improvement on the scan and as nothing at all — which is why the
|
|
1007
|
+
table, not the scan, is what a narrowing change is measured on.
|
|
613
1008
|
|
|
614
1009
|
The same runner drives the escalation-guard from a second table,
|
|
615
1010
|
`guard-tests/escalation-cases.tsv` (`<decision> <TAB> <to> <TAB> <message>`),
|