checkwright 0.0.1 → 0.17.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 +260 -4
- package/bin/checkwright.sh +53 -0
- package/lib/common/lock.sh +28 -0
- package/lib/common/profile.sh +58 -0
- package/lib/common/recipe.sh +93 -0
- package/lib/doctor.sh +90 -0
- package/lib/init.sh +289 -0
- package/package.json +15 -3
- package/payload/canon-kit/README.md +78 -0
- package/payload/canon-kit/SPEC.md +1264 -0
- package/payload/canon-kit/checks/check-amendment-queue.sh +115 -0
- package/payload/canon-kit/checks/check-comment-tier.sh +211 -0
- package/payload/canon-kit/checks/check-deprecation-task.sh +90 -0
- package/payload/canon-kit/checks/check-docs-cmd.sh +153 -0
- package/payload/canon-kit/checks/check-docs-link-convention.sh +71 -0
- package/payload/canon-kit/checks/check-knob-citation.sh +117 -0
- package/payload/canon-kit/checks/check-knob-default-coupling.sh +239 -0
- package/payload/canon-kit/checks/check-manifest-count.sh +46 -0
- package/payload/canon-kit/checks/check-manifest-temporal.sh +83 -0
- package/payload/canon-kit/checks/check-md-refs.sh +115 -0
- package/payload/canon-kit/checks/check-prose-enum.sh +115 -0
- package/payload/canon-kit/checks/check-prose-tells.sh +207 -0
- package/payload/canon-kit/checks/check-spec-derivable-section.sh +69 -0
- package/payload/canon-kit/checks/check-spec-dod-singleton.sh +45 -0
- package/payload/canon-kit/checks/check-spec-embedded-source.sh +133 -0
- package/payload/canon-kit/checks/check-spec-fence-balance.sh +42 -0
- package/payload/canon-kit/checks/check-spec-pointer.sh +176 -0
- package/payload/canon-kit/checks/check-surface-duplication.sh +105 -0
- package/payload/canon-kit/checks/check-todo-task-liveness.sh +80 -0
- package/payload/canon-kit/checks/check-tracking-claim.sh +136 -0
- package/payload/canon-kit/gate-tests/check-amendment-queue/bad/SPEC-tidy.md +5 -0
- package/payload/canon-kit/gate-tests/check-amendment-queue/bad/TASK-QUEUE.md +15 -0
- package/payload/canon-kit/gate-tests/check-amendment-queue/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-amendment-queue/good/SPEC-widget.md +6 -0
- package/payload/canon-kit/gate-tests/check-amendment-queue/good/TASK-QUEUE.md +15 -0
- package/payload/canon-kit/gate-tests/check-amendment-queue/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/bad/bad.sh +25 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/good/good.sh +32 -0
- package/payload/canon-kit/gate-tests/check-comment-tier.test.sh +146 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/bad/TASK-QUEUE.md +19 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/bad/bad.sh +6 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/bad/scripts/canon-config.sh +5 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/good/TASK-QUEUE.md +21 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/good/good.sh +5 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/good/scripts/canon-config.sh +5 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task.test.sh +98 -0
- package/payload/canon-kit/gate-tests/check-docs-cmd/bad/args +1 -0
- package/payload/canon-kit/gate-tests/check-docs-cmd/bad/doc.md +9 -0
- package/payload/canon-kit/gate-tests/check-docs-cmd/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-docs-cmd/good/args +1 -0
- package/payload/canon-kit/gate-tests/check-docs-cmd/good/bin/tool.sh +3 -0
- package/payload/canon-kit/gate-tests/check-docs-cmd/good/doc.md +18 -0
- package/payload/canon-kit/gate-tests/check-docs-cmd/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention/bad/args +4 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention/bad/docs/demokit/index.md +5 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention/bad/docs/index.md +3 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention/good/args +4 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention/good/docs/demokit/index.md +6 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention/good/docs/index.md +3 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention/good/docs/methodology.md +3 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-knob-citation/bad/SPEC.md +10 -0
- package/payload/canon-kit/gate-tests/check-knob-citation/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-knob-citation/good/SPEC.md +19 -0
- package/payload/canon-kit/gate-tests/check-knob-citation/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-knob-citation.test.sh +71 -0
- package/payload/canon-kit/gate-tests/check-knob-default-coupling/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-knob-default-coupling/bad/scripts/gate-sdk-config.sh +4 -0
- package/payload/canon-kit/gate-tests/check-knob-default-coupling/bad/widget-kit/SPEC.md +4 -0
- package/payload/canon-kit/gate-tests/check-knob-default-coupling/bad/widget-kit/lib/widget-cli.sh +3 -0
- package/payload/canon-kit/gate-tests/check-knob-default-coupling/bad/widget-kit/lib/widget.sh +5 -0
- package/payload/canon-kit/gate-tests/check-knob-default-coupling/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-knob-default-coupling/good/scripts/gate-sdk-config.sh +5 -0
- package/payload/canon-kit/gate-tests/check-knob-default-coupling/good/widget-kit/SPEC.md +7 -0
- package/payload/canon-kit/gate-tests/check-knob-default-coupling/good/widget-kit/lib/widget-cli.sh +3 -0
- package/payload/canon-kit/gate-tests/check-knob-default-coupling/good/widget-kit/lib/widget.sh +5 -0
- package/payload/canon-kit/gate-tests/check-knob-default-coupling.test.sh +73 -0
- package/payload/canon-kit/gate-tests/check-manifest-count/bad/SPEC.md +15 -0
- package/payload/canon-kit/gate-tests/check-manifest-count/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-manifest-count/good/SPEC.md +37 -0
- package/payload/canon-kit/gate-tests/check-manifest-count/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-manifest-count.test.sh +104 -0
- package/payload/canon-kit/gate-tests/check-manifest-temporal/bad/SPEC.md +6 -0
- package/payload/canon-kit/gate-tests/check-manifest-temporal/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-manifest-temporal/good/SPEC.md +17 -0
- package/payload/canon-kit/gate-tests/check-manifest-temporal/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-md-refs/bad/args +1 -0
- package/payload/canon-kit/gate-tests/check-md-refs/bad/doc.md +3 -0
- package/payload/canon-kit/gate-tests/check-md-refs/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-md-refs/good/args +1 -0
- package/payload/canon-kit/gate-tests/check-md-refs/good/doc.md +3 -0
- package/payload/canon-kit/gate-tests/check-md-refs/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-md-refs/good/target.md +1 -0
- package/payload/canon-kit/gate-tests/check-md-refs.test.sh +82 -0
- package/payload/canon-kit/gate-tests/check-prose-enum/bad/SPEC.md +4 -0
- package/payload/canon-kit/gate-tests/check-prose-enum/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-prose-enum/bad/scripts/canon-config.sh +4 -0
- package/payload/canon-kit/gate-tests/check-prose-enum/good/SPEC.md +16 -0
- package/payload/canon-kit/gate-tests/check-prose-enum/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-prose-enum/good/scripts/canon-config.sh +4 -0
- package/payload/canon-kit/gate-tests/check-prose-enum.test.sh +127 -0
- package/payload/canon-kit/gate-tests/check-prose-tells/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-prose-tells/bad/prose.md +15 -0
- package/payload/canon-kit/gate-tests/check-prose-tells/bad/scripts/canon-config.sh +8 -0
- package/payload/canon-kit/gate-tests/check-prose-tells/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-prose-tells/good/prose.md +21 -0
- package/payload/canon-kit/gate-tests/check-prose-tells/good/scripts/canon-config.sh +8 -0
- package/payload/canon-kit/gate-tests/check-spec-derivable-section/bad/SPEC.md +20 -0
- package/payload/canon-kit/gate-tests/check-spec-derivable-section/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-spec-derivable-section/good/SPEC.md +13 -0
- package/payload/canon-kit/gate-tests/check-spec-derivable-section/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-spec-dod-singleton/bad/SPEC.md +15 -0
- package/payload/canon-kit/gate-tests/check-spec-dod-singleton/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-spec-dod-singleton/good/SPEC.md +13 -0
- package/payload/canon-kit/gate-tests/check-spec-dod-singleton/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-spec-dod-singleton.test.sh +63 -0
- package/payload/canon-kit/gate-tests/check-spec-embedded-source/bad/SPEC.md +16 -0
- package/payload/canon-kit/gate-tests/check-spec-embedded-source/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-spec-embedded-source/bad/widget.sh +9 -0
- package/payload/canon-kit/gate-tests/check-spec-embedded-source/good/SPEC.md +19 -0
- package/payload/canon-kit/gate-tests/check-spec-embedded-source/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-spec-embedded-source/good/widget.sh +9 -0
- package/payload/canon-kit/gate-tests/check-spec-fence-balance/bad/args +1 -0
- package/payload/canon-kit/gate-tests/check-spec-fence-balance/bad/doc.md +8 -0
- package/payload/canon-kit/gate-tests/check-spec-fence-balance/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-spec-fence-balance/good/args +1 -0
- package/payload/canon-kit/gate-tests/check-spec-fence-balance/good/doc.md +9 -0
- package/payload/canon-kit/gate-tests/check-spec-fence-balance/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/README.md +4 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/SPEC-target.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/cand-tmpl.md +5 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/scripts/canon-config.sh +5 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/widget.sh +5 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/README.md +4 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/SPEC-target.md +6 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/SPEC-widget.md +5 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/cand-tmpl.md +7 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/scripts/canon-config.sh +5 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/widget.sh +6 -0
- package/payload/canon-kit/gate-tests/check-surface-duplication/bad/GLOSSARY.md +11 -0
- package/payload/canon-kit/gate-tests/check-surface-duplication/bad/VISION.md +6 -0
- package/payload/canon-kit/gate-tests/check-surface-duplication/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-surface-duplication/good/GLOSSARY.md +11 -0
- package/payload/canon-kit/gate-tests/check-surface-duplication/good/VISION.md +6 -0
- package/payload/canon-kit/gate-tests/check-surface-duplication/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/TASK-QUEUE.md +19 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/bad.sh +5 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/TASK-QUEUE.md +23 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/good.sh +5 -0
- package/payload/canon-kit/gate-tests/check-tracking-claim/bad/README.md +4 -0
- package/payload/canon-kit/gate-tests/check-tracking-claim/bad/args +1 -0
- package/payload/canon-kit/gate-tests/check-tracking-claim/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-tracking-claim/bad/kept.txt +1 -0
- package/payload/canon-kit/gate-tests/check-tracking-claim/good/README.md +7 -0
- package/payload/canon-kit/gate-tests/check-tracking-claim/good/args +1 -0
- package/payload/canon-kit/gate-tests/check-tracking-claim/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-tracking-claim/good/kept.txt +1 -0
- package/payload/canon-kit/gate-tests/check-tracking-claim/good/roster.list +1 -0
- package/payload/canon-kit/gate-tests/check-tracking-claim.test.sh +86 -0
- package/payload/canon-kit/lib/spec.sh +475 -0
- package/payload/canon-kit/smoke/install.sh +36 -0
- package/payload/canon-kit/smoke/violation.sh +22 -0
- package/payload/canon-kit/templates/SPEC-amendment.md +55 -0
- package/payload/canon-kit/templates/canon-config.sh +2 -0
- package/payload/context-kit/README.md +82 -0
- package/payload/context-kit/SPEC.md +785 -0
- package/payload/context-kit/bin/always-loaded.sh +86 -0
- package/payload/context-kit/bin/env-probe.sh +144 -0
- package/payload/context-kit/bin/footprint.sh +144 -0
- package/payload/context-kit/bin/md-index.sh +80 -0
- package/payload/context-kit/bin/md-section.sh +63 -0
- package/payload/context-kit/bin/pub-index.sh +90 -0
- package/payload/context-kit/bin/run-index-tests.sh +91 -0
- package/payload/context-kit/checks/check-brevity.sh +123 -0
- package/payload/context-kit/checks/check-footprint-fresh.sh +38 -0
- package/payload/context-kit/checks/check-memory-off.sh +112 -0
- package/payload/context-kit/checks/check-settings-pins.sh +110 -0
- package/payload/context-kit/gate-tests/check-brevity/bad/CLAUDE.md +14 -0
- package/payload/context-kit/gate-tests/check-brevity/bad/args +2 -0
- package/payload/context-kit/gate-tests/check-brevity/bad/expect.txt +1 -0
- package/payload/context-kit/gate-tests/check-brevity/good/CLAUDE.md +20 -0
- package/payload/context-kit/gate-tests/check-brevity/good/args +2 -0
- package/payload/context-kit/gate-tests/check-brevity/good/expect.txt +1 -0
- package/payload/context-kit/gate-tests/check-brevity.test.sh +89 -0
- package/payload/context-kit/gate-tests/check-footprint-fresh/bad/args +4 -0
- package/payload/context-kit/gate-tests/check-footprint-fresh/bad/emit.txt +12 -0
- package/payload/context-kit/gate-tests/check-footprint-fresh/bad/expect.txt +1 -0
- package/payload/context-kit/gate-tests/check-footprint-fresh/bad/projection.txt +11 -0
- package/payload/context-kit/gate-tests/check-footprint-fresh/good/args +4 -0
- package/payload/context-kit/gate-tests/check-footprint-fresh/good/emit.txt +12 -0
- package/payload/context-kit/gate-tests/check-footprint-fresh/good/expect.txt +1 -0
- package/payload/context-kit/gate-tests/check-footprint-fresh/good/projection.txt +12 -0
- package/payload/context-kit/gate-tests/check-memory-off/bad/args +1 -0
- package/payload/context-kit/gate-tests/check-memory-off/bad/expect.txt +1 -0
- package/payload/context-kit/gate-tests/check-memory-off/bad/memory/example-fact.md +6 -0
- package/payload/context-kit/gate-tests/check-memory-off/good/args +1 -0
- package/payload/context-kit/gate-tests/check-memory-off/good/expect.txt +1 -0
- package/payload/context-kit/gate-tests/check-memory-off/good/memory/.gitkeep +0 -0
- package/payload/context-kit/gate-tests/check-memory-off.test.sh +54 -0
- package/payload/context-kit/gate-tests/check-settings-pins/bad/args +1 -0
- package/payload/context-kit/gate-tests/check-settings-pins/bad/expect.txt +1 -0
- package/payload/context-kit/gate-tests/check-settings-pins/bad/settings-pins.conf +3 -0
- package/payload/context-kit/gate-tests/check-settings-pins/bad/settings.json +6 -0
- package/payload/context-kit/gate-tests/check-settings-pins/good/args +1 -0
- package/payload/context-kit/gate-tests/check-settings-pins/good/expect.txt +1 -0
- package/payload/context-kit/gate-tests/check-settings-pins/good/settings-pins.conf +3 -0
- package/payload/context-kit/gate-tests/check-settings-pins/good/settings.json +6 -0
- package/payload/context-kit/index-tests/corpus/baseline.txt +2 -0
- package/payload/context-kit/index-tests/corpus/hook-sample.txt +4 -0
- package/payload/context-kit/index-tests/corpus/sample.md +23 -0
- package/payload/context-kit/index-tests/corpus/sample.rs +24 -0
- package/payload/context-kit/index-tests/corpus/sample.ts +34 -0
- package/payload/context-kit/index-tests/corpus/surface.md +6 -0
- package/payload/context-kit/index-tests/expected/always-loaded.txt +1 -0
- package/payload/context-kit/index-tests/expected/md-index.txt +6 -0
- package/payload/context-kit/index-tests/expected/md-section.txt +6 -0
- package/payload/context-kit/index-tests/expected/pub-index-shadow.txt +2 -0
- package/payload/context-kit/index-tests/expected/pub-index-ts.txt +12 -0
- package/payload/context-kit/index-tests/expected/pub-index.txt +10 -0
- package/payload/context-kit/index-tests/expected/toolfloor.txt +14 -0
- package/payload/context-kit/index-tests/toolfloor-cases.sh +29 -0
- package/payload/context-kit/lib/pub-lang/rust.sh +26 -0
- package/payload/context-kit/lib/pub-lang/ts.sh +32 -0
- package/payload/context-kit/lib/toolfloor.sh +47 -0
- package/payload/context-kit/smoke/agents-md.sh +116 -0
- package/payload/context-kit/smoke/install.sh +60 -0
- package/payload/context-kit/smoke/violation.sh +21 -0
- package/payload/context-kit/templates/close-brevity.md +30 -0
- package/payload/context-kit/templates/context-config.sh +2 -0
- package/payload/context-kit/templates/session-context.sh +133 -0
- package/payload/context-kit/templates/settings-sessionstart.json +12 -0
- package/payload/delegation-kit/README.md +87 -0
- package/payload/delegation-kit/SPEC.md +780 -0
- package/payload/delegation-kit/bin/run-budget-guard-tests.sh +88 -0
- package/payload/delegation-kit/bin/run-trend-tests.sh +63 -0
- package/payload/delegation-kit/bin/run-usage-tests.sh +226 -0
- package/payload/delegation-kit/bin/usage-trend.sh +120 -0
- package/payload/delegation-kit/bin/usage-verdict.sh +144 -0
- package/payload/delegation-kit/checks/check-gate-tamper.sh +139 -0
- package/payload/delegation-kit/checks/check-rule-citation.sh +76 -0
- package/payload/delegation-kit/gate-tests/check-gate-tamper/bad/args +1 -0
- package/payload/delegation-kit/gate-tests/check-gate-tamper/bad/expect.txt +1 -0
- package/payload/delegation-kit/gate-tests/check-gate-tamper/bad/staged-files +5 -0
- package/payload/delegation-kit/gate-tests/check-gate-tamper/good/added-exemptions +2 -0
- package/payload/delegation-kit/gate-tests/check-gate-tamper/good/args +1 -0
- package/payload/delegation-kit/gate-tests/check-gate-tamper/good/expect.txt +1 -0
- package/payload/delegation-kit/gate-tests/check-gate-tamper/good/staged-files +5 -0
- package/payload/delegation-kit/gate-tests/check-rule-citation/bad/args +1 -0
- package/payload/delegation-kit/gate-tests/check-rule-citation/bad/expect.txt +1 -0
- package/payload/delegation-kit/gate-tests/check-rule-citation/bad/spec.md +9 -0
- package/payload/delegation-kit/gate-tests/check-rule-citation/bad/tmpl.md +4 -0
- package/payload/delegation-kit/gate-tests/check-rule-citation/good/args +1 -0
- package/payload/delegation-kit/gate-tests/check-rule-citation/good/expect.txt +1 -0
- package/payload/delegation-kit/gate-tests/check-rule-citation/good/spec.md +20 -0
- package/payload/delegation-kit/gate-tests/check-rule-citation/good/tmpl.md +5 -0
- package/payload/delegation-kit/lib/delegation.sh +81 -0
- package/payload/delegation-kit/smoke/install.sh +61 -0
- package/payload/delegation-kit/smoke/violation.sh +16 -0
- package/payload/delegation-kit/templates/agent-budget-guard.sh +18 -0
- package/payload/delegation-kit/templates/agent-execution.md +136 -0
- package/payload/delegation-kit/templates/delegation-config.sh +2 -0
- package/payload/delegation-kit/templates/dispatch-checklists.md +60 -0
- package/payload/delegation-kit/templates/statusline-usage.sh +79 -0
- package/payload/delegation-kit/templates/usage-poller.sh +67 -0
- package/payload/delegation-kit/usage-tests/budget-guard-cases.tsv +20 -0
- package/payload/delegation-kit/usage-tests/cases.tsv +44 -0
- package/payload/delegation-kit/usage-tests/trend-history.log +20 -0
- package/payload/doctrine-kit/DOCTRINE.md +386 -0
- package/payload/doctrine-kit/README.md +70 -0
- package/payload/doctrine-kit/SPEC.md +233 -0
- package/payload/doctrine-kit/bin/install-doctrine.sh +44 -0
- package/payload/doctrine-kit/bin/stage-rules.sh +51 -0
- package/payload/doctrine-kit/checks/check-doctrine-registration.sh +216 -0
- package/payload/doctrine-kit/gate-tests/check-doctrine-registration/bad/AGENT.md +14 -0
- package/payload/doctrine-kit/gate-tests/check-doctrine-registration/bad/DOCTRINE.md +12 -0
- package/payload/doctrine-kit/gate-tests/check-doctrine-registration/bad/args +1 -0
- package/payload/doctrine-kit/gate-tests/check-doctrine-registration/bad/expect.txt +1 -0
- package/payload/doctrine-kit/gate-tests/check-doctrine-registration/good/AGENT.md +15 -0
- package/payload/doctrine-kit/gate-tests/check-doctrine-registration/good/DOCTRINE.md +12 -0
- package/payload/doctrine-kit/gate-tests/check-doctrine-registration/good/args +1 -0
- package/payload/doctrine-kit/gate-tests/check-doctrine-registration/good/expect.txt +1 -0
- package/payload/doctrine-kit/gate-tests/check-doctrine-registration.test.sh +208 -0
- package/payload/doctrine-kit/lib/doctrine.sh +29 -0
- package/payload/doctrine-kit/smoke/install.sh +24 -0
- package/payload/doctrine-kit/smoke/violation.sh +13 -0
- package/payload/drift-kit/README.md +115 -0
- package/payload/drift-kit/SPEC.md +828 -0
- package/payload/drift-kit/bin/drift-report.sh +152 -0
- package/payload/drift-kit/bin/kfric.sh +42 -0
- package/payload/drift-kit/bin/overhead-meter.sh +106 -0
- package/payload/drift-kit/bin/stage-economics.sh +311 -0
- package/payload/drift-kit/bin/trajectory.sh +242 -0
- package/payload/drift-kit/kpis/kpi-always-loaded.sh +39 -0
- package/payload/drift-kit/kpis/kpi-amendment-age.sh +33 -0
- package/payload/drift-kit/kpis/kpi-deferred-age.sh +44 -0
- package/payload/drift-kit/kpis/kpi-gate-backlog.sh +52 -0
- package/payload/drift-kit/kpis/kpi-gate-runtime.sh +31 -0
- package/payload/drift-kit/kpis/kpi-knowledge-friction.sh +21 -0
- package/payload/drift-kit/kpis/kpi-overhead.sh +44 -0
- package/payload/drift-kit/kpis/kpi-price-table-age.sh +68 -0
- package/payload/drift-kit/kpis/kpi-prompt-friction.sh +38 -0
- package/payload/drift-kit/kpis/kpi-settings-local.sh +21 -0
- package/payload/drift-kit/kpis/kpi-task-split.sh +43 -0
- package/payload/drift-kit/smoke/install.sh +348 -0
- package/payload/drift-kit/smoke/overhead-fixture.jsonl +4 -0
- package/payload/drift-kit/templates/close-knowledge.md +24 -0
- package/payload/drift-kit/templates/drift-config.sh +2 -0
- package/payload/drift-kit/templates/economics.md +45 -0
- package/payload/drift-kit/templates/kpi-deprecated-surface.sh +32 -0
- package/payload/drift-kit/templates/kpis.list +22 -0
- package/payload/drift-kit/templates/price-table.tsv +21 -0
- package/payload/evidence-kit/README.md +59 -0
- package/payload/evidence-kit/SPEC.md +261 -0
- package/payload/evidence-kit/bin/diff-baseline.sh +34 -0
- package/payload/evidence-kit/bin/run-validate.sh +82 -0
- package/payload/evidence-kit/checks/check-evidence-baseline.sh +103 -0
- package/payload/evidence-kit/checks/check-evidence-manifest.sh +104 -0
- package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/TASK-QUEUE.md +3 -0
- package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/args +2 -0
- package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/expect.txt +1 -0
- package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/validate-baseline.txt +3 -0
- package/payload/evidence-kit/gate-tests/check-evidence-baseline/good/TASK-QUEUE.md +3 -0
- package/payload/evidence-kit/gate-tests/check-evidence-baseline/good/args +2 -0
- package/payload/evidence-kit/gate-tests/check-evidence-baseline/good/expect.txt +1 -0
- package/payload/evidence-kit/gate-tests/check-evidence-baseline/good/validate-baseline.txt +3 -0
- package/payload/evidence-kit/gate-tests/check-evidence-baseline.test.sh +84 -0
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/TASK-QUEUE.md +1 -0
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/WORKFLOW-STATE.txt +3 -0
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/args +3 -0
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/expect.txt +1 -0
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/validate-evidence.txt +2 -0
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/TASK-QUEUE.md +1 -0
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/WORKFLOW-STATE.txt +3 -0
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/args +3 -0
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/expect.txt +1 -0
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/validate-evidence.txt +2 -0
- package/payload/evidence-kit/gate-tests/check-evidence-manifest.test.sh +107 -0
- package/payload/evidence-kit/gate-tests/evidence-lib.test.sh +82 -0
- package/payload/evidence-kit/lib/evidence.sh +173 -0
- package/payload/evidence-kit/smoke/install.sh +45 -0
- package/payload/evidence-kit/smoke/violation.sh +8 -0
- package/payload/evidence-kit/templates/evidence-config.sh +2 -0
- package/payload/gate-sdk/README.md +124 -0
- package/payload/gate-sdk/SPEC.md +1861 -0
- package/payload/gate-sdk/bin/enforcement-map.sh +272 -0
- package/payload/gate-sdk/bin/gen-pre-commit.sh +267 -0
- package/payload/gate-sdk/bin/install-hooks.sh +48 -0
- package/payload/gate-sdk/bin/run-consumer-smoke.sh +112 -0
- package/payload/gate-sdk/bin/run-gate-tests.sh +128 -0
- package/payload/gate-sdk/bin/run-gates.sh +147 -0
- package/payload/gate-sdk/bin/upgrade-smoke.sh +163 -0
- package/payload/gate-sdk/checks/check-action-pinning.sh +55 -0
- package/payload/gate-sdk/checks/check-action-run-shell.sh +219 -0
- package/payload/gate-sdk/checks/check-assertion-strength.sh +134 -0
- package/payload/gate-sdk/checks/check-commit-msg.sh +50 -0
- package/payload/gate-sdk/checks/check-commit-subject.sh +43 -0
- package/payload/gate-sdk/checks/check-core-files.sh +52 -0
- package/payload/gate-sdk/checks/check-enforcement-fresh.sh +37 -0
- package/payload/gate-sdk/checks/check-exec-bit.sh +76 -0
- package/payload/gate-sdk/checks/check-gate-assertions.sh +123 -0
- package/payload/gate-sdk/checks/check-gate-exemption-tasks.sh +106 -0
- package/payload/gate-sdk/checks/check-gate-fail-closed.sh +84 -0
- package/payload/gate-sdk/checks/check-gate-fixture-coverage.sh +92 -0
- package/payload/gate-sdk/checks/check-gate-output.sh +65 -0
- package/payload/gate-sdk/checks/check-graph.sh +632 -0
- package/payload/gate-sdk/checks/check-hook-exec-bit.sh +45 -0
- package/payload/gate-sdk/checks/check-identity.sh +134 -0
- package/payload/gate-sdk/checks/check-kit-enum.sh +94 -0
- package/payload/gate-sdk/checks/check-kit-registration.sh +68 -0
- package/payload/gate-sdk/checks/check-readme-roster.sh +102 -0
- package/payload/gate-sdk/checks/check-reads-couples.sh +148 -0
- package/payload/gate-sdk/checks/check-root-tiering.sh +66 -0
- package/payload/gate-sdk/checks/check-shellcheck.sh +55 -0
- package/payload/gate-sdk/checks/check-smoke-entry-guard.sh +53 -0
- package/payload/gate-sdk/checks/check-template-copy-parity.sh +126 -0
- package/payload/gate-sdk/checks/check-test-hermetic.sh +119 -0
- package/payload/gate-sdk/checks/check-tree-terms.sh +61 -0
- package/payload/gate-sdk/checks/check-workflow-tiering.sh +84 -0
- package/payload/gate-sdk/gate-tests/check-action-pinning/bad/args +1 -0
- package/payload/gate-sdk/gate-tests/check-action-pinning/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-action-pinning/bad/tree/mutable.yml +11 -0
- package/payload/gate-sdk/gate-tests/check-action-pinning/bad/tree/nested/pinned.yml +5 -0
- package/payload/gate-sdk/gate-tests/check-action-pinning/good/args +1 -0
- package/payload/gate-sdk/gate-tests/check-action-pinning/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-action-pinning/good/tree/nested/deep.yml +5 -0
- package/payload/gate-sdk/gate-tests/check-action-pinning/good/tree/no-refs.yaml +8 -0
- package/payload/gate-sdk/gate-tests/check-action-pinning/good/tree/pinned.yml +10 -0
- package/payload/gate-sdk/gate-tests/check-action-run-shell/bad/args +3 -0
- package/payload/gate-sdk/gate-tests/check-action-run-shell/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-action-run-shell/bad/tree/workflows/ci.yml +15 -0
- package/payload/gate-sdk/gate-tests/check-action-run-shell/good/args +3 -0
- package/payload/gate-sdk/gate-tests/check-action-run-shell/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-action-run-shell/good/tree/action.yml +14 -0
- package/payload/gate-sdk/gate-tests/check-action-run-shell/good/tree/not-actions.yml +16 -0
- package/payload/gate-sdk/gate-tests/check-action-run-shell/good/tree/workflows/ci.yml +106 -0
- package/payload/gate-sdk/gate-tests/check-action-run-shell.test.sh +88 -0
- package/payload/gate-sdk/gate-tests/check-assertion-strength/bad/args +3 -0
- package/payload/gate-sdk/gate-tests/check-assertion-strength/bad/bin/verdict.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-assertion-strength/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-assertion-strength/bad/smoke/install.sh +11 -0
- package/payload/gate-sdk/gate-tests/check-assertion-strength/good/args +3 -0
- package/payload/gate-sdk/gate-tests/check-assertion-strength/good/bin/verdict.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-assertion-strength/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-assertion-strength/good/smoke/install.sh +16 -0
- package/payload/gate-sdk/gate-tests/check-commit-msg/bad/args +2 -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 +5 -0
- package/payload/gate-sdk/gate-tests/check-commit-msg/bad/patterns.list +5 -0
- package/payload/gate-sdk/gate-tests/check-commit-msg/good/args +2 -0
- package/payload/gate-sdk/gate-tests/check-commit-msg/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-commit-msg/good/msg.txt +5 -0
- package/payload/gate-sdk/gate-tests/check-commit-msg/good/patterns.list +5 -0
- package/payload/gate-sdk/gate-tests/check-commit-subject/bad/args +2 -0
- package/payload/gate-sdk/gate-tests/check-commit-subject/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-commit-subject/bad/msg.txt +4 -0
- package/payload/gate-sdk/gate-tests/check-commit-subject/good/args +2 -0
- package/payload/gate-sdk/gate-tests/check-commit-subject/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-commit-subject/good/msg.txt +5 -0
- package/payload/gate-sdk/gate-tests/check-commit-subject.test.sh +73 -0
- package/payload/gate-sdk/gate-tests/check-core-files/bad/args +1 -0
- package/payload/gate-sdk/gate-tests/check-core-files/bad/core-files.list +3 -0
- package/payload/gate-sdk/gate-tests/check-core-files/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-core-files/bad/present.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-core-files/good/args +1 -0
- package/payload/gate-sdk/gate-tests/check-core-files/good/core-files.list +5 -0
- package/payload/gate-sdk/gate-tests/check-core-files/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-core-files/good/nested/also-present.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-core-files/good/present.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/bad/args +4 -0
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/bad/emit.txt +14 -0
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/bad/projection.txt +7 -0
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/args +4 -0
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/emit.txt +14 -0
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/projection.txt +14 -0
- package/payload/gate-sdk/gate-tests/check-exec-bit/bad/args +1 -0
- package/payload/gate-sdk/gate-tests/check-exec-bit/bad/dump.txt +7 -0
- package/payload/gate-sdk/gate-tests/check-exec-bit/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-exec-bit/good/args +1 -0
- package/payload/gate-sdk/gate-tests/check-exec-bit/good/dump.txt +7 -0
- package/payload/gate-sdk/gate-tests/check-exec-bit/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-exec-bit.test.sh +46 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/args +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/scripts/SPEC.md +13 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/scripts/check-baz.sh +13 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/scripts/check-foo.sh +10 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/good/args +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/good/scripts/SPEC.md +20 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/good/scripts/check-baz.sh +12 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/good/scripts/check-foo.sh +9 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/TASK-QUEUE.md +9 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/args +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/gates/check-sample.sh +11 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/TASK-QUEUE.md +9 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/args +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/gates/check-sample.sh +11 -0
- package/payload/gate-sdk/gate-tests/check-gate-fail-closed/bad/args +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-fail-closed/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-fail-closed/bad/gates/check-sample.sh +8 -0
- package/payload/gate-sdk/gate-tests/check-gate-fail-closed/good/args +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-fail-closed/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-fail-closed/good/gates/check-sample.sh +8 -0
- package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/args +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/check-gamma.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/gate-tests/check-alpha/bad/.keep +0 -0
- package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/gate-tests/check-alpha/good/.keep +0 -0
- package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/gates.list +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/args +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/check-beta.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/gate-tests/check-alpha/bad/.keep +0 -0
- package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/gate-tests/check-alpha/good/.keep +0 -0
- package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/gates.list +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/bad/args +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/bad/check-sample.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/bad/gates.list +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/good/args +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/good/check-sample.sh +9 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/good/gates.list +3 -0
- package/payload/gate-sdk/gate-tests/check-graph/bad/SPEC-example-gate.md +12 -0
- package/payload/gate-sdk/gate-tests/check-graph/bad/args +1 -0
- package/payload/gate-sdk/gate-tests/check-graph/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-graph/good/SPEC-example-gate.md +20 -0
- package/payload/gate-sdk/gate-tests/check-graph/good/args +3 -0
- package/payload/gate-sdk/gate-tests/check-graph/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-graph-cap.test.sh +51 -0
- package/payload/gate-sdk/gate-tests/check-graph-refs.test.sh +55 -0
- package/payload/gate-sdk/gate-tests/check-graph-theme.test.sh +63 -0
- package/payload/gate-sdk/gate-tests/check-hook-exec-bit/bad/args +1 -0
- package/payload/gate-sdk/gate-tests/check-hook-exec-bit/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-hook-exec-bit/bad/hooks/pre-commit +2 -0
- package/payload/gate-sdk/gate-tests/check-hook-exec-bit/good/args +1 -0
- package/payload/gate-sdk/gate-tests/check-hook-exec-bit/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-hook-exec-bit/good/hooks/pre-commit +2 -0
- package/payload/gate-sdk/gate-tests/check-identity/bad/args +1 -0
- package/payload/gate-sdk/gate-tests/check-identity/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-identity/bad/git-config-email +1 -0
- package/payload/gate-sdk/gate-tests/check-identity/bad/git-remotes +2 -0
- package/payload/gate-sdk/gate-tests/check-identity/bad/identity.conf +4 -0
- package/payload/gate-sdk/gate-tests/check-identity/good/args +1 -0
- package/payload/gate-sdk/gate-tests/check-identity/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-identity/good/git-config-email +1 -0
- package/payload/gate-sdk/gate-tests/check-identity/good/git-remotes +3 -0
- package/payload/gate-sdk/gate-tests/check-identity/good/identity.conf +5 -0
- package/payload/gate-sdk/gate-tests/check-kit-enum/bad/args +1 -0
- package/payload/gate-sdk/gate-tests/check-kit-enum/bad/check-sample.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-kit-enum/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-kit-enum/bad/gates.list +4 -0
- package/payload/gate-sdk/gate-tests/check-kit-enum/good/args +1 -0
- package/payload/gate-sdk/gate-tests/check-kit-enum/good/check-sample.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-kit-enum/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-kit-enum/good/gates.list +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-registration/bad/args +4 -0
- package/payload/gate-sdk/gate-tests/check-kit-registration/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-kit-registration/bad/registry-doc.md +20 -0
- package/payload/gate-sdk/gate-tests/check-kit-registration/good/args +5 -0
- package/payload/gate-sdk/gate-tests/check-kit-registration/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-kit-registration.test.sh +75 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/alpha-kit/README.md +14 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/alpha-kit/checks/check-alpha-one.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/alpha-kit/checks/check-alpha-two.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/args +4 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/gamma-kit/README.md +5 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/gamma-kit/checks/check-gamma-one.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/scripts/gate-sdk-config.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/alpha-kit/README.md +16 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/alpha-kit/checks/check-alpha-one.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/alpha-kit/checks/check-alpha-two.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/args +6 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/beta-kit/smoke/install.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/scripts/gate-sdk-config.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-reads-couples/bad/args +2 -0
- package/payload/gate-sdk/gate-tests/check-reads-couples/bad/corpus/sub/deep.md +1 -0
- package/payload/gate-sdk/gate-tests/check-reads-couples/bad/corpus/top.md +1 -0
- package/payload/gate-sdk/gate-tests/check-reads-couples/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-reads-couples/bad/sandbox-gate.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-reads-couples/good/args +3 -0
- package/payload/gate-sdk/gate-tests/check-reads-couples/good/corpus/sub/deep.md +1 -0
- package/payload/gate-sdk/gate-tests/check-reads-couples/good/corpus/top.md +1 -0
- package/payload/gate-sdk/gate-tests/check-reads-couples/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-reads-couples/good/sandbox-gate.sh +8 -0
- package/payload/gate-sdk/gate-tests/check-root-tiering/bad/allow.list +1 -0
- package/payload/gate-sdk/gate-tests/check-root-tiering/bad/args +1 -0
- package/payload/gate-sdk/gate-tests/check-root-tiering/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-root-tiering/bad/root/README.md +1 -0
- package/payload/gate-sdk/gate-tests/check-root-tiering/bad/root/stray.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-root-tiering/good/allow.list +3 -0
- package/payload/gate-sdk/gate-tests/check-root-tiering/good/args +1 -0
- package/payload/gate-sdk/gate-tests/check-root-tiering/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-root-tiering/good/root/LICENSE +1 -0
- package/payload/gate-sdk/gate-tests/check-root-tiering/good/root/README.md +1 -0
- package/payload/gate-sdk/gate-tests/check-root-tiering/good/root/somedir/keep.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-shellcheck/bad/args +1 -0
- package/payload/gate-sdk/gate-tests/check-shellcheck/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-shellcheck/bad/warn.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-shellcheck/good/args +1 -0
- package/payload/gate-sdk/gate-tests/check-shellcheck/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-shellcheck/good/ok.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/bad/alpha-kit/smoke/install.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/bad/alpha-kit/smoke/violation.sh +7 -0
- package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/bad/args +4 -0
- package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/bad/scripts/gate-sdk-config.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/alpha-kit/smoke/install.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/alpha-kit/smoke/violation.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/args +6 -0
- package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/beta-kit/smoke/install.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/scripts/gate-sdk-config.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-template-copy-parity/bad/args +9 -0
- package/payload/gate-sdk/gate-tests/check-template-copy-parity/bad/delegation-kit/templates/agent-budget-guard.sh +16 -0
- package/payload/gate-sdk/gate-tests/check-template-copy-parity/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-template-copy-parity/bad/scripts/agent-budget-guard.sh +17 -0
- package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/args +8 -0
- package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/delegation-kit/templates/agent-budget-guard.sh +16 -0
- package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/delegation-kit/templates/delegation-config.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/delegation-kit/templates/usage-poller.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/scripts/agent-budget-guard.sh +16 -0
- package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/scripts/delegation-config.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-test-hermetic/bad/args +3 -0
- package/payload/gate-sdk/gate-tests/check-test-hermetic/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-test-hermetic/bad/leaky.test.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-test-hermetic/good/args +3 -0
- package/payload/gate-sdk/gate-tests/check-test-hermetic/good/exempt.test.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-test-hermetic/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-test-hermetic/good/sourced.test.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-test-hermetic-smoke.test.sh +84 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/bad/args +2 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/bad/patterns.list +3 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/bad/tree/leak.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/good/args +2 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/good/patterns.list +3 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/clean.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-workflow-tiering/bad/.workflow/payload.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-workflow-tiering/bad/.workflow/projection.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-workflow-tiering/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-workflow-tiering/good/.workflow/projection.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-workflow-tiering/good/.workflow/wire.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-workflow-tiering/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/enforcement-map.test.sh +87 -0
- package/payload/gate-sdk/gate-tests/lib-gate.test.sh +78 -0
- package/payload/gate-sdk/gate-tests/run-for-path.test.sh +77 -0
- package/payload/gate-sdk/lib/consumer-smoke.sh +32 -0
- package/payload/gate-sdk/lib/gate.sh +216 -0
- package/payload/gate-sdk/lib/inject.sh +35 -0
- package/payload/gate-sdk/lib/test-hermetic.sh +11 -0
- package/payload/gate-sdk/smoke/install.sh +84 -0
- package/payload/gate-sdk/smoke/violation.sh +13 -0
- package/payload/gate-sdk/templates/check-skeleton.sh +23 -0
- package/payload/gate-sdk/templates/gates-workflow.yml +55 -0
- package/payload/gate-sdk/templates/msg-patterns.list +21 -0
- package/payload/guard-kit/README.md +65 -0
- package/payload/guard-kit/SPEC.md +590 -0
- package/payload/guard-kit/bin/compare-settings-allow.sh +58 -0
- package/payload/guard-kit/bin/run-guard-tests.sh +86 -0
- package/payload/guard-kit/bin/scan-prompts.sh +166 -0
- package/payload/guard-kit/bin/scratch-run.sh +34 -0
- package/payload/guard-kit/gate-tests/scan-prompts.test.sh +70 -0
- package/payload/guard-kit/gate-tests/scratch-run.test.sh +62 -0
- package/payload/guard-kit/guard-tests/cases.tsv +117 -0
- package/payload/guard-kit/guard-tests/escalation-cases.tsv +13 -0
- package/payload/guard-kit/lib/guard.sh +448 -0
- package/payload/guard-kit/smoke/install.sh +26 -0
- package/payload/guard-kit/templates/bash-guard.sh +18 -0
- package/payload/guard-kit/templates/close-triage.md +31 -0
- package/payload/guard-kit/templates/escalation-guard.sh +27 -0
- package/payload/guard-kit/templates/guard-config.sh +2 -0
- package/payload/guard-kit/templates/settings-hooks.json +19 -0
- package/payload/guard-kit/templates/wakeup-guard.sh +20 -0
- package/payload/lifecycle-kit/README.md +106 -0
- package/payload/lifecycle-kit/SPEC.md +1469 -0
- package/payload/lifecycle-kit/bin/close-surfaces.sh +94 -0
- package/payload/lifecycle-kit/bin/enter-stage.sh +215 -0
- package/payload/lifecycle-kit/bin/file-gap.sh +43 -0
- package/payload/lifecycle-kit/bin/install-lifecycle.sh +36 -0
- package/payload/lifecycle-kit/bin/session-id.sh +75 -0
- package/payload/lifecycle-kit/checks/check-close-surfaces.sh +63 -0
- package/payload/lifecycle-kit/checks/check-lesson-disposition.sh +98 -0
- package/payload/lifecycle-kit/checks/check-lifecycle-registration.sh +54 -0
- package/payload/lifecycle-kit/checks/check-merge-attrs.sh +69 -0
- package/payload/lifecycle-kit/checks/check-shim-restatement.sh +97 -0
- package/payload/lifecycle-kit/checks/check-skill-binding.sh +59 -0
- package/payload/lifecycle-kit/checks/check-stage-entry.sh +197 -0
- package/payload/lifecycle-kit/checks/check-stage-evidence.sh +81 -0
- package/payload/lifecycle-kit/checks/check-stage-skill-coverage.sh +47 -0
- package/payload/lifecycle-kit/gate-tests/boundary-scratch-wipe.test.sh +96 -0
- package/payload/lifecycle-kit/gate-tests/check-close-surfaces/bad/args +1 -0
- package/payload/lifecycle-kit/gate-tests/check-close-surfaces/bad/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-close-surfaces/bad/owners/inbox.md +5 -0
- package/payload/lifecycle-kit/gate-tests/check-close-surfaces/bad/scripts/lifecycle-config.sh +4 -0
- package/payload/lifecycle-kit/gate-tests/check-close-surfaces/good/args +1 -0
- package/payload/lifecycle-kit/gate-tests/check-close-surfaces/good/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-close-surfaces/good/owners/inbox.md +5 -0
- package/payload/lifecycle-kit/gate-tests/check-close-surfaces/good/scripts/lifecycle-config.sh +4 -0
- package/payload/lifecycle-kit/gate-tests/check-close-surfaces.test.sh +66 -0
- package/payload/lifecycle-kit/gate-tests/check-lesson-disposition/bad/args +2 -0
- package/payload/lifecycle-kit/gate-tests/check-lesson-disposition/bad/evidence.txt +2 -0
- package/payload/lifecycle-kit/gate-tests/check-lesson-disposition/bad/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-lesson-disposition/bad/queue-head.md +8 -0
- package/payload/lifecycle-kit/gate-tests/check-lesson-disposition/bad/queue-work.md +5 -0
- package/payload/lifecycle-kit/gate-tests/check-lesson-disposition/good/args +2 -0
- package/payload/lifecycle-kit/gate-tests/check-lesson-disposition/good/evidence.txt +3 -0
- package/payload/lifecycle-kit/gate-tests/check-lesson-disposition/good/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-lesson-disposition/good/queue-head.md +8 -0
- package/payload/lifecycle-kit/gate-tests/check-lesson-disposition/good/queue-work.md +5 -0
- package/payload/lifecycle-kit/gate-tests/check-lesson-disposition.test.sh +56 -0
- package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration/bad/AGENT.md +11 -0
- package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration/bad/args +1 -0
- package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration/bad/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration/good/AGENT.md +11 -0
- package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration/good/args +1 -0
- package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration/good/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration.test.sh +59 -0
- package/payload/lifecycle-kit/gate-tests/check-merge-attrs/bad/.gitattributes +6 -0
- package/payload/lifecycle-kit/gate-tests/check-merge-attrs/bad/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-merge-attrs/good/.gitattributes +5 -0
- package/payload/lifecycle-kit/gate-tests/check-merge-attrs/good/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-merge-attrs.test.sh +113 -0
- package/payload/lifecycle-kit/gate-tests/check-shim-restatement/bad/args +2 -0
- package/payload/lifecycle-kit/gate-tests/check-shim-restatement/bad/commands/build.md +6 -0
- package/payload/lifecycle-kit/gate-tests/check-shim-restatement/bad/corpus.md +4 -0
- package/payload/lifecycle-kit/gate-tests/check-shim-restatement/bad/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-shim-restatement/good/args +2 -0
- package/payload/lifecycle-kit/gate-tests/check-shim-restatement/good/commands/build.md +5 -0
- package/payload/lifecycle-kit/gate-tests/check-shim-restatement/good/corpus.md +4 -0
- package/payload/lifecycle-kit/gate-tests/check-shim-restatement/good/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-shim-restatement.test.sh +80 -0
- package/payload/lifecycle-kit/gate-tests/check-skill-binding/bad/args +1 -0
- package/payload/lifecycle-kit/gate-tests/check-skill-binding/bad/commands/build.md +5 -0
- package/payload/lifecycle-kit/gate-tests/check-skill-binding/bad/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-skill-binding/bad/templates/build.md +7 -0
- package/payload/lifecycle-kit/gate-tests/check-skill-binding/good/args +1 -0
- package/payload/lifecycle-kit/gate-tests/check-skill-binding/good/commands/build.md +7 -0
- package/payload/lifecycle-kit/gate-tests/check-skill-binding/good/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-skill-binding/good/templates/build.md +7 -0
- package/payload/lifecycle-kit/gate-tests/check-skill-binding.test.sh +84 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-entry/bad/.workflow/WORKFLOW-STATE.txt +7 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-entry/bad/TASK-QUEUE.md +13 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-entry/bad/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-entry/good/.workflow/WORKFLOW-STATE.txt +7 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-entry/good/TASK-QUEUE.md +13 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-entry/good/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-entry.test.sh +251 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-evidence/bad/.workflow/WORKFLOW-STATE.txt +6 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-evidence/bad/TASK-QUEUE.md +13 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-evidence/bad/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-evidence/good/.workflow/WORKFLOW-STATE.txt +6 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-evidence/good/TASK-QUEUE.md +13 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-evidence/good/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-evidence.test.sh +115 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/args +1 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/align.md +2 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/build.md +2 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/scope.md +2 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/validate.md +2 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/args +1 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/align.md +2 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/build.md +2 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/close.md +2 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/scope.md +2 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/validate.md +2 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/expect.txt +1 -0
- package/payload/lifecycle-kit/lib/stages.sh +179 -0
- package/payload/lifecycle-kit/smoke/install.sh +341 -0
- package/payload/lifecycle-kit/smoke/violation.sh +8 -0
- package/payload/lifecycle-kit/templates/lead.md +271 -0
- package/payload/lifecycle-kit/templates/lifecycle-config.sh +2 -0
- package/payload/lifecycle-kit/templates/skills/align.md +65 -0
- package/payload/lifecycle-kit/templates/skills/build.md +78 -0
- package/payload/lifecycle-kit/templates/skills/close.md +122 -0
- package/payload/lifecycle-kit/templates/skills/release-sweep.md +39 -0
- package/payload/lifecycle-kit/templates/skills/scope.md +112 -0
- package/payload/lifecycle-kit/templates/skills/spec.md +91 -0
- package/payload/lifecycle-kit/templates/skills/upgrade.md +41 -0
- package/payload/lifecycle-kit/templates/skills/validate.md +54 -0
- package/payload/queue-kit/README.md +62 -0
- package/payload/queue-kit/SPEC.md +366 -0
- package/payload/queue-kit/bin/lesson-sink.sh +28 -0
- package/payload/queue-kit/bin/queue-index.sh +131 -0
- package/payload/queue-kit/checks/check-queue-hygiene.sh +81 -0
- package/payload/queue-kit/checks/check-queue-prose-precondition.sh +63 -0
- package/payload/queue-kit/checks/check-queue-sections.sh +44 -0
- package/payload/queue-kit/checks/check-queue-slug-liveness.sh +63 -0
- package/payload/queue-kit/checks/check-queue-wrap.sh +56 -0
- package/payload/queue-kit/checks/check-tag-lead-line.sh +66 -0
- package/payload/queue-kit/checks/check-task-conservation.sh +50 -0
- package/payload/queue-kit/checks/check-task-names.sh +128 -0
- package/payload/queue-kit/gate-tests/check-queue-hygiene/bad/TASK-QUEUE.md +17 -0
- package/payload/queue-kit/gate-tests/check-queue-hygiene/bad/expect.txt +1 -0
- package/payload/queue-kit/gate-tests/check-queue-hygiene/good/TASK-QUEUE.md +25 -0
- package/payload/queue-kit/gate-tests/check-queue-hygiene/good/expect.txt +1 -0
- package/payload/queue-kit/gate-tests/check-queue-prose-precondition/bad/TASK-QUEUE.md +15 -0
- 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 +25 -0
- package/payload/queue-kit/gate-tests/check-queue-prose-precondition/good/expect.txt +1 -0
- package/payload/queue-kit/gate-tests/check-queue-sections/bad/TASK-QUEUE.md +13 -0
- package/payload/queue-kit/gate-tests/check-queue-sections/bad/expect.txt +1 -0
- package/payload/queue-kit/gate-tests/check-queue-sections/good/TASK-QUEUE.md +15 -0
- package/payload/queue-kit/gate-tests/check-queue-sections/good/expect.txt +1 -0
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/TASK-QUEUE.md +17 -0
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/docs/page.md +4 -0
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/expect.txt +1 -0
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/scripts/queue-config.sh +3 -0
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/TASK-QUEUE.md +19 -0
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/docs/page.md +5 -0
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/expect.txt +1 -0
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/scripts/queue-config.sh +3 -0
- package/payload/queue-kit/gate-tests/check-queue-wrap/bad/TASK-QUEUE.md +15 -0
- package/payload/queue-kit/gate-tests/check-queue-wrap/bad/expect.txt +1 -0
- package/payload/queue-kit/gate-tests/check-queue-wrap/good/TASK-QUEUE.md +25 -0
- package/payload/queue-kit/gate-tests/check-queue-wrap/good/expect.txt +1 -0
- package/payload/queue-kit/gate-tests/check-tag-lead-line/bad/TASK-QUEUE.md +22 -0
- package/payload/queue-kit/gate-tests/check-tag-lead-line/bad/expect.txt +1 -0
- package/payload/queue-kit/gate-tests/check-tag-lead-line/good/TASK-QUEUE.md +29 -0
- package/payload/queue-kit/gate-tests/check-tag-lead-line/good/expect.txt +1 -0
- package/payload/queue-kit/gate-tests/check-task-names/bad/TASK-QUEUE.md +18 -0
- package/payload/queue-kit/gate-tests/check-task-names/bad/expect.txt +1 -0
- package/payload/queue-kit/gate-tests/check-task-names/good/TASK-QUEUE.md +25 -0
- package/payload/queue-kit/gate-tests/check-task-names/good/expect.txt +1 -0
- package/payload/queue-kit/gate-tests/queue-index.test.sh +118 -0
- package/payload/queue-kit/lib/queue.sh +107 -0
- package/payload/queue-kit/smoke/install.sh +21 -0
- package/payload/queue-kit/smoke/violation.sh +8 -0
- package/payload/queue-kit/templates/TASK-QUEUE.md +43 -0
- package/payload/queue-kit/templates/queue-config.sh +2 -0
- package/payload/site-kit/README.md +61 -0
- package/payload/site-kit/SPEC.md +263 -0
- package/payload/site-kit/checks/check-docs-cname-parity.sh +80 -0
- package/payload/site-kit/checks/check-docs-render-fidelity.sh +167 -0
- package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/args +4 -0
- package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/expect.txt +1 -0
- package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/site-config.sh +7 -0
- package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/tree/CNAME +1 -0
- package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/tree/README.md +5 -0
- package/payload/site-kit/gate-tests/check-docs-cname-parity/good/args +5 -0
- package/payload/site-kit/gate-tests/check-docs-cname-parity/good/expect.txt +1 -0
- package/payload/site-kit/gate-tests/check-docs-cname-parity/good/site-config.sh +7 -0
- package/payload/site-kit/gate-tests/check-docs-cname-parity/good/tree/CNAME +1 -0
- package/payload/site-kit/gate-tests/check-docs-cname-parity/good/tree/docs/posts/2026-01-01-legacy.md +4 -0
- package/payload/site-kit/gate-tests/check-docs-cname-parity/good/tree/index.md +4 -0
- package/payload/site-kit/gate-tests/check-docs-cname-parity/good/tree/pkg/gate-tests/fixture.md +5 -0
- package/payload/site-kit/gate-tests/check-docs-render-fidelity/bad/args +8 -0
- package/payload/site-kit/gate-tests/check-docs-render-fidelity/bad/expect.txt +1 -0
- package/payload/site-kit/gate-tests/check-docs-render-fidelity/bad/tree/docs/install.md +38 -0
- package/payload/site-kit/gate-tests/check-docs-render-fidelity/good/args +6 -0
- package/payload/site-kit/gate-tests/check-docs-render-fidelity/good/expect.txt +1 -0
- package/payload/site-kit/gate-tests/check-docs-render-fidelity/good/tree/docs/install.md +35 -0
- package/payload/site-kit/gate-tests/check-docs-render-fidelity-foreign.test.sh +87 -0
- package/payload/site-kit/gate-tests/check-docs-render-fidelity-span.test.sh +80 -0
- package/payload/site-kit/gate-tests/check-docs-render-fidelity-table.test.sh +90 -0
- package/payload/site-kit/lib/site.sh +29 -0
- package/payload/site-kit/smoke/install.sh +26 -0
- package/payload/site-kit/smoke/violation.sh +20 -0
- package/payload/site-kit/templates/site-health.yml +164 -0
- package/profiles.list +53 -0
|
@@ -0,0 +1,590 @@
|
|
|
1
|
+
# guard-kit — permission-friction reduction for agent sessions
|
|
2
|
+
|
|
3
|
+
A permission prompt the human approves is invisible to the agent — nothing
|
|
4
|
+
about it lands in the transcript, so the agent cannot notice, count, or fix
|
|
5
|
+
the friction it causes. The cost lands on the operator, silently and
|
|
6
|
+
per-prompt, and compounds as the command surface grows. The kit closes the
|
|
7
|
+
loop: a `PreToolUse` guard decides at call time (block with a corrective
|
|
8
|
+
message, steer to a better form, auto-allow the provably safe, log every
|
|
9
|
+
fall-through), a scanner ranks the logged prompt sources, a curation pass
|
|
10
|
+
keeps the committed allowlist durable and the per-user overlay small, and a
|
|
11
|
+
recurring close-stage triage step makes the whole loop a habit instead of a
|
|
12
|
+
one-off cleanup.
|
|
13
|
+
|
|
14
|
+
The kit carries the guard framework, the harness-generic ruleset, and the
|
|
15
|
+
triage tooling; every project-specific guard rule (build-tool hygiene,
|
|
16
|
+
container concurrency, test-suite serialization) is consumer rule content
|
|
17
|
+
and never ships. guard-kit registers **no
|
|
18
|
+
gates**: its runtime surfaces are hooks and advisory `bin/` tools, so
|
|
19
|
+
nothing joins `gates.list`; it follows gate-sdk's layout and smoke
|
|
20
|
+
conventions without depending on its registry.
|
|
21
|
+
|
|
22
|
+
## The friction loop
|
|
23
|
+
|
|
24
|
+
1. **Call time** — the consumer's `bash-guard.sh` (copied from
|
|
25
|
+
`templates/`, wired as the `PreToolUse(Bash)` hook) inspects each
|
|
26
|
+
command: block, steer, rewrite, auto-allow, or fall through. Every
|
|
27
|
+
fall-through — exactly the set of commands that may have prompted — is
|
|
28
|
+
appended to the friction log. An *approved* prompt is invisible to the
|
|
29
|
+
agent, so this log is the only record.
|
|
30
|
+
2. **Close time** — `bin/scan-prompts.sh` filters the log against the
|
|
31
|
+
committed allowlist and ranks what survives (§scan-prompts states the
|
|
32
|
+
local-overlay upper bound), grouped by command
|
|
33
|
+
pattern. Each recurring pattern is resolved by the **triage criterion**
|
|
34
|
+
(below); `bin/compare-settings-allow.sh` lists the local-overlay entries
|
|
35
|
+
a committed glob already grants (the deterministic prune set). Then the
|
|
36
|
+
log is cleared — its named reclaim path.
|
|
37
|
+
3. **Steady state** — friction low and justified: the committed
|
|
38
|
+
`settings.json` carries every durable pattern (reviewable, shared), the
|
|
39
|
+
local `settings.local.json` stays near-empty, and the guard encodes the
|
|
40
|
+
steering rules no static glob can express.
|
|
41
|
+
|
|
42
|
+
### The triage criterion
|
|
43
|
+
|
|
44
|
+
Allowlist and guard are two tools with distinct jobs — resolve each
|
|
45
|
+
recurring pattern by the criterion, never by defaulting to the allowlist:
|
|
46
|
+
|
|
47
|
+
- **Allowlist** (`Bash(...)` in the committed settings) when the command is
|
|
48
|
+
safe *and already in the form to reinforce* — static, glob-matched,
|
|
49
|
+
declarative.
|
|
50
|
+
- **Guard rule** when a *better form exists* and the agent should be steered
|
|
51
|
+
to it, or when the allow/deny needs logic a static glob cannot express.
|
|
52
|
+
- **Habit change** (a noted convention) for true one-offs.
|
|
53
|
+
|
|
54
|
+
Caution: an allowlist entry can *mask* a steering opportunity — before
|
|
55
|
+
blessing a form, confirm it is the one to reinforce; if a better form
|
|
56
|
+
exists, steer to it in the guard rather than permitting the worse one.
|
|
57
|
+
|
|
58
|
+
Note: the harness matches the allowlist **per segment** of a compound
|
|
59
|
+
command, so a glob on the core command does not cover the `echo` banners,
|
|
60
|
+
`wc`, redirects, or `;`-chained diagnostics wrapped around it — one
|
|
61
|
+
unmatched segment re-prompts the whole line. The read-only banner/diagnostic
|
|
62
|
+
tools an agent habitually chains (`echo`, `wc`, `grep`, `ls`, `command -v`)
|
|
63
|
+
are therefore themselves legitimate allowlist entries; allowlist them, or
|
|
64
|
+
run the core command bare.
|
|
65
|
+
|
|
66
|
+
## The guard framework (`lib/guard.sh`)
|
|
67
|
+
|
|
68
|
+
Primitives a consumer guard composes; each emits the harness's
|
|
69
|
+
`PreToolUse` hook protocol:
|
|
70
|
+
|
|
71
|
+
- `guard_read_command` — parse the hook JSON on stdin, emit the command;
|
|
72
|
+
**fail-open** on any parse problem (exit 0) so a guard can never wedge
|
|
73
|
+
the agent.
|
|
74
|
+
- `guard_block <msg>` — exit 2 with the message on stderr. Every block
|
|
75
|
+
message is self-describing: it names the offending pattern *and* the
|
|
76
|
+
corrective form, so the why of a rule rides to the agent in the rejection
|
|
77
|
+
itself, not in a code comment.
|
|
78
|
+
- `guard_advise <msg>` — allow, but feed the message back as
|
|
79
|
+
`additionalContext` (steering without blocking).
|
|
80
|
+
- `guard_allow <reason>` — silent grant via `permissionDecision: allow`.
|
|
81
|
+
- `guard_rewrite <cmd> <reason>` — behavior-preserving rewrite via
|
|
82
|
+
`updatedInput` (grant the better spelling of the same command).
|
|
83
|
+
- `guard_log_fallthrough` — append the (truncated, newline-flattened)
|
|
84
|
+
command to the friction log; best-effort, never affects the decision.
|
|
85
|
+
- `guard_allow_match <string> <pattern>` — the shell-glob match core: true when
|
|
86
|
+
the string matches a committed allow pattern, with the harness `:*` prefix
|
|
87
|
+
idiom (`Bash(printf:*)` ≡ any `printf …`) normalized to a trailing `*`. Not a
|
|
88
|
+
hook primitive — a shared helper, one implementation behind
|
|
89
|
+
compare-settings-allow's redundancy detection and rule 14's silent-grant
|
|
90
|
+
guard so the two never drift.
|
|
91
|
+
- `guard_split_compound <skeleton>` — the compound splitter: emits one segment
|
|
92
|
+
per line, splitting on the harness's statement separators (`;`, `&&`, `||`,
|
|
93
|
+
`|`). Also not a hook primitive — the single implementation every consumer
|
|
94
|
+
that reasons *per segment* shares (rules 8/14/16, the read-compound carve-out
|
|
95
|
+
of rules 9/10, and scan-prompts' `allowed()`), so the harness's per-segment
|
|
96
|
+
matching surface is modelled in exactly one place and cannot drift between
|
|
97
|
+
them. Fed a quote-stripped skeleton (`'…'`/`"…"` regions already neutralized
|
|
98
|
+
by the caller, as every rule does), so a separator inside a quoted argument is
|
|
99
|
+
never mistaken for a statement break.
|
|
100
|
+
|
|
101
|
+
Fail-open is the default posture. The one sanctioned fail-closed shape is a
|
|
102
|
+
deny-guard whose hook *matcher* already proves the tool identity (see
|
|
103
|
+
wakeup-guard): there, a logging or parse failure still denies.
|
|
104
|
+
|
|
105
|
+
delegation-kit's `agent-budget-guard.sh` is a second framework consumer,
|
|
106
|
+
composing these primitives into a `PreToolUse(Agent)` hook that blocks on a
|
|
107
|
+
PAUSE budget verdict and advises otherwise (delegation-kit/SPEC.md §The
|
|
108
|
+
delegation model) — cite-only; no guard-kit mechanism moves for it.
|
|
109
|
+
|
|
110
|
+
## Consumer rules
|
|
111
|
+
|
|
112
|
+
A consumer's project-specific block/steer/allow rules live in its copy of
|
|
113
|
+
`templates/bash-guard.sh`, composed from the `lib/guard.sh` primitives above and
|
|
114
|
+
placed **before** the generic ruleset — the template marks the position. Order
|
|
115
|
+
is the whole reason the seam sits here: a project rule that fires must fire
|
|
116
|
+
ahead of the generic rule it refines, or the generic verdict wins and the
|
|
117
|
+
project rule is dead code.
|
|
118
|
+
|
|
119
|
+
This is a placement contract, not a mechanism: guard-kit ships no consumer rule
|
|
120
|
+
and names none. What a project blocks or steers is its own toolchain knowledge
|
|
121
|
+
and stays in its copy, which is why the copy legitimately diverges from the
|
|
122
|
+
template here and why no rule content crosses into the kit.
|
|
123
|
+
|
|
124
|
+
## The generic ruleset
|
|
125
|
+
|
|
126
|
+
Rules that encode **harness behavior**, not any project's toolchain —
|
|
127
|
+
shipped as `lib/guard.sh` functions the template guard invokes. Order is
|
|
128
|
+
load-bearing where noted.
|
|
129
|
+
|
|
130
|
+
1. **`cd` in a compound command** — blocked: cwd drift plus a permission
|
|
131
|
+
prompt no allowlist entry suppresses. Corrective form: absolute paths,
|
|
132
|
+
or `git -C <dir>` for git.
|
|
133
|
+
2. **`git -C <repo-root>` when cwd is the root** — blocked: the absolute
|
|
134
|
+
`-C` target matches no allowlist entry and re-prompts, while the bare
|
|
135
|
+
`git` form is allowlisted. Pinned with a trailing space to the exact
|
|
136
|
+
root, so `git -C <root>/subdir` and a foreign-repo `-C` are untouched.
|
|
137
|
+
3. **Bare-name scratch redirect** — a `>`/`>>` to a slash-free
|
|
138
|
+
`*.err`/`*.out`/`*.log` target is blocked (it lands in the tracked tree
|
|
139
|
+
and risks a `git add -A`); the no-slash class lets path-bearing targets,
|
|
140
|
+
`/dev/null`, and fd-dups through. The corrective message points at the
|
|
141
|
+
consumer's gitignored scratch dirs (`GUARD_KIT_SCRATCH_DIRS`).
|
|
142
|
+
4. **Absolute-path execution of a known read-only repo script** — silently
|
|
143
|
+
rewritten to the repo-relative form via `guard_rewrite` (the relative
|
|
144
|
+
spelling is what allowlist globs match). The roster is the
|
|
145
|
+
`GUARD_KIT_RO_SCRIPTS` globs (default `check-*.sh`). Any other
|
|
146
|
+
absolute repo-script spelling gets a corrective block. **Placed before**
|
|
147
|
+
rule 5, which would otherwise steer the same command less precisely.
|
|
148
|
+
5. **Repo-root absolute prefix (non-script)** — any other command carrying
|
|
149
|
+
the literal repo-root prefix is steered to the repo-relative spelling.
|
|
150
|
+
`git` is excluded — rule 2 already owns its `-C` handling.
|
|
151
|
+
6. **Shell expansion / assignment** — a residual `${…}`/`$(…)`/`<(…)`/
|
|
152
|
+
`$NAME` after single-quoted regions are stripped is blocked (the harness
|
|
153
|
+
prompts on every expansion before allowlist matching). Only
|
|
154
|
+
*single*-quoted regions are stripped: inside single quotes `$` is
|
|
155
|
+
literal (`awk '$1'`), but a double-quoted `"$x"` still expands and must
|
|
156
|
+
stay visible. A standalone `NAME=value` assignment is caught separately,
|
|
157
|
+
since the expansion check only sees a *used* `$VAR`.
|
|
158
|
+
7. **Unquoted brace glyph** — the harness prompts on the bare `{` glyph
|
|
159
|
+
before allowlist matching, the same behavior class rule 6 pre-empts for
|
|
160
|
+
`$`-expansions, so a `{` surviving rule 6's single-quote strip is handled
|
|
161
|
+
by shape. A **bare `{}` placeholder** (`find … -exec cmd {} +`,
|
|
162
|
+
`xargs -I{}`), when every residual brace is exactly `{}`, is rewritten
|
|
163
|
+
via `guard_rewrite` — each `{}` single-quoted to `'{}'`,
|
|
164
|
+
behavior-preserving (the shell passes a literal `{}` either way) and
|
|
165
|
+
invisible to the matcher on the same premise as rule 6's strip. Every
|
|
166
|
+
expanding form is **blocked** with the written-out corrective:
|
|
167
|
+
git-ref shorthand (`@{u}`, `@{-n}`, `<ref>@{n}`) names the explicit
|
|
168
|
+
spelling (`origin/<branch>..HEAD`, or the resolved ref/hash);
|
|
169
|
+
list/range (`{a,b}`, `{a..b}`) names the spelled-out members or a loop;
|
|
170
|
+
any other residual `{` gets the generic corrective (single-quote if
|
|
171
|
+
literal — an awk/sed program in double quotes — write it out if it
|
|
172
|
+
expands). There is no legitimate brace-glob convenience to preserve:
|
|
173
|
+
since every bare `{` already costs an operator prompt no allowlist entry
|
|
174
|
+
can suppress, block-and-steer strictly dominates; only single-quoted
|
|
175
|
+
(literal) braces pass untouched. **Placed before both auto-allow rules**
|
|
176
|
+
so their literal-target premise holds for braces as well.
|
|
177
|
+
8. **`sed` reading or rewriting a file** — blocked with the steer to the
|
|
178
|
+
harness's file tools: `sed -i` (or any short bundle carrying `i`) to the
|
|
179
|
+
Edit tool, a **file operand** to the Read tool's offset/limit. A `sed` fed
|
|
180
|
+
by a pipe is a text filter with no tool equivalent and is untouched, so the
|
|
181
|
+
discriminator is the operand, not the binary — logic no allowlist glob can
|
|
182
|
+
express, which is why this is a rule and not a deny entry. Segments are
|
|
183
|
+
analyzed only when they *lead* with `sed`, so a `-i` flag on any other
|
|
184
|
+
command (`grep -i`) is invisible to it; within a segment, options are walked
|
|
185
|
+
so `-e`/`-f` consume their argument and the first bare operand is the script
|
|
186
|
+
— a *second* bare operand is the file that fires the rule. **Placed before
|
|
187
|
+
both auto-allow rules:** a consumer that widens `GUARD_KIT_RO_BINS` with
|
|
188
|
+
`sed` would otherwise have rule 13 silently grant an in-place rewrite.
|
|
189
|
+
9. **Listing-only `find`** — a bare `find` that only lists is blocked with
|
|
190
|
+
the steer to the harness's Glob tool (the same shape as rule 8's `sed`
|
|
191
|
+
read-steer: a better tool exists, and Glob returns paths registered for a
|
|
192
|
+
later Read). Fires on the conjunction no allowlist glob can express: every
|
|
193
|
+
segment leads with `find` and carries **no action predicate**
|
|
194
|
+
(`-exec`/`-execdir`/`-ok`/`-okdir`/`-delete`/`-fls`/`-fprint`/`-fprint0`/
|
|
195
|
+
`-fprintf` — find(1) mechanism, a lib literal), with **no composition** — no
|
|
196
|
+
pipe, `&&`/`||` chain, background, or redirect. A lone listing fires, and so
|
|
197
|
+
does a **`;`-sequence of listings**: a `;`-compound is not composition but a
|
|
198
|
+
batch of independent listings, exactly what the Glob steer collapses into one
|
|
199
|
+
call. A literal `echo`/`printf` banner segment between them is the natural
|
|
200
|
+
separator of such a batch and is tolerated; at least one segment must be a
|
|
201
|
+
listing. A piped `find` is a legitimate producer (rule 13 may still
|
|
202
|
+
auto-allow it), an action-predicate `find` is an executor, a redirected
|
|
203
|
+
`find` has a downstream reader, and a **mixed** compound (a segment that is
|
|
204
|
+
neither a listing nor a banner) all pass untouched. **Placed before both
|
|
205
|
+
auto-allow rules** (same reasoning as rule 8): a bare listing meets the steer
|
|
206
|
+
rather than a silent read-only-pipeline grant, since `find` is in the default
|
|
207
|
+
`GUARD_KIT_RO_BINS` roster. A consumer needing different behavior shadows
|
|
208
|
+
the rule in its consumer-rules section.
|
|
209
|
+
10. **Bare single-file `cat`** — a `cat` read is blocked with the steer to the
|
|
210
|
+
harness's Read tool (rule 8's read-steer shape: Read returns numbered lines
|
|
211
|
+
registered for a later Edit). Fires on the conjunction no allowlist glob
|
|
212
|
+
expresses: every segment leads with `cat` and carries **exactly one**
|
|
213
|
+
non-flag operand (flags are allowed, `cat -n <file>`), with **no
|
|
214
|
+
composition** — no pipe, heredoc, redirect, substitution, `&&`/`||` chain,
|
|
215
|
+
or background. A lone `cat <file>` fires, and so does a **`;`-batch of
|
|
216
|
+
reads** (`cat a; cat b`): a `;`-compound of single-file reads is a batch,
|
|
217
|
+
not composition, and collapses into successive Read calls — the ergonomic
|
|
218
|
+
case the steer exists for. A literal `echo`/`printf` banner segment between
|
|
219
|
+
reads is the natural separator of such a batch and is tolerated: it is
|
|
220
|
+
redundant once the batch moves to the Read tool, which shows each filename
|
|
221
|
+
itself. At least one segment must be a read. Multi-file concatenation, a
|
|
222
|
+
piped or heredoc'd `cat`, a redirected `cat`, an `&&`-chain, and a **mixed**
|
|
223
|
+
or banner-only compound are composition (or carry no read the Read tool
|
|
224
|
+
replaces) and pass untouched. **Placed before both auto-allow rules** (same
|
|
225
|
+
reasoning as rule 8): a bare `cat <file>` meets the steer rather than a
|
|
226
|
+
silent read-only-pipeline grant, since `cat` is in the default
|
|
227
|
+
`GUARD_KIT_RO_BINS` roster.
|
|
228
|
+
11. **Working-tree `git grep`** — a `git grep` that searches the working tree
|
|
229
|
+
is blocked with the steer to the harness's Grep tool (rule 8's read-steer
|
|
230
|
+
shape: Grep returns matching lines with files registered for a later Read).
|
|
231
|
+
Fires on the discriminator no allowlist glob expresses: the command leads
|
|
232
|
+
with `git grep`, names no revision, and does not scope elsewhere — the
|
|
233
|
+
index (`--cached`/`--staged`), a non-repo search (`--no-index`), or an
|
|
234
|
+
untracked-file search (`--untracked`). "Names a revision" is read off the
|
|
235
|
+
positional grammar: the pattern is one positional (or supplied by
|
|
236
|
+
`-e`/`-f`), so a *further* bare positional before any `--` is a tree-ish
|
|
237
|
+
the Grep tool cannot reach — `git grep foo` steers while `git grep foo
|
|
238
|
+
HEAD` passes, and a `-- <path>` limiter keeps the search in the working
|
|
239
|
+
tree and still steers. A piped `git grep` is a producer and never reaches
|
|
240
|
+
this rule (the consumer disqualifies it). Conservative by construction: an
|
|
241
|
+
unrecognized option-with-argument or a glued pattern flag biases toward
|
|
242
|
+
passing, never a false steer of a history search.
|
|
243
|
+
12. **Auto-allow `: > file` truncation** — a leading `:` plus redirect
|
|
244
|
+
defeats the permission matcher, so it always prompts. Granted silently
|
|
245
|
+
when the command is *only* `:` followed by redirects and every target is
|
|
246
|
+
gitignored (`git check-ignore`): truncating scratch is safe; a tracked
|
|
247
|
+
file must still prompt. The `git` subprocess is gated behind the rare
|
|
248
|
+
`:`-redirect match; expansions (rule 6) and brace forms (rule 7) are
|
|
249
|
+
already blocked, so a surviving target is a literal path.
|
|
250
|
+
13. **Auto-allow read-only pipeline** — granted silently when every pipe
|
|
251
|
+
segment leads with a roster binary (`GUARD_KIT_RO_BINS`, default the
|
|
252
|
+
grep/head/cat/find/jq family) and every redirect target is `/dev/null`
|
|
253
|
+
or an fd-dup. Conservative by construction: command/process
|
|
254
|
+
substitution, a leftover quote after stripping, any statement separator,
|
|
255
|
+
a non-`/dev/null` redirect, or a `find` with a write action all refuse
|
|
256
|
+
and fall through.
|
|
257
|
+
14. **Decorated allowlisted command** — the leading command exactly matches a
|
|
258
|
+
committed **bare** allow entry (a `Bash(<cmd>)` with no `:*`/`*` glob) but
|
|
259
|
+
the command decorates it — `&&`/`;`/`|` chaining, a trailing redirect, or
|
|
260
|
+
`2>&1` — which forces a permission prompt no allowlist entry suppresses.
|
|
261
|
+
**Blocked** with the steer *run it bare — the bare form is statically
|
|
262
|
+
allowed; the decoration forces a prompt.* Block, not advise: the rule fires
|
|
263
|
+
only on commands that would prompt anyway, so blocking converts the prompt
|
|
264
|
+
into a durable steer at no extra interrupt, and an advise would *grant* the
|
|
265
|
+
decorated command (its extra segments the allowlist never reviewed).
|
|
266
|
+
**Bare leads only:** a glob-headed family (`Bash(git log:*)`) coexists with
|
|
267
|
+
allowlisted decorators, so only an exact bare entry qualifies as the lead;
|
|
268
|
+
widening to glob leads is possible later without a new name. **Never
|
|
269
|
+
intercepts a silent grant:** the harness matches per segment, so a compound
|
|
270
|
+
whose every segment matches the committed allowlist is granted without a
|
|
271
|
+
prompt and blocking it would regress — the rule therefore fires only when a
|
|
272
|
+
non-leading segment (or a redirect on the lead) fails to match any committed
|
|
273
|
+
allow entry, reusing `guard_allow_match`'s shell-glob semantics. Reads
|
|
274
|
+
`GUARD_KIT_SETTINGS`; **fail-open** — no `jq`, no settings file, or a
|
|
275
|
+
parse error and the rule silently declines and falls through. Placed after
|
|
276
|
+
the auto-allow rules (12, 13) so a silently granted read-only pipeline never
|
|
277
|
+
reaches it.
|
|
278
|
+
15. **Git history-rewrite advisory** — a `git commit` carrying `--amend`, `-F`,
|
|
279
|
+
or `--file`, or a `git reset --soft`, gets a `guard_advise` steer carrying
|
|
280
|
+
the checklist from DOCTRINE.md's *Re-verify volatile state before a git
|
|
281
|
+
history rewrite* rule (verify HEAD before amend/squash; re-stage and verify
|
|
282
|
+
staged content after a soft reset; write any `commit -F` message file fresh
|
|
283
|
+
this turn). Advisory, not a block: each is a legitimate command, so the rule
|
|
284
|
+
injects the re-verification context and lets the command proceed. The
|
|
285
|
+
DOCTRINE.md rule is cited by **name**, not number — the doctrine's craft
|
|
286
|
+
rules renumber as it grows, and this ruleset carries its own rule 15, so a
|
|
287
|
+
doc-qualified number would both rot on a renumber and read ambiguously
|
|
288
|
+
against the local numbering. Placed
|
|
289
|
+
after the auto-allow rules (12, 13) and the decorated-allowlist rule (14),
|
|
290
|
+
so it fires only on a bare rewrite command none of those claimed; a
|
|
291
|
+
decorated form meets rule 14's block first and the advisory fires on the
|
|
292
|
+
re-issued bare command.
|
|
293
|
+
16. **Bare `rm` of a tracked path** — an `rm` statement naming a git-tracked
|
|
294
|
+
file (`git ls-files --error-unmatch`) is **blocked** with the steer to
|
|
295
|
+
`git rm -q <path>`, which deletes and stages that one deletion in a single
|
|
296
|
+
motion. The deletion is the point: a bare `rm` leaves it unstaged, so it
|
|
297
|
+
lands only via a later `git add -A` — the form the shared-index discipline
|
|
298
|
+
warns against, since it sweeps a concurrent session's foreign path into the
|
|
299
|
+
commit. Block, not advise, on rule 14's reasoning: no consumer allowlist is
|
|
300
|
+
presumed to grant `rm`, so the rule fires on a command that would prompt
|
|
301
|
+
anyway and converts the prompt into a durable steer. Fires per statement
|
|
302
|
+
(`;`/`&&`/`||`/`|` split), so a decorated form steers on the same premise as
|
|
303
|
+
the bare one. Conservative by construction: expansions and backticks decline
|
|
304
|
+
outright (rule 6 already blocks them), option words are skipped, and a
|
|
305
|
+
tracked *directory* under `rm -r` does not match `--error-unmatch` — each
|
|
306
|
+
biases toward passing rather than a false steer. An untracked or gitignored
|
|
307
|
+
target never matches, so scratch deletion is untouched.
|
|
308
|
+
17. **Fall-through logging** — anything neither blocked nor auto-allowed is
|
|
309
|
+
appended to the friction log. Always last; never affects the decision.
|
|
310
|
+
|
|
311
|
+
### Consumer rules
|
|
312
|
+
|
|
313
|
+
Project rules — build-cache hygiene, container-build concurrency,
|
|
314
|
+
test-suite serialization, disk reclaim, tool-specific steering — live in a
|
|
315
|
+
marked section of the consumer's copied `bash-guard.sh`, before the generic
|
|
316
|
+
ruleset. Two ordering disciplines, attested in production use and kept as
|
|
317
|
+
guidance: a command about to be *blocked* must never first trigger a
|
|
318
|
+
side-effecting rule (place blocks before any reclaim/cleanup rule), and a
|
|
319
|
+
steering rule must precede the broader rule that would catch the same
|
|
320
|
+
command less precisely. A third, on the match surface: a substring rule
|
|
321
|
+
sees the entire tool input, heredoc bodies included, so prose that merely
|
|
322
|
+
*names* a guarded command — a `git commit -F -` message describing one —
|
|
323
|
+
false-blocks. Match against a quote-stripped copy of the command (quoted
|
|
324
|
+
spans may then name anything), and keep longer prose out of the match
|
|
325
|
+
surface via a quoted `-m` span or a `-F <file>` the hook never reads.
|
|
326
|
+
|
|
327
|
+
## scratch-run
|
|
328
|
+
|
|
329
|
+
`bin/scratch-run.sh <script> [args…]` closes a loop the steering rules
|
|
330
|
+
themselves open. The generic ruleset pushes probes and multi-line sweeps
|
|
331
|
+
into the consumer's gitignored scratch dir (`GATE_SDK_TMP_DIR`) and refuses
|
|
332
|
+
the harness scratchpad by name — yet nothing allowlists *executing* what
|
|
333
|
+
lands there, so every run of a steered-to script prompts, forever. The
|
|
334
|
+
runner is the fixed, allowlistable path that ends it: given a target inside
|
|
335
|
+
the scratch dir it **echoes the script's contents to stdout** (a header
|
|
336
|
+
naming the path, then the body), then **executes it**, passing stdout,
|
|
337
|
+
stderr and the child's exit code through and forwarding `[args…]` verbatim
|
|
338
|
+
without interpreting them.
|
|
339
|
+
|
|
340
|
+
The echo is the point, not a convenience. A bare scratch-glob allowlist
|
|
341
|
+
would auto-approve executing any script at that path with its contents
|
|
342
|
+
visible only in an earlier write call — turning a visible command into a
|
|
343
|
+
silent *and* opaque one, the opposite of what the prompt was buying.
|
|
344
|
+
Echo-at-execution makes the silent run **self-documenting**: the executed
|
|
345
|
+
lines land in the transcript at the moment they run, which is the evidence
|
|
346
|
+
surface a supervisor's post-commit review reads. Steering the agent to
|
|
347
|
+
inline the script instead is known-insufficient — it serves a short probe
|
|
348
|
+
and not the genuine multi-line sweeps (loops, arrays, command
|
|
349
|
+
substitution) that are exactly the recurring case.
|
|
350
|
+
|
|
351
|
+
**What the allowlist entry buys, and what it costs.** The consumer's entry
|
|
352
|
+
names this fixed path with a wildcard tail, and a guard only ever inspects
|
|
353
|
+
the **outer command string** — so an allowlisted invocation of the runner
|
|
354
|
+
carries no expansion and no decoration, passes, and the script's
|
|
355
|
+
*contents* are never guard-inspected at all. State that plainly rather than
|
|
356
|
+
as a convenience: the generic rules that would refuse an expansion-bearing
|
|
357
|
+
one-liner do not reach the same code once it sits inside a scratch file.
|
|
358
|
+
The echoed body is the **compensating control**, and it relocates review
|
|
359
|
+
rather than removing it — from *before* execution, where the permission
|
|
360
|
+
prompt put it, to *after*, in the transcript a supervisor reads. That is
|
|
361
|
+
the actual posture of the entry, and a consumer unwilling to move review
|
|
362
|
+
downstream should simply not add it: the tool still runs without it, and
|
|
363
|
+
still prompts.
|
|
364
|
+
|
|
365
|
+
**Fail-closed on reach.** A target resolving outside the scratch dir is
|
|
366
|
+
refused before any echo or execution, so the tool cannot become a general
|
|
367
|
+
"run this arbitrary path without a prompt" bypass: its reach is exactly the
|
|
368
|
+
scratch surface the guard already steers into. The test reads the
|
|
369
|
+
*resolved* path, never the spelling, so a traversal out of the dir refuses
|
|
370
|
+
like any other outsider. Refusal, an absent target, and a missing argument
|
|
371
|
+
are each exit 2 — which the passthrough makes ambiguous by construction,
|
|
372
|
+
since a child exiting 2 is indistinguishable by code alone; the echo is the
|
|
373
|
+
discriminator, as a refusal prints no body. Content-agnostic generic
|
|
374
|
+
mechanism: the scratch dir comes from gate-sdk's existing `GATE_SDK_TMP_DIR`
|
|
375
|
+
and no kit knob is added, while the consumer's allowlist entry for the fixed
|
|
376
|
+
path is that consumer's settings, never a kit literal.
|
|
377
|
+
|
|
378
|
+
## scan-prompts
|
|
379
|
+
|
|
380
|
+
Advisory: surfaces recurring permission-prompt sources from the friction
|
|
381
|
+
log, filtering against **both** settings files (`GUARD_KIT_SETTINGS` and
|
|
382
|
+
`GUARD_KIT_SETTINGS_LOCAL`) and the harness's built-in read-only git/docker
|
|
383
|
+
auto-allows. Matching is **per compound segment**, the same surface the
|
|
384
|
+
harness matches on (§The guard framework, `guard_split_compound`): a logged
|
|
385
|
+
command is granted only when *every* segment is, so a whole-string glob that
|
|
386
|
+
spans a compound the harness would split and refuse — `Bash(git status:*)`
|
|
387
|
+
against `git status && rm -rf x` — does not read as allowed and is counted as
|
|
388
|
+
prompting.
|
|
389
|
+
|
|
390
|
+
The friction log's fall-throughs split three ways:
|
|
391
|
+
- **Committed-covered** — every segment matches the committed allowlist or a
|
|
392
|
+
harness built-in. Silently granted, reinforced; off every list.
|
|
393
|
+
- **Prompting** — some segment nothing grants. The headline `<n> prompting
|
|
394
|
+
call(s)`, grouped and ranked by pattern (leading binary, plus subcommand for
|
|
395
|
+
the common multi-command binaries), triaged at close by the criterion above.
|
|
396
|
+
- **Overlay-covered** — granted, but at least one segment relies on the
|
|
397
|
+
uncommitted `GUARD_KIT_SETTINGS_LOCAL` overlay. It *did not prompt*, so it is
|
|
398
|
+
excluded from the headline (the count is a true prompt count, not an upper
|
|
399
|
+
bound), yet it is exactly the promote-or-prune candidate the close step must
|
|
400
|
+
see — so it is ranked in a **separate, visibly-advisory section** below the
|
|
401
|
+
headline, never mixed into it.
|
|
402
|
+
|
|
403
|
+
`--count` emits the compact `<patterns>/<occurrences>` prompting token for a
|
|
404
|
+
drift-KPI consumer (overlay-covered excluded, so the KPI reads true); an
|
|
405
|
+
explicit file argument overrides the log path (test capability). Its behavior
|
|
406
|
+
— the three-way split, the per-segment matching, the true count — is pinned by
|
|
407
|
+
`gate-tests/scan-prompts.test.sh`.
|
|
408
|
+
|
|
409
|
+
## compare-settings-allow
|
|
410
|
+
|
|
411
|
+
Advisory: lists local-overlay allow entries already granted by a glob in
|
|
412
|
+
the committed settings — the deterministic prune-candidate set for the
|
|
413
|
+
close-stage audit. A committed pattern subsumes a local entry when the
|
|
414
|
+
local string matches it under shell-glob semantics; the harness `:*` prefix
|
|
415
|
+
idiom (`Bash(printf:*)` ≡ any `printf …`) is normalized to a trailing `*`
|
|
416
|
+
so one glob test covers both forms — the match core is `guard_allow_match`
|
|
417
|
+
in `lib/guard.sh`, shared with rule 14. Read-only — reports candidates, never
|
|
418
|
+
mutates (the operator prunes). It is the detector, not the policy: a
|
|
419
|
+
non-redundant local entry can still be one-off junk worth pruning by
|
|
420
|
+
judgment. `--count` emits the bare count.
|
|
421
|
+
|
|
422
|
+
## wakeup-guard (template)
|
|
423
|
+
|
|
424
|
+
Optional second guard, same framework, opposite posture: blocks
|
|
425
|
+
self-scheduled wakeups (`ScheduleWakeup`/`CronCreate`) unconditionally and
|
|
426
|
+
logs each attempt — a stored prompt re-fires in a later session as if the
|
|
427
|
+
user typed it, long after its premises are stale, and the scheduling call
|
|
428
|
+
is invisible at the moment it matters. Fail-closed (the matcher proves the
|
|
429
|
+
tool identity, so a logging failure still denies). The attempt log is
|
|
430
|
+
reviewed and deleted in the same close-stage triage pass as the friction
|
|
431
|
+
log. Deliberate scheduling stays possible by disabling the hook for a
|
|
432
|
+
session — the block is the default, not a capability removal.
|
|
433
|
+
|
|
434
|
+
### escalation-guard (template)
|
|
435
|
+
|
|
436
|
+
`templates/escalation-guard.sh` is the wakeup-guard's sibling — same framework,
|
|
437
|
+
a tool-targeted matcher, a separate opt-in hook — but **advisory, not
|
|
438
|
+
fail-closed**, and the opposite failure posture: an advisory never blocks a
|
|
439
|
+
message, so any inability to inspect the payload passes silently. Registered as
|
|
440
|
+
a `PreToolUse(SendMessage)` hook, it fires only on a message addressed to the
|
|
441
|
+
lead (a background stage session reaches the live lead as `main`) and advises,
|
|
442
|
+
feeding `additionalContext`, when that message lacks any of the decision-shape
|
|
443
|
+
headers **Question / Options / Recommendation / Evidence**. A downward or
|
|
444
|
+
peer-directed message, or one already carrying those headers, passes untouched.
|
|
445
|
+
|
|
446
|
+
It is the mechanical floor under lifecycle-kit's lead protocol
|
|
447
|
+
(lifecycle-kit/SPEC.md §templates/lead.md): prompts request the escalation
|
|
448
|
+
shape, this guard enforces it. The header grammar is the kit's mechanism; the
|
|
449
|
+
ruling-class roster — what a stage session must escalate at all — stays consumer
|
|
450
|
+
config in the dispatched agent-definition, never here. Opt-in is the consumer's
|
|
451
|
+
settings registration, the same valve as the wakeup-guard; absent it the
|
|
452
|
+
template is inert prose, the intended default (this repo leaves it unwired, as
|
|
453
|
+
it does the wakeup-guard). That stated default is the *only* enforcement of the
|
|
454
|
+
wiring: no gate observes it — `check-settings-pins` and `check-memory-off` stay
|
|
455
|
+
green whether the hook is wired or not — so a session decides whether to wire an
|
|
456
|
+
optional guard by reading this section, never by predicting a gate's verdict or
|
|
457
|
+
reading the guard's own source to infer one. It sources no config and writes no
|
|
458
|
+
log — the advisory is transient, so nothing accrues for the close-stage triage.
|
|
459
|
+
|
|
460
|
+
## The close-stage triage step
|
|
461
|
+
|
|
462
|
+
`templates/close-triage.md` is the recurring step a consumer splices into
|
|
463
|
+
its close-stage skill — it fills the tooling-friction placeholder in
|
|
464
|
+
lifecycle-kit's close template. The step: run `scan-prompts`, resolve each
|
|
465
|
+
recurring pattern by the triage criterion; review and delete the wakeup
|
|
466
|
+
log if present; run `compare-settings-allow` and prune the listed local
|
|
467
|
+
entries, then by judgment prune the remaining one-off exact-string local
|
|
468
|
+
entries and promote recurring safe patterns to the committed settings as
|
|
469
|
+
globs; clear the friction log. Goal: the local set stays small and every
|
|
470
|
+
durable pattern lives in the committed, reviewable allowlist.
|
|
471
|
+
|
|
472
|
+
The friction log is a capture-tier surface with no forcing function — nothing
|
|
473
|
+
refuses a close that skips it — so it declares itself advisory on the
|
|
474
|
+
close-surface roster (lifecycle-kit/SPEC.md §The close-surface roster), naming
|
|
475
|
+
the clear above as its reclaim path:
|
|
476
|
+
|
|
477
|
+
close-surface: .workflow/prompt-friction.log advisory reclaim=: > .workflow/prompt-friction.log
|
|
478
|
+
|
|
479
|
+
## Layout and configuration
|
|
480
|
+
|
|
481
|
+
```
|
|
482
|
+
guard-kit/
|
|
483
|
+
lib/guard.sh # primitives + generic ruleset functions
|
|
484
|
+
bin/scan-prompts.sh
|
|
485
|
+
bin/compare-settings-allow.sh
|
|
486
|
+
bin/scratch-run.sh # echo-then-exec runner for scratch scripts
|
|
487
|
+
bin/run-guard-tests.sh # decision-table runner
|
|
488
|
+
guard-tests/cases.tsv # expected-decision <TAB> command
|
|
489
|
+
guard-tests/escalation-cases.tsv # expected-decision <TAB> to <TAB> message
|
|
490
|
+
gate-tests/scratch-run.test.sh # bespoke unit test, run by gate-sdk's runner
|
|
491
|
+
templates/bash-guard.sh # consumer copy: generic rules on, marked
|
|
492
|
+
# consumer-rules section
|
|
493
|
+
templates/wakeup-guard.sh
|
|
494
|
+
templates/escalation-guard.sh
|
|
495
|
+
templates/guard-config.sh
|
|
496
|
+
templates/settings-hooks.json # the PreToolUse wiring snippet
|
|
497
|
+
templates/close-triage.md
|
|
498
|
+
smoke/install.sh
|
|
499
|
+
```
|
|
500
|
+
|
|
501
|
+
Config follows the established kit pattern: copy
|
|
502
|
+
`templates/guard-config.sh` into the gates dir (or point
|
|
503
|
+
`GUARD_KIT_CONFIG_FILE` elsewhere) and override any knob; defaults fill
|
|
504
|
+
what the consumer left unset, and a set-but-missing `GUARD_KIT_CONFIG_FILE`
|
|
505
|
+
exits 2 rather than silently running on defaults. In a hook that sources the
|
|
506
|
+
lib, that exit 2 surfaces as a hook block carrying the not-found message —
|
|
507
|
+
loud on the first guarded command, the intended fail-closed (the guards
|
|
508
|
+
gate the lib source on file existence only, so the message is never
|
|
509
|
+
swallowed; a lib that is not vendored at all stays fail-open). Knobs (this
|
|
510
|
+
repo's layout as defaults):
|
|
511
|
+
|
|
512
|
+
- `GUARD_KIT_LIB` — the vendored `lib/guard.sh` path the copied guards
|
|
513
|
+
source (the test runner points it at the tree under test); default
|
|
514
|
+
`guard-kit/lib/guard.sh`. Env or the copied guard's head only — it
|
|
515
|
+
resolves before the config file loads, so `guard-config.sh` cannot set
|
|
516
|
+
it.
|
|
517
|
+
- `GUARD_KIT_LOG` — default
|
|
518
|
+
`${GATE_SDK_WORKFLOW_DIR:-.workflow}/prompt-friction.log`.
|
|
519
|
+
- `GUARD_KIT_WAKEUP_LOG` — default
|
|
520
|
+
`${GATE_SDK_WORKFLOW_DIR:-.workflow}/wakeup-attempts.log`.
|
|
521
|
+
- `GUARD_KIT_SETTINGS` — default `.claude/settings.json`.
|
|
522
|
+
- `GUARD_KIT_SETTINGS_LOCAL` — default `.claude/settings.local.json`.
|
|
523
|
+
- `GUARD_KIT_RO_SCRIPTS` — array of globs eligible for the
|
|
524
|
+
absolute→relative rewrite (rule 4); default `("check-*.sh")`.
|
|
525
|
+
- `GUARD_KIT_RO_BINS` — read-only pipeline roster (rule 13); default the
|
|
526
|
+
grep/head/cat/find/jq family.
|
|
527
|
+
- `GUARD_KIT_SCRATCH_DIRS` — gitignored scratch dirs named in the
|
|
528
|
+
rule-3 corrective message; default `(".tmp")`.
|
|
529
|
+
|
|
530
|
+
Both logs are per-iteration scratch: a consumer gitignores them even where
|
|
531
|
+
its workflow dir is otherwise committed.
|
|
532
|
+
|
|
533
|
+
## Testing
|
|
534
|
+
|
|
535
|
+
The gate contracts do not fit hooks (a guard speaks exit-2 + hook JSON, not
|
|
536
|
+
`OK:`/`FAIL:` lines), so the kit ships its own decision-table runner
|
|
537
|
+
instead of `gate-tests/`: `guard-tests/cases.tsv` pairs an expected
|
|
538
|
+
decision (`block`/`advise`/`allow`/`rewrite`/`fallthrough`) with a command;
|
|
539
|
+
`bin/run-guard-tests.sh` feeds each through the template guard as hook JSON
|
|
540
|
+
on stdin and asserts the exit code and output class, failing on any
|
|
541
|
+
mismatch. Every generic rule carries at least one firing and one
|
|
542
|
+
non-firing case (the fixture-pair discipline, transplanted).
|
|
543
|
+
|
|
544
|
+
The same runner drives the escalation-guard from a second table,
|
|
545
|
+
`guard-tests/escalation-cases.tsv` (`<decision> <TAB> <to> <TAB> <message>`),
|
|
546
|
+
feeding a `SendMessage`-shaped payload instead of a command: a firing case (a
|
|
547
|
+
headerless message to `main` → advise) and its non-firing pair (a fully shaped
|
|
548
|
+
block, and a non-`main` recipient → fallthrough) hold the same fixture-pair
|
|
549
|
+
discipline for the advisory.
|
|
550
|
+
|
|
551
|
+
`smoke/install.sh` copies the templates into the scratch consumer (guard
|
|
552
|
+
and config into the gates dir, hook wiring into `.claude/settings.json`,
|
|
553
|
+
log paths gitignored) and then drives one crafted payload directly through
|
|
554
|
+
the installed guard, asserting a block — the install is self-verifying.
|
|
555
|
+
There is no `smoke/violation.sh`: the kit registers no gates, so no
|
|
556
|
+
battery-reddening violation is craftable (gate-sdk/SPEC.md §Consumer smoke
|
|
557
|
+
makes that file conditional on exactly this).
|
|
558
|
+
|
|
559
|
+
A shipped `bin/` tool that is not a hook takes neither lane. `bin/scratch-run.sh`
|
|
560
|
+
(§scratch-run) is tested by a bespoke unit test at
|
|
561
|
+
`gate-tests/scratch-run.test.sh`, asserting echo-then-exec on an in-scratch
|
|
562
|
+
target, pass-through of args and exit code, and the fail-closed refusal of an
|
|
563
|
+
out-of-scratch one. It is **not** a `guard-tests/` row: that table's grammar is a
|
|
564
|
+
decision paired with a command, which cannot express any of the three. It is not
|
|
565
|
+
a gate either, so no `good/`+`bad/` fixture pair is owed — but shipped mechanism
|
|
566
|
+
owes a test, and the bespoke-unit-test lane is gate-sdk's
|
|
567
|
+
`<tests-dir>/*.test.sh` (gate-sdk/SPEC.md §run-gate-tests), which admits a tests
|
|
568
|
+
dir carrying unit tests and no fixture pair. Homing it there is what puts it
|
|
569
|
+
under `check-test-hermetic`, whose assertion A enumerates
|
|
570
|
+
`<kit-root>/gate-tests/*.test.sh` — the enforcement a kit-local runner would
|
|
571
|
+
forfeit. A kit's first `gate-tests/` directory also obliges a fixture-runner
|
|
572
|
+
line in the consumer's battery, which `check-kit-registration` reads from
|
|
573
|
+
`git ls-files`: the line belongs in the same commit as the test, never a
|
|
574
|
+
follow-up.
|
|
575
|
+
|
|
576
|
+
A gateless kit shapes gate-sdk's discovery rule: `gate_kit_roots` recognizes a
|
|
577
|
+
sibling kit by its `checks/` *or* `smoke/` directory. Keying on `checks/`
|
|
578
|
+
alone would leave this kit undiscovered — its `smoke/install.sh` would never
|
|
579
|
+
run under `run-consumer-smoke.sh`, and its `lib/` and `bin/` would escape
|
|
580
|
+
`check-shellcheck`'s self-lint sweep.
|
|
581
|
+
|
|
582
|
+
## Out of scope
|
|
583
|
+
|
|
584
|
+
Every toolchain- and product-coupled guard rule is consumer rule content:
|
|
585
|
+
build-cache hygiene, container-build concurrency and restart discipline,
|
|
586
|
+
test-suite serialization rosters, proactive disk reclaim, tool-preference
|
|
587
|
+
steering, and any read-only script roster beyond `check-*.sh`. So are
|
|
588
|
+
allowlist contents beyond the read-only core, and a memory-policy write
|
|
589
|
+
guard (a product ruling, not friction mechanism). The split is framework
|
|
590
|
+
and generic rules here, a consumer's rules in its own copied guard.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# spec: guard-kit/SPEC.md §compare-settings-allow — the deterministic prune-candidate set
|
|
3
|
+
# usage: compare-settings-allow.sh [--count]
|
|
4
|
+
set -uo pipefail
|
|
5
|
+
|
|
6
|
+
BIN="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
7
|
+
# shellcheck source=../lib/guard.sh
|
|
8
|
+
source "$BIN/../lib/guard.sh"
|
|
9
|
+
|
|
10
|
+
COMMITTED="$GUARD_KIT_SETTINGS"
|
|
11
|
+
LOCAL="$GUARD_KIT_SETTINGS_LOCAL"
|
|
12
|
+
|
|
13
|
+
COUNT=0
|
|
14
|
+
case "${1:-}" in
|
|
15
|
+
--count) COUNT=1 ;;
|
|
16
|
+
"") ;;
|
|
17
|
+
*) echo "usage: compare-settings-allow.sh [--count]" >&2; exit 2 ;;
|
|
18
|
+
esac
|
|
19
|
+
|
|
20
|
+
if [[ ! -f "$LOCAL" ]]; then
|
|
21
|
+
[[ "$COUNT" -eq 1 ]] && { echo "0"; exit 0; }
|
|
22
|
+
echo "=== settings allowlist redundancy (advisory — prune candidates) ==="
|
|
23
|
+
echo "no $LOCAL — nothing to compare"
|
|
24
|
+
exit 0
|
|
25
|
+
fi
|
|
26
|
+
|
|
27
|
+
mapfile -t COMMITTED_ALLOW < <(jq -r '.permissions.allow[]?' "$COMMITTED" 2>/dev/null || true)
|
|
28
|
+
mapfile -t LOCAL_ALLOW < <(jq -r '.permissions.allow[]?' "$LOCAL" 2>/dev/null || true)
|
|
29
|
+
|
|
30
|
+
redundant=()
|
|
31
|
+
for entry in "${LOCAL_ALLOW[@]}"; do
|
|
32
|
+
[[ -z "$entry" ]] && continue
|
|
33
|
+
for pat in "${COMMITTED_ALLOW[@]}"; do
|
|
34
|
+
[[ -z "$pat" ]] && continue
|
|
35
|
+
if guard_allow_match "$entry" "$pat"; then
|
|
36
|
+
redundant+=("$entry ⊆ $pat")
|
|
37
|
+
break
|
|
38
|
+
fi
|
|
39
|
+
done
|
|
40
|
+
done
|
|
41
|
+
|
|
42
|
+
if [[ "$COUNT" -eq 1 ]]; then
|
|
43
|
+
echo "${#redundant[@]}"
|
|
44
|
+
exit 0
|
|
45
|
+
fi
|
|
46
|
+
|
|
47
|
+
echo "=== settings allowlist redundancy (advisory — prune candidates) ==="
|
|
48
|
+
if [[ ${#redundant[@]} -eq 0 ]]; then
|
|
49
|
+
echo "no redundant local entries (every $LOCAL allow entry adds coverage)"
|
|
50
|
+
exit 0
|
|
51
|
+
fi
|
|
52
|
+
|
|
53
|
+
echo "${#redundant[@]} local allow entr(ies) already granted by a committed glob — safe to prune from $LOCAL:"
|
|
54
|
+
echo
|
|
55
|
+
printf ' %s\n' "${redundant[@]}"
|
|
56
|
+
echo
|
|
57
|
+
echo "help: remove each listed entry from $LOCAL — the committed pattern on the"
|
|
58
|
+
echo " right already grants it (run at close, triage step 4)."
|