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,272 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# spec: gate-sdk/SPEC.md §enforcement-map — the kit→surface→class map emitted from the class registries; the emitted page owns the enforcement-class taxonomy
|
|
3
|
+
# usage: enforcement-map.sh [--emit]
|
|
4
|
+
# bare: an advisory header plus the page; --emit: the page only, for the committed docs/enforcement.md projection.
|
|
5
|
+
# advisory by construction: never joins gates.list; a healthy run exits 0 whatever registries are absent, a set-but-missing registry knob exits 2 fail-closed before any stdout; the freshness gate (check-enforcement-fresh) blocks a stale emission.
|
|
6
|
+
set -uo pipefail
|
|
7
|
+
|
|
8
|
+
SDK="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
9
|
+
# shellcheck source=../lib/gate.sh
|
|
10
|
+
source "$SDK/lib/gate.sh"
|
|
11
|
+
|
|
12
|
+
# spec: gate-sdk/SPEC.md §enforcement-map — every registry defaults to this repo's layout and reads through the owning kit's knob, so a consumer relocates each surface without touching the emitter; the := expansion erases set-ness, so each knob's explicit value is captured first (adopted-but-broken refuses where not-adopted degrades)
|
|
13
|
+
GATES_DIR="$(gate_sdk_gates_dir)"
|
|
14
|
+
LIST="$GATES_DIR/gates.list"
|
|
15
|
+
set_kpis="${DRIFT_KIT_KPIS_FILE:-}"
|
|
16
|
+
set_settings="${CONTEXT_KIT_SETTINGS_FILE:-}"
|
|
17
|
+
set_evidence="${EVIDENCE_KIT_CONFIG_FILE:-}"
|
|
18
|
+
set_scan="${GATE_SDK_ENFORCE_SCAN_DIR:-}"
|
|
19
|
+
: "${DRIFT_KIT_KPIS_FILE:=$GATES_DIR/kpis.list}"
|
|
20
|
+
: "${CONTEXT_KIT_SETTINGS_FILE:=.claude/settings.json}"
|
|
21
|
+
: "${EVIDENCE_KIT_CONFIG_FILE:=$GATES_DIR/evidence-config.sh}"
|
|
22
|
+
: "${GATE_SDK_ENFORCE_SCAN_DIR:=.}"
|
|
23
|
+
|
|
24
|
+
# spec: gate-sdk/SPEC.md §enforcement-map — check-before-emit: every explicitly set registry knob is verified before the first stdout byte in both modes, stderr naming the knob and exit 2 on a missing path (for the settings knob, also a set file jq refuses to parse; jq absence is a toolchain gap and keeps degrading), so a misconfigured --emit regen leaves an empty projection and a nonzero exit, never a plausible partial page
|
|
25
|
+
preflight_knobs() {
|
|
26
|
+
local bad=0
|
|
27
|
+
[[ -n "$set_kpis" && ! -f "$DRIFT_KIT_KPIS_FILE" ]] &&
|
|
28
|
+
{ echo "enforcement-map: DRIFT_KIT_KPIS_FILE not found: $DRIFT_KIT_KPIS_FILE" >&2; bad=1; }
|
|
29
|
+
[[ -n "$set_evidence" && ! -f "$EVIDENCE_KIT_CONFIG_FILE" ]] &&
|
|
30
|
+
{ echo "enforcement-map: EVIDENCE_KIT_CONFIG_FILE not found: $EVIDENCE_KIT_CONFIG_FILE" >&2; bad=1; }
|
|
31
|
+
[[ -n "$set_scan" && ! -d "$GATE_SDK_ENFORCE_SCAN_DIR" ]] &&
|
|
32
|
+
{ echo "enforcement-map: GATE_SDK_ENFORCE_SCAN_DIR not found: $GATE_SDK_ENFORCE_SCAN_DIR" >&2; bad=1; }
|
|
33
|
+
if [[ -n "$set_settings" ]]; then
|
|
34
|
+
if [[ ! -f "$CONTEXT_KIT_SETTINGS_FILE" ]]; then
|
|
35
|
+
echo "enforcement-map: CONTEXT_KIT_SETTINGS_FILE not found: $CONTEXT_KIT_SETTINGS_FILE" >&2; bad=1
|
|
36
|
+
elif command -v jq >/dev/null 2>&1 && ! jq -e . "$CONTEXT_KIT_SETTINGS_FILE" >/dev/null 2>&1; then
|
|
37
|
+
echo "enforcement-map: CONTEXT_KIT_SETTINGS_FILE unparseable: $CONTEXT_KIT_SETTINGS_FILE" >&2; bad=1
|
|
38
|
+
fi
|
|
39
|
+
fi
|
|
40
|
+
return "$bad"
|
|
41
|
+
}
|
|
42
|
+
# spec: canon-kit/SPEC.md §check-md-refs — the reference-link ref knob (owned by canon-kit); the page's owner-section citations pin to the same ref check-md-refs' self-repo pass validates, so a link the emitter writes is a link the blocker resolves
|
|
43
|
+
: "${CANON_KIT_DOCS_BLOB_REF:=master}"
|
|
44
|
+
SELF_REPO_PREFIX="$(gate_self_repo_prefix "$CANON_KIT_DOCS_BLOB_REF")"
|
|
45
|
+
|
|
46
|
+
emit=0
|
|
47
|
+
[[ "${1:-}" == "--emit" ]] && emit=1
|
|
48
|
+
|
|
49
|
+
# spec: gate-sdk/SPEC.md §enforcement-map — attribute a path to its owning kit label by the first kit segment (paths arrive absolute from gate_kit_roots or relative from a hook command); a surface under no kit groups as (consumer)
|
|
50
|
+
attribute_kit() {
|
|
51
|
+
local seg
|
|
52
|
+
local IFS=/
|
|
53
|
+
local -a segs
|
|
54
|
+
read -ra segs <<< "${1#./}"
|
|
55
|
+
for seg in "${segs[@]}"; do
|
|
56
|
+
case "$seg" in
|
|
57
|
+
gate-sdk|*-kit) printf '%s\n' "$seg"; return 0 ;;
|
|
58
|
+
esac
|
|
59
|
+
done
|
|
60
|
+
printf '%s\n' "(consumer)"
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
# spec: gate-sdk/SPEC.md §enforcement-map — the first slash-bearing token of a hook/suite command is the enforcing script, whose dir attributes the row
|
|
64
|
+
command_path() {
|
|
65
|
+
local tok
|
|
66
|
+
for tok in $1; do
|
|
67
|
+
[[ "$tok" == */* ]] && { printf '%s\n' "$tok"; return 0; }
|
|
68
|
+
done
|
|
69
|
+
printf '%s\n' "$1"
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
# spec: gate-sdk/SPEC.md §enforcement-map — the kit column links each kit's docs page (`<kit>/index.md`, relative to the emitted page under the docs root); the (consumer) group owns no kit page and stays plain text
|
|
73
|
+
kit_cell() {
|
|
74
|
+
case "$1" in
|
|
75
|
+
'(consumer)') printf '%s' "$1" ;;
|
|
76
|
+
*) printf '[%s](%s/index.md)' "$1" "$1" ;;
|
|
77
|
+
esac
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
# spec: gate-sdk/SPEC.md §enforcement-map — cite a class's owner section through the reference-link grammar (canon-kit/SPEC.md §The reference-link grammar): a self-repo blob link when the identity is known and the SPEC is git-tracked, degrading to the bare `<path> §<title>` when a consumer has not vendored that kit or a clone has no origin
|
|
81
|
+
owner_ref() { # $1=path $2=anchor $3=section-title
|
|
82
|
+
if [[ -n "$SELF_REPO_PREFIX" ]] && git ls-files --error-unmatch -- "$1" >/dev/null 2>&1; then
|
|
83
|
+
printf '[`%s` §%s](%s%s#%s)' "$1" "$3" "$SELF_REPO_PREFIX" "$1" "$2"
|
|
84
|
+
else
|
|
85
|
+
printf '`%s` §%s' "$1" "$3"
|
|
86
|
+
fi
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
mapfile -t CHECK_DIRS < <(gate_check_dirs)
|
|
90
|
+
mapfile -t KIT_ROOTS < <(gate_kit_roots)
|
|
91
|
+
|
|
92
|
+
# spec: gate-sdk/SPEC.md §enforcement-map — Blocking gates: gates.list membership, tier read from each gate's `# graph:` line, kit from the resolution dir; grouped by tier (precommit, commit-msg, align-only), gates.list order within a tier
|
|
93
|
+
gate_rows() {
|
|
94
|
+
[[ -f "$LIST" ]] || return 0
|
|
95
|
+
local -a pre=() msg=() align=()
|
|
96
|
+
local c src tier kit row
|
|
97
|
+
while IFS= read -r c; do
|
|
98
|
+
src="$(gate_resolve "$c" "${CHECK_DIRS[@]}" 2>/dev/null || true)"
|
|
99
|
+
[[ -n "$src" ]] || continue
|
|
100
|
+
tier="$(sed -n 's/^# graph:.*[[:space:]]tier=\([a-z-]*\).*/\1/p' "$src" | head -1)"
|
|
101
|
+
[[ -n "$tier" ]] || tier="?"
|
|
102
|
+
kit="$(attribute_kit "$src")"
|
|
103
|
+
row="| $(kit_cell "$kit") | $c | $tier |"
|
|
104
|
+
case "$tier" in
|
|
105
|
+
precommit) pre+=("$row") ;;
|
|
106
|
+
commit-msg) msg+=("$row") ;;
|
|
107
|
+
*) align+=("$row") ;;
|
|
108
|
+
esac
|
|
109
|
+
done < <(gates_list_members "$LIST")
|
|
110
|
+
[[ ${#pre[@]} -eq 0 && ${#msg[@]} -eq 0 && ${#align[@]} -eq 0 ]] && return 0
|
|
111
|
+
printf '## Blocking gates\n\n'
|
|
112
|
+
printf '| kit | gate | tier |\n| --- | --- | --- |\n'
|
|
113
|
+
printf '%s\n' "${pre[@]+"${pre[@]}"}" "${msg[@]+"${msg[@]}"}" "${align[@]+"${align[@]}"}"
|
|
114
|
+
printf '\n'
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
# spec: gate-sdk/SPEC.md §enforcement-map — Advisory KPIs: the drift-kit KPI registry, kit from where each plugin resolves (scripts/ then each kit's kpis/)
|
|
118
|
+
kpi_rows() {
|
|
119
|
+
[[ -f "$DRIFT_KIT_KPIS_FILE" ]] || return 0
|
|
120
|
+
local -a rows=()
|
|
121
|
+
local name src d
|
|
122
|
+
while IFS= read -r name; do
|
|
123
|
+
src=""
|
|
124
|
+
[[ -f "$GATES_DIR/$name.sh" ]] && src="$GATES_DIR/$name.sh"
|
|
125
|
+
if [[ -z "$src" ]]; then
|
|
126
|
+
for d in "${KIT_ROOTS[@]}"; do
|
|
127
|
+
[[ -f "$d/kpis/$name.sh" ]] && { src="$d/kpis/$name.sh"; break; }
|
|
128
|
+
done
|
|
129
|
+
fi
|
|
130
|
+
[[ -n "$src" ]] || src="$GATES_DIR/$name.sh"
|
|
131
|
+
rows+=("| $(kit_cell "$(attribute_kit "$src")") | $name |")
|
|
132
|
+
done < <(gates_list_members "$DRIFT_KIT_KPIS_FILE")
|
|
133
|
+
[[ ${#rows[@]} -eq 0 ]] && return 0
|
|
134
|
+
printf '## Advisory KPIs\n\n'
|
|
135
|
+
printf '| kit | KPI |\n| --- | --- |\n'
|
|
136
|
+
printf '%s\n' "${rows[@]}"
|
|
137
|
+
printf '\n'
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
# spec: gate-sdk/SPEC.md §enforcement-map — Guards and Session warnings: PreToolUse / SessionStart command hooks in the tracked harness settings file, kit from the enforcing script's dir
|
|
141
|
+
hook_rows() {
|
|
142
|
+
local kind="$1" jqpath="$2"
|
|
143
|
+
command -v jq >/dev/null 2>&1 || return 0
|
|
144
|
+
[[ -f "$CONTEXT_KIT_SETTINGS_FILE" ]] || return 0
|
|
145
|
+
jq -e . "$CONTEXT_KIT_SETTINGS_FILE" >/dev/null 2>&1 || return 0
|
|
146
|
+
local -a rows=()
|
|
147
|
+
local line cmd matcher path
|
|
148
|
+
while IFS=$'\t' read -r cmd matcher; do
|
|
149
|
+
[[ -n "$cmd" ]] || continue
|
|
150
|
+
path="$(command_path "$cmd")"
|
|
151
|
+
if [[ "$kind" == guard ]]; then
|
|
152
|
+
rows+=("| $(kit_cell "$(attribute_kit "$path")") | $path | $matcher |")
|
|
153
|
+
else
|
|
154
|
+
rows+=("| $(kit_cell "$(attribute_kit "$path")") | $path |")
|
|
155
|
+
fi
|
|
156
|
+
done < <(jq -r "$jqpath" "$CONTEXT_KIT_SETTINGS_FILE" 2>/dev/null)
|
|
157
|
+
[[ ${#rows[@]} -eq 0 ]] && return 0
|
|
158
|
+
if [[ "$kind" == guard ]]; then
|
|
159
|
+
printf '## Guards\n\n'
|
|
160
|
+
printf '| kit | surface | intercepts |\n| --- | --- | --- |\n'
|
|
161
|
+
else
|
|
162
|
+
printf '## Session warnings\n\n'
|
|
163
|
+
printf '| kit | surface |\n| --- | --- |\n'
|
|
164
|
+
fi
|
|
165
|
+
printf '%s\n' "${rows[@]}"
|
|
166
|
+
printf '\n'
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
# spec: gate-sdk/SPEC.md §enforcement-map — Validate suites: evidence-kit's suite registry (the config's suite list + per-suite run command), kit from the run command's script
|
|
170
|
+
suite_rows() {
|
|
171
|
+
[[ -f "$EVIDENCE_KIT_CONFIG_FILE" ]] || return 0
|
|
172
|
+
local -a suites=()
|
|
173
|
+
local cmd var
|
|
174
|
+
# shellcheck disable=SC1090 # consumer-supplied evidence config, path is config
|
|
175
|
+
source "$EVIDENCE_KIT_CONFIG_FILE"
|
|
176
|
+
declare -p EVIDENCE_KIT_SUITES &>/dev/null || return 0
|
|
177
|
+
suites=("${EVIDENCE_KIT_SUITES[@]}")
|
|
178
|
+
[[ ${#suites[@]} -eq 0 ]] && return 0
|
|
179
|
+
printf '## Validate suites\n\n'
|
|
180
|
+
printf '| kit | suite |\n| --- | --- |\n'
|
|
181
|
+
local s
|
|
182
|
+
for s in "${suites[@]}"; do
|
|
183
|
+
var="EVIDENCE_KIT_RUN_$s"
|
|
184
|
+
cmd="${!var-}"
|
|
185
|
+
printf '| %s | %s |\n' "$(kit_cell "$(attribute_kit "$(command_path "$cmd")")")" "$s"
|
|
186
|
+
done
|
|
187
|
+
printf '\n'
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
# spec: gate-sdk/SPEC.md §enforcement-map — Monitors: the one class with no parseable registry, so a non-gate surface declares itself with a line-start `# enforce: class=monitor <free-text>` marker the emitter greps; a marker is dormant in a template/fixture (an inert copy-source) and activates only where a consumer copies the file into a live path, so the walk prunes templates/ (grep -v, the sibling-finder idiom) atop the gate-tests exclusion GATE_GREP_EXCLUDES already carries; sorted for a stable projection
|
|
191
|
+
monitor_rows() {
|
|
192
|
+
local -a rows=()
|
|
193
|
+
local line file rest surface
|
|
194
|
+
while IFS= read -r line; do
|
|
195
|
+
[[ -n "$line" ]] || continue
|
|
196
|
+
file="${line%%:*}"; rest="${line#*:}"; rest="${rest#*:}"
|
|
197
|
+
surface="$(printf '%s' "$rest" | sed -E 's/^[[:space:]]*#[[:space:]]*enforce:[[:space:]]+class=monitor[[:space:]]+//; s/[[:space:]]+$//')"
|
|
198
|
+
rows+=("| $(kit_cell "$(attribute_kit "$file")") | $surface |")
|
|
199
|
+
done < <(grep -rHnI "${GATE_GREP_EXCLUDES[@]}" -E '^[[:space:]]*#[[:space:]]*enforce:[[:space:]]+class=monitor[[:space:]]' "$GATE_SDK_ENFORCE_SCAN_DIR" 2>/dev/null | grep -v '/templates/' | sort)
|
|
200
|
+
[[ ${#rows[@]} -eq 0 ]] && return 0
|
|
201
|
+
printf '## Monitors\n\n'
|
|
202
|
+
printf '| kit | surface |\n| --- | --- |\n'
|
|
203
|
+
printf '%s\n' "${rows[@]}"
|
|
204
|
+
printf '\n'
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
# spec: gate-sdk/SPEC.md §enforcement-map — the enforcement-class taxonomy, ordered hardest to softest; this page owns the prose and each class cites its mechanism owner through the reference-link grammar
|
|
208
|
+
class_roster() {
|
|
209
|
+
local gate kpi guard warn suite monitor
|
|
210
|
+
gate="$(owner_ref gate-sdk/SPEC.md enforcement-tiers 'Enforcement tiers')"
|
|
211
|
+
kpi="$(owner_ref drift-kit/SPEC.md the-kpi-plugin-contract 'The KPI plugin contract')"
|
|
212
|
+
guard="$(owner_ref guard-kit/SPEC.md the-guard-framework-libguardsh 'The guard framework')"
|
|
213
|
+
warn="$(owner_ref context-kit/SPEC.md the-session-context-hook-template 'The session-context hook')"
|
|
214
|
+
suite="$(owner_ref evidence-kit/SPEC.md baseline-manifest 'Baseline manifest')"
|
|
215
|
+
monitor="$(owner_ref site-kit/SPEC.md the-monitor-boundary 'The monitor boundary')"
|
|
216
|
+
cat <<CLASSES
|
|
217
|
+
- A **blocking gate** fails the commit (or, at the \`align-only\` tier, the
|
|
218
|
+
consistency audit) — the pre-commit hook is its local reach, the CI workflow
|
|
219
|
+
its server-side backstop. Owner: $gate.
|
|
220
|
+
- An **advisory KPI** never blocks; it reports a drift trend into the
|
|
221
|
+
session-context line. Owner: $kpi.
|
|
222
|
+
- A **guard** intercepts a tool call before it runs. Owner: $guard.
|
|
223
|
+
- A **session warning** surfaces context when a session opens. Owner: $warn.
|
|
224
|
+
- A **validate suite** holds a test baseline that a per-run evidence manifest
|
|
225
|
+
attests. Owner: $suite.
|
|
226
|
+
- A **monitor** watches deployment truth rather than tree truth, so it reds a
|
|
227
|
+
scheduled run, never a merge. Owner: $monitor.
|
|
228
|
+
CLASSES
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
emit_page() {
|
|
232
|
+
cat <<'PREAMBLE'
|
|
233
|
+
---
|
|
234
|
+
title: Enforcement map
|
|
235
|
+
nav_parent: value
|
|
236
|
+
nav_child_order: 1
|
|
237
|
+
---
|
|
238
|
+
# Enforcement map
|
|
239
|
+
|
|
240
|
+
_Generated by `bash gate-sdk/bin/enforcement-map.sh --emit`; do not hand-edit —
|
|
241
|
+
`check-enforcement-fresh` byte-compares this page against the emitter._
|
|
242
|
+
|
|
243
|
+
Every governed surface in this repo is held by one enforcement class, ordered
|
|
244
|
+
here from hardest to softest:
|
|
245
|
+
|
|
246
|
+
PREAMBLE
|
|
247
|
+
class_roster
|
|
248
|
+
cat <<'PREAMBLE'
|
|
249
|
+
|
|
250
|
+
The rows below derive from the class registries — the gate registry, the KPI
|
|
251
|
+
registry, the harness settings hooks, the evidence-suite config, and the
|
|
252
|
+
`# enforce:` markers a non-gate surface declares itself with — so this map
|
|
253
|
+
cannot drift from what actually runs. A registry a consumer has not adopted
|
|
254
|
+
leaves its section absent.
|
|
255
|
+
|
|
256
|
+
PREAMBLE
|
|
257
|
+
gate_rows
|
|
258
|
+
kpi_rows
|
|
259
|
+
hook_rows guard '.hooks.PreToolUse // [] | .[] | (.matcher // "*") as $m | (.hooks // [])[] | select(.type == "command") | "\(.command)\t\($m)"'
|
|
260
|
+
hook_rows warning '.hooks.SessionStart // [] | .[] | (.hooks // [])[] | select(.type == "command") | "\(.command)\t"'
|
|
261
|
+
suite_rows
|
|
262
|
+
monitor_rows
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
preflight_knobs || exit 2
|
|
266
|
+
|
|
267
|
+
if [[ "$emit" -eq 0 ]]; then
|
|
268
|
+
echo "=== Enforcement map (advisory — regenerate the committed page with --emit) ==="
|
|
269
|
+
echo
|
|
270
|
+
fi
|
|
271
|
+
emit_page
|
|
272
|
+
exit 0
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# spec: gate-sdk/SPEC.md §gen-pre-commit — emit <hooks-dir>/pre-commit from the per-gate graph: manifests; check-graph asserts the committed hook equals --emit
|
|
3
|
+
set -euo pipefail
|
|
4
|
+
|
|
5
|
+
SDK="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
6
|
+
# shellcheck source=../lib/gate.sh
|
|
7
|
+
source "$SDK/lib/gate.sh"
|
|
8
|
+
|
|
9
|
+
REPO_ROOT="$(git rev-parse --show-toplevel)" || {
|
|
10
|
+
echo "gen-pre-commit: not inside a git repository" >&2
|
|
11
|
+
exit 2
|
|
12
|
+
}
|
|
13
|
+
cd "$REPO_ROOT" || exit 2
|
|
14
|
+
|
|
15
|
+
GATES_DIR="$(gate_sdk_gates_dir)"
|
|
16
|
+
LIST="$GATES_DIR/gates.list"
|
|
17
|
+
HOOKS_DIR="${GATE_SDK_HOOKS_DIR:-$GATES_DIR/git-hooks}"
|
|
18
|
+
HOOK="$HOOKS_DIR/pre-commit"
|
|
19
|
+
MSG_HOOK="$HOOKS_DIR/commit-msg"
|
|
20
|
+
[[ -f "$LIST" ]] || { echo "gen-pre-commit: no registry at $LIST" >&2; exit 2; }
|
|
21
|
+
|
|
22
|
+
mapfile -t CHECKS < <(gates_list_members "$LIST")
|
|
23
|
+
|
|
24
|
+
REL_DIRS=("$GATES_DIR")
|
|
25
|
+
while IFS= read -r k; do
|
|
26
|
+
REL_DIRS+=("$(realpath --relative-to="$REPO_ROOT" "$k")/checks")
|
|
27
|
+
done < <(gate_kit_roots)
|
|
28
|
+
|
|
29
|
+
resolve_rel() {
|
|
30
|
+
gate_resolve "$1" "${REL_DIRS[@]}"
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
declare -A MANUAL=()
|
|
34
|
+
read_manual() {
|
|
35
|
+
local line name="" buf=""
|
|
36
|
+
[[ -f "$HOOK" ]] || return 0
|
|
37
|
+
while IFS= read -r line; do
|
|
38
|
+
if [[ "$line" =~ ^[[:space:]]*#\ \>\>\>\ manual:\ ([a-z0-9-]+) ]]; then
|
|
39
|
+
name="${BASH_REMATCH[1]}"; buf=""; continue
|
|
40
|
+
fi
|
|
41
|
+
if [[ -n "$name" && "$line" =~ ^[[:space:]]*#\ \<\<\<\ manual:\ ([a-z0-9-]+) ]]; then
|
|
42
|
+
MANUAL["$name"]="$buf"; name=""; continue
|
|
43
|
+
fi
|
|
44
|
+
[[ -n "$name" ]] && buf+="$line"$'\n'
|
|
45
|
+
done < "$HOOK"
|
|
46
|
+
return 0
|
|
47
|
+
}
|
|
48
|
+
read_manual
|
|
49
|
+
|
|
50
|
+
manifest_field() {
|
|
51
|
+
local gate="$1" key="$2" src
|
|
52
|
+
src="$(resolve_rel "$gate")" || return 0
|
|
53
|
+
gate_manifest_field "$src" "$key"
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
# spec: gate-sdk/SPEC.md §run-gates — the hook's staged_matches is this lib body emitted verbatim; check-graph freshness holds them in sync
|
|
57
|
+
emit_staged_matcher_body() {
|
|
58
|
+
local body
|
|
59
|
+
body="$(awk '
|
|
60
|
+
$0 == "gate_staged_matches() {" { grab = 1; next }
|
|
61
|
+
grab && $0 == "}" { exit }
|
|
62
|
+
grab { print }
|
|
63
|
+
' "$SDK/lib/gate.sh")"
|
|
64
|
+
[[ -n "$body" ]] || { echo "gen-pre-commit: could not extract gate_staged_matches body from lib/gate.sh" >&2; exit 2; }
|
|
65
|
+
printf '%s\n' "$body"
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
emit_block() {
|
|
69
|
+
local gate="$1" couples trigger mode gen relpath
|
|
70
|
+
couples="$(manifest_field "$gate" couples)"
|
|
71
|
+
trigger="$(manifest_field "$gate" trigger)"; trigger="${trigger:-$couples}"
|
|
72
|
+
trigger="$(gate_expand_couples "$trigger")"
|
|
73
|
+
mode="$(manifest_field "$gate" mode)"
|
|
74
|
+
gen="$(manifest_field "$gate" gen)"
|
|
75
|
+
relpath="$(resolve_rel "$gate")" || relpath="$GATES_DIR/$gate.sh"
|
|
76
|
+
|
|
77
|
+
printf '\n'
|
|
78
|
+
if [[ "$gen" == manual ]]; then
|
|
79
|
+
printf '# >>> manual: %s\n' "$gate"
|
|
80
|
+
if [[ -n "${MANUAL[$gate]+x}" ]]; then
|
|
81
|
+
printf '%s' "${MANUAL[$gate]}"
|
|
82
|
+
else
|
|
83
|
+
printf '%s\n' " # TODO: fill this manual region, then re-run --emit"
|
|
84
|
+
fi
|
|
85
|
+
printf '# <<< manual: %s\n' "$gate"
|
|
86
|
+
return 0
|
|
87
|
+
fi
|
|
88
|
+
|
|
89
|
+
local -a globs; IFS=',' read -ra globs <<<"$trigger"
|
|
90
|
+
local quoted=""; local g
|
|
91
|
+
for g in "${globs[@]}"; do quoted+=" '$g'"; done
|
|
92
|
+
quoted="${quoted# }"
|
|
93
|
+
|
|
94
|
+
if [[ "$trigger" == '*' ]]; then
|
|
95
|
+
printf '%s\n' "run_gate $gate $relpath"
|
|
96
|
+
elif [[ "$mode" == staged ]]; then
|
|
97
|
+
printf 'mapfile -t _staged < <(git diff --cached --name-only --diff-filter=ACMR -- %s)\n' "$quoted"
|
|
98
|
+
printf '%s\n' "_targets=()"
|
|
99
|
+
printf '%s\n' 'for _f in "${_staged[@]}"; do [[ -f "$_f" ]] && _targets+=("$_f"); done'
|
|
100
|
+
printf '%s\n' 'if [[ ${#_targets[@]} -gt 0 ]]; then'
|
|
101
|
+
printf ' run_gate %s %s "${_targets[@]}"\n' "$gate" "$relpath"
|
|
102
|
+
printf '%s\n' 'fi'
|
|
103
|
+
else
|
|
104
|
+
printf 'if staged_matches %s; then\n' "$quoted"
|
|
105
|
+
printf ' run_gate %s %s\n' "$gate" "$relpath"
|
|
106
|
+
printf '%s\n' 'fi'
|
|
107
|
+
fi
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
emit() {
|
|
111
|
+
cat <<'HEAD'
|
|
112
|
+
#!/usr/bin/env bash
|
|
113
|
+
# pre-commit - GENERATED, DO NOT EDIT (except gen=manual regions between sentinels).
|
|
114
|
+
#
|
|
115
|
+
# Emitted from the per-gate `# graph:` manifests by:
|
|
116
|
+
# bash gate-sdk/bin/gen-pre-commit.sh --write
|
|
117
|
+
# Edit a gate's manifest (couples=/trigger=/mode=/gen=), or a gen=manual region
|
|
118
|
+
# below, then regenerate. check-graph asserts this file equals --emit. Each gate
|
|
119
|
+
# prints its own per-finding + `help:` lines before this hook reports the failure.
|
|
120
|
+
#
|
|
121
|
+
# Install (opt-in, per clone): bash gate-sdk/bin/install-hooks.sh
|
|
122
|
+
# Bypass once (use sparingly): git commit --no-verify
|
|
123
|
+
#
|
|
124
|
+
# This is the *triggered subset* of the gates.list battery: every check here
|
|
125
|
+
# also runs whole-tree via gate-sdk/bin/run-gates.sh.
|
|
126
|
+
set -euo pipefail
|
|
127
|
+
|
|
128
|
+
mapfile -t staged_all < <(git diff --cached --name-only --diff-filter=ACMR)
|
|
129
|
+
[[ ${#staged_all[@]} -eq 0 ]] && exit 0
|
|
130
|
+
|
|
131
|
+
# True if any staged path matches one of the given globs (bash glob: `*` spans '/').
|
|
132
|
+
staged_matches() {
|
|
133
|
+
HEAD
|
|
134
|
+
emit_staged_matcher_body
|
|
135
|
+
cat <<'HEAD'
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
# Uniform failure: the captured output was already reprinted above.
|
|
139
|
+
hook_fail() {
|
|
140
|
+
echo ""
|
|
141
|
+
echo "pre-commit: $1 failed (see above)."
|
|
142
|
+
echo " Bypass once (use sparingly): git commit --no-verify"
|
|
143
|
+
exit 1
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
GATE_SDK_VERBOSE="${GATE_SDK_VERBOSE:-}"
|
|
147
|
+
_ran=0
|
|
148
|
+
# Capture a gate's output; reprint it only on failure, or with GATE_SDK_VERBOSE.
|
|
149
|
+
run_gate() {
|
|
150
|
+
local name="$1"; shift
|
|
151
|
+
local out ok=1
|
|
152
|
+
out="$("$@" 2>&1)" || ok=0
|
|
153
|
+
_ran=$((_ran + 1))
|
|
154
|
+
if (( ! ok )); then
|
|
155
|
+
[[ -n "$out" ]] && printf '%s\n' "$out"
|
|
156
|
+
hook_fail "$name"
|
|
157
|
+
fi
|
|
158
|
+
if [[ -n "$GATE_SDK_VERBOSE" ]]; then
|
|
159
|
+
[[ -n "$out" ]] && printf '%s\n' "$out"
|
|
160
|
+
printf ' PASS: %s\n' "$name"
|
|
161
|
+
fi
|
|
162
|
+
}
|
|
163
|
+
HEAD
|
|
164
|
+
|
|
165
|
+
local c tier
|
|
166
|
+
local -A seen=()
|
|
167
|
+
for c in "${CHECKS[@]}"; do
|
|
168
|
+
[[ -n "${seen[$c]+x}" ]] && continue
|
|
169
|
+
seen[$c]=1
|
|
170
|
+
tier="$(manifest_field "$c" tier)"
|
|
171
|
+
[[ "$tier" == precommit ]] || continue
|
|
172
|
+
emit_block "$c"
|
|
173
|
+
done
|
|
174
|
+
|
|
175
|
+
cat <<'TAIL'
|
|
176
|
+
|
|
177
|
+
printf 'pre-commit: %d gate(s) passed.\n' "$_ran"
|
|
178
|
+
exit 0
|
|
179
|
+
TAIL
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
# spec: gate-sdk/SPEC.md §gen-pre-commit — the commit-msg surface: every tier=commit-msg gate becomes one unconditional invocation passing the hook's $1 (message path)
|
|
183
|
+
commit_msg_gates() {
|
|
184
|
+
local c tier
|
|
185
|
+
local -A seen=()
|
|
186
|
+
for c in "${CHECKS[@]}"; do
|
|
187
|
+
[[ -n "${seen[$c]+x}" ]] && continue
|
|
188
|
+
seen[$c]=1
|
|
189
|
+
tier="$(manifest_field "$c" tier)"
|
|
190
|
+
[[ "$tier" == commit-msg ]] && printf '%s\n' "$c"
|
|
191
|
+
done
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
emit_commit_msg() {
|
|
195
|
+
cat <<'HEAD'
|
|
196
|
+
#!/usr/bin/env bash
|
|
197
|
+
# commit-msg - GENERATED, DO NOT EDIT.
|
|
198
|
+
#
|
|
199
|
+
# Emitted from the tier=commit-msg `# graph:` manifests by:
|
|
200
|
+
# bash gate-sdk/bin/gen-pre-commit.sh --write
|
|
201
|
+
# Edit a gate's manifest, then regenerate. check-graph asserts this file equals
|
|
202
|
+
# --emit-commit-msg. git feeds the prospective message file as $1; each gate
|
|
203
|
+
# prints its own per-finding + `help:` lines before this hook reports failure.
|
|
204
|
+
#
|
|
205
|
+
# Install (opt-in, per clone): bash gate-sdk/bin/install-hooks.sh
|
|
206
|
+
# Bypass once (use sparingly): git commit --no-verify
|
|
207
|
+
set -euo pipefail
|
|
208
|
+
|
|
209
|
+
msg_file="${1:?commit-msg: git did not pass the message-file path}"
|
|
210
|
+
|
|
211
|
+
# Uniform failure: the captured output was already reprinted above.
|
|
212
|
+
hook_fail() {
|
|
213
|
+
echo ""
|
|
214
|
+
echo "commit-msg: $1 failed (see above)."
|
|
215
|
+
echo " Bypass once (use sparingly): git commit --no-verify"
|
|
216
|
+
exit 1
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
GATE_SDK_VERBOSE="${GATE_SDK_VERBOSE:-}"
|
|
220
|
+
_ran=0
|
|
221
|
+
# Capture a gate's output; reprint it only on failure, or with GATE_SDK_VERBOSE.
|
|
222
|
+
run_gate() {
|
|
223
|
+
local name="$1"; shift
|
|
224
|
+
local out ok=1
|
|
225
|
+
out="$("$@" 2>&1)" || ok=0
|
|
226
|
+
_ran=$((_ran + 1))
|
|
227
|
+
if (( ! ok )); then
|
|
228
|
+
[[ -n "$out" ]] && printf '%s\n' "$out"
|
|
229
|
+
hook_fail "$name"
|
|
230
|
+
fi
|
|
231
|
+
if [[ -n "$GATE_SDK_VERBOSE" ]]; then
|
|
232
|
+
[[ -n "$out" ]] && printf '%s\n' "$out"
|
|
233
|
+
printf ' PASS: %s\n' "$name"
|
|
234
|
+
fi
|
|
235
|
+
}
|
|
236
|
+
HEAD
|
|
237
|
+
|
|
238
|
+
local c relpath
|
|
239
|
+
while IFS= read -r c; do
|
|
240
|
+
[[ -n "$c" ]] || continue
|
|
241
|
+
relpath="$(resolve_rel "$c")" || relpath="$GATES_DIR/$c.sh"
|
|
242
|
+
printf '\nrun_gate %s %s "$msg_file"\n' "$c" "$relpath"
|
|
243
|
+
done < <(commit_msg_gates)
|
|
244
|
+
|
|
245
|
+
cat <<'TAIL'
|
|
246
|
+
|
|
247
|
+
printf 'commit-msg: %d gate(s) passed.\n' "$_ran"
|
|
248
|
+
exit 0
|
|
249
|
+
TAIL
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
case "${1:-}" in
|
|
253
|
+
--emit) emit ;;
|
|
254
|
+
--emit-commit-msg) emit_commit_msg ;;
|
|
255
|
+
--write)
|
|
256
|
+
mkdir -p "$HOOKS_DIR"
|
|
257
|
+
emit > "$HOOK"
|
|
258
|
+
chmod +x "$HOOK"
|
|
259
|
+
echo "gen-pre-commit: wrote $HOOK"
|
|
260
|
+
if [[ -n "$(commit_msg_gates)" ]]; then
|
|
261
|
+
emit_commit_msg > "$MSG_HOOK"
|
|
262
|
+
chmod +x "$MSG_HOOK"
|
|
263
|
+
echo "gen-pre-commit: wrote $MSG_HOOK"
|
|
264
|
+
fi
|
|
265
|
+
;;
|
|
266
|
+
*) echo "usage: gen-pre-commit.sh --emit|--emit-commit-msg|--write" >&2; exit 2 ;;
|
|
267
|
+
esac
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# spec: gate-sdk/SPEC.md §install-hooks — wire core.hooksPath for this clone (opt-in, per clone)
|
|
3
|
+
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
|
|
6
|
+
SDK="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
7
|
+
# shellcheck source=../lib/gate.sh
|
|
8
|
+
source "$SDK/lib/gate.sh"
|
|
9
|
+
|
|
10
|
+
REPO_ROOT="$(git rev-parse --show-toplevel)"
|
|
11
|
+
cd "$REPO_ROOT"
|
|
12
|
+
|
|
13
|
+
GATES_DIR="$(gate_sdk_gates_dir)"
|
|
14
|
+
HOOKS_DIR="${GATE_SDK_HOOKS_DIR:-$GATES_DIR/git-hooks}"
|
|
15
|
+
|
|
16
|
+
[[ -d "$HOOKS_DIR" ]] || {
|
|
17
|
+
echo "install-hooks: no hooks dir at $HOOKS_DIR — generate the pre-commit hook first:" >&2
|
|
18
|
+
echo " bash gate-sdk/bin/gen-pre-commit.sh --write" >&2
|
|
19
|
+
exit 2
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
chmod +x "$HOOKS_DIR"/* 2>/dev/null || true
|
|
23
|
+
|
|
24
|
+
git config core.hooksPath "$HOOKS_DIR"
|
|
25
|
+
echo "Installed: core.hooksPath = $HOOKS_DIR"
|
|
26
|
+
|
|
27
|
+
if [[ -f .git-blame-ignore-revs ]]; then
|
|
28
|
+
git config blame.ignoreRevsFile ".git-blame-ignore-revs"
|
|
29
|
+
echo "Installed: blame.ignoreRevsFile = .git-blame-ignore-revs"
|
|
30
|
+
fi
|
|
31
|
+
|
|
32
|
+
# spec: gate-sdk/SPEC.md §install-hooks — apply-and-verify rung: run check-identity
|
|
33
|
+
# once at opt-in so a fresh clone learns of a wrong-identity/wrong-remote mapping
|
|
34
|
+
# before its first commit; the gate's exit status surfaces through this script's.
|
|
35
|
+
identity_rc=0
|
|
36
|
+
mapfile -t _check_dirs < <(gate_check_dirs)
|
|
37
|
+
if identity_gate="$(gate_resolve check-identity "${_check_dirs[@]}")"; then
|
|
38
|
+
echo ""
|
|
39
|
+
echo "Verifying git identity (check-identity)…"
|
|
40
|
+
bash "$identity_gate" || identity_rc=$?
|
|
41
|
+
fi
|
|
42
|
+
|
|
43
|
+
echo "Active hooks:"
|
|
44
|
+
ls -1 "$HOOKS_DIR" | sed 's/^/ /'
|
|
45
|
+
echo ""
|
|
46
|
+
echo "Disable with: git config --unset core.hooksPath"
|
|
47
|
+
|
|
48
|
+
exit "$identity_rc"
|