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,86 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# spec: context-kit/SPEC.md §The always-loaded meter — standing per-session surface vs committed baseline
|
|
3
|
+
# usage: always-loaded.sh [--update-baseline] (bare: total/per-part/delta; --update-baseline: rewrite it)
|
|
4
|
+
set -uo pipefail
|
|
5
|
+
|
|
6
|
+
KIT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
7
|
+
REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
|
|
8
|
+
cd "$REPO_ROOT" 2>/dev/null || { echo "always-loaded: cannot enter repo root" >&2; exit 2; }
|
|
9
|
+
|
|
10
|
+
UPDATE=0
|
|
11
|
+
[[ "${1:-}" == "--update-baseline" ]] && UPDATE=1
|
|
12
|
+
|
|
13
|
+
_ck_cfg="${CONTEXT_KIT_CONFIG_FILE:-}"
|
|
14
|
+
if [[ -n "$_ck_cfg" ]]; then
|
|
15
|
+
[[ -f "$_ck_cfg" ]] || {
|
|
16
|
+
echo "context-kit: CONTEXT_KIT_CONFIG_FILE not found: $_ck_cfg" >&2
|
|
17
|
+
exit 2
|
|
18
|
+
}
|
|
19
|
+
# shellcheck source=/dev/null # consumer config path is resolved at runtime
|
|
20
|
+
source "$_ck_cfg"
|
|
21
|
+
else
|
|
22
|
+
_ck_cfg="${GATE_SDK_GATES_DIR:-scripts}/context-config.sh"
|
|
23
|
+
if [[ -f "$_ck_cfg" ]]; then
|
|
24
|
+
# shellcheck source=/dev/null # consumer config path is resolved at runtime
|
|
25
|
+
source "$_ck_cfg"
|
|
26
|
+
fi
|
|
27
|
+
fi
|
|
28
|
+
unset _ck_cfg
|
|
29
|
+
|
|
30
|
+
declare -p CONTEXT_KIT_SURFACES >/dev/null 2>&1 || CONTEXT_KIT_SURFACES=("CLAUDE.md")
|
|
31
|
+
: "${CONTEXT_KIT_BASELINE_FILE:=${GATE_SDK_WORKFLOW_DIR:-.workflow}/always-loaded-baseline.txt}"
|
|
32
|
+
|
|
33
|
+
if [[ -z "${CONTEXT_KIT_HOOK_CMD+x}" ]]; then
|
|
34
|
+
CONTEXT_KIT_HOOK_CMD=""
|
|
35
|
+
for _qi in "${GATE_SDK_GATES_DIR:-scripts}/queue-index.sh" "$KIT/../queue-kit/bin/queue-index.sh"; do
|
|
36
|
+
if [[ -f "$_qi" ]]; then
|
|
37
|
+
CONTEXT_KIT_HOOK_CMD="bash $_qi --collapse-deferred"
|
|
38
|
+
break
|
|
39
|
+
fi
|
|
40
|
+
done
|
|
41
|
+
unset _qi
|
|
42
|
+
fi
|
|
43
|
+
|
|
44
|
+
surface=0
|
|
45
|
+
for f in "${CONTEXT_KIT_SURFACES[@]}"; do
|
|
46
|
+
[[ -f "$f" ]] || continue
|
|
47
|
+
n="$(wc -l < "$f" 2>/dev/null | tr -d ' ')"
|
|
48
|
+
[[ "$n" =~ ^[0-9]+$ ]] && surface=$(( surface + n ))
|
|
49
|
+
done
|
|
50
|
+
|
|
51
|
+
hook=0
|
|
52
|
+
if [[ -n "$CONTEXT_KIT_HOOK_CMD" ]]; then
|
|
53
|
+
hook_out="$(bash -c "$CONTEXT_KIT_HOOK_CMD" 2>/dev/null || true)"
|
|
54
|
+
if [[ -n "$hook_out" ]]; then
|
|
55
|
+
hook="$(printf '%s\n' "$hook_out" | wc -l | tr -d ' ')"
|
|
56
|
+
[[ "$hook" =~ ^[0-9]+$ ]] || hook=0
|
|
57
|
+
fi
|
|
58
|
+
fi
|
|
59
|
+
|
|
60
|
+
total=$(( surface + hook ))
|
|
61
|
+
|
|
62
|
+
base_total=""; base_commit=""; base_extra=""
|
|
63
|
+
if [[ -f "$CONTEXT_KIT_BASELINE_FILE" ]]; then
|
|
64
|
+
read -r base_total _ base_commit base_extra < <(
|
|
65
|
+
grep -vE '^[[:space:]]*(#|$)' "$CONTEXT_KIT_BASELINE_FILE" 2>/dev/null | head -1)
|
|
66
|
+
fi
|
|
67
|
+
|
|
68
|
+
if [[ "$UPDATE" -eq 1 ]]; then
|
|
69
|
+
commit="$(git rev-parse HEAD 2>/dev/null || echo unknown)"
|
|
70
|
+
line="$total $surface $commit"
|
|
71
|
+
[[ -n "$base_extra" ]] && line="$line $base_extra"
|
|
72
|
+
{
|
|
73
|
+
echo "# contract: context-kit/SPEC.md §The always-loaded meter"
|
|
74
|
+
echo "$line"
|
|
75
|
+
} > "$CONTEXT_KIT_BASELINE_FILE"
|
|
76
|
+
echo "always-loaded baseline updated: ${total}l (surfaces $surface · hook $hook) @ ${commit:0:8}"
|
|
77
|
+
exit 0
|
|
78
|
+
fi
|
|
79
|
+
|
|
80
|
+
line="always-loaded: ${total}l (surfaces $surface · hook $hook)"
|
|
81
|
+
if [[ "$base_total" =~ ^[0-9]+$ ]]; then
|
|
82
|
+
delta=$(( total - base_total ))
|
|
83
|
+
line="$line $(printf '%+d' "$delta") since ${base_commit:0:8}"
|
|
84
|
+
fi
|
|
85
|
+
echo "$line"
|
|
86
|
+
exit 0
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# spec: context-kit/SPEC.md §bin/env-probe — derives the marker-bounded machine profile into the consumer-local, gitignored profile file; hand-authored gotchas live outside the markers and survive every re-probe
|
|
3
|
+
# usage: env-probe.sh (rewrites the generated block in $CONTEXT_KIT_ENV_PROFILE_FILE, seeding the file with a gotchas scaffold when absent)
|
|
4
|
+
set -uo pipefail
|
|
5
|
+
|
|
6
|
+
KIT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
7
|
+
SDK="${GATE_SDK_ROOT:-$KIT/../gate-sdk}"
|
|
8
|
+
REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
|
|
9
|
+
cd "$REPO_ROOT" 2>/dev/null || { echo "env-probe: cannot enter repo root" >&2; exit 2; }
|
|
10
|
+
# shellcheck source=../../gate-sdk/lib/inject.sh
|
|
11
|
+
source "$SDK/lib/inject.sh"
|
|
12
|
+
|
|
13
|
+
_ck_cfg="${CONTEXT_KIT_CONFIG_FILE:-}"
|
|
14
|
+
if [[ -n "$_ck_cfg" ]]; then
|
|
15
|
+
[[ -f "$_ck_cfg" ]] || {
|
|
16
|
+
echo "context-kit: CONTEXT_KIT_CONFIG_FILE not found: $_ck_cfg" >&2
|
|
17
|
+
exit 2
|
|
18
|
+
}
|
|
19
|
+
# shellcheck source=/dev/null # consumer config path is resolved at runtime
|
|
20
|
+
source "$_ck_cfg"
|
|
21
|
+
else
|
|
22
|
+
_ck_cfg="${GATE_SDK_GATES_DIR:-scripts}/context-config.sh"
|
|
23
|
+
if [[ -f "$_ck_cfg" ]]; then
|
|
24
|
+
# shellcheck source=/dev/null # consumer config path is resolved at runtime
|
|
25
|
+
source "$_ck_cfg"
|
|
26
|
+
fi
|
|
27
|
+
fi
|
|
28
|
+
unset _ck_cfg
|
|
29
|
+
|
|
30
|
+
: "${CONTEXT_KIT_ENV_PROFILE_FILE:=ENV.local.md}"
|
|
31
|
+
BEGIN="<!-- context-kit:env:begin -->"
|
|
32
|
+
END="<!-- context-kit:env:end -->"
|
|
33
|
+
|
|
34
|
+
# shellcheck source=../lib/toolfloor.sh
|
|
35
|
+
source "$KIT/lib/toolfloor.sh"
|
|
36
|
+
|
|
37
|
+
# spec: context-kit/SPEC.md §bin/env-probe — package-manager detection walk; first present wins, ordered widest-family first
|
|
38
|
+
PM_CANDIDATES=(apt-get dnf yum pacman emerge zypper apk brew nix-env)
|
|
39
|
+
|
|
40
|
+
probe_version() {
|
|
41
|
+
local tool="$1" raw="" out=""
|
|
42
|
+
command -v "$tool" >/dev/null 2>&1 || return 1
|
|
43
|
+
# spec: context-kit/SPEC.md §bin/env-probe — both version probes read from /dev/null: `-V` prints a banner for most tools but is an ordinary flag for some (GNU sort's version-sort), so a tool rejecting `--version` would otherwise fall through to a `-V` that reads inherited stdin and hangs the probe
|
|
44
|
+
raw="$("$tool" --version 2>/dev/null </dev/null)"
|
|
45
|
+
[[ -n "$raw" ]] || raw="$("$tool" -V 2>/dev/null </dev/null)"
|
|
46
|
+
# spec: context-kit/SPEC.md §bin/env-probe — prefer the first line bearing an N.N version token (shellcheck buries it past a banner), else the first line, else the resolved path
|
|
47
|
+
out="$(printf '%s\n' "$raw" | grep -m1 -E '[0-9]+\.[0-9]+')"
|
|
48
|
+
[[ -n "$out" ]] || out="$(printf '%s\n' "$raw" | head -1)"
|
|
49
|
+
[[ -n "$out" ]] || out="present ($(command -v "$tool"))"
|
|
50
|
+
printf '%s' "$(printf '%s' "$out" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')"
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
os_line="$(uname -s -r -m 2>/dev/null || echo unknown)"
|
|
54
|
+
distro=""
|
|
55
|
+
if [[ -r /etc/os-release ]]; then
|
|
56
|
+
distro="$(. /etc/os-release 2>/dev/null && printf '%s' "${PRETTY_NAME:-${ID:-}}")"
|
|
57
|
+
fi
|
|
58
|
+
[[ -n "$distro" ]] && os_line="$os_line — $distro"
|
|
59
|
+
|
|
60
|
+
pm="none detected"
|
|
61
|
+
for _pm in "${PM_CANDIDATES[@]}"; do
|
|
62
|
+
if command -v "$_pm" >/dev/null 2>&1; then
|
|
63
|
+
pm="$_pm ($(command -v "$_pm"))"
|
|
64
|
+
break
|
|
65
|
+
fi
|
|
66
|
+
done
|
|
67
|
+
|
|
68
|
+
# spec: context-kit/SPEC.md §bin/env-probe — renders the constrained member's parenthetical; an unconstrained member carries none, so the roster's optional axis stays optional on the page too
|
|
69
|
+
render_floor() { # $1 = roster element, $2 = verdict -> the trailing parenthetical, empty when the member is unconstrained
|
|
70
|
+
local desc=""
|
|
71
|
+
tool_floor_parse "$1"
|
|
72
|
+
[[ -n "$TOOL_FLOOR_MIN" ]] && desc="floor $TOOL_FLOOR_MIN"
|
|
73
|
+
if [[ -n "$TOOL_FLOOR_IMPL" ]]; then
|
|
74
|
+
[[ -n "$desc" ]] && desc+=", "
|
|
75
|
+
desc+="requires $TOOL_FLOOR_IMPL"
|
|
76
|
+
fi
|
|
77
|
+
[[ -n "$desc" ]] || return 0
|
|
78
|
+
case "$2" in
|
|
79
|
+
ok) printf ' (%s, ok)' "$desc" ;;
|
|
80
|
+
uncomparable) printf ' (%s — unverified)' "$desc" ;;
|
|
81
|
+
*) printf ' (%s — below contract)' "$desc" ;;
|
|
82
|
+
esac
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
tool_lines=""
|
|
86
|
+
absent=()
|
|
87
|
+
below=()
|
|
88
|
+
for _e in "${PROBE_SET[@]}"; do
|
|
89
|
+
tool_floor_parse "$_e"
|
|
90
|
+
_t="$TOOL_FLOOR_NAME"
|
|
91
|
+
ver="$(probe_version "$_t")" || ver=""
|
|
92
|
+
verdict="$(tool_floor_check "$_e" "$ver")"
|
|
93
|
+
read -r _kind _found _floor <<<"$verdict"
|
|
94
|
+
case "$_kind" in
|
|
95
|
+
absent) absent+=("$_t"); continue ;;
|
|
96
|
+
below) below+=("\`$_t\` (found $_found, floor $_floor)") ;;
|
|
97
|
+
wrong-impl) below+=("\`$_t\` (found $_found, requires $TOOL_FLOOR_IMPL)") ;;
|
|
98
|
+
uncomparable) below+=("\`$_t\` (unverified against floor $TOOL_FLOOR_MIN)") ;;
|
|
99
|
+
esac
|
|
100
|
+
tool_lines+=" - \`$_t\` — $ver$(render_floor "$_e" "$verdict")"$'\n'
|
|
101
|
+
done
|
|
102
|
+
absent_line="none"
|
|
103
|
+
[[ ${#absent[@]} -gt 0 ]] && absent_line="$(printf '`%s` ' "${absent[@]}")"
|
|
104
|
+
below_line="none"
|
|
105
|
+
if [[ ${#below[@]} -gt 0 ]]; then
|
|
106
|
+
below_line="$(printf '%s; ' "${below[@]}")"
|
|
107
|
+
below_line="${below_line%; }"
|
|
108
|
+
fi
|
|
109
|
+
|
|
110
|
+
if [[ ! -f "$CONTEXT_KIT_ENV_PROFILE_FILE" ]]; then
|
|
111
|
+
# spec: context-kit/SPEC.md §bin/env-probe — seed the gotchas scaffold once (outside the markers); every re-probe replaces only the block
|
|
112
|
+
cat > "$CONTEXT_KIT_ENV_PROFILE_FILE" <<'SEED'
|
|
113
|
+
# Local environment profile
|
|
114
|
+
|
|
115
|
+
Hand-authored gotchas go here, outside the generated block below, and survive
|
|
116
|
+
every re-probe — the facts a probe cannot know. For example: no `dig`/`host` on
|
|
117
|
+
this box; resolve names with `getent hosts` or a DoH `curl`.
|
|
118
|
+
|
|
119
|
+
SEED
|
|
120
|
+
fi
|
|
121
|
+
|
|
122
|
+
new_body="$(
|
|
123
|
+
printf '_Probed %s by context-kit env-probe — do not hand-edit inside the markers._\n\n' "$(date +%F)"
|
|
124
|
+
printf -- '- **OS:** %s\n' "$os_line"
|
|
125
|
+
printf -- '- **Package manager:** %s\n' "$pm"
|
|
126
|
+
printf -- '- **Toolchain:**\n%s' "$tool_lines"
|
|
127
|
+
printf -- '- **Absent:** %s\n' "$absent_line"
|
|
128
|
+
printf -- '- **Below contract:** %s\n' "$below_line"
|
|
129
|
+
)"
|
|
130
|
+
|
|
131
|
+
# spec: context-kit/SPEC.md §bin/env-probe — change-detection: rewrite the block only when the probed content differs from disk, comparing every line but the derived `Probed <date>` line, so an unchanged box writes nothing and the date stays a last-changed signal
|
|
132
|
+
new_cmp="$(printf '%s\n' "$new_body" | grep -v '^_Probed ')"
|
|
133
|
+
if grep -qF -- "$BEGIN" "$CONTEXT_KIT_ENV_PROFILE_FILE" 2>/dev/null; then
|
|
134
|
+
old_cmp="$(awk -v b="$BEGIN" -v e="$END" '$0==b{i=1;next} $0==e{i=0;next} i' "$CONTEXT_KIT_ENV_PROFILE_FILE" | grep -v '^_Probed ')"
|
|
135
|
+
if [[ "$new_cmp" == "$old_cmp" ]]; then
|
|
136
|
+
echo "env-probe: env profile block unchanged in $CONTEXT_KIT_ENV_PROFILE_FILE (Probed date preserved)"
|
|
137
|
+
exit 0
|
|
138
|
+
fi
|
|
139
|
+
fi
|
|
140
|
+
|
|
141
|
+
action="$(printf '%s\n' "$new_body" | inject_marker_block "$CONTEXT_KIT_ENV_PROFILE_FILE" "$BEGIN" "$END")" \
|
|
142
|
+
|| { echo "env-probe: failed to write profile block" >&2; exit 2; }
|
|
143
|
+
|
|
144
|
+
echo "env-probe: $action the env profile block in $CONTEXT_KIT_ENV_PROFILE_FILE"
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# spec: context-kit/SPEC.md §bin/footprint — per-kit two-tier context footprint, a deterministic projection of tracked kit surfaces
|
|
3
|
+
# usage: footprint.sh [--emit] (bare: human header + table; --emit: the committed docs/footprint.md page)
|
|
4
|
+
set -uo pipefail
|
|
5
|
+
|
|
6
|
+
REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
|
|
7
|
+
cd "$REPO_ROOT" 2>/dev/null || { echo "footprint: cannot enter repo root" >&2; exit 2; }
|
|
8
|
+
|
|
9
|
+
_ck_cfg="${CONTEXT_KIT_CONFIG_FILE:-}"
|
|
10
|
+
if [[ -n "$_ck_cfg" ]]; then
|
|
11
|
+
[[ -f "$_ck_cfg" ]] || {
|
|
12
|
+
echo "context-kit: CONTEXT_KIT_CONFIG_FILE not found: $_ck_cfg" >&2
|
|
13
|
+
exit 2
|
|
14
|
+
}
|
|
15
|
+
# shellcheck source=/dev/null # consumer config path is resolved at runtime
|
|
16
|
+
source "$_ck_cfg"
|
|
17
|
+
else
|
|
18
|
+
_ck_cfg="${GATE_SDK_GATES_DIR:-scripts}/context-config.sh"
|
|
19
|
+
if [[ -f "$_ck_cfg" ]]; then
|
|
20
|
+
# shellcheck source=/dev/null # consumer config path is resolved at runtime
|
|
21
|
+
source "$_ck_cfg"
|
|
22
|
+
fi
|
|
23
|
+
fi
|
|
24
|
+
unset _ck_cfg
|
|
25
|
+
|
|
26
|
+
declare -p CONTEXT_KIT_SURFACES >/dev/null 2>&1 || CONTEXT_KIT_SURFACES=("CLAUDE.md")
|
|
27
|
+
|
|
28
|
+
emit=0
|
|
29
|
+
[[ "${1:-}" == "--emit" ]] && emit=1
|
|
30
|
+
|
|
31
|
+
# spec: context-kit/SPEC.md §bin/footprint — the measured set is the kit roster, derived not maintained: top-level dirs carrying a SPEC.md
|
|
32
|
+
mapfile -t KITS < <(for _s in */SPEC.md; do [[ -f "$_s" ]] && printf '%s\n' "${_s%/SPEC.md}"; done | sort)
|
|
33
|
+
|
|
34
|
+
# spec: context-kit/SPEC.md §bin/footprint — a file set collapses to an exact line count and a byte total; the token estimate is bytes/4, computed at render
|
|
35
|
+
sum_files() { # args: files... -> "<lines> <bytes>"
|
|
36
|
+
local L=0 B=0 f n
|
|
37
|
+
for f in "$@"; do
|
|
38
|
+
[[ -f "$f" ]] || continue
|
|
39
|
+
n="$(wc -l < "$f")"; L=$(( L + n ))
|
|
40
|
+
n="$(wc -c < "$f")"; B=$(( B + n ))
|
|
41
|
+
done
|
|
42
|
+
printf '%d %d' "$L" "$B"
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
# spec: context-kit/SPEC.md §bin/footprint — always-loaded tier: the content between a kit's generated begin/end markers in the configured surface files, the agent-file block the kit injects
|
|
46
|
+
kit_always() { # $1 = kit -> "<lines> <bytes>"
|
|
47
|
+
local kit="$1" L=0 B=0 sf block bl bb
|
|
48
|
+
for sf in "${CONTEXT_KIT_SURFACES[@]}"; do
|
|
49
|
+
[[ -f "$sf" ]] || continue
|
|
50
|
+
block="$(awk -v k="$kit" '
|
|
51
|
+
index($0, "<!-- " k ":begin -->") { inb=1; next }
|
|
52
|
+
index($0, "<!-- " k ":end -->") { inb=0; next }
|
|
53
|
+
inb { print }
|
|
54
|
+
' "$sf")"
|
|
55
|
+
[[ -n "$block" ]] || continue
|
|
56
|
+
bl="$(printf '%s\n' "$block" | wc -l)"; L=$(( L + bl ))
|
|
57
|
+
bb="$(printf '%s\n' "$block" | wc -c)"; B=$(( B + bb ))
|
|
58
|
+
done
|
|
59
|
+
printf '%d %d' "$L" "$B"
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
# spec: context-kit/SPEC.md §bin/footprint — load-triggered tier: the kit's shipped skill/template markdown under its templates tree (gate-test fixtures sit outside it, so they never enter the count)
|
|
63
|
+
kit_triggered() { # $1 = kit -> "<lines> <bytes>"
|
|
64
|
+
local kit="$1"
|
|
65
|
+
mapfile -t _tf < <(find "$kit/templates" -type f -name '*.md' 2>/dev/null | sort)
|
|
66
|
+
sum_files "${_tf[@]+"${_tf[@]}"}"
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
cell() { # $1 $2 = lines bytes -> "<n>l · ~<n>t" or an em dash when empty
|
|
70
|
+
local l="$1" b="$2"
|
|
71
|
+
if [[ "$l" -eq 0 && "$b" -eq 0 ]]; then printf '%s' "—"; return; fi
|
|
72
|
+
printf '%dl · ~%dt' "$l" $(( b / 4 ))
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
ROWS=()
|
|
76
|
+
tAL=0 tAB=0 tTL=0 tTB=0
|
|
77
|
+
for kit in "${KITS[@]}"; do
|
|
78
|
+
read -r al ab <<<"$(kit_always "$kit")"
|
|
79
|
+
read -r tl tb <<<"$(kit_triggered "$kit")"
|
|
80
|
+
tAL=$(( tAL + al )); tAB=$(( tAB + ab ))
|
|
81
|
+
tTL=$(( tTL + tl )); tTB=$(( tTB + tb ))
|
|
82
|
+
ROWS+=("| $kit | $(cell "$al" "$ab") | $(cell "$tl" "$tb") |")
|
|
83
|
+
done
|
|
84
|
+
|
|
85
|
+
print_table() {
|
|
86
|
+
echo "| kit | always-loaded | load-triggered |"
|
|
87
|
+
echo "| --- | --- | --- |"
|
|
88
|
+
printf '%s\n' "${ROWS[@]}"
|
|
89
|
+
echo "| **total** | $(cell "$tAL" "$tAB") | $(cell "$tTL" "$tTB") |"
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
if [[ "$emit" -eq 0 ]]; then
|
|
93
|
+
echo "=== Context footprint (context-kit — kit-shipped share only) ==="
|
|
94
|
+
echo "Per-kit always-loaded vs load-triggered cost; lines exact, tokens a bytes/4 estimate."
|
|
95
|
+
echo
|
|
96
|
+
print_table
|
|
97
|
+
exit 0
|
|
98
|
+
fi
|
|
99
|
+
|
|
100
|
+
cat <<'EOF'
|
|
101
|
+
---
|
|
102
|
+
title: Footprint
|
|
103
|
+
nav_parent: value
|
|
104
|
+
nav_child_order: 2
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
# Context footprint
|
|
108
|
+
|
|
109
|
+
What vendoring Checkwright costs a consumer's context budget, measured per kit
|
|
110
|
+
and split by when the cost is paid. Every number here is generated from the
|
|
111
|
+
tracked kit surfaces by `context-kit/bin/footprint.sh` and held current by a
|
|
112
|
+
freshness gate, so the page cannot drift from what the kits actually ship.
|
|
113
|
+
|
|
114
|
+
## What is measured
|
|
115
|
+
|
|
116
|
+
Each kit's footprint splits by when its cost lands in a session:
|
|
117
|
+
|
|
118
|
+
- **Always-loaded** — the fixed block a kit injects into the consumer's
|
|
119
|
+
always-loaded agent file, so it rides every session's context. Measured as the
|
|
120
|
+
content a kit generates between its own `begin`/`end` markers in the configured
|
|
121
|
+
surface files.
|
|
122
|
+
- **Load-triggered** — the kit's shipped skill and template markdown, pulled
|
|
123
|
+
into context only when its trigger fires. Measured over the markdown the kit
|
|
124
|
+
ships under its templates directory.
|
|
125
|
+
|
|
126
|
+
Line counts are exact. The token column is a labeled estimate — a
|
|
127
|
+
bytes-over-four heuristic, marked with a leading `~` because the true count is
|
|
128
|
+
model-tokenizer-dependent; read it as an order of magnitude, never a precise
|
|
129
|
+
figure.
|
|
130
|
+
|
|
131
|
+
## What is excluded
|
|
132
|
+
|
|
133
|
+
The figures are kit-share only — what a kit itself ships. A consumer's own
|
|
134
|
+
bindings (the skill shims that point at a vendored template), consumer
|
|
135
|
+
configuration, the reference SPEC and README pages a reader opens on demand, and
|
|
136
|
+
the session hook's dynamic body (which is consumer state, not fixed kit text) are
|
|
137
|
+
all left out, so each number reflects the kit's advertised cost rather than a
|
|
138
|
+
host repository's residue.
|
|
139
|
+
|
|
140
|
+
## Per-kit footprint
|
|
141
|
+
|
|
142
|
+
EOF
|
|
143
|
+
print_table
|
|
144
|
+
exit 0
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# spec: context-kit/SPEC.md §Index-first reading — compact heading hierarchy with first sentence per section
|
|
3
|
+
# usage: md-index.sh [paths…] (default: whole tree, build dirs skipped)
|
|
4
|
+
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
|
|
7
|
+
REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
|
|
8
|
+
|
|
9
|
+
TARGETS=("${@}")
|
|
10
|
+
if [[ ${#TARGETS[@]} -eq 0 ]]; then
|
|
11
|
+
TARGETS=("$REPO_ROOT")
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
EXTRACT='
|
|
15
|
+
function strip_links(s, out, span, txt) {
|
|
16
|
+
out = ""
|
|
17
|
+
while (match(s, /\[[^]]+\]\([^)]+\)/)) {
|
|
18
|
+
span = substr(s, RSTART, RLENGTH)
|
|
19
|
+
txt = span; sub(/^\[/, "", txt); sub(/\].*$/, "", txt)
|
|
20
|
+
out = out substr(s, 1, RSTART - 1) txt
|
|
21
|
+
s = substr(s, RSTART + RLENGTH)
|
|
22
|
+
}
|
|
23
|
+
return out s
|
|
24
|
+
}
|
|
25
|
+
{ lines[NR] = $0 }
|
|
26
|
+
END {
|
|
27
|
+
for (i = 1; i <= NR; i++) {
|
|
28
|
+
line = lines[i]
|
|
29
|
+
if (! match(line, /^#{1,6}[ \t]+/)) continue
|
|
30
|
+
level = 0
|
|
31
|
+
while (substr(line, level + 1, 1) == "#") level++
|
|
32
|
+
heading = substr(line, RLENGTH + 1)
|
|
33
|
+
gsub(/^[ \t]+|[ \t]+$/, "", heading)
|
|
34
|
+
first = ""
|
|
35
|
+
infence = 0
|
|
36
|
+
for (j = i + 1; j <= NR; j++) {
|
|
37
|
+
l = lines[j]
|
|
38
|
+
gsub(/^[ \t]+|[ \t]+$/, "", l)
|
|
39
|
+
if (l ~ /^```/ || l ~ /^~~~/) { infence = ! infence; continue }
|
|
40
|
+
if (infence) continue
|
|
41
|
+
if (l ~ /^#{1,6}[ \t]/ || l ~ /^---/) break
|
|
42
|
+
if (l != "") {
|
|
43
|
+
text = strip_links(l)
|
|
44
|
+
gsub(/[*_`]/, "", text)
|
|
45
|
+
if (match(text, /[.!?]/)) first = substr(text, 1, RSTART)
|
|
46
|
+
else first = substr(text, 1, 120)
|
|
47
|
+
gsub(/^[ \t]+|[ \t]+$/, "", first)
|
|
48
|
+
break
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
indent = ""; for (k = 1; k < level; k++) indent = indent " "
|
|
52
|
+
prefix = ""; for (k = 1; k <= level; k++) prefix = prefix "#"
|
|
53
|
+
if (first != "") print indent prefix " " heading ":" i " — " first
|
|
54
|
+
else print indent prefix " " heading ":" i
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
'
|
|
58
|
+
|
|
59
|
+
FOUND=0
|
|
60
|
+
|
|
61
|
+
while IFS= read -r -d '' file; do
|
|
62
|
+
output=$(awk "$EXTRACT" < "$file" 2>/dev/null || true)
|
|
63
|
+
|
|
64
|
+
if [[ -n "$output" ]]; then
|
|
65
|
+
rel="${file#"$REPO_ROOT"/}"
|
|
66
|
+
lines=$(wc -l < "$file" | tr -d ' ')
|
|
67
|
+
echo "${rel} (${lines}L)"
|
|
68
|
+
echo "$output"
|
|
69
|
+
echo ""
|
|
70
|
+
FOUND=1
|
|
71
|
+
fi
|
|
72
|
+
done < <(find "${TARGETS[@]}" -name "*.md" \
|
|
73
|
+
-not -path "*/target/*" \
|
|
74
|
+
-not -path "*/.git/*" \
|
|
75
|
+
-not -path "*/node_modules/*" \
|
|
76
|
+
-print0 | sort -z)
|
|
77
|
+
|
|
78
|
+
if [[ "$FOUND" -eq 0 ]]; then
|
|
79
|
+
echo "No Markdown files found in ${TARGETS[*]}"
|
|
80
|
+
fi
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# spec: context-kit/SPEC.md §Index-first reading — print one Markdown section by heading
|
|
3
|
+
# usage: md-section.sh <file> <heading>
|
|
4
|
+
|
|
5
|
+
set -uo pipefail
|
|
6
|
+
|
|
7
|
+
FILE="${1:-}"
|
|
8
|
+
QUERY="${2:-}"
|
|
9
|
+
|
|
10
|
+
if [[ -z "$FILE" || -z "$QUERY" ]]; then
|
|
11
|
+
echo "usage: md-section.sh <file.md> \"<heading>\"" >&2
|
|
12
|
+
exit 2
|
|
13
|
+
fi
|
|
14
|
+
if [[ ! -f "$FILE" ]]; then
|
|
15
|
+
echo "md-section: file not found: $FILE" >&2
|
|
16
|
+
exit 2
|
|
17
|
+
fi
|
|
18
|
+
|
|
19
|
+
needle="$(printf '%s' "$QUERY" | sed 's/^[[:space:]]*§*[[:space:]]*//; s/[[:space:]]*$//' | tr '[:upper:]' '[:lower:]')"
|
|
20
|
+
|
|
21
|
+
awk -v needle="$needle" '
|
|
22
|
+
function heading_level(line, n) {
|
|
23
|
+
if (line !~ /^#+[[:space:]]/) return 0
|
|
24
|
+
n = 0
|
|
25
|
+
while (substr(line, n + 1, 1) == "#") n++
|
|
26
|
+
return n
|
|
27
|
+
}
|
|
28
|
+
function heading_text(line, t) {
|
|
29
|
+
t = line
|
|
30
|
+
sub(/^#+[[:space:]]+/, "", t)
|
|
31
|
+
sub(/[[:space:]]+$/, "", t)
|
|
32
|
+
return tolower(t)
|
|
33
|
+
}
|
|
34
|
+
{
|
|
35
|
+
if ($0 ~ /^[[:space:]]*(```|~~~)/) in_fence = !in_fence
|
|
36
|
+
}
|
|
37
|
+
!found {
|
|
38
|
+
if (!in_fence) {
|
|
39
|
+
lvl = heading_level($0)
|
|
40
|
+
if (lvl > 0 && heading_text($0) == needle) {
|
|
41
|
+
found = 1
|
|
42
|
+
start_lvl = lvl
|
|
43
|
+
print
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
next
|
|
47
|
+
}
|
|
48
|
+
{
|
|
49
|
+
if (!in_fence) {
|
|
50
|
+
lvl = heading_level($0)
|
|
51
|
+
if (lvl > 0 && lvl <= start_lvl) exit
|
|
52
|
+
}
|
|
53
|
+
print
|
|
54
|
+
}
|
|
55
|
+
END { if (!found) exit 3 }
|
|
56
|
+
' "$FILE"
|
|
57
|
+
rc=$?
|
|
58
|
+
|
|
59
|
+
if [[ $rc -eq 3 ]]; then
|
|
60
|
+
echo "md-section: no heading matched: $QUERY" >&2
|
|
61
|
+
exit 1
|
|
62
|
+
fi
|
|
63
|
+
exit "$rc"
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# spec: context-kit/SPEC.md §Index-first reading — compact public API surface, a dispatcher over per-language extractors (ships rust, ts)
|
|
3
|
+
# usage: pub-index.sh [paths…]
|
|
4
|
+
set -uo pipefail
|
|
5
|
+
|
|
6
|
+
KIT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
7
|
+
REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
|
|
8
|
+
|
|
9
|
+
_ck_cfg="${CONTEXT_KIT_CONFIG_FILE:-}"
|
|
10
|
+
if [[ -n "$_ck_cfg" ]]; then
|
|
11
|
+
[[ -f "$_ck_cfg" ]] || {
|
|
12
|
+
echo "context-kit: CONTEXT_KIT_CONFIG_FILE not found: $_ck_cfg" >&2
|
|
13
|
+
exit 2
|
|
14
|
+
}
|
|
15
|
+
# shellcheck source=/dev/null # consumer config path is resolved at runtime
|
|
16
|
+
source "$_ck_cfg"
|
|
17
|
+
else
|
|
18
|
+
_ck_cfg="${GATE_SDK_GATES_DIR:-scripts}/context-config.sh"
|
|
19
|
+
if [[ -f "$_ck_cfg" ]]; then
|
|
20
|
+
# shellcheck source=/dev/null # consumer config path is resolved at runtime
|
|
21
|
+
source "$_ck_cfg"
|
|
22
|
+
fi
|
|
23
|
+
fi
|
|
24
|
+
unset _ck_cfg
|
|
25
|
+
|
|
26
|
+
TARGETS=("$@")
|
|
27
|
+
[[ ${#TARGETS[@]} -eq 0 ]] && TARGETS=("$REPO_ROOT")
|
|
28
|
+
|
|
29
|
+
# spec: context-kit/SPEC.md §Index-first reading — extractor resolution: the consumer dir shadows the kit's shipped lib/pub-lang (the gates.list consumer-first precedent)
|
|
30
|
+
KIT_LANG_DIR="$KIT/lib/pub-lang"
|
|
31
|
+
LANG_DIR="${CONTEXT_KIT_PUB_LANG_DIR:-${GATE_SDK_GATES_DIR:-scripts}/pub-lang}"
|
|
32
|
+
|
|
33
|
+
resolve_extractor() { # $1 = lang -> prints extractor path, or returns 1
|
|
34
|
+
[[ -f "$LANG_DIR/$1.sh" ]] && { printf '%s' "$LANG_DIR/$1.sh"; return 0; }
|
|
35
|
+
[[ -f "$KIT_LANG_DIR/$1.sh" ]] && { printf '%s' "$KIT_LANG_DIR/$1.sh"; return 0; }
|
|
36
|
+
return 1
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
# spec: context-kit/SPEC.md §Index-first reading — the enabled set is CONTEXT_KIT_PUB_LANGS; its default is the shipped kit roster, derived at run time (never a maintained list)
|
|
40
|
+
if declare -p CONTEXT_KIT_PUB_LANGS >/dev/null 2>&1; then
|
|
41
|
+
LANGS=("${CONTEXT_KIT_PUB_LANGS[@]}")
|
|
42
|
+
else
|
|
43
|
+
LANGS=()
|
|
44
|
+
if [[ -d "$KIT_LANG_DIR" ]]; then
|
|
45
|
+
while IFS= read -r f; do LANGS+=("$(basename "$f" .sh)"); done \
|
|
46
|
+
< <(find "$KIT_LANG_DIR" -maxdepth 1 -name '*.sh' -type f | sort)
|
|
47
|
+
fi
|
|
48
|
+
fi
|
|
49
|
+
|
|
50
|
+
PRUNE=(-not -path '*/.git/*' -not -path '*/target/*' -not -path '*/node_modules/*' -not -path '*/dist/*' -not -path '*/build/*')
|
|
51
|
+
|
|
52
|
+
emit_lang() { # $1 = extractor path; prints per-file blocks for this language
|
|
53
|
+
(
|
|
54
|
+
# shellcheck source=/dev/null # extractor path is resolved at runtime
|
|
55
|
+
source "$1"
|
|
56
|
+
local nameexpr=() g
|
|
57
|
+
for g in "${PUB_LANG_GLOBS[@]}"; do
|
|
58
|
+
[[ ${#nameexpr[@]} -gt 0 ]] && nameexpr+=(-o)
|
|
59
|
+
nameexpr+=(-name "$g")
|
|
60
|
+
done
|
|
61
|
+
local file raw rows rel count
|
|
62
|
+
while IFS= read -r -d '' file; do
|
|
63
|
+
raw="$(pub_lang_extract "$file" || true)"
|
|
64
|
+
[[ -n "$raw" ]] || continue
|
|
65
|
+
rows="$(printf '%s\n' "$raw" | LC_ALL=C sort -k1,1 -k2,2)"
|
|
66
|
+
rel="${file#"$REPO_ROOT"/}"
|
|
67
|
+
count="$(printf '%s\n' "$rows" | wc -l | tr -d ' ')"
|
|
68
|
+
printf '%s (%s)\n' "$rel" "$count"
|
|
69
|
+
printf '%s\n' "$rows" | awk '{ printf " %-8s %s :%s\n", $1, $2, $3 }'
|
|
70
|
+
printf '\n'
|
|
71
|
+
done < <(find "${TARGETS[@]}" \( "${nameexpr[@]}" \) "${PRUNE[@]}" -print0 2>/dev/null | sort -z)
|
|
72
|
+
)
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
FOUND=0
|
|
76
|
+
for lang in "${LANGS[@]}"; do
|
|
77
|
+
extractor="$(resolve_extractor "$lang")" || {
|
|
78
|
+
echo "pub-index: no extractor for language '$lang' in $LANG_DIR or $KIT_LANG_DIR" >&2
|
|
79
|
+
exit 2
|
|
80
|
+
}
|
|
81
|
+
block="$(emit_lang "$extractor")"
|
|
82
|
+
if [[ -n "$block" ]]; then
|
|
83
|
+
printf '%s\n' "$block"
|
|
84
|
+
FOUND=1
|
|
85
|
+
fi
|
|
86
|
+
done
|
|
87
|
+
|
|
88
|
+
if [[ "$FOUND" -eq 0 ]]; then
|
|
89
|
+
echo "No public items found in ${TARGETS[*]}"
|
|
90
|
+
fi
|