checkwright 0.24.0 → 0.26.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 +35 -1361
- package/bin/checkwright.ps1 +157 -0
- package/bin/checkwright.sh +187 -44
- package/package.json +15 -14
- package/payload/artifact/aarch64-apple-darwin/checkwright-gates +0 -0
- package/payload/artifact/aarch64-apple-darwin/checkwright-gates.sha256 +1 -0
- package/payload/artifact/aarch64-pc-windows-msvc/checkwright-gates.exe +0 -0
- package/payload/artifact/aarch64-pc-windows-msvc/checkwright-gates.exe.sha256 +1 -0
- package/payload/artifact/aarch64-unknown-linux-gnu/checkwright-gates +0 -0
- package/payload/artifact/aarch64-unknown-linux-gnu/checkwright-gates.sha256 +1 -0
- package/payload/artifact/targets.list +120 -24
- package/payload/artifact/x86_64-apple-darwin/checkwright-gates +0 -0
- package/payload/artifact/x86_64-apple-darwin/checkwright-gates.sha256 +1 -0
- package/payload/artifact/x86_64-pc-windows-msvc/checkwright-gates.exe +0 -0
- package/payload/artifact/x86_64-pc-windows-msvc/checkwright-gates.exe.sha256 +1 -0
- 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 +25 -37
- package/payload/canon-kit/checks/check-amendment-queue.gate +2 -2
- package/payload/canon-kit/checks/check-amendment-retired-spelling.gate +3 -0
- package/payload/canon-kit/checks/check-amendment-update-target.gate +3 -0
- package/payload/canon-kit/checks/check-comment-tier.gate +1 -1
- package/payload/canon-kit/checks/check-deprecation-task.gate +2 -1
- package/payload/canon-kit/checks/check-docs-cmd.gate +2 -2
- package/payload/canon-kit/checks/check-docs-link-convention.gate +1 -1
- package/payload/canon-kit/checks/check-docs-restatement-parity.gate +4 -0
- package/payload/canon-kit/checks/check-fence-command-head.gate +3 -0
- package/payload/canon-kit/checks/check-fence-run.gate +3 -0
- package/payload/canon-kit/checks/check-install-claim.gate +2 -1
- package/payload/canon-kit/checks/check-knob-citation.gate +1 -1
- package/payload/canon-kit/checks/check-manifest-count.gate +1 -1
- package/payload/canon-kit/checks/check-manifest-temporal.gate +1 -1
- package/payload/canon-kit/checks/check-md-refs.gate +1 -1
- package/payload/canon-kit/checks/check-md-unwrapped.gate +3 -0
- package/payload/canon-kit/checks/check-measured-claim.gate +2 -1
- package/payload/canon-kit/checks/check-payload-claim.gate +2 -1
- package/payload/canon-kit/checks/check-prose-bounds.gate +3 -0
- package/payload/canon-kit/checks/check-prose-enum.gate +2 -1
- package/payload/canon-kit/checks/check-prose-tells.gate +1 -1
- package/payload/canon-kit/checks/check-provenance-seam.gate +3 -0
- package/payload/canon-kit/checks/check-spec-derivable-section.gate +1 -1
- package/payload/canon-kit/checks/check-spec-dod-singleton.gate +1 -1
- package/payload/canon-kit/checks/check-spec-embedded-source.gate +1 -1
- package/payload/canon-kit/checks/check-spec-fence-balance.gate +1 -1
- package/payload/canon-kit/checks/check-spec-pointer.gate +2 -2
- package/payload/canon-kit/checks/check-surface-duplication.gate +3 -0
- package/payload/canon-kit/checks/check-todo-task-liveness.gate +1 -1
- package/payload/canon-kit/checks/check-tracking-claim.gate +1 -1
- package/payload/canon-kit/checks/check-unmarked-claim.gate +4 -0
- package/payload/canon-kit/gate-tests/check-amendment-queue/bad/SPEC-tidy.md +3 -0
- package/payload/canon-kit/gate-tests/check-amendment-queue/bad/TASK-QUEUE.md +37 -8
- package/payload/canon-kit/gate-tests/check-amendment-queue/bad/expect.txt +6 -3
- package/payload/canon-kit/gate-tests/check-amendment-queue/good/SPEC-widget.md +7 -0
- package/payload/canon-kit/gate-tests/check-amendment-queue/good/TASK-QUEUE.md +11 -3
- package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/bad/SPEC-nosection.md +16 -0
- package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/bad/SPEC-thing.md +26 -0
- package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/bad/expect.txt +8 -0
- package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/bad/surface/one.md +4 -0
- package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/bad/surface/two.md +3 -0
- package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/SPEC-tidy.md +20 -0
- package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/SPEC-widget.md +37 -0
- package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/component/README.md +4 -0
- package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/component/SPEC.md +4 -0
- package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/unnamed.md +4 -0
- package/payload/canon-kit/gate-tests/check-amendment-update-target/bad/SPEC-thing.md +26 -0
- package/payload/canon-kit/gate-tests/check-amendment-update-target/bad/expect.txt +8 -0
- package/payload/canon-kit/gate-tests/check-amendment-update-target/good/SPEC-widget.md +47 -0
- package/payload/canon-kit/gate-tests/check-amendment-update-target/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-amendment-update-target.test.sh +82 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/good/good.sh +1 -1
- package/payload/canon-kit/gate-tests/check-comment-tier.test.sh +37 -26
- package/payload/canon-kit/gate-tests/check-deprecation-task/bad/TASK-QUEUE.md +3 -1
- package/payload/canon-kit/gate-tests/check-deprecation-task/bad/scripts/canon-config.knobs +2 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/good/TASK-QUEUE.md +6 -2
- package/payload/canon-kit/gate-tests/check-deprecation-task/good/expect.txt +1 -1
- package/payload/canon-kit/gate-tests/check-deprecation-task/good/scripts/canon-config.knobs +2 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task.test.sh +12 -10
- package/payload/canon-kit/gate-tests/check-docs-cmd/good/doc.md +4 -1
- package/payload/canon-kit/gate-tests/check-docs-cmd.test.sh +61 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention/bad/expect.txt +3 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention.test.sh +21 -2
- package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/expect.txt +2 -0
- package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/kit/README.md +10 -0
- package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/kit/index.md +11 -0
- package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/scripts/canon-config.knobs +2 -0
- package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/scripts/gate-sdk-config.knobs +2 -0
- package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/kit/README.md +12 -0
- package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/kit/index.md +13 -0
- package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/scripts/canon-config.knobs +2 -0
- package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/scripts/gate-sdk-config.knobs +2 -0
- package/payload/canon-kit/gate-tests/check-fence-command-head/bad/args +1 -0
- package/payload/canon-kit/gate-tests/check-fence-command-head/bad/doc.md +16 -0
- package/payload/canon-kit/gate-tests/check-fence-command-head/bad/expect.txt +5 -0
- package/payload/canon-kit/gate-tests/check-fence-command-head/good/args +1 -0
- package/payload/canon-kit/gate-tests/check-fence-command-head/good/bin/run.sh +3 -0
- package/payload/canon-kit/gate-tests/check-fence-command-head/good/doc.md +41 -0
- package/payload/canon-kit/gate-tests/check-fence-command-head/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-fence-command-head/good/lib/tool.sh +5 -0
- package/payload/canon-kit/gate-tests/check-fence-command-head/good/scripts/canon-config.knobs +2 -0
- package/payload/canon-kit/gate-tests/check-fence-run/bad/args +1 -0
- package/payload/canon-kit/gate-tests/check-fence-run/bad/doc.md +32 -0
- package/payload/canon-kit/gate-tests/check-fence-run/bad/expect.txt +7 -0
- package/payload/canon-kit/gate-tests/check-fence-run/good/args +1 -0
- package/payload/canon-kit/gate-tests/check-fence-run/good/doc.md +31 -0
- package/payload/canon-kit/gate-tests/check-fence-run/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-install-claim/bad/scripts/canon-config.knobs +7 -0
- package/payload/canon-kit/gate-tests/check-install-claim/good/scripts/canon-config.knobs +7 -0
- package/payload/canon-kit/gate-tests/check-knob-citation.test.sh +42 -7
- package/payload/canon-kit/gate-tests/check-knob-default-coupling/bad/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +1 -2
- package/payload/canon-kit/gate-tests/check-knob-default-coupling/good/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +2 -3
- package/payload/canon-kit/gate-tests/check-knob-default-coupling.test.sh +37 -8
- package/payload/canon-kit/gate-tests/check-manifest-count/bad/SPEC.md +3 -0
- package/payload/canon-kit/gate-tests/check-manifest-count/good/SPEC.md +10 -0
- package/payload/canon-kit/gate-tests/check-manifest-count.test.sh +6 -6
- package/payload/canon-kit/gate-tests/check-md-refs.test.sh +1 -1
- package/payload/canon-kit/gate-tests/check-md-unwrapped/bad/doc.md +13 -0
- package/payload/canon-kit/gate-tests/check-md-unwrapped/bad/expect.txt +4 -0
- package/payload/canon-kit/gate-tests/check-md-unwrapped/bad/scripts/canon-config.knobs +2 -0
- package/payload/canon-kit/gate-tests/check-md-unwrapped/good/doc.md +45 -0
- package/payload/canon-kit/gate-tests/check-md-unwrapped/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-md-unwrapped/good/scripts/canon-config.knobs +4 -0
- package/payload/canon-kit/gate-tests/check-measured-claim/bad/SPEC.md +3 -0
- package/payload/canon-kit/gate-tests/check-measured-claim/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-measured-claim/bad/scripts/canon-config.knobs +4 -0
- package/payload/canon-kit/gate-tests/check-measured-claim/good/SPEC.md +8 -0
- package/payload/canon-kit/gate-tests/check-measured-claim/good/scripts/canon-config.knobs +4 -0
- package/payload/canon-kit/gate-tests/check-measured-claim/good/worktrees/SPEC.md +12 -0
- package/payload/canon-kit/gate-tests/check-measured-claim.test.sh +32 -13
- package/payload/canon-kit/gate-tests/check-payload-claim/bad/scripts/canon-config.knobs +6 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/good/scripts/canon-config.knobs +6 -0
- package/payload/canon-kit/gate-tests/check-prose-bounds/bad/CLAUDE.md +9 -0
- package/payload/canon-kit/gate-tests/check-prose-bounds/bad/SPEC.md +11 -0
- package/payload/canon-kit/gate-tests/check-prose-bounds/bad/expect.txt +3 -0
- package/payload/canon-kit/gate-tests/check-prose-bounds/bad/scripts/canon-config.knobs +3 -0
- package/payload/canon-kit/gate-tests/check-prose-bounds/good/CLAUDE.md +10 -0
- package/payload/canon-kit/gate-tests/check-prose-bounds/good/SPEC.md +27 -0
- package/payload/canon-kit/gate-tests/check-prose-bounds/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-prose-bounds/good/scripts/canon-config.knobs +3 -0
- package/payload/canon-kit/gate-tests/check-prose-bounds.test.sh +98 -0
- package/payload/canon-kit/gate-tests/check-prose-enum/bad/scripts/canon-config.knobs +3 -0
- package/payload/canon-kit/gate-tests/check-prose-enum/good/scripts/canon-config.knobs +3 -0
- package/payload/canon-kit/gate-tests/check-prose-enum.test.sh +55 -25
- package/payload/canon-kit/gate-tests/check-prose-tells/bad/prose.md +2 -0
- package/payload/canon-kit/gate-tests/check-prose-tells/bad/scripts/canon-config.knobs +5 -0
- package/payload/canon-kit/gate-tests/check-prose-tells/good/prose.md +6 -0
- package/payload/canon-kit/gate-tests/check-prose-tells/good/scripts/{canon-config.sh → canon-config.knobs} +2 -5
- package/payload/canon-kit/gate-tests/check-prose-tells/good/worktrees/prose.md +17 -0
- package/payload/canon-kit/gate-tests/check-provenance-seam/bad/TASK-QUEUE.md +15 -0
- package/payload/canon-kit/gate-tests/check-provenance-seam/bad/expect.txt +8 -0
- package/payload/canon-kit/gate-tests/check-provenance-seam/bad/scripts/canon-config.knobs +3 -0
- package/payload/canon-kit/gate-tests/check-provenance-seam/bad/scripts/gate-sdk-config.knobs +2 -0
- package/payload/canon-kit/gate-tests/check-provenance-seam/bad/scripts/lifecycle-config.knobs +12 -0
- package/payload/canon-kit/gate-tests/check-provenance-seam/bad/widget-toolkit/SPEC.md +27 -0
- package/payload/canon-kit/gate-tests/check-provenance-seam/good/TASK-QUEUE.md +15 -0
- package/payload/canon-kit/gate-tests/check-provenance-seam/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-provenance-seam/good/scripts/canon-config.knobs +3 -0
- package/payload/canon-kit/gate-tests/check-provenance-seam/good/scripts/gate-sdk-config.knobs +2 -0
- package/payload/canon-kit/gate-tests/check-provenance-seam/good/scripts/lifecycle-config.knobs +12 -0
- package/payload/canon-kit/gate-tests/check-provenance-seam/good/widget-toolkit/SPEC.md +20 -0
- package/payload/canon-kit/gate-tests/check-provenance-seam.test.sh +136 -0
- package/payload/canon-kit/gate-tests/check-spec-dod-singleton.test.sh +1 -1
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/README.md +6 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/SPEC-widget.md +5 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/bad.rs +2 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/expect.txt +4 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/scripts/canon-config.knobs +6 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/README.md +15 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/SPEC-widget.md +10 -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.rs +2 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/scripts/canon-config.knobs +6 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/vendored-kit/notes.txt +4 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/TASK-QUEUE.md +3 -1
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/TASK-QUEUE.md +9 -3
- package/payload/canon-kit/gate-tests/check-tracking-claim.test.sh +1 -1
- package/payload/canon-kit/gate-tests/check-unmarked-claim/bad/SPEC.md +14 -0
- package/payload/canon-kit/gate-tests/check-unmarked-claim/bad/expect.txt +4 -0
- package/payload/canon-kit/gate-tests/check-unmarked-claim/bad/scripts/canon-config.knobs +4 -0
- package/payload/canon-kit/gate-tests/check-unmarked-claim/good/SPEC.md +21 -0
- package/payload/canon-kit/gate-tests/check-unmarked-claim/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-unmarked-claim/good/scripts/canon-config.knobs +4 -0
- package/payload/canon-kit/gate-tests/check-unmarked-claim/good/worktrees/SPEC.md +11 -0
- package/payload/canon-kit/gate-tests/check-unmarked-claim.test.sh +110 -0
- package/payload/canon-kit/templates/SPEC-amendment.md +63 -27
- package/payload/canon-kit/templates/canon-config.knobs +1 -0
- package/payload/context-kit/README.md +33 -61
- package/payload/context-kit/checks/check-brevity.gate +2 -2
- package/payload/context-kit/checks/check-footprint-fresh.gate +3 -2
- package/payload/context-kit/checks/check-memory-off.gate +1 -1
- package/payload/context-kit/checks/check-settings-paths.gate +2 -2
- package/payload/context-kit/checks/check-settings-pins.gate +1 -1
- package/payload/context-kit/checks/check-surface-ratchet.gate +3 -0
- package/payload/context-kit/gate-tests/check-brevity/bad/CLAUDE.md +9 -2
- package/payload/context-kit/gate-tests/check-brevity/bad/expect.txt +1 -0
- package/payload/context-kit/gate-tests/check-brevity/good/CLAUDE.md +9 -4
- package/payload/context-kit/gate-tests/check-brevity/good/expect.txt +1 -1
- package/payload/context-kit/gate-tests/check-brevity.test.sh +107 -24
- package/payload/context-kit/gate-tests/check-footprint-fresh/good/CLAUDE.md +6 -0
- package/payload/context-kit/gate-tests/check-footprint-fresh/good/demo-kit/SPEC.md +3 -0
- package/payload/context-kit/gate-tests/check-footprint-fresh/good/demo-kit/templates/guide.md +3 -0
- package/payload/context-kit/gate-tests/check-footprint-fresh/good/docs/footprint.md +30 -0
- package/payload/context-kit/gate-tests/check-memory-off/bad/scripts/{context-config.sh → context-config.knobs} +1 -3
- package/payload/context-kit/gate-tests/check-memory-off/good/scripts/{context-config.sh → context-config.knobs} +1 -3
- package/payload/context-kit/gate-tests/check-memory-off.test.sh +1 -1
- package/payload/context-kit/gate-tests/check-settings-paths/bad/expect.txt +2 -0
- package/payload/context-kit/gate-tests/check-settings-paths/bad/settings.json +21 -0
- package/payload/context-kit/gate-tests/check-settings-paths/bad/tools/run-gates.sh +4 -0
- package/payload/context-kit/gate-tests/check-settings-paths/good/expect.txt +2 -1
- package/payload/context-kit/gate-tests/check-settings-paths/good/settings.json +48 -1
- package/payload/context-kit/gate-tests/check-settings-paths/good/tools/run-gates.sh +4 -0
- package/payload/context-kit/gate-tests/check-settings-pins.test.sh +1 -1
- package/payload/context-kit/gate-tests/check-surface-ratchet/bad/CLAUDE.md +5 -0
- package/payload/context-kit/gate-tests/check-surface-ratchet/bad/expect.txt +2 -0
- package/payload/context-kit/gate-tests/check-surface-ratchet/bad/scripts/context-config.knobs +4 -0
- package/payload/context-kit/gate-tests/check-surface-ratchet/bad/surface-ceiling.txt +2 -0
- package/payload/context-kit/gate-tests/check-surface-ratchet/bad/templates/ungoverned.md +3 -0
- package/payload/context-kit/gate-tests/check-surface-ratchet/good/CLAUDE.md +3 -0
- package/payload/context-kit/gate-tests/check-surface-ratchet/good/expect.txt +1 -0
- package/payload/context-kit/gate-tests/check-surface-ratchet/good/scripts/context-config.knobs +4 -0
- package/payload/context-kit/gate-tests/check-surface-ratchet/good/surface-ceiling.txt +4 -0
- package/payload/context-kit/gate-tests/check-surface-ratchet/good/templates/held.md +4 -0
- package/payload/context-kit/gate-tests/check-surface-ratchet.test.sh +76 -0
- package/payload/context-kit/index-tests/corpus/baseline.txt +1 -1
- package/payload/context-kit/index-tests/corpus/surface.md +1 -6
- package/payload/context-kit/index-tests/expected/always-loaded.txt +1 -1
- package/payload/context-kit/templates/close-brevity.md +9 -28
- package/payload/context-kit/templates/context-config.knobs +1 -0
- package/payload/context-kit/templates/session-context.sh +43 -28
- package/payload/delegation-kit/README.md +35 -59
- package/payload/delegation-kit/checks/check-agent-tier-explicit.gate +1 -1
- package/payload/delegation-kit/checks/check-gate-tamper.gate +1 -1
- package/payload/delegation-kit/gate-tests/check-gate-tamper.test.sh +23 -2
- package/payload/delegation-kit/templates/agent-execution.md +23 -372
- package/payload/delegation-kit/templates/delegation-config.knobs +4 -0
- package/payload/delegation-kit/templates/dispatch-checklists.md +8 -45
- package/payload/delegation-kit/usage-tests/dispatch-guard-cases.tsv +33 -17
- package/payload/doctrine-kit/DOCTRINE.md +92 -458
- package/payload/doctrine-kit/README.md +24 -55
- package/payload/doctrine-kit/checks/check-doctrine-registration.gate +1 -1
- package/payload/doctrine-kit/gate-tests/check-doctrine-registration.test.sh +48 -3
- package/payload/drift-kit/README.md +43 -89
- package/payload/drift-kit/templates/close-knowledge.md +7 -22
- package/payload/drift-kit/templates/drift-config.knobs +1 -0
- package/payload/drift-kit/templates/economics.md +10 -48
- package/payload/drift-kit/templates/kpi-deprecated-surface.sh +31 -9
- package/payload/drift-kit/templates/kpis.list +2 -1
- package/payload/drift-kit/templates/price-table.tsv +1 -1
- package/payload/evidence-kit/README.md +23 -46
- package/payload/evidence-kit/checks/check-battery-roster.gate +1 -1
- package/payload/evidence-kit/checks/check-evidence-baseline.gate +2 -2
- package/payload/evidence-kit/checks/check-evidence-manifest.gate +1 -1
- package/payload/evidence-kit/checks/check-producer-liveness.gate +3 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/bad/scripts/evidence-config.knobs +7 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/good/scripts/evidence-config.knobs +7 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster.test.sh +7 -7
- package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/TASK-QUEUE.md +3 -1
- package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/args +1 -0
- package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/expect.txt +2 -0
- package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/scripts/evidence-config.knobs +4 -0
- package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/validate-baseline.txt +1 -0
- package/payload/evidence-kit/gate-tests/check-evidence-baseline/good/TASK-QUEUE.md +3 -1
- package/payload/evidence-kit/gate-tests/check-evidence-baseline/good/args +1 -0
- package/payload/evidence-kit/gate-tests/check-evidence-baseline/good/scripts/evidence-config.knobs +3 -0
- package/payload/evidence-kit/gate-tests/check-evidence-baseline.test.sh +134 -14
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/scripts/{evidence-config.sh → evidence-config.knobs} +3 -5
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/scripts/{evidence-config.sh → evidence-config.knobs} +3 -5
- package/payload/evidence-kit/gate-tests/check-evidence-manifest.test.sh +5 -4
- package/payload/evidence-kit/gate-tests/diff-baseline-status.test.sh +128 -0
- package/payload/evidence-kit/gate-tests/evidence-lib.test.sh +51 -45
- package/payload/evidence-kit/gate-tests/pre-hook.test.sh +66 -0
- package/payload/evidence-kit/gate-tests/producer-lock.test.sh +29 -16
- package/payload/evidence-kit/templates/evidence-config.knobs +1 -0
- package/payload/gate-sdk/README.md +47 -73
- package/payload/gate-sdk/bin/build-native.sh +89 -1
- package/payload/gate-sdk/bin/run-gates.ps1 +266 -0
- package/payload/gate-sdk/bin/run-gates.sh +60 -182
- package/payload/gate-sdk/checks/check-action-gh-repo.gate +1 -1
- package/payload/gate-sdk/checks/check-action-job-ref.gate +3 -0
- package/payload/gate-sdk/checks/check-action-permissions.gate +3 -0
- package/payload/gate-sdk/checks/check-action-pinning.gate +1 -1
- package/payload/gate-sdk/checks/check-action-run-path.gate +3 -0
- package/payload/gate-sdk/checks/check-action-run-shell.gate +3 -0
- package/payload/gate-sdk/checks/check-commit-msg.gate +2 -1
- package/payload/gate-sdk/checks/check-commit-subject.gate +1 -1
- package/payload/gate-sdk/checks/check-core-files.gate +1 -1
- package/payload/gate-sdk/checks/check-crate-arms.gate +3 -0
- package/payload/gate-sdk/checks/check-enforcement-fresh.gate +3 -2
- package/payload/gate-sdk/checks/check-exec-bit.gate +1 -1
- package/payload/gate-sdk/checks/check-front-end-fail-open.gate +3 -0
- package/payload/gate-sdk/checks/check-gate-assertions.gate +3 -0
- package/payload/gate-sdk/checks/check-gate-binary-fresh.gate +1 -1
- package/payload/gate-sdk/checks/check-gate-exemption-tasks.gate +1 -1
- package/payload/gate-sdk/checks/check-gate-fail-closed.gate +1 -1
- package/payload/gate-sdk/checks/check-gate-fixture-coverage.gate +1 -1
- package/payload/gate-sdk/checks/check-gate-output.gate +1 -1
- package/payload/gate-sdk/checks/check-gate-substrate-parity.gate +3 -0
- package/payload/gate-sdk/checks/check-graph.gate +2 -1
- package/payload/gate-sdk/checks/check-hook-exec-bit.gate +1 -1
- package/payload/gate-sdk/checks/check-identity.gate +1 -1
- package/payload/gate-sdk/checks/check-install-disposition.gate +3 -0
- package/payload/gate-sdk/checks/check-kit-enum.gate +1 -1
- package/payload/gate-sdk/checks/check-kit-registration.gate +1 -1
- package/payload/gate-sdk/checks/check-kit-roots-dialect.gate +3 -0
- package/payload/gate-sdk/checks/check-packed-links.gate +3 -0
- package/payload/gate-sdk/checks/check-path-dialect.gate +3 -0
- package/payload/gate-sdk/checks/check-pipe-membership.gate +3 -0
- package/payload/gate-sdk/checks/check-portability-floor.gate +4 -0
- package/payload/gate-sdk/checks/check-projection-roster.gate +4 -0
- package/payload/gate-sdk/checks/check-reads-couples.gate +1 -1
- package/payload/gate-sdk/checks/check-root-tiering.gate +1 -1
- package/payload/gate-sdk/checks/check-shellcheck.gate +3 -0
- package/payload/gate-sdk/checks/check-template-copy-parity.gate +1 -1
- package/payload/gate-sdk/checks/check-tree-terms.gate +4 -0
- package/payload/gate-sdk/checks/check-workflow-tiering.gate +1 -1
- package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/args +2 -0
- package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/scripts/gate-sdk-config.knobs +1 -0
- package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/tree/notes.md +3 -0
- package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/tree/workflows/ci.yml +8 -0
- package/payload/gate-sdk/gate-tests/check-action-job-ref/good/args +3 -0
- package/payload/gate-sdk/gate-tests/check-action-job-ref/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-action-job-ref/good/scripts/gate-sdk-config.knobs +1 -0
- package/payload/gate-sdk/gate-tests/check-action-job-ref/good/tree/notes.md +3 -0
- package/payload/gate-sdk/gate-tests/check-action-job-ref/good/tree/workflows/ci.yml +8 -0
- package/payload/gate-sdk/gate-tests/check-action-permissions/bad/args +3 -0
- package/payload/gate-sdk/gate-tests/check-action-permissions/bad/expect.txt +5 -0
- package/payload/gate-sdk/gate-tests/check-action-permissions/bad/tree/workflows/empty-allowlist.yml +29 -0
- package/payload/gate-sdk/gate-tests/check-action-permissions/bad/tree/workflows/gates.yml +25 -0
- package/payload/gate-sdk/gate-tests/check-action-permissions/good/args +5 -0
- package/payload/gate-sdk/gate-tests/check-action-permissions/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-action-permissions/good/tree/action.yml +9 -0
- package/payload/gate-sdk/gate-tests/check-action-permissions/good/tree/not-actions.yml +7 -0
- package/payload/gate-sdk/gate-tests/check-action-permissions/good/tree/workflows/declared.yml +69 -0
- package/payload/gate-sdk/gate-tests/check-action-permissions/good/tree/workflows/valves.yml +22 -0
- package/payload/gate-sdk/gate-tests/check-action-run-path/bad/args +4 -0
- package/payload/gate-sdk/gate-tests/check-action-run-path/bad/expect.txt +2 -0
- package/payload/gate-sdk/gate-tests/check-action-run-path/bad/tree/scripts/present.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-action-run-path/bad/tree/workflows/ci.yml +14 -0
- package/payload/gate-sdk/gate-tests/check-action-run-path/good/args +5 -0
- package/payload/gate-sdk/gate-tests/check-action-run-path/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-action-run-path/good/tree/scripts/build.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-action-run-path/good/tree/sub/scripts/inner.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-action-run-path/good/tree/workflows/ci.yml +36 -0
- package/payload/gate-sdk/gate-tests/check-action-run-shell/bad/args +4 -2
- package/payload/gate-sdk/gate-tests/check-action-run-shell/bad/expect.txt +2 -0
- package/payload/gate-sdk/gate-tests/check-action-run-shell/bad/tree/workflows/runner-dialect.yml +36 -0
- package/payload/gate-sdk/gate-tests/check-action-run-shell/good/args +3 -2
- package/payload/gate-sdk/gate-tests/check-action-run-shell/good/expect.txt +1 -1
- package/payload/gate-sdk/gate-tests/check-action-run-shell/good/tree/workflows/runner-dialect.yml +71 -0
- package/payload/gate-sdk/gate-tests/check-action-run-shell.test.sh +102 -9
- package/payload/gate-sdk/gate-tests/check-assertion-strength/bad/smoke/install.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-assertion-strength/good/smoke/install.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-assertion-strength.test.sh +55 -0
- package/payload/gate-sdk/gate-tests/check-commit-msg/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-commit-msg/bad/msg.txt +4 -0
- package/payload/gate-sdk/gate-tests/check-commit-msg/bad/patterns.list +5 -1
- package/payload/gate-sdk/gate-tests/check-commit-msg/good/msg.txt +7 -0
- package/payload/gate-sdk/gate-tests/check-commit-msg/good/patterns.list +5 -1
- package/payload/gate-sdk/gate-tests/check-commit-subject.test.sh +2 -2
- package/payload/gate-sdk/gate-tests/check-core-files.test.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-crate-arms/bad/scripts/gate-sdk-config.knobs +3 -0
- package/payload/gate-sdk/gate-tests/check-crate-arms/good/scripts/gate-sdk-config.knobs +3 -0
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/demo-kit/SPEC.md +3 -0
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/demo-kit/checks/check-demo.gate +1 -0
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/demo-kit/probe.conf +1 -0
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/demo-kit/templates/guide.md +3 -0
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/docs/enforcement.md +33 -0
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/scripts/gate-sdk-config.knobs +1 -0
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/scripts/gates.list +1 -0
- package/payload/gate-sdk/gate-tests/check-exec-bit.test.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-front-end-fail-open/bad/args +3 -0
- package/payload/gate-sdk/gate-tests/check-front-end-fail-open/bad/expect.txt +2 -0
- package/payload/gate-sdk/gate-tests/check-front-end-fail-open/bad/gate-sdk/bin/run-gates.ps1 +5 -0
- package/payload/gate-sdk/gate-tests/check-front-end-fail-open/bad/gate-sdk/bin/run-gates.sh +9 -0
- package/payload/gate-sdk/gate-tests/check-front-end-fail-open/good/args +4 -0
- package/payload/gate-sdk/gate-tests/check-front-end-fail-open/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-front-end-fail-open/good/gate-sdk/bin/run-gates.ps1 +5 -0
- package/payload/gate-sdk/gate-tests/check-front-end-fail-open/good/gate-sdk/bin/run-gates.sh +9 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/expect.txt +5 -1
- package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/scripts/SPEC.md +22 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/scripts/check-count.sh +11 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/scripts/check-extra.sh +14 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/scripts/check-zero.sh +7 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/good/expect.txt +1 -1
- package/payload/gate-sdk/gate-tests/check-gate-assertions/good/scripts/SPEC.md +30 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/good/scripts/check-qux.sh +13 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions.test.sh +117 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/gate-sdk-config.knobs +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/gate-sdk-config.knobs +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh.test.sh +6 -12
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/TASK-QUEUE.md +5 -3
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/TASK-QUEUE.md +3 -1
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks.test.sh +4 -2
- package/payload/gate-sdk/gate-tests/check-gate-output.test.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/ci/build-artifact.sh +9 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/ci.yml +9 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/expect.txt +6 -2
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/kit-spec.md +6 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-nospec.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-ungrounded.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gate-sdk-config.knobs +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gates.list +8 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/ci/build-artifact.sh +9 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/ci.yml +16 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/expect.txt +6 -2
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/kit-spec.md +12 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-held.sh +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gate-sdk-config.knobs +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gates.list +1 -1
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity.test.sh +222 -197
- package/payload/gate-sdk/gate-tests/check-graph/bad/SPEC-example-gate.md +7 -2
- package/payload/gate-sdk/gate-tests/check-graph/bad/expect.txt +4 -0
- package/payload/gate-sdk/gate-tests/check-graph/good/SPEC-second-gate.md +3 -1
- package/payload/gate-sdk/gate-tests/check-graph-cap.test.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-graph-refs.test.sh +8 -8
- package/payload/gate-sdk/gate-tests/check-graph-theme.test.sh +2 -2
- package/payload/gate-sdk/gate-tests/check-graph-tree.test.sh +49 -14
- package/payload/gate-sdk/gate-tests/check-identity/bad/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +4 -4
- package/payload/gate-sdk/gate-tests/check-identity/good/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +4 -4
- package/payload/gate-sdk/gate-tests/check-identity.test.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-eta.sh +7 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-iota.sh +7 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-theta.sh +7 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-zeta.gate +3 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/smoke/install.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/args +8 -5
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/expect.txt +5 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/native/src/installer/recipe.rs +10 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +2 -3
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/args +8 -4
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/expect.txt +2 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +2 -3
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/{alpha-kit → site-kit}/checks/check-alpha.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/site-kit/checks/check-beta.gate +3 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/site-kit/checks/check-gamma.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/site-kit/checks/check-omega.sh +7 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/site-kit/checks/check-psi.sh +7 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/{alpha-kit → site-kit}/smoke/install.sh +2 -2
- package/payload/gate-sdk/gate-tests/check-kit-registration/bad/registry-doc.md +15 -12
- package/payload/gate-sdk/gate-tests/check-kit-registration/good/args +7 -5
- package/payload/gate-sdk/gate-tests/check-kit-registration/good/scripts/gate-sdk-config.knobs +2 -0
- package/payload/gate-sdk/gate-tests/check-kit-registration.test.sh +2 -2
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/args +5 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/alpha-kit/checks/placeholder.txt +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/alpha-kit/gate-tests/alpha.test.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/alpha-kit/lib/alpha.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/beta-kit/checks/placeholder.txt +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/beta-kit/gate-tests/beta.test.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/beta-kit/lib/beta.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/gate-sdk/checks/placeholder.txt +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/gate-sdk/lib/gate.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/scripts/gate-sdk-config.knobs +7 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/scripts/gates.list +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/args +7 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/alpha-kit/checks/placeholder.txt +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/alpha-kit/gate-tests/alpha.test.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/alpha-kit/lib/alpha.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/beta-kit/checks/placeholder.txt +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/beta-kit/gate-tests/beta.test.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/beta-kit/lib/beta.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/gate-sdk/checks/placeholder.txt +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/gate-sdk/lib/gate.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/scripts/gates.list +3 -0
- package/payload/gate-sdk/gate-tests/check-packed-links/bad/alpha-kit/README.md +5 -0
- package/payload/gate-sdk/gate-tests/check-packed-links/bad/args +5 -0
- package/payload/gate-sdk/gate-tests/check-packed-links/bad/beta-kit/README.md +5 -0
- package/payload/gate-sdk/gate-tests/check-packed-links/bad/expect.txt +2 -0
- package/payload/gate-sdk/gate-tests/check-packed-links/bad/scripts/gate-sdk-config.knobs +4 -0
- package/payload/gate-sdk/gate-tests/check-packed-links/good/alpha-kit/README.md +5 -0
- package/payload/gate-sdk/gate-tests/check-packed-links/good/args +8 -0
- package/payload/gate-sdk/gate-tests/check-packed-links/good/beta-kit/README.md +9 -0
- package/payload/gate-sdk/gate-tests/check-packed-links/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-packed-links/good/gamma-kit/SPEC.md +4 -0
- package/payload/gate-sdk/gate-tests/check-packed-links/good/scripts/gate-sdk-config.knobs +6 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/bad/args +3 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/bad/expect.txt +15 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/bad/native/src/primitive.rs +19 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/bad/native/src/producer.rs +8 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/bad/native/src/walk.rs +13 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/bound-root.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/case-arm.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/commented.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/common-dir.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/glob-test.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/late-anchor.sh +7 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/logical-readback.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/probe.sh +7 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/two-root.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/args +3 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/expect.txt +13 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/commented.rs +5 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/local.rs +12 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/namespace.rs +11 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/typed.rs +10 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/verdict.rs +5 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/walk.rs +24 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/anchored.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/cd-only.sh +7 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/commented.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/one-root.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/probe.sh +8 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/rooted.sh +23 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/subshell.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/two-line.sh +8 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/verdict.sh +7 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/args +4 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/expect.txt +6 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/scripts/gate-sdk-config.knobs +1 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/array-grep.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/echo-max-count.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/gate-tests/membership.test.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/loop-head.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/tests/relocated.test.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/good/args +5 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/good/expect.txt +3 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/full-reader.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/gate-tests/check-x/bad/violating.test.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/gate-tests/clean.test.sh +8 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/loop-membership.sh +8 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/no-pipefail.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/one-line-producer.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/bad/args +2 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/bad/expect.txt +8 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/bad/patterns.list +4 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/bad/scripts/gate-sdk-config.knobs +4 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/bad/tree/empty-reason-verb +5 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/bad/tree/strings.ps1 +6 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/bad/tree/too-far-verb +5 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/bad/tree/undeclared-verb +3 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/good/args +2 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/good/patterns.list +5 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/good/scripts/gate-sdk-config.knobs +4 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/good/tree/front.ps1 +7 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/good/tree/plain-verb +5 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/good/tree/portability-patterns.list +5 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/good/tree/upgrade-verb +7 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor.test.sh +154 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/bad/demo-kit/checks/check-beta.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/bad/docs/roster.md +11 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/bad/expect.txt +7 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/check-alpha.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/check-gamma.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/check-plain.gate +1 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/gate-sdk-config.knobs +3 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/gates.list +4 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/good/demo-kit/checks/check-beta.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/good/docs/roster.md +16 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/check-alpha.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/check-delta.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/check-epsilon.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/check-plain.gate +1 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/gate-sdk-config.knobs +4 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/gates.list +5 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/scripts/gate-sdk-config.knobs +4 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/args +1 -1
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/scripts/gate-sdk-config.knobs +4 -0
- package/payload/gate-sdk/gate-tests/check-reads-couples/bad/expect.txt +1 -1
- package/payload/gate-sdk/gate-tests/check-reads-couples/bad/sandbox-gate.sh +4 -4
- package/payload/gate-sdk/gate-tests/check-reads-couples/good/sandbox-gate.sh +4 -4
- package/payload/gate-sdk/gate-tests/check-reads-couples.test.sh +25 -20
- package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/bad/alpha-kit/smoke/install.sh +1 -1
- package/payload/gate-sdk/gate-tests/{check-template-registry-parity/bad/scripts/gate-sdk-config.sh → check-smoke-entry-guard/bad/scripts/gate-sdk-config.knobs} +2 -3
- package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/alpha-kit/smoke/install.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/alpha-kit/smoke/violation.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/args +1 -1
- package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/beta-kit/smoke/install.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/scripts/gate-sdk-config.knobs +4 -0
- package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/args +3 -1
- package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/delegation-kit/templates/session-note.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/expect.txt +1 -1
- package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/scripts/session-note.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-template-copy-parity.test.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/args +2 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/drift-kit/templates/kpis.list +18 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/expect.txt +2 -0
- package/payload/gate-sdk/gate-tests/{check-smoke-entry-guard/bad/scripts/gate-sdk-config.sh → check-template-registry-parity/bad/scripts/gate-sdk-config.knobs} +2 -3
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/args +3 -1
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/drift-kit/templates/kpis.list +17 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/expect.txt +1 -1
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/scripts/gate-sdk-config.knobs +4 -0
- package/payload/gate-sdk/gate-tests/check-test-hermetic-smoke.test.sh +5 -5
- package/payload/gate-sdk/gate-tests/check-tree-terms/bad/expect.txt +6 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/bad/patterns.list +4 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/bad/tree/accounts.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/bad/tree/multi.txt +4 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/bad/tree/second-leak.txt +2 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/good/expect.txt +1 -1
- package/payload/gate-sdk/gate-tests/check-tree-terms/good/patterns.list +7 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/anchored.txt +5 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/handles.txt +2 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/msg-patterns.list +2 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/msg-patterns.local.list +3 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/worktrees/vendored-note.txt +3 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms.test.sh +133 -0
- package/payload/gate-sdk/gate-tests/emit-arm-shape.test.sh +95 -0
- package/payload/gate-sdk/gate-tests/enforcement-map.test.sh +10 -10
- package/payload/gate-sdk/gate-tests/lib-gate.test.sh +10 -184
- package/payload/gate-sdk/gate-tests/reads-census.test.sh +96 -0
- package/payload/gate-sdk/gate-tests/run-arm-contract.test.sh +190 -0
- package/payload/gate-sdk/gate-tests/run-dispatch-streams.test.sh +64 -41
- package/payload/gate-sdk/gate-tests/run-for-path.test.sh +2 -2
- package/payload/gate-sdk/gate-tests/run-gate-tests.test.sh +121 -16
- package/payload/gate-sdk/gate-tests/run-gates-linked-worktree.test.sh +136 -0
- package/payload/gate-sdk/lib/gate.sh +231 -484
- package/payload/gate-sdk/lib/test-hermetic.sh +39 -9
- package/payload/gate-sdk/templates/check-skeleton.sh +3 -2
- package/payload/gate-sdk/templates/gates-workflow.yml +23 -10
- package/payload/gate-sdk/templates/msg-patterns.list +14 -5
- package/payload/gate-sdk/templates/portability-patterns.list +56 -0
- package/payload/guard-kit/README.md +43 -46
- package/payload/guard-kit/checks/check-door-binding.gate +3 -0
- package/payload/guard-kit/gate-tests/check-door-binding/bad/alpha-kit/README.md +6 -0
- package/payload/guard-kit/gate-tests/check-door-binding/bad/alpha-kit/templates/alpha-config.knobs +3 -0
- package/payload/guard-kit/gate-tests/check-door-binding/bad/args +5 -0
- package/payload/guard-kit/gate-tests/check-door-binding/bad/beta-kit/lib/beta.sh +6 -0
- package/payload/guard-kit/gate-tests/check-door-binding/bad/expect.txt +5 -0
- package/payload/guard-kit/gate-tests/check-door-binding/bad/scripts/gate-sdk-config.knobs +4 -0
- package/payload/guard-kit/gate-tests/check-door-binding/bad/scripts/guard-config.knobs +3 -0
- package/payload/guard-kit/gate-tests/check-door-binding/bad/site/banner.md +8 -0
- package/payload/guard-kit/gate-tests/check-door-binding/bad/site/landing.md +11 -0
- package/payload/guard-kit/gate-tests/check-door-binding/good/alpha-kit/README.md +8 -0
- package/payload/guard-kit/gate-tests/check-door-binding/good/alpha-kit/templates/settings-hooks.json +20 -0
- package/payload/guard-kit/gate-tests/check-door-binding/good/args +7 -0
- package/payload/guard-kit/gate-tests/check-door-binding/good/beta-kit/lib/beta.sh +6 -0
- package/payload/guard-kit/gate-tests/check-door-binding/good/expect.txt +1 -0
- package/payload/guard-kit/gate-tests/check-door-binding/good/scripts/gate-sdk-config.knobs +4 -0
- package/payload/guard-kit/gate-tests/check-door-binding/good/scripts/guard-config.knobs +3 -0
- package/payload/guard-kit/gate-tests/check-door-binding/good/site/mirror.md +12 -0
- package/payload/guard-kit/gate-tests/check-door-binding/good/site/register.md +24 -0
- package/payload/guard-kit/gate-tests/compare-settings-allow.test.sh +75 -17
- package/payload/guard-kit/gate-tests/consumer-rules.test.sh +189 -0
- package/payload/guard-kit/gate-tests/door-binding-corpus.test.sh +72 -0
- package/payload/guard-kit/gate-tests/git-mutation-under-producer.test.sh +48 -23
- package/payload/guard-kit/gate-tests/guard-config-knobs.test.sh +170 -0
- package/payload/guard-kit/gate-tests/rewrite.test.sh +73 -0
- package/payload/guard-kit/gate-tests/scan-prompts.test.sh +174 -8
- package/payload/guard-kit/gate-tests/scratch-run.test.sh +149 -13
- package/payload/guard-kit/gate-tests/worktree-confinement.test.sh +169 -0
- package/payload/guard-kit/guard-tests/background-cases.tsv +23 -0
- package/payload/guard-kit/guard-tests/cases.tsv +374 -38
- package/payload/guard-kit/guard-tests/powershell-background-cases.tsv +29 -0
- package/payload/guard-kit/guard-tests/powershell-cases.tsv +81 -0
- package/payload/guard-kit/templates/close-triage.md +15 -55
- package/payload/guard-kit/templates/guard-config.knobs +26 -0
- package/payload/guard-kit/templates/settings-allow.json +15 -0
- package/payload/guard-kit/templates/settings-hooks.json +5 -5
- package/payload/lifecycle-kit/README.md +48 -76
- package/payload/lifecycle-kit/checks/check-audit-roster.gate +3 -0
- package/payload/lifecycle-kit/checks/check-close-surfaces.gate +1 -1
- package/payload/lifecycle-kit/checks/check-dispatch-entry.gate +3 -0
- package/payload/lifecycle-kit/checks/check-gap-inbox-neutrality.gate +1 -1
- package/payload/lifecycle-kit/checks/check-lesson-disposition.gate +1 -1
- package/payload/lifecycle-kit/checks/check-lifecycle-registration.gate +1 -1
- package/payload/lifecycle-kit/checks/check-merge-attrs.gate +1 -1
- package/payload/lifecycle-kit/checks/check-scratch-citation.gate +1 -1
- package/payload/lifecycle-kit/checks/check-shim-restatement.gate +1 -1
- package/payload/lifecycle-kit/checks/check-skill-binding.gate +1 -1
- package/payload/lifecycle-kit/checks/check-stage-entry.gate +2 -2
- package/payload/lifecycle-kit/checks/check-stage-evidence.gate +1 -1
- package/payload/lifecycle-kit/checks/check-stage-skill-coverage.gate +2 -2
- package/payload/lifecycle-kit/checks/check-stamp-subject.gate +3 -0
- package/payload/lifecycle-kit/checks/check-survey-record.gate +2 -2
- package/payload/lifecycle-kit/gate-tests/boundary-scratch-wipe.test.sh +93 -18
- package/payload/lifecycle-kit/gate-tests/boundary-stage-journal.test.sh +196 -0
- package/payload/lifecycle-kit/gate-tests/boundary-worktree-refusal.test.sh +214 -0
- package/payload/lifecycle-kit/gate-tests/check-audit-roster/bad/args +2 -0
- package/payload/lifecycle-kit/gate-tests/check-audit-roster/bad/expect.txt +6 -0
- package/payload/lifecycle-kit/gate-tests/check-audit-roster/bad/roster.txt +34 -0
- package/payload/lifecycle-kit/gate-tests/check-audit-roster/good/args +2 -0
- package/payload/lifecycle-kit/gate-tests/check-audit-roster/good/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-audit-roster/good/roster.txt +22 -0
- package/payload/lifecycle-kit/gate-tests/check-audit-roster.test.sh +101 -0
- package/payload/lifecycle-kit/gate-tests/check-close-surfaces/bad/scripts/lifecycle-config.knobs +2 -0
- package/payload/lifecycle-kit/gate-tests/check-close-surfaces/good/owners/worktrees/inbox.md +5 -0
- package/payload/lifecycle-kit/gate-tests/check-close-surfaces/good/scripts/lifecycle-config.knobs +2 -0
- package/payload/lifecycle-kit/gate-tests/check-close-surfaces.test.sh +21 -4
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/args +6 -0
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/head.txt +5 -0
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/marker.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/msg.txt +4 -0
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/paths.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/staged.txt +5 -0
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/args +6 -0
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/head.txt +5 -0
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/marker.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/msg.txt +4 -0
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/paths.txt +2 -0
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/staged.txt +6 -0
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry.test.sh +60 -0
- package/payload/lifecycle-kit/gate-tests/check-lesson-disposition.test.sh +1 -1
- package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration/bad/AGENT.md +1 -5
- package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration/good/AGENT.md +1 -5
- package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration.test.sh +1 -1
- package/payload/lifecycle-kit/gate-tests/check-merge-attrs.test.sh +2 -2
- package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/scripts/lifecycle-config.knobs +2 -0
- package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/scripts/lifecycle-config.knobs +2 -0
- package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/surfaces/worktrees/queue.md +13 -0
- package/payload/lifecycle-kit/gate-tests/check-shim-restatement.test.sh +1 -1
- package/payload/lifecycle-kit/gate-tests/check-skill-binding.test.sh +1 -1
- package/payload/lifecycle-kit/gate-tests/check-stage-entry.test.sh +158 -11
- package/payload/lifecycle-kit/gate-tests/check-stage-evidence.test.sh +27 -2
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/align.md +4 -1
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/build.md +4 -1
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/close.md +5 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/scope.md +4 -1
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/validate.md +1 -1
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/expect.txt +1 -1
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/align.md +4 -1
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/build.md +4 -1
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/close.md +4 -1
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/scope.md +4 -1
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/validate.md +4 -1
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage.test.sh +73 -0
- package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/args +4 -0
- package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/head.txt +5 -0
- package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/msg.txt +4 -0
- package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/staged.txt +6 -0
- package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/args +4 -0
- package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/head.txt +5 -0
- package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/msg.txt +4 -0
- package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/staged.txt +7 -0
- package/payload/lifecycle-kit/gate-tests/check-stamp-subject.test.sh +59 -0
- package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/expect.txt +3 -0
- package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/record.md +24 -0
- package/payload/lifecycle-kit/gate-tests/check-survey-record/good/expect.txt +1 -1
- package/payload/lifecycle-kit/gate-tests/check-survey-record/good/record.md +10 -0
- package/payload/lifecycle-kit/gate-tests/check-survey-record.test.sh +56 -5
- package/payload/lifecycle-kit/gate-tests/dispatch-marker.test.sh +152 -0
- package/payload/lifecycle-kit/gate-tests/file-gap-recurrence.test.sh +23 -48
- package/payload/lifecycle-kit/gate-tests/gap-inbox-route.test.sh +7 -5
- package/payload/lifecycle-kit/gate-tests/lead-journal-open.test.sh +119 -0
- package/payload/lifecycle-kit/gate-tests/preflight-valve.test.sh +170 -0
- package/payload/lifecycle-kit/gate-tests/rename-iteration.test.sh +5 -3
- package/payload/lifecycle-kit/gate-tests/ruling-staleness.test.sh +89 -0
- package/payload/lifecycle-kit/gate-tests/stamp-before-write.test.sh +66 -0
- package/payload/lifecycle-kit/gate-tests/survey-record-entry.test.sh +12 -6
- package/payload/lifecycle-kit/templates/consult.md +9 -63
- package/payload/lifecycle-kit/templates/lead.md +143 -423
- package/payload/lifecycle-kit/templates/lifecycle-config.knobs +1 -0
- package/payload/lifecycle-kit/templates/release-sweep.md +6 -35
- package/payload/lifecycle-kit/templates/stages/align.md +14 -82
- package/payload/lifecycle-kit/templates/stages/build.md +30 -98
- package/payload/lifecycle-kit/templates/stages/close.md +21 -170
- package/payload/lifecycle-kit/templates/stages/scope.md +42 -167
- package/payload/lifecycle-kit/templates/stages/spec.md +31 -97
- package/payload/lifecycle-kit/templates/stages/validate.md +22 -59
- package/payload/lifecycle-kit/templates/upgrade.md +6 -37
- package/payload/queue-kit/README.md +33 -48
- package/payload/queue-kit/checks/check-deferred-board-tags.gate +3 -0
- package/payload/queue-kit/checks/check-queue-entry-budget.gate +2 -2
- package/payload/queue-kit/checks/check-queue-hygiene.gate +2 -2
- package/payload/queue-kit/checks/check-queue-prose-precondition.gate +1 -1
- package/payload/queue-kit/checks/check-queue-sections.gate +1 -1
- package/payload/queue-kit/checks/check-queue-slug-liveness.gate +2 -2
- package/payload/queue-kit/checks/check-queue-wrap.gate +2 -2
- package/payload/queue-kit/checks/check-roadmap-fresh.gate +3 -2
- package/payload/queue-kit/checks/check-tag-lead-line.gate +2 -2
- package/payload/queue-kit/checks/check-task-conservation.gate +1 -1
- package/payload/queue-kit/checks/check-task-names.gate +2 -2
- package/payload/queue-kit/gate-tests/check-deferred-board-tags/bad/TASK-QUEUE.md +41 -0
- package/payload/queue-kit/gate-tests/check-deferred-board-tags/bad/expect.txt +6 -0
- package/payload/queue-kit/gate-tests/check-deferred-board-tags/bad/widget-kit/README.md +3 -0
- package/payload/queue-kit/gate-tests/check-deferred-board-tags/good/TASK-QUEUE.md +39 -0
- package/payload/queue-kit/gate-tests/check-deferred-board-tags/good/expect.txt +1 -0
- package/payload/queue-kit/gate-tests/check-deferred-board-tags/good/widget-kit/README.md +3 -0
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/TASK-QUEUE.md +76 -31
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/expect.txt +12 -4
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/scripts/queue-config.knobs +4 -0
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/TASK-QUEUE.md +58 -19
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/expect.txt +8 -4
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/scripts/queue-config.knobs +4 -0
- package/payload/queue-kit/gate-tests/check-queue-entry-budget.test.sh +124 -0
- package/payload/queue-kit/gate-tests/check-queue-hygiene/bad/TASK-QUEUE.md +11 -1
- package/payload/queue-kit/gate-tests/check-queue-hygiene/bad/expect.txt +2 -0
- package/payload/queue-kit/gate-tests/check-queue-hygiene/good/TASK-QUEUE.md +30 -11
- package/payload/queue-kit/gate-tests/check-queue-prose-precondition/bad/TASK-QUEUE.md +3 -1
- package/payload/queue-kit/gate-tests/check-queue-prose-precondition/bad/expect.txt +1 -0
- package/payload/queue-kit/gate-tests/check-queue-prose-precondition/good/TASK-QUEUE.md +22 -6
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/TASK-QUEUE.md +3 -1
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/docs/page.md +1 -1
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/expect.txt +3 -1
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/scripts/queue-config.knobs +1 -0
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/TASK-QUEUE.md +6 -2
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/docs/page.md +3 -3
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/docs/worktrees/page.md +4 -0
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/scripts/queue-config.knobs +1 -0
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness.test.sh +100 -0
- package/payload/queue-kit/gate-tests/check-queue-wrap/bad/TASK-QUEUE.md +3 -1
- package/payload/queue-kit/gate-tests/check-queue-wrap/good/TASK-QUEUE.md +20 -6
- package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/TASK-QUEUE.md +15 -8
- package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/scripts/queue-config.knobs +5 -0
- package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/TASK-QUEUE.md +13 -6
- package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/scripts/queue-config.knobs +5 -0
- package/payload/queue-kit/gate-tests/check-tag-lead-line/bad/TASK-QUEUE.md +28 -7
- package/payload/queue-kit/gate-tests/check-tag-lead-line/bad/expect.txt +10 -2
- package/payload/queue-kit/gate-tests/check-tag-lead-line/good/TASK-QUEUE.md +30 -8
- package/payload/queue-kit/gate-tests/check-task-names/bad/TASK-QUEUE.md +18 -3
- package/payload/queue-kit/gate-tests/check-task-names/bad/expect.txt +9 -0
- package/payload/queue-kit/gate-tests/check-task-names/good/TASK-QUEUE.md +20 -6
- package/payload/queue-kit/gate-tests/entry-history.test.sh +197 -0
- package/payload/queue-kit/gate-tests/queue-counts.test.sh +77 -73
- package/payload/queue-kit/gate-tests/queue-edges.test.sh +168 -87
- package/payload/queue-kit/gate-tests/queue-index.test.sh +30 -16
- package/payload/queue-kit/gate-tests/roadmap.test.sh +65 -58
- package/payload/queue-kit/templates/TASK-QUEUE.md +36 -23
- package/payload/queue-kit/templates/queue-config.knobs +1 -0
- package/payload/site-kit/README.md +26 -45
- package/payload/site-kit/checks/check-docs-cname-parity.gate +1 -1
- package/payload/site-kit/checks/check-docs-highlight-coverage.gate +4 -0
- package/payload/site-kit/checks/check-docs-liquid-parse.gate +3 -0
- package/payload/site-kit/checks/check-docs-render-fidelity.gate +3 -0
- package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/args +1 -1
- package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/scripts/site-config.knobs +2 -0
- package/payload/site-kit/gate-tests/check-docs-cname-parity/good/args +2 -2
- package/payload/site-kit/gate-tests/check-docs-cname-parity/good/scripts/site-config.knobs +2 -0
- package/payload/site-kit/gate-tests/check-docs-highlight-coverage/bad/docs/_layouts/default.html +11 -0
- package/payload/site-kit/gate-tests/check-docs-highlight-coverage/bad/expect.txt +4 -0
- package/payload/site-kit/gate-tests/check-docs-highlight-coverage/bad/scripts/highlight-tokens.list +7 -0
- package/payload/site-kit/gate-tests/check-docs-highlight-coverage/bad/scripts/site-config.knobs +3 -0
- package/payload/site-kit/gate-tests/check-docs-highlight-coverage/good/docs/_layouts/default.html +14 -0
- package/payload/site-kit/gate-tests/check-docs-highlight-coverage/good/expect.txt +1 -0
- package/payload/site-kit/gate-tests/check-docs-highlight-coverage/good/scripts/highlight-tokens.list +7 -0
- package/payload/site-kit/gate-tests/check-docs-highlight-coverage/good/scripts/site-config.knobs +1 -0
- package/payload/site-kit/gate-tests/check-docs-liquid-parse/bad/docs/_layouts/default.html +4 -0
- package/payload/site-kit/gate-tests/check-docs-liquid-parse/bad/docs/span.md +3 -0
- package/payload/site-kit/gate-tests/check-docs-liquid-parse/bad/expect.txt +2 -0
- package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/_layouts/default.html +4 -0
- package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/front.md +7 -0
- package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/loop.md +5 -0
- package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/plain.html +1 -0
- package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/raw.md +3 -0
- package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/search.json +4 -0
- package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/expect.txt +1 -0
- package/payload/site-kit/gate-tests/check-docs-liquid-parse-parser.test.sh +62 -0
- package/payload/site-kit/gate-tests/check-docs-render-fidelity-batch.test.sh +40 -45
- package/payload/site-kit/gate-tests/check-docs-render-fidelity-foreign.test.sh +7 -4
- package/payload/site-kit/gate-tests/check-docs-render-fidelity-span.test.sh +7 -4
- package/payload/site-kit/gate-tests/check-docs-render-fidelity-table.test.sh +7 -4
- package/payload/site-kit/templates/site-health.yml +67 -4
- package/profiles.list +4 -5
- package/lib/common/digest.sh +0 -18
- package/lib/common/lock.sh +0 -75
- package/lib/common/profile.sh +0 -91
- package/lib/common/recipe.sh +0 -106
- package/lib/diff.sh +0 -66
- package/lib/doctor.sh +0 -164
- package/lib/init.sh +0 -428
- package/lib/uninstall.sh +0 -214
- package/lib/update.sh +0 -34
- package/payload/canon-kit/SPEC.md +0 -2129
- package/payload/canon-kit/checks/check-surface-duplication.sh +0 -106
- package/payload/canon-kit/gate-tests/check-deprecation-task/bad/scripts/canon-config.sh +0 -6
- package/payload/canon-kit/gate-tests/check-deprecation-task/good/scripts/canon-config.sh +0 -6
- package/payload/canon-kit/gate-tests/check-install-claim/bad/scripts/canon-config.sh +0 -10
- package/payload/canon-kit/gate-tests/check-install-claim/good/scripts/canon-config.sh +0 -10
- package/payload/canon-kit/gate-tests/check-measured-claim/bad/scripts/canon-config.sh +0 -6
- package/payload/canon-kit/gate-tests/check-measured-claim/good/scripts/canon-config.sh +0 -6
- package/payload/canon-kit/gate-tests/check-payload-claim/bad/scripts/canon-config.sh +0 -8
- package/payload/canon-kit/gate-tests/check-payload-claim/good/scripts/canon-config.sh +0 -8
- package/payload/canon-kit/gate-tests/check-prose-enum/bad/scripts/canon-config.sh +0 -4
- package/payload/canon-kit/gate-tests/check-prose-enum/good/scripts/canon-config.sh +0 -4
- package/payload/canon-kit/gate-tests/check-prose-tells/bad/scripts/canon-config.sh +0 -8
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/scripts/canon-config.sh +0 -5
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/scripts/canon-config.sh +0 -5
- package/payload/canon-kit/lib/spec.sh +0 -544
- package/payload/canon-kit/smoke/install.sh +0 -56
- package/payload/canon-kit/smoke/violation.sh +0 -22
- package/payload/canon-kit/templates/canon-config.sh +0 -2
- package/payload/context-kit/SPEC.md +0 -1123
- package/payload/context-kit/bin/always-loaded.sh +0 -70
- package/payload/context-kit/bin/env-probe.sh +0 -142
- package/payload/context-kit/bin/md-index.sh +0 -80
- package/payload/context-kit/bin/md-section.sh +0 -63
- package/payload/context-kit/bin/pub-index.sh +0 -90
- package/payload/context-kit/bin/run-index-tests.sh +0 -91
- package/payload/context-kit/gate-tests/check-footprint-fresh/good/args +0 -4
- package/payload/context-kit/gate-tests/check-footprint-fresh/good/emit.txt +0 -12
- package/payload/context-kit/gate-tests/check-footprint-fresh/good/projection.txt +0 -12
- package/payload/context-kit/index-tests/expected/toolfloor.txt +0 -23
- package/payload/context-kit/index-tests/toolfloor-cases.sh +0 -49
- package/payload/context-kit/lib/context.sh +0 -56
- package/payload/context-kit/lib/pub-lang/rust.sh +0 -26
- package/payload/context-kit/lib/pub-lang/ts.sh +0 -32
- package/payload/context-kit/lib/toolfloor.sh +0 -58
- package/payload/context-kit/smoke/agents-md.sh +0 -139
- package/payload/context-kit/smoke/install.sh +0 -64
- package/payload/context-kit/smoke/violation.sh +0 -21
- package/payload/context-kit/templates/context-config.sh +0 -2
- package/payload/delegation-kit/SPEC.md +0 -1712
- package/payload/delegation-kit/bin/run-budget-guard-tests.sh +0 -88
- package/payload/delegation-kit/bin/run-dispatch-guard-tests.sh +0 -97
- package/payload/delegation-kit/bin/run-trend-tests.sh +0 -63
- package/payload/delegation-kit/bin/run-usage-tests.sh +0 -226
- package/payload/delegation-kit/bin/usage-trend.sh +0 -120
- package/payload/delegation-kit/bin/usage-verdict.sh +0 -144
- package/payload/delegation-kit/lib/delegation.sh +0 -84
- package/payload/delegation-kit/smoke/install.sh +0 -63
- package/payload/delegation-kit/smoke/violation.sh +0 -16
- package/payload/delegation-kit/templates/agent-budget-guard.sh +0 -18
- package/payload/delegation-kit/templates/agent-dispatch-guard.sh +0 -61
- package/payload/delegation-kit/templates/delegation-config.sh +0 -6
- package/payload/delegation-kit/templates/statusline-usage.sh +0 -101
- package/payload/delegation-kit/templates/usage-poller.sh +0 -67
- package/payload/delegation-kit/usage-tests/budget-guard-cases.tsv +0 -20
- package/payload/doctrine-kit/SPEC.md +0 -385
- package/payload/doctrine-kit/bin/install-doctrine.sh +0 -194
- package/payload/doctrine-kit/bin/stage-rules.sh +0 -51
- package/payload/doctrine-kit/lib/doctrine.sh +0 -29
- package/payload/doctrine-kit/smoke/install.sh +0 -203
- package/payload/doctrine-kit/smoke/violation.sh +0 -13
- package/payload/drift-kit/SPEC.md +0 -1187
- package/payload/drift-kit/bin/drift-report.sh +0 -155
- package/payload/drift-kit/bin/kfric.sh +0 -61
- package/payload/drift-kit/bin/overhead-meter.sh +0 -106
- package/payload/drift-kit/bin/stage-economics.sh +0 -465
- package/payload/drift-kit/kpis/kpi-always-loaded.sh +0 -39
- package/payload/drift-kit/kpis/kpi-amendment-age.sh +0 -33
- package/payload/drift-kit/kpis/kpi-deferred-age.sh +0 -46
- package/payload/drift-kit/kpis/kpi-gate-backlog.sh +0 -52
- package/payload/drift-kit/kpis/kpi-gate-runtime.sh +0 -31
- package/payload/drift-kit/kpis/kpi-incident-recurrence.sh +0 -42
- package/payload/drift-kit/kpis/kpi-knowledge-friction.sh +0 -21
- package/payload/drift-kit/kpis/kpi-overhead.sh +0 -44
- package/payload/drift-kit/kpis/kpi-price-table-age.sh +0 -68
- package/payload/drift-kit/kpis/kpi-prompt-friction.sh +0 -38
- package/payload/drift-kit/kpis/kpi-queue-net-delta.sh +0 -74
- package/payload/drift-kit/kpis/kpi-settings-local.sh +0 -21
- package/payload/drift-kit/kpis/kpi-task-split.sh +0 -43
- package/payload/drift-kit/lib/drift.sh +0 -43
- package/payload/drift-kit/smoke/install.sh +0 -537
- package/payload/drift-kit/smoke/overhead-fixture.jsonl +0 -4
- package/payload/drift-kit/templates/drift-config.sh +0 -2
- package/payload/evidence-kit/SPEC.md +0 -740
- package/payload/evidence-kit/bin/diff-baseline.sh +0 -34
- package/payload/evidence-kit/bin/run-validate.sh +0 -124
- package/payload/evidence-kit/checks/check-producer-liveness.sh +0 -75
- package/payload/evidence-kit/gate-tests/check-battery-roster/bad/scripts/evidence-config.sh +0 -7
- package/payload/evidence-kit/gate-tests/check-battery-roster/good/scripts/evidence-config.sh +0 -7
- package/payload/evidence-kit/lib/evidence.sh +0 -193
- package/payload/evidence-kit/smoke/install.sh +0 -59
- package/payload/evidence-kit/smoke/violation.sh +0 -8
- package/payload/evidence-kit/templates/evidence-config.sh +0 -2
- package/payload/gate-sdk/SPEC.md +0 -10138
- package/payload/gate-sdk/bin/gen-pre-commit.sh +0 -297
- package/payload/gate-sdk/bin/install-hooks.sh +0 -60
- package/payload/gate-sdk/bin/port-blockers.sh +0 -473
- package/payload/gate-sdk/bin/run-consumer-smoke.sh +0 -239
- package/payload/gate-sdk/bin/run-gate-tests.sh +0 -179
- package/payload/gate-sdk/bin/upgrade-smoke.sh +0 -236
- package/payload/gate-sdk/checks/check-action-run-shell.sh +0 -223
- package/payload/gate-sdk/checks/check-crate-arms.sh +0 -62
- package/payload/gate-sdk/checks/check-gate-assertions.sh +0 -149
- package/payload/gate-sdk/checks/check-gate-substrate-parity.sh +0 -397
- package/payload/gate-sdk/checks/check-install-disposition.sh +0 -93
- package/payload/gate-sdk/checks/check-shellcheck.sh +0 -57
- package/payload/gate-sdk/checks/check-tree-terms.sh +0 -67
- package/payload/gate-sdk/gate-tests/check-crate-arms/bad/scripts/gate-sdk-config.sh +0 -2
- package/payload/gate-sdk/gate-tests/check-crate-arms/good/scripts/gate-sdk-config.sh +0 -2
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/args +0 -4
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/emit.txt +0 -14
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/projection.txt +0 -14
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/gate-sdk-config.sh +0 -2
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/gate-sdk-config.sh +0 -2
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gate-sdk-config.sh +0 -6
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/stub-bin +0 -3
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gate-sdk-config.sh +0 -6
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/stub-bin +0 -3
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/installer/lib/common/recipe.sh +0 -9
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-beta.gate +0 -3
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-gamma.sh +0 -6
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/installer/lib/common/recipe.sh +0 -10
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/scripts/gate-sdk-config.sh +0 -5
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/scripts/gate-sdk-config.sh +0 -5
- package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/scripts/gate-sdk-config.sh +0 -5
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/scripts/gate-sdk-config.sh +0 -5
- package/payload/gate-sdk/gate-tests/declaration-lib-parity.test.sh +0 -211
- package/payload/gate-sdk/gate-tests/lib-declaration.test.sh +0 -112
- package/payload/gate-sdk/lib/consumer-smoke.sh +0 -69
- package/payload/gate-sdk/lib/declaration.sh +0 -59
- package/payload/gate-sdk/lib/inject.sh +0 -80
- package/payload/gate-sdk/smoke/install.sh +0 -148
- package/payload/gate-sdk/smoke/violation.sh +0 -13
- package/payload/guard-kit/SPEC.md +0 -1063
- package/payload/guard-kit/bin/compare-settings-allow.sh +0 -91
- package/payload/guard-kit/bin/run-guard-tests.sh +0 -92
- package/payload/guard-kit/bin/scan-prompts.sh +0 -166
- package/payload/guard-kit/bin/scratch-run.sh +0 -34
- package/payload/guard-kit/gate-tests/guard-read-path.test.sh +0 -52
- package/payload/guard-kit/lib/guard.sh +0 -835
- package/payload/guard-kit/smoke/install.sh +0 -26
- package/payload/guard-kit/templates/bash-guard.sh +0 -18
- package/payload/guard-kit/templates/escalation-guard.sh +0 -27
- package/payload/guard-kit/templates/guard-config.sh +0 -5
- package/payload/guard-kit/templates/wakeup-guard.sh +0 -20
- package/payload/lifecycle-kit/SPEC.md +0 -2884
- package/payload/lifecycle-kit/bin/cite-survey.sh +0 -81
- package/payload/lifecycle-kit/bin/enter-stage.sh +0 -380
- package/payload/lifecycle-kit/bin/file-gap.sh +0 -101
- package/payload/lifecycle-kit/bin/file-survey.sh +0 -69
- package/payload/lifecycle-kit/bin/install-lifecycle.sh +0 -36
- package/payload/lifecycle-kit/bin/session-id.sh +0 -75
- package/payload/lifecycle-kit/gate-tests/check-close-surfaces/bad/scripts/lifecycle-config.sh +0 -4
- package/payload/lifecycle-kit/gate-tests/check-close-surfaces/good/scripts/lifecycle-config.sh +0 -4
- package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/scripts/lifecycle-config.sh +0 -4
- package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/scripts/lifecycle-config.sh +0 -4
- package/payload/lifecycle-kit/gate-tests/workflow-state-guard.test.sh +0 -100
- package/payload/lifecycle-kit/lib/stages.sh +0 -194
- package/payload/lifecycle-kit/smoke/install.sh +0 -434
- package/payload/lifecycle-kit/smoke/violation.sh +0 -8
- package/payload/lifecycle-kit/templates/lifecycle-config.sh +0 -2
- package/payload/lifecycle-kit/templates/workflow-state-guard.sh +0 -29
- package/payload/queue-kit/SPEC.md +0 -1358
- package/payload/queue-kit/bin/lesson-sink.sh +0 -28
- package/payload/queue-kit/bin/queue-counts.sh +0 -35
- package/payload/queue-kit/bin/queue-edges.sh +0 -78
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/scripts/queue-config.sh +0 -6
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/scripts/queue-config.sh +0 -6
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/scripts/queue-config.sh +0 -3
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/scripts/queue-config.sh +0 -3
- package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/scripts/queue-config.sh +0 -6
- package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/scripts/queue-config.sh +0 -6
- package/payload/queue-kit/gate-tests/queue-lib-parity.test.sh +0 -215
- package/payload/queue-kit/lib/queue.sh +0 -129
- package/payload/queue-kit/smoke/install.sh +0 -25
- package/payload/queue-kit/smoke/violation.sh +0 -8
- package/payload/queue-kit/templates/queue-config.sh +0 -2
- package/payload/site-kit/SPEC.md +0 -589
- package/payload/site-kit/checks/check-docs-render-fidelity.sh +0 -242
- package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/scripts/site-config.sh +0 -7
- package/payload/site-kit/gate-tests/check-docs-cname-parity/good/scripts/site-config.sh +0 -7
- package/payload/site-kit/lib/site.sh +0 -43
- package/payload/site-kit/smoke/install.sh +0 -34
- package/payload/site-kit/smoke/violation.sh +0 -20
- /package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/{check-ported.gate → check-stage-entry.gate} +0 -0
|
@@ -1,1063 +0,0 @@
|
|
|
1
|
-
# guard-kit — permission-friction reduction for agent sessions
|
|
2
|
-
|
|
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
|
|
10
|
-
loop: a `PreToolUse` guard decides at call time (block with a corrective
|
|
11
|
-
message, steer to a better form, auto-allow the provably safe, log every
|
|
12
|
-
fall-through), a scanner ranks the logged prompt sources, a curation pass
|
|
13
|
-
keeps the committed allowlist durable and the per-user overlay small, and a
|
|
14
|
-
recurring close-stage triage step makes the whole loop a habit instead of a
|
|
15
|
-
one-off cleanup.
|
|
16
|
-
|
|
17
|
-
The kit carries the guard framework, the harness-generic ruleset, and the
|
|
18
|
-
triage tooling; every project-specific guard rule (build-tool hygiene,
|
|
19
|
-
container concurrency, test-suite serialization) is consumer rule content
|
|
20
|
-
and never ships. guard-kit registers **no
|
|
21
|
-
gates**: its runtime surfaces are hooks and advisory `bin/` tools, so
|
|
22
|
-
nothing joins `gates.list`; it follows gate-sdk's layout and smoke
|
|
23
|
-
conventions without depending on its registry.
|
|
24
|
-
|
|
25
|
-
## The friction loop
|
|
26
|
-
|
|
27
|
-
1. **Call time** — the consumer's `bash-guard.sh` (copied from
|
|
28
|
-
`templates/`, wired as the `PreToolUse(Bash)` hook) inspects each
|
|
29
|
-
command: block, steer, rewrite, auto-allow, or fall through. Every
|
|
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.
|
|
33
|
-
2. **Close time** — `bin/scan-prompts.sh` filters the log against the
|
|
34
|
-
committed allowlist and ranks what survives (§scan-prompts states the
|
|
35
|
-
local-overlay upper bound), grouped by command
|
|
36
|
-
pattern. Each recurring pattern is resolved by the **triage criterion**
|
|
37
|
-
(below); `bin/compare-settings-allow.sh` lists the local-overlay entries
|
|
38
|
-
a committed glob already grants (the prune set) and those a declared probe
|
|
39
|
-
proves too broad (the narrowing set). Then the
|
|
40
|
-
log is cleared — its named reclaim path.
|
|
41
|
-
3. **Steady state** — friction low and justified: the committed
|
|
42
|
-
`settings.json` carries every durable pattern (reviewable, shared), the
|
|
43
|
-
local `settings.local.json` stays near-empty, and the guard encodes the
|
|
44
|
-
steering rules no static glob can express.
|
|
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
|
-
|
|
80
|
-
### The triage criterion
|
|
81
|
-
|
|
82
|
-
Allowlist and guard are two tools with distinct jobs — resolve each
|
|
83
|
-
recurring pattern by the criterion, never by defaulting to the allowlist:
|
|
84
|
-
|
|
85
|
-
- **Allowlist** (`Bash(...)` in the committed settings) when the command is
|
|
86
|
-
safe *and already in the form to reinforce* — static, glob-matched,
|
|
87
|
-
declarative.
|
|
88
|
-
- **Guard rule** when a *better form exists* and the agent should be steered
|
|
89
|
-
to it, or when the allow/deny needs logic a static glob cannot express.
|
|
90
|
-
- **Habit change** (a noted convention) for true one-offs.
|
|
91
|
-
|
|
92
|
-
Caution: an allowlist entry can *mask* a steering opportunity — before
|
|
93
|
-
blessing a form, confirm it is the one to reinforce; if a better form
|
|
94
|
-
exists, steer to it in the guard rather than permitting the worse one.
|
|
95
|
-
|
|
96
|
-
Note: the harness matches the allowlist **per segment** of a compound
|
|
97
|
-
command, so a glob on the core command does not cover the `echo` banners,
|
|
98
|
-
`wc`, redirects, or `;`-chained diagnostics wrapped around it — one
|
|
99
|
-
unmatched segment takes the whole line off the match path. The read-only banner/diagnostic
|
|
100
|
-
tools an agent habitually chains (`echo`, `wc`, `grep`, `ls`, `command -v`)
|
|
101
|
-
are therefore themselves legitimate allowlist entries; allowlist them, or
|
|
102
|
-
run the core command bare.
|
|
103
|
-
|
|
104
|
-
## The guard framework (`lib/guard.sh`)
|
|
105
|
-
|
|
106
|
-
Primitives a consumer guard composes; each emits the harness's
|
|
107
|
-
`PreToolUse` hook protocol:
|
|
108
|
-
|
|
109
|
-
- `guard_read_command` — parse the hook JSON on stdin, emit the command;
|
|
110
|
-
**fail-open** on any parse problem (exit 0) so a guard can never wedge
|
|
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.
|
|
120
|
-
- `guard_block <msg>` — exit 2 with the message on stderr. Every block
|
|
121
|
-
message is self-describing: it names the offending pattern *and* the
|
|
122
|
-
corrective form, so the why of a rule rides to the agent in the rejection
|
|
123
|
-
itself, not in a code comment.
|
|
124
|
-
- `guard_advise <msg>` — allow, but feed the message back as
|
|
125
|
-
`additionalContext` (steering without blocking).
|
|
126
|
-
- `guard_allow <reason>` — silent grant via `permissionDecision: allow`.
|
|
127
|
-
- `guard_rewrite <cmd> <reason>` — behavior-preserving rewrite via
|
|
128
|
-
`updatedInput` (grant the better spelling of the same command).
|
|
129
|
-
- `guard_log_fallthrough` — append the (truncated, newline-flattened)
|
|
130
|
-
command to the friction log; best-effort, never affects the decision.
|
|
131
|
-
- `guard_allow_match <string> <pattern>` — the shell-glob match core: true when
|
|
132
|
-
the string matches a committed allow pattern, with the harness `:*` prefix
|
|
133
|
-
idiom (`Bash(printf:*)` ≡ any `printf …`) normalized to a trailing `*`. Not a
|
|
134
|
-
hook primitive — a shared helper, one implementation behind
|
|
135
|
-
compare-settings-allow's redundancy detection and rule 17's silent-grant
|
|
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.
|
|
151
|
-
- `guard_split_compound <skeleton>` — the compound splitter: emits one segment
|
|
152
|
-
per line, splitting on the harness's statement separators (`;`, `&&`, `||`,
|
|
153
|
-
`|`). Also not a hook primitive — the single implementation every consumer
|
|
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.
|
|
214
|
-
|
|
215
|
-
Fail-open is the default posture. The one sanctioned fail-closed shape is a
|
|
216
|
-
deny-guard whose hook *matcher* already proves the tool identity (see
|
|
217
|
-
wakeup-guard): there, a logging or parse failure still denies.
|
|
218
|
-
|
|
219
|
-
**A third posture, fail-open-but-loud**, covers a deny-guard whose matcher
|
|
220
|
-
proves the tool but whose rule turns on a **payload field**. The gap is real
|
|
221
|
-
rather than a technicality: wakeup-guard's rule *is* the tool, so a parse
|
|
222
|
-
failure that denies costs nothing, while a rule needing a field cannot say
|
|
223
|
-
that — denying on a parse failure would wedge every call its matcher covers.
|
|
224
|
-
Passing silently is the opposite failure and the worse one, since it ships an
|
|
225
|
-
unenforceable claim that reports success. So the guard **allows the call and
|
|
226
|
-
emits an advisory naming the rule it could not enforce**: a degraded
|
|
227
|
-
enforcement is visible, never silently folded. One delivery constraint comes
|
|
228
|
-
with the posture and is easy to miss — `guard_advise` is itself jq-backed, so a
|
|
229
|
-
guard degrading *because* `jq` is absent cannot reach for it and must emit the
|
|
230
|
-
advisory envelope directly, or the loud half is lost in exactly the case it was
|
|
231
|
-
written for.
|
|
232
|
-
|
|
233
|
-
delegation-kit is this framework's second and third consumer, and they do not
|
|
234
|
-
cost the kit alike. `agent-budget-guard.sh` composes these primitives into a
|
|
235
|
-
`PreToolUse(Agent)` hook that blocks on a PAUSE budget verdict and advises
|
|
236
|
-
otherwise — cite-only; no guard-kit mechanism moves for it.
|
|
237
|
-
`agent-dispatch-guard.sh` shares that matcher and enforces delegation-kit's
|
|
238
|
-
dispatch-shape rules; guard-kit mechanism **does** move for that one, by
|
|
239
|
-
exactly one clause — the fail-open-but-loud posture above, which it is the
|
|
240
|
-
shipped instance of (delegation-kit/SPEC.md §The delegation model).
|
|
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
|
-
|
|
254
|
-
## Consumer rules
|
|
255
|
-
|
|
256
|
-
A consumer's project-specific block/steer/allow rules live in its copy of
|
|
257
|
-
`templates/bash-guard.sh`, composed from the `lib/guard.sh` primitives above and
|
|
258
|
-
placed **before** the generic ruleset — the template marks the position. Order
|
|
259
|
-
is the whole reason the seam sits here: a project rule that fires must fire
|
|
260
|
-
ahead of the generic rule it refines, or the generic verdict wins and the
|
|
261
|
-
project rule is dead code.
|
|
262
|
-
|
|
263
|
-
This is a placement contract, not a mechanism: guard-kit ships no consumer rule
|
|
264
|
-
and names none. What a project blocks or steers is its own toolchain knowledge
|
|
265
|
-
and stays in its copy, which is why the copy legitimately diverges from the
|
|
266
|
-
template here and why no rule content crosses into the kit.
|
|
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
|
-
|
|
279
|
-
## The generic ruleset
|
|
280
|
-
|
|
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.
|
|
315
|
-
|
|
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.
|
|
319
|
-
2. **`git -C <repo-root>` when cwd is the root** — blocked: the absolute
|
|
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
|
|
322
|
-
root, so `git -C <root>/subdir` and a foreign-repo `-C` are untouched.
|
|
323
|
-
3. **Bare-name scratch redirect** — a `>`/`>>` to a slash-free
|
|
324
|
-
`*.err`/`*.out`/`*.log` target is blocked (it lands in the tracked tree
|
|
325
|
-
and risks a `git add -A`); the no-slash class lets path-bearing targets,
|
|
326
|
-
`/dev/null`, and fd-dups through. The corrective message points at the
|
|
327
|
-
consumer's gitignored scratch dirs (`GUARD_KIT_SCRATCH_DIRS`).
|
|
328
|
-
4. **Absolute-path execution of a known read-only repo script** — silently
|
|
329
|
-
rewritten to the repo-relative form via `guard_rewrite` (the relative
|
|
330
|
-
spelling is what allowlist globs match). The roster is the
|
|
331
|
-
`GUARD_KIT_RO_SCRIPTS` globs (default `check-*.sh`). Any other
|
|
332
|
-
absolute repo-script spelling gets a corrective block. **Placed before**
|
|
333
|
-
rule 5, which would otherwise steer the same command less precisely.
|
|
334
|
-
5. **Repo-root absolute prefix (non-script)** — any other command carrying
|
|
335
|
-
the literal repo-root prefix is steered to the repo-relative spelling.
|
|
336
|
-
`git` is excluded — rule 2 already owns its `-C` handling.
|
|
337
|
-
6. **Shell expansion / assignment** — a residual `${…}`/`$(…)`/`<(…)`/
|
|
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
|
|
353
|
-
before allowlist matching, the same behavior class rule 6 pre-empts for
|
|
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 {} +`,
|
|
367
|
-
`xargs -I{}`), when every residual brace is exactly `{}`, is rewritten
|
|
368
|
-
via `guard_rewrite` — each `{}` single-quoted to `'{}'`,
|
|
369
|
-
behavior-preserving (the shell passes a literal `{}` either way) and
|
|
370
|
-
invisible to the matcher on the same premise as rule 6's strip. Every
|
|
371
|
-
expanding form is **blocked** with the written-out corrective:
|
|
372
|
-
git-ref shorthand (`@{u}`, `@{-n}`, `<ref>@{n}`) names the explicit
|
|
373
|
-
spelling (`origin/<branch>..HEAD`, or the resolved ref/hash);
|
|
374
|
-
list/range (`{a,b}`, `{a..b}`) names the spelled-out members or a loop;
|
|
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**
|
|
381
|
-
so their literal-target premise holds for braces as well.
|
|
382
|
-
8. **`sed` reading or rewriting a file** — blocked with the steer to the
|
|
383
|
-
harness's file tools: `sed -i` (or any short bundle carrying `i`) to the
|
|
384
|
-
Edit tool, a **file operand** to the Read tool's offset/limit. A `sed` fed
|
|
385
|
-
by a pipe is a text filter with no tool equivalent and is untouched, so the
|
|
386
|
-
discriminator is the operand, not the binary — logic no allowlist glob can
|
|
387
|
-
express, which is why this is a rule and not a deny entry. Segments are
|
|
388
|
-
analyzed only when they *lead* with `sed`, so a `-i` flag on any other
|
|
389
|
-
command (`grep -i`) is invisible to it; within a segment, options are walked
|
|
390
|
-
so `-e`/`-f` consume their argument and the first bare operand is the script
|
|
391
|
-
— a *second* bare operand is the file that fires the rule. **Placed before
|
|
392
|
-
both auto-allow rules:** a consumer that widens `GUARD_KIT_RO_BINS` with
|
|
393
|
-
`sed` would otherwise have rule 16 silently grant an in-place rewrite.
|
|
394
|
-
9. **Listing-only `find`** — a bare `find` that only lists is blocked with
|
|
395
|
-
the steer to the harness's Glob tool (the same shape as rule 8's `sed`
|
|
396
|
-
read-steer: a better tool exists, and Glob returns paths registered for a
|
|
397
|
-
later Read). Fires on the conjunction no allowlist glob can express: every
|
|
398
|
-
segment leads with `find` and carries **no action predicate**
|
|
399
|
-
(`-exec`/`-execdir`/`-ok`/`-okdir`/`-delete`/`-fls`/`-fprint`/`-fprint0`/
|
|
400
|
-
`-fprintf` — find(1) mechanism, a lib literal), with **no composition** — no
|
|
401
|
-
pipe, `&&`/`||` chain, background, or redirect. A lone listing fires, and so
|
|
402
|
-
does a **`;`-sequence of listings**: a `;`-compound is not composition but a
|
|
403
|
-
batch of independent listings, exactly what the Glob steer collapses into one
|
|
404
|
-
call. A literal `echo`/`printf` banner segment between them is the natural
|
|
405
|
-
separator of such a batch and is tolerated; at least one segment must be a
|
|
406
|
-
listing. A piped `find` is a legitimate producer (rule 16 may still
|
|
407
|
-
auto-allow it), an action-predicate `find` is an executor, a redirected
|
|
408
|
-
`find` has a downstream reader, and a **mixed** compound (a segment that is
|
|
409
|
-
neither a listing nor a banner) all pass untouched. **Placed before both
|
|
410
|
-
auto-allow rules** (same reasoning as rule 8): a bare listing meets the steer
|
|
411
|
-
rather than a silent read-only-pipeline grant, since `find` is in the default
|
|
412
|
-
`GUARD_KIT_RO_BINS` roster. A consumer needing different behavior shadows
|
|
413
|
-
the rule in its consumer-rules section.
|
|
414
|
-
10. **Bare single-file `cat`** — a `cat` read is blocked with the steer to the
|
|
415
|
-
harness's Read tool (rule 8's read-steer shape: Read returns numbered lines
|
|
416
|
-
registered for a later Edit). Fires on the conjunction no allowlist glob
|
|
417
|
-
expresses: every segment leads with `cat` and carries **exactly one**
|
|
418
|
-
non-flag operand (flags are allowed, `cat -n <file>`), with **no
|
|
419
|
-
composition** — no pipe, heredoc, redirect, substitution, `&&`/`||` chain,
|
|
420
|
-
or background. A lone `cat <file>` fires, and so does a **`;`-batch of
|
|
421
|
-
reads** (`cat a; cat b`): a `;`-compound of single-file reads is a batch,
|
|
422
|
-
not composition, and collapses into successive Read calls — the ergonomic
|
|
423
|
-
case the steer exists for. A literal `echo`/`printf` banner segment between
|
|
424
|
-
reads is the natural separator of such a batch and is tolerated: it is
|
|
425
|
-
redundant once the batch moves to the Read tool, which shows each filename
|
|
426
|
-
itself. At least one segment must be a read. Multi-file concatenation, a
|
|
427
|
-
piped or heredoc'd `cat`, a redirected `cat`, an `&&`-chain, and a **mixed**
|
|
428
|
-
or banner-only compound are composition (or carry no read the Read tool
|
|
429
|
-
replaces) and pass untouched. **Placed before both auto-allow rules** (same
|
|
430
|
-
reasoning as rule 8): a bare `cat <file>` meets the steer rather than a
|
|
431
|
-
silent read-only-pipeline grant, since `cat` is in the default
|
|
432
|
-
`GUARD_KIT_RO_BINS` roster.
|
|
433
|
-
11. **Working-tree `git grep`** — a `git grep` that searches the working tree
|
|
434
|
-
is blocked with the steer to the harness's Grep tool (rule 8's read-steer
|
|
435
|
-
shape: Grep returns matching lines with files registered for a later Read).
|
|
436
|
-
Fires on the discriminator no allowlist glob expresses: the command leads
|
|
437
|
-
with `git grep`, names no revision, and does not scope elsewhere — the
|
|
438
|
-
index (`--cached`/`--staged`), a non-repo search (`--no-index`), or an
|
|
439
|
-
untracked-file search (`--untracked`). "Names a revision" is read off the
|
|
440
|
-
positional grammar: the pattern is one positional (or supplied by
|
|
441
|
-
`-e`/`-f`), so a *further* bare positional before any `--` is a tree-ish
|
|
442
|
-
the Grep tool cannot reach — `git grep foo` steers while `git grep foo
|
|
443
|
-
HEAD` passes, and a `-- <path>` limiter keeps the search in the working
|
|
444
|
-
tree and still steers. A piped `git grep` is a producer and never reaches
|
|
445
|
-
this rule (the consumer disqualifies it). Conservative by construction: an
|
|
446
|
-
unrecognized option-with-argument or a glued pattern flag biases toward
|
|
447
|
-
passing, never a false steer of a history search.
|
|
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
|
|
569
|
-
gitignored (`git check-ignore`): truncating scratch is safe; a tracked
|
|
570
|
-
file must still take that decision. The `git` subprocess is gated behind the rare
|
|
571
|
-
`:`-redirect match; expansions (rule 6) and brace forms (rule 7) are
|
|
572
|
-
already blocked, so a surviving target is a literal path.
|
|
573
|
-
16. **Auto-allow read-only pipeline** — granted silently when every pipe
|
|
574
|
-
segment leads with a roster binary (`GUARD_KIT_RO_BINS`, default the
|
|
575
|
-
grep/head/cat/find/jq family) and every redirect target is `/dev/null`
|
|
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
|
|
616
|
-
committed **bare** allow entry (a `Bash(<cmd>)` with no `:*`/`*` glob) but
|
|
617
|
-
the command decorates it — `&&`/`;`/`|` chaining, a trailing redirect, or
|
|
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.
|
|
620
|
-
**Blocked** with the steer *run it bare — the bare form is statically
|
|
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
|
|
624
|
-
decorated command (its extra segments the allowlist never reviewed).
|
|
625
|
-
**Bare leads only:** a glob-headed family (`Bash(git log:*)`) coexists with
|
|
626
|
-
allowlisted decorators, so only an exact bare entry qualifies as the lead;
|
|
627
|
-
widening to glob leads is possible later without a new name. **Never
|
|
628
|
-
intercepts a silent grant:** the harness matches per segment, so a compound
|
|
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
|
|
631
|
-
non-leading segment (or a redirect on the lead) fails to match any committed
|
|
632
|
-
allow entry, reusing `guard_allow_match`'s shell-glob semantics. Reads
|
|
633
|
-
`GUARD_KIT_SETTINGS`; **fail-open** — no `jq`, no settings file, or a
|
|
634
|
-
parse error and the rule silently declines and falls through. Placed after
|
|
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`,
|
|
646
|
-
or `--file`, or a `git reset --soft`, gets a `guard_advise` steer carrying
|
|
647
|
-
the checklist from DOCTRINE.md's *Re-verify volatile state before a git
|
|
648
|
-
history rewrite* rule (verify HEAD before amend/squash; re-stage and verify
|
|
649
|
-
staged content after a soft reset; write any `commit -F` message file fresh
|
|
650
|
-
this turn). Advisory, not a block: each is a legitimate command, so the rule
|
|
651
|
-
injects the re-verification context and lets the command proceed. The
|
|
652
|
-
DOCTRINE.md rule is cited by **name**, not number — the doctrine's craft
|
|
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
|
|
657
|
-
against the local numbering. Placed
|
|
658
|
-
after the auto-allow rules (15, 16) and the decorated-allowlist rule (17),
|
|
659
|
-
so it fires only on a bare rewrite command none of those claimed; a
|
|
660
|
-
decorated form meets rule 17's block first and the advisory fires on the
|
|
661
|
-
re-issued bare command.
|
|
662
|
-
19. **Bare `rm` of a tracked path** — an `rm` statement naming a git-tracked
|
|
663
|
-
file (`git ls-files --error-unmatch`) is **blocked** with the steer to
|
|
664
|
-
`git rm -q <path>`, which deletes and stages that one deletion in a single
|
|
665
|
-
motion. The deletion is the point: a bare `rm` leaves it unstaged, so it
|
|
666
|
-
lands only via a later `git add -A` — the form the shared-index discipline
|
|
667
|
-
warns against, since it sweeps a concurrent session's foreign path into the
|
|
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
|
|
671
|
-
(`;`/`&&`/`||`/`|` split), so a decorated form steers on the same premise as
|
|
672
|
-
the bare one. Conservative by construction: expansions and backticks decline
|
|
673
|
-
outright (rule 6 already blocks them), option words are skipped, and a
|
|
674
|
-
tracked *directory* under `rm -r` does not match `--error-unmatch` — each
|
|
675
|
-
biases toward passing rather than a false steer. An untracked or gitignored
|
|
676
|
-
target never matches, so scratch deletion is untouched.
|
|
677
|
-
20. **Fall-through logging** — anything neither blocked nor auto-allowed is
|
|
678
|
-
appended to the friction log. Always last; never affects the decision.
|
|
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
|
-
|
|
687
|
-
### Consumer rules
|
|
688
|
-
|
|
689
|
-
Project rules — build-cache hygiene, container-build concurrency,
|
|
690
|
-
test-suite serialization, disk reclaim, tool-specific steering — live in a
|
|
691
|
-
marked section of the consumer's copied `bash-guard.sh`, before the generic
|
|
692
|
-
ruleset. Two ordering disciplines, attested in production use and kept as
|
|
693
|
-
guidance: a command about to be *blocked* must never first trigger a
|
|
694
|
-
side-effecting rule (place blocks before any reclaim/cleanup rule), and a
|
|
695
|
-
steering rule must precede the broader rule that would catch the same
|
|
696
|
-
command less precisely. A third, on the match surface: a substring rule
|
|
697
|
-
sees the entire tool input, heredoc bodies included, so prose that merely
|
|
698
|
-
*names* a guarded command — a `git commit -F -` message describing one —
|
|
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.
|
|
704
|
-
|
|
705
|
-
## scratch-run
|
|
706
|
-
|
|
707
|
-
`bin/scratch-run.sh <script> [args…]` closes a loop the steering rules
|
|
708
|
-
themselves open. The generic ruleset pushes probes and multi-line sweeps
|
|
709
|
-
into the consumer's gitignored scratch dir (`GATE_SDK_TMP_DIR`) and refuses
|
|
710
|
-
the harness scratchpad by name — yet nothing allowlists *executing* what
|
|
711
|
-
lands there, so every run of a steered-to script is decided out of band, forever. The
|
|
712
|
-
runner is the fixed, allowlistable path that ends it: given a target inside
|
|
713
|
-
the scratch dir it **echoes the script's contents to stdout** (a header
|
|
714
|
-
naming the path, then the body), then **executes it**, passing stdout,
|
|
715
|
-
stderr and the child's exit code through and forwarding `[args…]` verbatim
|
|
716
|
-
without interpreting them.
|
|
717
|
-
|
|
718
|
-
The echo is the point, not a convenience. A bare scratch-glob allowlist
|
|
719
|
-
would auto-approve executing any script at that path with its contents
|
|
720
|
-
visible only in an earlier write call — turning a visible command into a
|
|
721
|
-
silent *and* opaque one, the opposite of what the permission decision was buying.
|
|
722
|
-
Echo-at-execution makes the silent run **self-documenting**: the executed
|
|
723
|
-
lines land in the transcript at the moment they run, which is the evidence
|
|
724
|
-
surface a supervisor's post-commit review reads. Steering the agent to
|
|
725
|
-
inline the script instead is known-insufficient — it serves a short probe
|
|
726
|
-
and not the genuine multi-line sweeps (loops, arrays, command
|
|
727
|
-
substitution) that are exactly the recurring case.
|
|
728
|
-
|
|
729
|
-
**What the allowlist entry buys, and what it costs.** The consumer's entry
|
|
730
|
-
names this fixed path with a wildcard tail, and a guard only ever inspects
|
|
731
|
-
the **outer command string** — so an allowlisted invocation of the runner
|
|
732
|
-
carries no expansion and no decoration, passes, and the script's
|
|
733
|
-
*contents* are never guard-inspected at all. State that plainly rather than
|
|
734
|
-
as a convenience: the generic rules that would refuse an expansion-bearing
|
|
735
|
-
one-liner do not reach the same code once it sits inside a scratch file.
|
|
736
|
-
The echoed body is the **compensating control**, and it relocates review
|
|
737
|
-
rather than removing it — from *before* execution, where the permission
|
|
738
|
-
decision put it, to *after*, in the transcript a supervisor reads. That is
|
|
739
|
-
the actual posture of the entry, and a consumer unwilling to move review
|
|
740
|
-
downstream should simply not add it: the tool still runs without it, and its
|
|
741
|
-
runs still take that decision.
|
|
742
|
-
|
|
743
|
-
**Fail-closed on reach.** A target resolving outside the scratch dir is
|
|
744
|
-
refused before any echo or execution, so the tool cannot become a general
|
|
745
|
-
"run this arbitrary path unreviewed" bypass: its reach is exactly the
|
|
746
|
-
scratch surface the guard already steers into. The test reads the
|
|
747
|
-
*resolved* path, never the spelling, so a traversal out of the dir refuses
|
|
748
|
-
like any other outsider. Refusal, an absent target, and a missing argument
|
|
749
|
-
are each exit 2 — which the passthrough makes ambiguous by construction,
|
|
750
|
-
since a child exiting 2 is indistinguishable by code alone; the echo is the
|
|
751
|
-
discriminator, as a refusal prints no body. Content-agnostic generic
|
|
752
|
-
mechanism: the scratch dir comes from gate-sdk's existing `GATE_SDK_TMP_DIR`
|
|
753
|
-
and no kit knob is added, while the consumer's allowlist entry for the fixed
|
|
754
|
-
path is that consumer's settings, never a kit literal.
|
|
755
|
-
|
|
756
|
-
## scan-prompts
|
|
757
|
-
|
|
758
|
-
Advisory: surfaces recurring permission-friction sources from the friction
|
|
759
|
-
log, filtering against **both** settings files (`GUARD_KIT_SETTINGS` and
|
|
760
|
-
`GUARD_KIT_SETTINGS_LOCAL`) and the harness's built-in read-only git/docker
|
|
761
|
-
auto-allows. Matching is **per compound segment**, the same surface the
|
|
762
|
-
harness matches on (§The guard framework, `guard_split_compound`): a logged
|
|
763
|
-
command is granted only when *every* segment is, so a whole-string glob that
|
|
764
|
-
spans a compound the harness would split and refuse — `Bash(git status:*)`
|
|
765
|
-
against `git status && rm -rf x` — does not read as allowed and is counted as
|
|
766
|
-
prompting.
|
|
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
|
-
|
|
775
|
-
The friction log's fall-throughs split three ways:
|
|
776
|
-
- **Committed-covered** — every segment matches the committed allowlist or a
|
|
777
|
-
harness built-in. Silently granted, reinforced; off every list.
|
|
778
|
-
- **Prompting** — some segment nothing grants. The headline `<n> prompting
|
|
779
|
-
call(s)`, grouped and ranked by pattern (leading binary, plus subcommand for
|
|
780
|
-
the common multi-command binaries), triaged at close by the criterion above.
|
|
781
|
-
- **Overlay-covered** — granted, but at least one segment relies on the
|
|
782
|
-
uncommitted `GUARD_KIT_SETTINGS_LOCAL` overlay. It *did not prompt*, so it is
|
|
783
|
-
excluded from the headline (the count is a true prompt count, not an upper
|
|
784
|
-
bound), yet it is exactly the promote-or-prune candidate the close step must
|
|
785
|
-
see — so it is ranked in a **separate, visibly-advisory section** below the
|
|
786
|
-
headline, never mixed into it.
|
|
787
|
-
|
|
788
|
-
`--count` emits the compact `<patterns>/<occurrences>` prompting token for a
|
|
789
|
-
drift-KPI consumer (overlay-covered excluded, so the KPI reads true); an
|
|
790
|
-
explicit file argument overrides the log path (test capability). Its behavior
|
|
791
|
-
— the three-way split, the per-segment matching, the true count — is pinned by
|
|
792
|
-
`gate-tests/scan-prompts.test.sh`.
|
|
793
|
-
|
|
794
|
-
## compare-settings-allow
|
|
795
|
-
|
|
796
|
-
Advisory: lists local-overlay allow entries already granted by a glob in
|
|
797
|
-
the committed settings — the deterministic prune-candidate set for the
|
|
798
|
-
close-stage audit. A committed pattern subsumes a local entry when the
|
|
799
|
-
local string matches it under shell-glob semantics; the harness `:*` prefix
|
|
800
|
-
idiom (`Bash(printf:*)` ≡ any `printf …`) is normalized to a trailing `*`
|
|
801
|
-
so one glob test covers both forms — the match core is `guard_allow_match`
|
|
802
|
-
in `lib/guard.sh`, shared with rule 17. Read-only — reports candidates, never
|
|
803
|
-
mutates (the operator prunes). It is the detector, not the policy: a
|
|
804
|
-
non-redundant local entry can still be one-off junk worth pruning by
|
|
805
|
-
judgment.
|
|
806
|
-
|
|
807
|
-
The tool asks a **second question over the same two files**: which local entries
|
|
808
|
-
are *too broad*. Redundancy asks whether a committed glob already grants a local
|
|
809
|
-
entry; breadth asks whether a local glob would auto-allow a command the consumer
|
|
810
|
-
called bad. Both are one call to `guard_allow_match` — the breadth question
|
|
811
|
-
simply swaps its arguments, `guard_allow_match <probe> <local-glob>`, so there is
|
|
812
|
-
no second matching implementation and the `:*` normalization is shared. The two
|
|
813
|
-
findings are reported as distinct sets, and breadth is advisory in the same sense
|
|
814
|
-
as redundancy: the report names the local glob and the one probe that witnesses
|
|
815
|
-
its breadth, and the operator disposes — narrow the glob, or record that the
|
|
816
|
-
breadth is intended.
|
|
817
|
-
|
|
818
|
-
The probe set is consumer config (`GUARD_KIT_BREADTH_PROBES`, §Layout and
|
|
819
|
-
configuration), and it is **probes rather than a roster**: each entry is a single
|
|
820
|
-
witness whose auto-allowance would be bad, not a member of a set claimed
|
|
821
|
-
complete. A missing probe costs one witness and can never produce a false green,
|
|
822
|
-
because no completeness is claimed — and nothing here may come to claim it, since
|
|
823
|
-
a report worded as coverage would be the false-confidence proxy gate-sdk/SPEC.md
|
|
824
|
-
§When a gate earns its place refuses. With no probes declared the breadth section
|
|
825
|
-
is omitted entirely rather than printed clean, so a consumer that declared no
|
|
826
|
-
vocabulary cannot read silence as coverage.
|
|
827
|
-
|
|
828
|
-
This is the criterion's home rather than a gate, and the placement is ruled
|
|
829
|
-
rather than defaulted: the subject is a gitignored per-machine file CI cannot
|
|
830
|
-
see, and the verdict is operator-intent-dependent (a blanket grant is fine in a
|
|
831
|
-
throwaway sandbox), which is the high-false-positive shape §When a gate earns its
|
|
832
|
-
place holds back for an attested miss. What replaces the gate is a scheduled
|
|
833
|
-
reader — §The close-stage triage step — the same mechanism the redundancy
|
|
834
|
-
criterion has relied on since it shipped.
|
|
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
|
-
|
|
847
|
-
`--count` emits both bare counts on one line, redundancy first and breadth
|
|
848
|
-
second.
|
|
849
|
-
|
|
850
|
-
## wakeup-guard (template)
|
|
851
|
-
|
|
852
|
-
Optional second guard, same framework, opposite posture: blocks
|
|
853
|
-
self-scheduled wakeups (`ScheduleWakeup`/`CronCreate`) unconditionally and
|
|
854
|
-
logs each attempt — a stored prompt re-fires in a later session as if the
|
|
855
|
-
user typed it, long after its premises are stale, and the scheduling call
|
|
856
|
-
is invisible at the moment it matters. Fail-closed (the matcher proves the
|
|
857
|
-
tool identity, so a logging failure still denies). The attempt log is
|
|
858
|
-
reviewed and deleted in the same close-stage triage pass as the friction
|
|
859
|
-
log. Deliberate scheduling stays possible by disabling the hook for a
|
|
860
|
-
session — the block is the default, not a capability removal.
|
|
861
|
-
|
|
862
|
-
### escalation-guard (template)
|
|
863
|
-
|
|
864
|
-
`templates/escalation-guard.sh` is the wakeup-guard's sibling — same framework,
|
|
865
|
-
a tool-targeted matcher, a separate opt-in hook — but **advisory, not
|
|
866
|
-
fail-closed**, and the opposite failure posture: an advisory never blocks a
|
|
867
|
-
message, so any inability to inspect the payload passes silently. Registered as
|
|
868
|
-
a `PreToolUse(SendMessage)` hook, it fires only on a message addressed to the
|
|
869
|
-
lead (a background stage session reaches the live lead as `main`) and advises,
|
|
870
|
-
feeding `additionalContext`, when that message lacks any of the decision-shape
|
|
871
|
-
headers **Question / Options / Recommendation / Evidence**. A downward or
|
|
872
|
-
peer-directed message, or one already carrying those headers, passes untouched.
|
|
873
|
-
|
|
874
|
-
It is the mechanical floor under lifecycle-kit's lead protocol
|
|
875
|
-
(lifecycle-kit/SPEC.md §templates/lead.md): prompts request the escalation
|
|
876
|
-
shape, this guard enforces it. The header grammar is the kit's mechanism; the
|
|
877
|
-
ruling-class roster — what a stage session must escalate at all — stays consumer
|
|
878
|
-
config in the dispatched agent-definition, never here. Opt-in is the consumer's
|
|
879
|
-
settings registration, the same valve as the wakeup-guard; absent it the
|
|
880
|
-
template is inert prose, the intended default (this repo leaves it unwired, as
|
|
881
|
-
it does the wakeup-guard). That stated default is the *only* enforcement of the
|
|
882
|
-
wiring: no gate observes it — `check-settings-pins` and `check-memory-off` stay
|
|
883
|
-
green whether the hook is wired or not — so a session decides whether to wire an
|
|
884
|
-
optional guard by reading this section, never by predicting a gate's verdict or
|
|
885
|
-
reading the guard's own source to infer one. It sources no config and writes no
|
|
886
|
-
log — the advisory is transient, so nothing accrues for the close-stage triage.
|
|
887
|
-
|
|
888
|
-
## The close-stage triage step
|
|
889
|
-
|
|
890
|
-
`templates/close-triage.md` is the recurring step a consumer splices into
|
|
891
|
-
its close-stage skill — it fills the tooling-friction placeholder in
|
|
892
|
-
lifecycle-kit's close template. The step: run `scan-prompts`, resolve each
|
|
893
|
-
recurring pattern by the triage criterion; review and delete the wakeup
|
|
894
|
-
log if present; run `compare-settings-allow` and take its **two**
|
|
895
|
-
dispositions — prune the listed redundant local entries, and for each entry the
|
|
896
|
-
breadth report names, either narrow the glob or record that its breadth is
|
|
897
|
-
intended — then by judgment prune the remaining one-off exact-string local
|
|
898
|
-
entries and promote recurring safe patterns to the committed settings as
|
|
899
|
-
globs; clear the friction log. Two judgments the reports cannot make sit in
|
|
900
|
-
that last step. An entry naming a **script path** rather than a fixed command is
|
|
901
|
-
not content-pinned — it grants whatever the file says at run time — and its
|
|
902
|
-
sanctioned form is `bin/scratch-run.sh` (§scratch-run), whose echo is the
|
|
903
|
-
compensating control; and widening the committed set is the consumer's call,
|
|
904
|
-
since a session does not widen its own auto-allow set on its own say-so. Goal: the local set stays small, every
|
|
905
|
-
durable pattern lives in the committed, reviewable allowlist, and no local glob
|
|
906
|
-
auto-allows a command the consumer declared bad. One step, two reports, one
|
|
907
|
-
reader — no new invocation point and no new schedule.
|
|
908
|
-
|
|
909
|
-
The friction log is a capture-tier surface with no forcing function — nothing
|
|
910
|
-
refuses a close that skips it — so it declares itself advisory on the
|
|
911
|
-
close-surface roster (lifecycle-kit/SPEC.md §The close-surface roster), naming
|
|
912
|
-
the clear above as its reclaim path:
|
|
913
|
-
|
|
914
|
-
close-surface: .workflow/prompt-friction.log advisory reclaim=: > .workflow/prompt-friction.log
|
|
915
|
-
|
|
916
|
-
## Layout and configuration
|
|
917
|
-
|
|
918
|
-
```
|
|
919
|
-
guard-kit/
|
|
920
|
-
lib/guard.sh # primitives + generic ruleset functions
|
|
921
|
-
bin/scan-prompts.sh
|
|
922
|
-
bin/compare-settings-allow.sh
|
|
923
|
-
bin/scratch-run.sh # echo-then-exec runner for scratch scripts
|
|
924
|
-
bin/run-guard-tests.sh # decision-table runner
|
|
925
|
-
guard-tests/cases.tsv # expected-decision <TAB> command
|
|
926
|
-
guard-tests/escalation-cases.tsv # expected-decision <TAB> to <TAB> message
|
|
927
|
-
gate-tests/scratch-run.test.sh # bespoke unit test, run by gate-sdk's runner
|
|
928
|
-
gate-tests/scan-prompts.test.sh # bespoke unit test, run by gate-sdk's runner
|
|
929
|
-
gate-tests/compare-settings-allow.test.sh # bespoke unit test, run by gate-sdk's runner
|
|
930
|
-
templates/bash-guard.sh # consumer copy: generic rules on, marked
|
|
931
|
-
# consumer-rules section
|
|
932
|
-
templates/wakeup-guard.sh
|
|
933
|
-
templates/escalation-guard.sh
|
|
934
|
-
templates/guard-config.sh
|
|
935
|
-
templates/settings-hooks.json # the PreToolUse wiring snippet
|
|
936
|
-
templates/close-triage.md
|
|
937
|
-
smoke/install.sh
|
|
938
|
-
```
|
|
939
|
-
|
|
940
|
-
Config follows the established kit pattern: copy
|
|
941
|
-
`templates/guard-config.sh` into the gates dir (or point
|
|
942
|
-
`GUARD_KIT_CONFIG_FILE` elsewhere) and override any knob; defaults fill
|
|
943
|
-
what the consumer left unset, and a set-but-missing `GUARD_KIT_CONFIG_FILE`
|
|
944
|
-
exits 2 rather than silently running on defaults. In a hook that sources the
|
|
945
|
-
lib, that exit 2 surfaces as a hook block carrying the not-found message —
|
|
946
|
-
loud on the first guarded command, the intended fail-closed (the guards
|
|
947
|
-
gate the lib source on file existence only, so the message is never
|
|
948
|
-
swallowed; a lib that is not vendored at all stays fail-open). Knobs (this
|
|
949
|
-
repo's layout as defaults):
|
|
950
|
-
|
|
951
|
-
- `GUARD_KIT_LIB` — the vendored `lib/guard.sh` path the copied guards
|
|
952
|
-
source (the test runner points it at the tree under test); default
|
|
953
|
-
`guard-kit/lib/guard.sh`. Env or the copied guard's head only — it
|
|
954
|
-
resolves before the config file loads, so `guard-config.sh` cannot set
|
|
955
|
-
it.
|
|
956
|
-
- `GUARD_KIT_LOG` — default
|
|
957
|
-
`${GATE_SDK_WORKFLOW_DIR:-.workflow}/prompt-friction.log`.
|
|
958
|
-
- `GUARD_KIT_WAKEUP_LOG` — default
|
|
959
|
-
`${GATE_SDK_WORKFLOW_DIR:-.workflow}/wakeup-attempts.log`.
|
|
960
|
-
- `GUARD_KIT_SETTINGS` — default `.claude/settings.json`.
|
|
961
|
-
- `GUARD_KIT_SETTINGS_LOCAL` — default `.claude/settings.local.json`.
|
|
962
|
-
- `GUARD_KIT_BREADTH_PROBES` — array of permission-rule strings, each a witness
|
|
963
|
-
that a local glob is too broad (§compare-settings-allow); default empty, in
|
|
964
|
-
which case the breadth report is absent and the tool behaves exactly as it did
|
|
965
|
-
before the criterion shipped. Entries are full permission-rule strings rather
|
|
966
|
-
than bare commands, matching the settings vocabulary the tool already reads on
|
|
967
|
-
both sides, so a consumer can probe non-`Bash` rules with the same mechanism.
|
|
968
|
-
The kit ships **no** default probes: every string naming a command is the
|
|
969
|
-
consumer's vocabulary, never the kit's (CLAUDE.md §The provenance seam).
|
|
970
|
-
- `GUARD_KIT_RO_SCRIPTS` — array of globs eligible for the
|
|
971
|
-
absolute→relative rewrite (rule 4); default `("check-*.sh")`.
|
|
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.
|
|
975
|
-
- `GUARD_KIT_SCRATCH_DIRS` — gitignored scratch dirs named in the
|
|
976
|
-
rule-3 corrective message; default `(".tmp")`.
|
|
977
|
-
|
|
978
|
-
Both logs are per-iteration scratch: a consumer gitignores them even where
|
|
979
|
-
its workflow dir is otherwise committed.
|
|
980
|
-
|
|
981
|
-
## Testing
|
|
982
|
-
|
|
983
|
-
The gate contracts do not fit hooks (a guard speaks exit-2 + hook JSON, not
|
|
984
|
-
`OK:`/`FAIL:` lines), so the kit ships its own decision-table runner
|
|
985
|
-
instead of `gate-tests/`: `guard-tests/cases.tsv` pairs an expected
|
|
986
|
-
decision (`block`/`advise`/`allow`/`rewrite`/`fallthrough`) with a command;
|
|
987
|
-
`bin/run-guard-tests.sh` feeds each through the template guard as hook JSON
|
|
988
|
-
on stdin and asserts the exit code and output class, failing on any
|
|
989
|
-
mismatch. Every generic rule carries at least one firing and one
|
|
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.
|
|
1008
|
-
|
|
1009
|
-
The same runner drives the escalation-guard from a second table,
|
|
1010
|
-
`guard-tests/escalation-cases.tsv` (`<decision> <TAB> <to> <TAB> <message>`),
|
|
1011
|
-
feeding a `SendMessage`-shaped payload instead of a command: a firing case (a
|
|
1012
|
-
headerless message to `main` → advise) and its non-firing pair (a fully shaped
|
|
1013
|
-
block, and a non-`main` recipient → fallthrough) hold the same fixture-pair
|
|
1014
|
-
discipline for the advisory.
|
|
1015
|
-
|
|
1016
|
-
`smoke/install.sh` copies the templates into the scratch consumer (guard
|
|
1017
|
-
and config into the gates dir, hook wiring into `.claude/settings.json`,
|
|
1018
|
-
log paths gitignored) and then drives one crafted payload directly through
|
|
1019
|
-
the installed guard, asserting a block — the install is self-verifying.
|
|
1020
|
-
There is no `smoke/violation.sh`: the kit registers no gates, so no
|
|
1021
|
-
battery-reddening violation is craftable (gate-sdk/SPEC.md §Consumer smoke
|
|
1022
|
-
makes that file conditional on exactly this).
|
|
1023
|
-
|
|
1024
|
-
`compare-settings-allow`'s breadth criterion takes the same bespoke lane for the
|
|
1025
|
-
same reason, at `gate-tests/compare-settings-allow.test.sh`: a firing probe
|
|
1026
|
-
(a blanket local glob reported with its witness), a non-firing one (a narrow
|
|
1027
|
-
entry reporting clean), and the empty-knob silence that proves the section is
|
|
1028
|
-
omitted rather than printed clean. It drives the tool through
|
|
1029
|
-
`GUARD_KIT_CONFIG_FILE` pointed at a sandbox config, so the consumer's own probe
|
|
1030
|
-
array cannot leak into the fixture.
|
|
1031
|
-
|
|
1032
|
-
A shipped `bin/` tool that is not a hook takes neither lane. `bin/scratch-run.sh`
|
|
1033
|
-
(§scratch-run) is tested by a bespoke unit test at
|
|
1034
|
-
`gate-tests/scratch-run.test.sh`, asserting echo-then-exec on an in-scratch
|
|
1035
|
-
target, pass-through of args and exit code, and the fail-closed refusal of an
|
|
1036
|
-
out-of-scratch one. It is **not** a `guard-tests/` row: that table's grammar is a
|
|
1037
|
-
decision paired with a command, which cannot express any of the three. It is not
|
|
1038
|
-
a gate either, so no `good/`+`bad/` fixture pair is owed — but shipped mechanism
|
|
1039
|
-
owes a test, and the bespoke-unit-test lane is gate-sdk's
|
|
1040
|
-
`<tests-dir>/*.test.sh` (gate-sdk/SPEC.md §run-gate-tests), which admits a tests
|
|
1041
|
-
dir carrying unit tests and no fixture pair. Homing it there is what puts it
|
|
1042
|
-
under `check-test-hermetic`, whose assertion A enumerates
|
|
1043
|
-
`<kit-root>/gate-tests/*.test.sh` — the enforcement a kit-local runner would
|
|
1044
|
-
forfeit. A kit's first `gate-tests/` directory also obliges a fixture-runner
|
|
1045
|
-
line in the consumer's battery, which `check-kit-registration` reads from
|
|
1046
|
-
`git ls-files`: the line belongs in the same commit as the test, never a
|
|
1047
|
-
follow-up.
|
|
1048
|
-
|
|
1049
|
-
A gateless kit shapes gate-sdk's discovery rule: `gate_kit_roots` recognizes a
|
|
1050
|
-
sibling kit by its `checks/` *or* `smoke/` directory. Keying on `checks/`
|
|
1051
|
-
alone would leave this kit undiscovered — its `smoke/install.sh` would never
|
|
1052
|
-
run under `run-consumer-smoke.sh`, and its `lib/` and `bin/` would escape
|
|
1053
|
-
`check-shellcheck`'s self-lint sweep.
|
|
1054
|
-
|
|
1055
|
-
## Out of scope
|
|
1056
|
-
|
|
1057
|
-
Every toolchain- and product-coupled guard rule is consumer rule content:
|
|
1058
|
-
build-cache hygiene, container-build concurrency and restart discipline,
|
|
1059
|
-
test-suite serialization rosters, proactive disk reclaim, tool-preference
|
|
1060
|
-
steering, and any read-only script roster beyond `check-*.sh`. So are
|
|
1061
|
-
allowlist contents beyond the read-only core, and a memory-policy write
|
|
1062
|
-
guard (a product ruling, not friction mechanism). The split is framework
|
|
1063
|
-
and generic rules here, a consumer's rules in its own copied guard.
|