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,54 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# graph: couples=CLAUDE.md,lifecycle-kit/lib/stages.sh dir=one valve=none tier=precommit
|
|
3
|
+
# spec: lifecycle-kit/SPEC.md §check-lifecycle-registration — the always-loaded agent file carries a lifecycle-kit marker block whose content byte-matches the block regenerated from the live stage machine, fail-closed when the target or a marker is missing
|
|
4
|
+
#
|
|
5
|
+
# usage: check-lifecycle-registration.sh [agent-file]
|
|
6
|
+
# path resolves relative to cwd (= repo root in a battery run); the default
|
|
7
|
+
# comes from LIFECYCLE_KIT_AGENT_FILE (lifecycle-kit/lib/stages.sh).
|
|
8
|
+
set -uo pipefail
|
|
9
|
+
|
|
10
|
+
KIT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
11
|
+
SDK="${GATE_SDK_ROOT:-$KIT/../gate-sdk}"
|
|
12
|
+
# shellcheck source=../../gate-sdk/lib/gate.sh
|
|
13
|
+
source "$SDK/lib/gate.sh"
|
|
14
|
+
# shellcheck source=../lib/stages.sh
|
|
15
|
+
source "$KIT/lib/stages.sh"
|
|
16
|
+
|
|
17
|
+
AGENT_FILE="${1:-$LIFECYCLE_KIT_AGENT_FILE}"
|
|
18
|
+
[[ -f "$AGENT_FILE" ]] \
|
|
19
|
+
|| { echo "check-lifecycle-registration: agent file not found: $AGENT_FILE" >&2; exit 2; } # exit 2: fail-closed
|
|
20
|
+
|
|
21
|
+
BEGIN="<!-- lifecycle-kit:begin -->"
|
|
22
|
+
END="<!-- lifecycle-kit:end -->"
|
|
23
|
+
|
|
24
|
+
if ! grep -qF -- "$BEGIN" "$AGENT_FILE"; then
|
|
25
|
+
echo "check-lifecycle-registration: no lifecycle-kit registration block in $AGENT_FILE"
|
|
26
|
+
echo " help: install the resident registration block into the always-loaded agent file —"
|
|
27
|
+
echo " bash lifecycle-kit/bin/install-lifecycle.sh — so a session that loads it"
|
|
28
|
+
echo " is pointed at the stage machine. Override the path with LIFECYCLE_KIT_AGENT_FILE."
|
|
29
|
+
exit 1
|
|
30
|
+
fi
|
|
31
|
+
grep -qF -- "$END" "$AGENT_FILE" \
|
|
32
|
+
|| { echo "check-lifecycle-registration: begin marker present but end marker missing in $AGENT_FILE — the block bounds are unreadable" >&2; exit 2; } # exit 2: fail-closed
|
|
33
|
+
|
|
34
|
+
present="$(awk -v b="$BEGIN" -v e="$END" '
|
|
35
|
+
$0 == b { inb = 1; next }
|
|
36
|
+
$0 == e { inb = 0; next }
|
|
37
|
+
inb { print }
|
|
38
|
+
' "$AGENT_FILE")"; st=$?
|
|
39
|
+
fail_closed "$st" check-lifecycle-registration awk
|
|
40
|
+
|
|
41
|
+
expected="$(lifecycle_registration_block)"; st=$?
|
|
42
|
+
fail_closed "$st" check-lifecycle-registration lifecycle_registration_block
|
|
43
|
+
|
|
44
|
+
if [[ "$present" != "$expected" ]]; then
|
|
45
|
+
echo "check-lifecycle-registration: the registration block in $AGENT_FILE is stale — it does not match the block derived from the live stage machine:"
|
|
46
|
+
diff <(printf '%s\n' "$expected") <(printf '%s\n' "$present") | sed 's/^/ /'
|
|
47
|
+
echo " help: a reshaped stage machine (LIFECYCLE_KIT_STAGES / LIFECYCLE_KIT_QUEUE_FILE) or a"
|
|
48
|
+
echo " hand-edited block staled the registration — regenerate it in place:"
|
|
49
|
+
echo " bash lifecycle-kit/bin/install-lifecycle.sh"
|
|
50
|
+
exit 1
|
|
51
|
+
fi
|
|
52
|
+
|
|
53
|
+
echo "LIFECYCLE-REGISTRATION: clean ($AGENT_FILE carries the lifecycle-kit registration block in byte-lockstep with the derived stage machine; ${#LIFECYCLE_KIT_STAGES[@]} stage(s))"
|
|
54
|
+
exit 0
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# graph: couples=.gitattributes,lifecycle-kit/lib/stages.sh dir=one valve=none tier=precommit
|
|
3
|
+
# spec: lifecycle-kit/SPEC.md §check-merge-attrs — bidirectional parity between the derived iteration-scoped supersede set and the merge=iteration-scoped lines in .gitattributes (a smuggled ours-driver attribute on a path outside the set is the reverse-direction safety edge), plus forward-only parity for the derived union set (the gap inbox must carry merge=union; the git-native union driver is legitimate consumer usage elsewhere, so no reverse edge)
|
|
4
|
+
#
|
|
5
|
+
# usage: check-merge-attrs.sh [gitattributes-file]
|
|
6
|
+
# path resolves relative to cwd (= repo root in a battery run); the default
|
|
7
|
+
# is .gitattributes (repo root).
|
|
8
|
+
set -uo pipefail
|
|
9
|
+
|
|
10
|
+
KIT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
11
|
+
SDK="${GATE_SDK_ROOT:-$KIT/../gate-sdk}"
|
|
12
|
+
# shellcheck source=../../gate-sdk/lib/gate.sh
|
|
13
|
+
source "$SDK/lib/gate.sh"
|
|
14
|
+
# shellcheck source=../lib/stages.sh
|
|
15
|
+
source "$KIT/lib/stages.sh"
|
|
16
|
+
|
|
17
|
+
ATTRS="${1:-.gitattributes}"
|
|
18
|
+
|
|
19
|
+
derived="$(lifecycle_supersede_set | sort -u | grep -v '^$')"
|
|
20
|
+
[[ -n "$derived" ]] \
|
|
21
|
+
|| { echo "check-merge-attrs: the derived iteration-scoped supersede set is empty — the state machine names no boundary-truncated surface (a lifecycle always owns at least its state + lesson-evidence files)" >&2; exit 2; } # exit 2: fail-closed
|
|
22
|
+
union_derived="$(lifecycle_union_set | sort -u | grep -v '^$')"
|
|
23
|
+
[[ -n "$union_derived" ]] \
|
|
24
|
+
|| { echo "check-merge-attrs: the derived union-merge set is empty — the state machine names no append-only union surface (a lifecycle always owns at least its gap inbox)" >&2; exit 2; } # exit 2: fail-closed
|
|
25
|
+
|
|
26
|
+
if [[ -e "$ATTRS" ]]; then
|
|
27
|
+
[[ -r "$ATTRS" ]] \
|
|
28
|
+
|| { echo "check-merge-attrs: $ATTRS exists but is not readable — the parity cannot be checked" >&2; exit 2; } # exit 2: fail-closed
|
|
29
|
+
attributed="$(awk '
|
|
30
|
+
/^[[:space:]]*#/ { next }
|
|
31
|
+
{ for (i = 2; i <= NF; i++) if ($i == "merge=iteration-scoped") { print $1; break } }
|
|
32
|
+
' "$ATTRS")"; st=$?
|
|
33
|
+
fail_closed "$st" check-merge-attrs awk
|
|
34
|
+
attributed="$(printf '%s\n' "$attributed" | sort -u | grep -v '^$' || true)"
|
|
35
|
+
union_attributed="$(awk '
|
|
36
|
+
/^[[:space:]]*#/ { next }
|
|
37
|
+
{ for (i = 2; i <= NF; i++) if ($i == "merge=union") { print $1; break } }
|
|
38
|
+
' "$ATTRS")"; st=$?
|
|
39
|
+
fail_closed "$st" check-merge-attrs awk
|
|
40
|
+
union_attributed="$(printf '%s\n' "$union_attributed" | sort -u | grep -v '^$' || true)"
|
|
41
|
+
else
|
|
42
|
+
attributed=""
|
|
43
|
+
union_attributed=""
|
|
44
|
+
fi
|
|
45
|
+
|
|
46
|
+
missing="$(comm -23 <(printf '%s\n' "$derived") <(printf '%s\n' "$attributed" | grep -v '^$'))"
|
|
47
|
+
extra="$(comm -13 <(printf '%s\n' "$derived") <(printf '%s\n' "$attributed" | grep -v '^$'))"
|
|
48
|
+
# spec: lifecycle-kit/SPEC.md §check-merge-attrs — forward only: a union member with no merge=union line. The reverse edge is deliberately absent — merge=union is git-native and a consumer's own append log legitimately carries it (§Multi-operator semantics).
|
|
49
|
+
union_missing="$(comm -23 <(printf '%s\n' "$union_derived") <(printf '%s\n' "$union_attributed" | grep -v '^$'))"
|
|
50
|
+
|
|
51
|
+
if [[ -n "$missing" || -n "$extra" || -n "$union_missing" ]]; then
|
|
52
|
+
echo "check-merge-attrs: $ATTRS merge attributes are out of parity with the derived supersede/union sets:"
|
|
53
|
+
while IFS= read -r p; do
|
|
54
|
+
[[ -n "$p" ]] && echo " supersede path with no merge=iteration-scoped attribute (the merge-supersede rule is unmechanized for it): $p"
|
|
55
|
+
done <<<"$missing"
|
|
56
|
+
while IFS= read -r p; do
|
|
57
|
+
[[ -n "$p" ]] && echo " merge=iteration-scoped on a path outside the derived set (a smuggled ours-driver silently discards merge content on a real surface): $p"
|
|
58
|
+
done <<<"$extra"
|
|
59
|
+
while IFS= read -r p; do
|
|
60
|
+
[[ -n "$p" ]] && echo " union-merge path with no merge=union attribute (a gap filed on either side of a concurrent merge would be silently dropped): $p"
|
|
61
|
+
done <<<"$union_missing"
|
|
62
|
+
echo " help: regenerate the marker block — bash lifecycle-kit/bin/install-lifecycle.sh — which writes one 'merge=iteration-scoped' line per boundary-truncated surface (LIFECYCLE_KIT_STATE_FILE, LIFECYCLE_KIT_LESSON_EVIDENCE_FILE, and each LIFECYCLE_KIT_BOUNDARY_TRUNCATE member) and one 'merge=union' line per union surface (LIFECYCLE_KIT_GAP_INBOX_FILE). Remove any hand-added merge=iteration-scoped attribute on a path outside the supersede set."
|
|
63
|
+
exit 1
|
|
64
|
+
fi
|
|
65
|
+
|
|
66
|
+
dcount="$(grep -vc '^$' <<<"$derived")"
|
|
67
|
+
ucount="$(grep -vc '^$' <<<"$union_derived")"
|
|
68
|
+
echo "MERGE-ATTRS: clean ($ATTRS carries a merge=iteration-scoped line for each of the $dcount derived iteration-scoped surface(s) and no others, and a merge=union line for each of the $ucount union surface(s))"
|
|
69
|
+
exit 0
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# graph: couples=.claude/commands/*.md,CLAUDE.md,kit:templates/*.md,lifecycle-kit/templates/skills/*.md dir=one valve=none tier=precommit
|
|
3
|
+
# spec: lifecycle-kit/SPEC.md §check-shim-restatement — no binding shim shares an >=N-word normalized n-gram with the dedup corpus (CLAUDE.md + every kit's templates)
|
|
4
|
+
#
|
|
5
|
+
# usage: check-shim-restatement.sh [skills-dir] [corpus-file...]
|
|
6
|
+
# skills-dir defaults to LIFECYCLE_KIT_SKILLS_DIR; positional corpus files override
|
|
7
|
+
# the computed default (the hermetic-fixture affordance).
|
|
8
|
+
set -uo pipefail
|
|
9
|
+
|
|
10
|
+
KIT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
11
|
+
SDK="${GATE_SDK_ROOT:-$KIT/../gate-sdk}"
|
|
12
|
+
# shellcheck source=../../gate-sdk/lib/gate.sh
|
|
13
|
+
source "$SDK/lib/gate.sh"
|
|
14
|
+
# shellcheck source=../lib/stages.sh
|
|
15
|
+
source "$KIT/lib/stages.sh"
|
|
16
|
+
|
|
17
|
+
DIR="${1:-$LIFECYCLE_KIT_SKILLS_DIR}"
|
|
18
|
+
[[ -d "$DIR" ]] || { echo "check-shim-restatement: skills dir not found: $DIR" >&2; exit 2; }
|
|
19
|
+
[[ $# -gt 0 ]] && shift
|
|
20
|
+
|
|
21
|
+
N="$LIFECYCLE_KIT_SHIM_NGRAM"
|
|
22
|
+
|
|
23
|
+
# spec: lifecycle-kit/SPEC.md §check-shim-restatement — corpus resolution order
|
|
24
|
+
corpus=()
|
|
25
|
+
if [[ $# -gt 0 ]]; then
|
|
26
|
+
corpus=("$@")
|
|
27
|
+
elif [[ ${#LIFECYCLE_KIT_SHIM_DEDUP_CORPUS[@]} -gt 0 ]]; then
|
|
28
|
+
corpus=("${LIFECYCLE_KIT_SHIM_DEDUP_CORPUS[@]}")
|
|
29
|
+
else
|
|
30
|
+
[[ -f "$LIFECYCLE_KIT_AGENT_FILE" ]] && corpus+=("$LIFECYCLE_KIT_AGENT_FILE")
|
|
31
|
+
while IFS= read -r root; do
|
|
32
|
+
tdir="${root%/}/templates"
|
|
33
|
+
[[ -d "$tdir" ]] || continue
|
|
34
|
+
while IFS= read -r tf; do corpus+=("$tf"); done < <(gate_find "$tdir" -name '*.md' -type f | sort)
|
|
35
|
+
done < <(gate_kit_roots_rel)
|
|
36
|
+
fi
|
|
37
|
+
|
|
38
|
+
# spec: lifecycle-kit/SPEC.md §check-shim-restatement — normalize, then emit every N-word window
|
|
39
|
+
emit_ngrams() {
|
|
40
|
+
awk -v N="$N" '
|
|
41
|
+
{ line = tolower($0); gsub(/[^a-z0-9]+/, " ", line)
|
|
42
|
+
nf = split(line, a, " ")
|
|
43
|
+
for (i = 1; i <= nf; i++) if (a[i] != "") { c++; w[c] = a[i] } }
|
|
44
|
+
END { for (i = 1; i + N - 1 <= c; i++) { s = w[i]; for (j = 1; j < N; j++) s = s " " w[i + j]; print s } }
|
|
45
|
+
' "$1"
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
CORPUS_IDX="$(mktemp)"
|
|
49
|
+
trap 'rm -f "$CORPUS_IDX"' EXIT
|
|
50
|
+
: >"$CORPUS_IDX"
|
|
51
|
+
for cf in "${corpus[@]+"${corpus[@]}"}"; do
|
|
52
|
+
[[ -f "$cf" ]] || continue
|
|
53
|
+
cg="$(emit_ngrams "$cf")"; st=$?
|
|
54
|
+
fail_closed "$st" check-shim-restatement "ngram($cf)"
|
|
55
|
+
[[ -n "$cg" ]] || continue
|
|
56
|
+
sort -u <<<"$cg" | awk -v f="$cf" '{print $0 "\t" f}' >>"$CORPUS_IDX"
|
|
57
|
+
done
|
|
58
|
+
LC_ALL=C sort -t$'\t' -k1,1 -u "$CORPUS_IDX" -o "$CORPUS_IDX"
|
|
59
|
+
[[ -s "$CORPUS_IDX" ]] || {
|
|
60
|
+
echo "check-shim-restatement: dedup corpus produced no ${N}-word n-grams (corpus files missing or shorter than N)" >&2
|
|
61
|
+
exit 2
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
findings=()
|
|
65
|
+
shims=0
|
|
66
|
+
shopt -s nullglob
|
|
67
|
+
for f in "$DIR"/*.md; do
|
|
68
|
+
grep -qE '^Execute the template at .+, applying the bindings below\.$' "$f" || continue
|
|
69
|
+
shims=$((shims + 1))
|
|
70
|
+
sg="$(emit_ngrams "$f" | sort -u)"; st=${PIPESTATUS[0]}
|
|
71
|
+
fail_closed "$st" check-shim-restatement "ngram($f)"
|
|
72
|
+
[[ -n "$sg" ]] || continue
|
|
73
|
+
overlaps="$(awk -F'\t' '
|
|
74
|
+
NR == FNR { file[$1] = $2; next }
|
|
75
|
+
($0 in file) { print file[$0] "\t" $0 }
|
|
76
|
+
' "$CORPUS_IDX" - <<<"$sg")"; st=$?
|
|
77
|
+
fail_closed "$st" check-shim-restatement "awk overlap($f)"
|
|
78
|
+
[[ -n "$overlaps" ]] || continue
|
|
79
|
+
while IFS=$'\t' read -r cf ng; do
|
|
80
|
+
[[ -n "$ng" ]] || continue
|
|
81
|
+
findings+=("$(basename "$f") shares a ${N}-word phrase with $cf: \"$ng\"")
|
|
82
|
+
done <<<"$overlaps"
|
|
83
|
+
done
|
|
84
|
+
shopt -u nullglob
|
|
85
|
+
|
|
86
|
+
if [[ ${#findings[@]} -gt 0 ]]; then
|
|
87
|
+
echo "check-shim-restatement: a binding shim restates the dedup corpus — bind consumer"
|
|
88
|
+
echo "residue and cite kit-owned procedure, never restate it:"
|
|
89
|
+
for m in "${findings[@]}"; do echo " $m"; done
|
|
90
|
+
echo " help: delete the restated span from the shim and replace it with a citation"
|
|
91
|
+
echo " (a path plus a §heading) to the corpus surface that owns it. The n-gram"
|
|
92
|
+
echo " holds the copy shape only; a paraphrase below ${N} words passes this gate"
|
|
93
|
+
echo " and is still the same defect to fix on sight."
|
|
94
|
+
exit 1
|
|
95
|
+
fi
|
|
96
|
+
echo "SHIM-RESTATEMENT: clean ($shims binding-shim(s); no ${N}-word phrase shared with the dedup corpus)"
|
|
97
|
+
exit 0
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# graph: couples=.claude/commands/*.md,lifecycle-kit/templates/skills/*.md,lifecycle-kit/templates/lead.md,delegation-kit/templates/agent-execution.md dir=one valve=none tier=precommit
|
|
3
|
+
# spec: lifecycle-kit/SPEC.md §check-skill-binding — every binding-shim skill names an existing template and binds exactly that template's slot set
|
|
4
|
+
#
|
|
5
|
+
# usage: check-skill-binding.sh [skills-dir]
|
|
6
|
+
# Defaults to LIFECYCLE_KIT_SKILLS_DIR (.claude/commands). Template paths in a
|
|
7
|
+
# binding directive resolve relative to the current directory.
|
|
8
|
+
set -uo pipefail
|
|
9
|
+
|
|
10
|
+
KIT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
11
|
+
SDK="${GATE_SDK_ROOT:-$KIT/../gate-sdk}"
|
|
12
|
+
# shellcheck source=../../gate-sdk/lib/gate.sh
|
|
13
|
+
source "$SDK/lib/gate.sh"
|
|
14
|
+
# shellcheck source=../lib/stages.sh
|
|
15
|
+
source "$KIT/lib/stages.sh"
|
|
16
|
+
|
|
17
|
+
DIR="${1:-$LIFECYCLE_KIT_SKILLS_DIR}"
|
|
18
|
+
[[ -d "$DIR" ]] || { echo "check-skill-binding: skills dir not found: $DIR" >&2; exit 2; }
|
|
19
|
+
|
|
20
|
+
findings=()
|
|
21
|
+
shims=0
|
|
22
|
+
|
|
23
|
+
shopt -s nullglob
|
|
24
|
+
for f in "$DIR"/*.md; do
|
|
25
|
+
tmpl="$(sed -nE 's/^Execute the template at (.+), applying the bindings below\.$/\1/p' "$f" | head -1)"
|
|
26
|
+
[[ -n "$tmpl" ]] || continue
|
|
27
|
+
shims=$((shims + 1))
|
|
28
|
+
|
|
29
|
+
if [[ ! -f "$tmpl" ]]; then
|
|
30
|
+
findings+=("$(basename "$f"): binding directive names template '$tmpl' — no such file")
|
|
31
|
+
continue
|
|
32
|
+
fi
|
|
33
|
+
|
|
34
|
+
mapfile -t slots < <(grep -oE '\*<[a-z][a-z0-9-]*:' "$tmpl" | sed -E 's/^\*<//; s/:$//' | sort -u)
|
|
35
|
+
mapfile -t binds < <(awk '/^## Bindings/ { f=1; next } f' "$f" \
|
|
36
|
+
| sed -nE 's/^\*\*([a-z][a-z0-9-]*)\*\* —.*/\1/p' | sort -u)
|
|
37
|
+
|
|
38
|
+
for s in "${slots[@]+"${slots[@]}"}"; do
|
|
39
|
+
printf '%s\n' "${binds[@]+"${binds[@]}"}" | grep -qxF "$s" \
|
|
40
|
+
|| findings+=("$(basename "$f"): template slot '$s' has no binding")
|
|
41
|
+
done
|
|
42
|
+
for b in "${binds[@]+"${binds[@]}"}"; do
|
|
43
|
+
printf '%s\n' "${slots[@]+"${slots[@]}"}" | grep -qxF "$b" \
|
|
44
|
+
|| findings+=("$(basename "$f"): binding '$b' names no slot in $tmpl")
|
|
45
|
+
done
|
|
46
|
+
done
|
|
47
|
+
shopt -u nullglob
|
|
48
|
+
|
|
49
|
+
if [[ ${#findings[@]} -gt 0 ]]; then
|
|
50
|
+
echo "check-skill-binding: a binding shim must name an existing template and bind"
|
|
51
|
+
echo "exactly that template's slot set — an unbound slot or an orphan binding is drift:"
|
|
52
|
+
for m in "${findings[@]}"; do echo " $m"; done
|
|
53
|
+
echo " help: fix the binding directive's template path, or align the shim's ## Bindings"
|
|
54
|
+
echo " entries with the template's *<slot-name: ...>* set (one entry per slot)."
|
|
55
|
+
exit 1
|
|
56
|
+
fi
|
|
57
|
+
|
|
58
|
+
echo "SKILL-BINDING: clean ($shims binding-shim(s); each names an existing template and binds its exact slot set)"
|
|
59
|
+
exit 0
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# graph: couples=TASK-QUEUE.md,.workflow/WORKFLOW-STATE.txt dir=one valve=none tier=precommit
|
|
3
|
+
# spec: lifecycle-kit/SPEC.md §check-stage-entry — prior-stage invocation-stamp ordering + drain-entry queue-empty + audit-trigger signal
|
|
4
|
+
set -uo pipefail
|
|
5
|
+
|
|
6
|
+
KIT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
7
|
+
SDK="${GATE_SDK_ROOT:-$KIT/../gate-sdk}"
|
|
8
|
+
# shellcheck source=../../gate-sdk/lib/gate.sh
|
|
9
|
+
source "$SDK/lib/gate.sh"
|
|
10
|
+
# shellcheck source=../lib/stages.sh
|
|
11
|
+
source "$KIT/lib/stages.sh"
|
|
12
|
+
|
|
13
|
+
QUEUE="${1:-$LIFECYCLE_KIT_QUEUE_FILE}"
|
|
14
|
+
STATE="${2:-$LIFECYCLE_KIT_STATE_FILE}"
|
|
15
|
+
|
|
16
|
+
[[ -f "$QUEUE" ]] || { echo "check-stage-entry: file not found: $QUEUE" >&2; exit 2; }
|
|
17
|
+
[[ -f "$STATE" ]] || { echo "check-stage-entry: file not found: $STATE" >&2; exit 2; }
|
|
18
|
+
|
|
19
|
+
hdr="$(lifecycle_header "$QUEUE")"
|
|
20
|
+
if [[ -z "$hdr" ]]; then
|
|
21
|
+
echo "STAGE-ENTRY: no '## Iteration:' header in $QUEUE"
|
|
22
|
+
echo " help: add '## Iteration: <name>' to $QUEUE"
|
|
23
|
+
exit 1
|
|
24
|
+
fi
|
|
25
|
+
|
|
26
|
+
# spec: lifecycle-kit/SPEC.md §check-stage-entry — the two axes, two surfaces: the header names the iteration, the state file's last stamp is the entered stage. An empty cursor is unreachable by construction here — enter-stage hands this gate a temp state file that always carries the candidate stamp, and at pre-commit the entry commit stages that same stamp — so it stays a hard parse error rather than a disarm.
|
|
27
|
+
iter="$(lifecycle_header_iter "$hdr")"
|
|
28
|
+
stage="$(lifecycle_current_stage "$STATE")"
|
|
29
|
+
if [[ -z "$iter" ]]; then
|
|
30
|
+
echo "STAGE-ENTRY: could not parse the iteration from: $hdr"
|
|
31
|
+
echo " help: header must read '## Iteration: <name>'"
|
|
32
|
+
exit 1
|
|
33
|
+
fi
|
|
34
|
+
if [[ -z "$stage" ]]; then
|
|
35
|
+
echo "STAGE-ENTRY: could not parse the entered stage — no stamp line in $STATE"
|
|
36
|
+
echo " help: the entered stage is the last '<iter> <stage> <session-id> <YYYY-MM-DD>' stamp; run the stage skill (it stamps as its first step)"
|
|
37
|
+
exit 1
|
|
38
|
+
fi
|
|
39
|
+
|
|
40
|
+
if ! lifecycle_stage_known "$stage"; then
|
|
41
|
+
echo "STAGE-ENTRY: cursor stage '$stage' is not a lifecycle stage (${LIFECYCLE_KIT_STAGES[*]})"
|
|
42
|
+
echo " help: the last stamp in $STATE must name one of the configured lifecycle stages"
|
|
43
|
+
exit 1
|
|
44
|
+
fi
|
|
45
|
+
pred="${LIFECYCLE_KIT_PREDECESSOR[$stage]:-}"
|
|
46
|
+
|
|
47
|
+
errors=()
|
|
48
|
+
c_fired=0
|
|
49
|
+
|
|
50
|
+
# assertion A: the entered stage's mandatory-predecessor stamp exists for this iteration
|
|
51
|
+
if [[ -n "$pred" ]]; then
|
|
52
|
+
found="$(awk -v it="$iter" -v pr="$pred" '
|
|
53
|
+
/^---[[:space:]]*$/ { f = 1; next }
|
|
54
|
+
f && NF { if ($1 == it && $2 == pr) { print "1"; exit } }
|
|
55
|
+
' "$STATE")"; st=$?
|
|
56
|
+
fail_closed "$st" STAGE-ENTRY "awk predecessor-stamp scan"
|
|
57
|
+
[[ "$found" == "1" ]] || errors+=("entering '$stage' but no '$iter $pred' stamp in $STATE — the mandatory predecessor stage was never invoked (run /$pred, or correct the entry stamp)")
|
|
58
|
+
fi
|
|
59
|
+
|
|
60
|
+
# assertion B: drain-entry queue-empty — [drain-exempt:] exempts at drain entry only; the drain successor's entry backstops with no exemption
|
|
61
|
+
b_mode=""
|
|
62
|
+
if [[ -n "$LIFECYCLE_KIT_DRAIN_STAGE" ]]; then
|
|
63
|
+
if [[ "$stage" == "$LIFECYCLE_KIT_DRAIN_STAGE" ]]; then
|
|
64
|
+
b_mode=drain
|
|
65
|
+
else
|
|
66
|
+
for s in "${!LIFECYCLE_KIT_PREDECESSOR[@]}"; do
|
|
67
|
+
[[ "$s" == "$stage" && "${LIFECYCLE_KIT_PREDECESSOR[$s]}" == "$LIFECYCLE_KIT_DRAIN_STAGE" ]] && b_mode=successor
|
|
68
|
+
done
|
|
69
|
+
fi
|
|
70
|
+
fi
|
|
71
|
+
exempt_detail=""
|
|
72
|
+
if [[ -n "$b_mode" ]]; then
|
|
73
|
+
secs=""
|
|
74
|
+
for s in "${LIFECYCLE_KIT_ACTIVE_SECTIONS[@]}"; do secs+="${secs:+|}$s"; done
|
|
75
|
+
scan="$(awk -v secre="^## ($secs)[[:space:]]*$" -v exempt="$([[ "$b_mode" == drain ]] && echo 1 || echo 0)" '
|
|
76
|
+
$0 ~ secre { inq = 1; next }
|
|
77
|
+
/^## / { inq = 0 }
|
|
78
|
+
!inq || $0 !~ /^- / { next }
|
|
79
|
+
{
|
|
80
|
+
if (match($0, /\[drain-exempt:[[:space:]]*[^]]*\]/)) {
|
|
81
|
+
r = substr($0, RSTART, RLENGTH)
|
|
82
|
+
sub(/^\[drain-exempt:[[:space:]]*/, "", r); sub(/\]$/, "", r)
|
|
83
|
+
gsub(/[[:space:]]+$/, "", r)
|
|
84
|
+
if (r == "") printf "M\t%d\t%s\n", FNR, $0
|
|
85
|
+
else if (exempt) printf "E\t%d\t%s\n", FNR, r
|
|
86
|
+
else printf "L\t%d\t%s\n", FNR, $0
|
|
87
|
+
} else printf "L\t%d\t%s\n", FNR, $0
|
|
88
|
+
}
|
|
89
|
+
' "$QUEUE")"; st=$?
|
|
90
|
+
fail_closed "$st" STAGE-ENTRY "awk active-queue scan"
|
|
91
|
+
leftover=""; malformed=""; n_exempt=0
|
|
92
|
+
while IFS=$'\t' read -r kind ln text; do
|
|
93
|
+
[[ -n "$kind" ]] || continue
|
|
94
|
+
case "$kind" in
|
|
95
|
+
L) leftover+=$'\n'" $ln: $text" ;;
|
|
96
|
+
M) malformed+=$'\n'" $ln: $text" ;;
|
|
97
|
+
E) n_exempt=$((n_exempt + 1)); exempt_detail+="${exempt_detail:+; }$ln: $text" ;;
|
|
98
|
+
esac
|
|
99
|
+
done <<< "$scan"
|
|
100
|
+
if [[ -n "$leftover" ]]; then
|
|
101
|
+
if [[ "$b_mode" == drain ]]; then
|
|
102
|
+
errors+=("entering '$stage' but the active queue is non-empty (the prior stage is not drained):$leftover")
|
|
103
|
+
else
|
|
104
|
+
errors+=("entering '$stage' (the drain successor) but the active queue is non-empty — nothing may remain active past '$LIFECYCLE_KIT_DRAIN_STAGE', [drain-exempt:] included:$leftover")
|
|
105
|
+
fi
|
|
106
|
+
fi
|
|
107
|
+
[[ -z "$malformed" ]] || errors+=("[drain-exempt:] with an empty reason is malformed (the reason is the audit trail):$malformed")
|
|
108
|
+
fi
|
|
109
|
+
|
|
110
|
+
# assertion C: audit-entry with a cross-component amendment signal and no audit stamp demands that stamp or a recorded waiver (lifecycle-kit/SPEC.md §check-stage-entry)
|
|
111
|
+
if [[ -n "$LIFECYCLE_KIT_AUDIT_STAGE" && "$stage" == "$LIFECYCLE_KIT_AUDIT_ENTRY_STAGE" ]]; then
|
|
112
|
+
audit_stamp="$(awk -v it="$iter" -v au="$LIFECYCLE_KIT_AUDIT_STAGE" '
|
|
113
|
+
/^---[[:space:]]*$/ { f = 1; next }
|
|
114
|
+
f && NF { if ($1 == it && $2 == au) { print "1"; exit } }
|
|
115
|
+
' "$STATE")"; st=$?
|
|
116
|
+
fail_closed "$st" STAGE-ENTRY "awk audit-stamp scan"
|
|
117
|
+
|
|
118
|
+
if [[ "$audit_stamp" != "1" ]]; then
|
|
119
|
+
# spec: lifecycle-kit/SPEC.md §check-stage-entry — templates/ paths excluded (a shipped stub is not a live amendment)
|
|
120
|
+
declare -A roster=()
|
|
121
|
+
while IFS= read -r sf; do
|
|
122
|
+
[[ -n "$sf" ]] || continue
|
|
123
|
+
sf="${sf#./}"; roster["${sf%/*}"]=1
|
|
124
|
+
done < <(gate_find "." -name "$LIFECYCLE_KIT_ROSTER_BASENAME" -type f | grep -v '/templates/' || true) # reads-couples-exempt: whole-tree audit-signal scan; re-fire is owned by the state-file couple every stage entry stamps
|
|
125
|
+
|
|
126
|
+
declare -A amend_dirs=()
|
|
127
|
+
amend_files=()
|
|
128
|
+
while IFS= read -r af; do
|
|
129
|
+
[[ -n "$af" ]] || continue
|
|
130
|
+
af="${af#./}"; amend_dirs["${af%/*}"]=1; amend_files+=("$af")
|
|
131
|
+
done < <(gate_find "." -name "$LIFECYCLE_KIT_AMENDMENT_GLOB" -type f | grep -v '/templates/' || true) # reads-couples-exempt: whole-tree audit-signal scan; re-fire is owned by the state-file couple every stage entry stamps
|
|
132
|
+
|
|
133
|
+
contract_alt=""
|
|
134
|
+
for ct in "${LIFECYCLE_KIT_CONTRACT_TOKENS[@]}"; do
|
|
135
|
+
contract_alt+="${contract_alt:+|}${ct//./\\.}"
|
|
136
|
+
done
|
|
137
|
+
|
|
138
|
+
signal_detail=""
|
|
139
|
+
if [[ ${#amend_dirs[@]} -ge 2 ]]; then
|
|
140
|
+
signal_detail="amendments span ${#amend_dirs[@]} component dirs: ${!amend_dirs[*]}"
|
|
141
|
+
else
|
|
142
|
+
for af in ${amend_files[@]+"${amend_files[@]}"}; do
|
|
143
|
+
declare -A comps=(["${af%/*}"]=1)
|
|
144
|
+
while IFS= read -r tok; do
|
|
145
|
+
[[ -n "$tok" ]] || continue
|
|
146
|
+
d="$tok"
|
|
147
|
+
for ct in "${LIFECYCLE_KIT_CONTRACT_TOKENS[@]}"; do
|
|
148
|
+
d="${d%/$ct}"; d="${d%/${ct%/}}"
|
|
149
|
+
done
|
|
150
|
+
[[ -n "${roster[$d]:-}" ]] && comps["$d"]=1
|
|
151
|
+
done < <(grep -oE '[a-z0-9][a-z0-9/_-]*/('"$contract_alt"')' "$af" 2>/dev/null || true)
|
|
152
|
+
if [[ ${#comps[@]} -ge 2 ]]; then
|
|
153
|
+
signal_detail="amendment $af references ${#comps[@]} components: ${!comps[*]}"
|
|
154
|
+
unset comps
|
|
155
|
+
break
|
|
156
|
+
fi
|
|
157
|
+
unset comps
|
|
158
|
+
done
|
|
159
|
+
fi
|
|
160
|
+
|
|
161
|
+
if [[ -n "$signal_detail" ]]; then
|
|
162
|
+
waiver="$(awk -v it="$iter" -v wv="$LIFECYCLE_KIT_WAIVER_TOKEN" '
|
|
163
|
+
/^---[[:space:]]*$/ { f = 1; next }
|
|
164
|
+
f && NF { if ($1 == it && $2 == wv) { print "1"; exit } }
|
|
165
|
+
' "$STATE")"; st=$?
|
|
166
|
+
fail_closed "$st" STAGE-ENTRY "awk waiver scan"
|
|
167
|
+
if [[ "$waiver" != "1" ]]; then
|
|
168
|
+
c_fired=1
|
|
169
|
+
errors+=("entering '$stage' with a cross-component amendment signal and no '$iter $LIFECYCLE_KIT_AUDIT_STAGE' stamp ($signal_detail) — the audit trigger (≥2 components' contracts) was not verified for this iteration")
|
|
170
|
+
fi
|
|
171
|
+
fi
|
|
172
|
+
fi
|
|
173
|
+
fi
|
|
174
|
+
|
|
175
|
+
if [[ ${#errors[@]} -gt 0 ]]; then
|
|
176
|
+
echo "STAGE-ENTRY: ${#errors[@]} prior-stage readiness issue(s) entering '$stage' of '$iter':"
|
|
177
|
+
printf ' %s\n' "${errors[@]}"
|
|
178
|
+
if [[ "$c_fired" == "1" ]]; then
|
|
179
|
+
echo " help: a cross-component $LIFECYCLE_KIT_AUDIT_ENTRY_STAGE entry must run /$LIFECYCLE_KIT_AUDIT_STAGE (stamps '$iter $LIFECYCLE_KIT_AUDIT_STAGE <session> <date>'), or — on an explicit user ruling, never self-issued by the entering session — record a deliberate waiver line '$iter $LIFECYCLE_KIT_WAIVER_TOKEN <session> <date>' in $STATE"
|
|
180
|
+
else
|
|
181
|
+
echo " help: a stage entry re-verifies the prior stage's static exit — invoke the predecessor skill (it stamps $STATE) and drain the active queue before entering $LIFECYCLE_KIT_DRAIN_STAGE"
|
|
182
|
+
fi
|
|
183
|
+
exit 1
|
|
184
|
+
fi
|
|
185
|
+
|
|
186
|
+
if [[ -z "$pred" ]]; then
|
|
187
|
+
detail="'$stage' has no mandatory predecessor"
|
|
188
|
+
elif [[ "$b_mode" == drain ]]; then
|
|
189
|
+
detail="predecessor '$pred' stamped; active queue drained"
|
|
190
|
+
[[ -z "$exempt_detail" ]] || detail+=" (drain-exempt residue — $exempt_detail)"
|
|
191
|
+
elif [[ "$b_mode" == successor ]]; then
|
|
192
|
+
detail="predecessor '$pred' stamped; active queue empty (drain-successor backstop, no exemption)"
|
|
193
|
+
else
|
|
194
|
+
detail="predecessor '$pred' stamped"
|
|
195
|
+
fi
|
|
196
|
+
echo "STAGE-ENTRY: clean ('$iter' / '$stage' — $detail)"
|
|
197
|
+
exit 0
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# graph: couples=TASK-QUEUE.md,.workflow/WORKFLOW-STATE.txt dir=one valve=none tier=precommit
|
|
3
|
+
# spec: lifecycle-kit/SPEC.md §check-stage-evidence — stamp grammar + name-axis agreement (staleness) between the header and every stamp; cross-stage session-id distinctness
|
|
4
|
+
set -uo pipefail
|
|
5
|
+
|
|
6
|
+
KIT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
7
|
+
# shellcheck source=../lib/stages.sh
|
|
8
|
+
source "$KIT/lib/stages.sh"
|
|
9
|
+
|
|
10
|
+
QUEUE="${1:-$LIFECYCLE_KIT_QUEUE_FILE}"
|
|
11
|
+
STATE="${2:-$LIFECYCLE_KIT_STATE_FILE}"
|
|
12
|
+
|
|
13
|
+
hdr="$(lifecycle_header "$QUEUE")"
|
|
14
|
+
if [[ -z "$hdr" ]]; then
|
|
15
|
+
echo "STAGE-EVIDENCE: no '## Iteration:' header in $QUEUE"
|
|
16
|
+
echo " help: add '## Iteration: <name>' to $QUEUE"
|
|
17
|
+
exit 1
|
|
18
|
+
fi
|
|
19
|
+
|
|
20
|
+
iter="$(lifecycle_header_iter "$hdr")"
|
|
21
|
+
if [[ -z "$iter" ]]; then
|
|
22
|
+
echo "STAGE-EVIDENCE: could not parse the iteration from: $hdr"
|
|
23
|
+
echo " help: header must read '## Iteration: <name>'"
|
|
24
|
+
exit 1
|
|
25
|
+
fi
|
|
26
|
+
|
|
27
|
+
# spec: lifecycle-kit/SPEC.md §check-stage-evidence — the cursor is read before the unnamed-iteration guard because that guard consumes both axes; a state file present but carrying no stamp is this gate's no-cursor fallback and reds with the missing-file message's sibling — an unstamped file is exactly the condition this gate exists to reject, so it must not go vacuous once the stage axis moved off the header.
|
|
28
|
+
[[ -f "$STATE" ]] || {
|
|
29
|
+
echo "STAGE-EVIDENCE: $STATE is missing"
|
|
30
|
+
echo " help: create it — prose header, a '---' separator, then one '<iter> <stage> <session-id> <YYYY-MM-DD>' stamp per stage-skill invocation"
|
|
31
|
+
exit 1
|
|
32
|
+
}
|
|
33
|
+
stage="$(lifecycle_current_stage "$STATE")"
|
|
34
|
+
if [[ -z "$stage" ]]; then
|
|
35
|
+
echo "STAGE-EVIDENCE: $STATE carries no stamp — there is no current stage to attest"
|
|
36
|
+
echo " help: run the stage skill (it stamps as its first step), or append the '<iter> <stage> <session-id> <YYYY-MM-DD>' stamp below the '---' separator"
|
|
37
|
+
exit 1
|
|
38
|
+
fi
|
|
39
|
+
|
|
40
|
+
if [[ "$iter" == "—" && "$stage" != "$LIFECYCLE_KIT_FIRST_STAGE" ]]; then
|
|
41
|
+
echo "STAGE-EVIDENCE: iteration is still unnamed ('—') at stage '$stage' — /$LIFECYCLE_KIT_FIRST_STAGE must name the iteration (header + stamp) before advancing past $LIFECYCLE_KIT_FIRST_STAGE"
|
|
42
|
+
echo " help: set '## Iteration: <name>' and rewrite the matching $STATE stamp's '—' to <name>"
|
|
43
|
+
exit 1
|
|
44
|
+
fi
|
|
45
|
+
|
|
46
|
+
errors=()
|
|
47
|
+
# spec: lifecycle-kit/SPEC.md §check-stage-evidence — cross-stage session-id distinctness (a stage flip is a context boundary)
|
|
48
|
+
declare -A stage_of_sid=()
|
|
49
|
+
while IFS= read -r line; do
|
|
50
|
+
read -r f1 f2 f3 f4 rest <<<"$line"
|
|
51
|
+
if [[ -z "$f4" || -n "$rest" ]]; then
|
|
52
|
+
errors+=("malformed stamp (want '<iter> <stage> <session-id> <YYYY-MM-DD>'): $line"); continue
|
|
53
|
+
fi
|
|
54
|
+
if ! lifecycle_stage_known "$f2" && [[ -z "$LIFECYCLE_KIT_WAIVER_TOKEN" || "$f2" != "$LIFECYCLE_KIT_WAIVER_TOKEN" ]]; then
|
|
55
|
+
errors+=("bad stage '$f2' (not a lifecycle stage: ${LIFECYCLE_KIT_STAGES[*]}${LIFECYCLE_KIT_WAIVER_TOKEN:+, or the waiver token $LIFECYCLE_KIT_WAIVER_TOKEN}): $line"); continue
|
|
56
|
+
fi
|
|
57
|
+
[[ "$f4" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]] || { errors+=("bad date '$f4': $line"); continue; }
|
|
58
|
+
[[ "$f1" == "$iter" || ( "$f1" == "—" && "$iter" == "—" ) ]] \
|
|
59
|
+
|| errors+=("stamp iteration '$f1' is neither current ('$iter') nor a legal '—' bootstrap (allowed only while the header is unnamed) — stale; /$LIFECYCLE_KIT_FIRST_STAGE truncates at the iteration boundary and renames its bootstrap stamp on naming: $line")
|
|
60
|
+
# spec: lifecycle-kit/SPEC.md §check-stage-evidence — the distinctness map runs only at the 'stage' posture; 'iteration' skips this check alone, attribution still rides the stamps
|
|
61
|
+
if [[ "$LIFECYCLE_KIT_SESSION_BOUNDARY" == stage && "$f1" == "$iter" ]] && lifecycle_stage_known "$f2"; then
|
|
62
|
+
if [[ -n "${stage_of_sid[$f3]:-}" && "${stage_of_sid[$f3]}" != "$f2" ]]; then
|
|
63
|
+
errors+=("session id '$f3' is shared by stages '${stage_of_sid[$f3]}' and '$f2' of '$iter' — a stage flip is a context boundary and needs a fresh session (same-stage re-entries may share or rotate freely; waiver stamps are exempt; the 'iteration' posture of LIFECYCLE_KIT_SESSION_BOUNDARY relaxes this check): $line")
|
|
64
|
+
else
|
|
65
|
+
stage_of_sid["$f3"]="$f2"
|
|
66
|
+
fi
|
|
67
|
+
fi
|
|
68
|
+
done < <(awk '/^---[[:space:]]*$/{f=1; next} f && NF {print}' "$STATE")
|
|
69
|
+
|
|
70
|
+
if [[ ${#errors[@]} -gt 0 ]]; then
|
|
71
|
+
echo "STAGE-EVIDENCE: ${#errors[@]} issue(s) in $STATE:"
|
|
72
|
+
printf ' %s\n' "${errors[@]}"
|
|
73
|
+
echo " help: run /\$stage in this session (it stamps $STATE as its first step), or append the '<iter> <stage> <session> <date>' stamp"
|
|
74
|
+
exit 1
|
|
75
|
+
fi
|
|
76
|
+
if [[ "$LIFECYCLE_KIT_SESSION_BOUNDARY" == stage ]]; then
|
|
77
|
+
echo "STAGE-EVIDENCE: clean ('$iter' / '$stage' stamped; all stamps well-formed, current, and stage-distinct in session id)"
|
|
78
|
+
else
|
|
79
|
+
echo "STAGE-EVIDENCE: clean ('$iter' / '$stage' stamped; all stamps well-formed and current; cross-stage distinctness relaxed by the 'iteration' session boundary)"
|
|
80
|
+
fi
|
|
81
|
+
exit 0
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# graph: couples=.claude/commands/*.md dir=one valve=none tier=precommit
|
|
3
|
+
# spec: lifecycle-kit/SPEC.md §check-stage-skill-coverage — the configured stage set and the skills dir cover each other: every stage has a skill, every enter-stage-invoking skill names a live stage
|
|
4
|
+
#
|
|
5
|
+
# usage: check-stage-skill-coverage.sh [skills-dir]
|
|
6
|
+
# Defaults to LIFECYCLE_KIT_SKILLS_DIR (.claude/commands).
|
|
7
|
+
set -uo pipefail
|
|
8
|
+
|
|
9
|
+
KIT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
10
|
+
SDK="${GATE_SDK_ROOT:-$KIT/../gate-sdk}"
|
|
11
|
+
# shellcheck source=../../gate-sdk/lib/gate.sh
|
|
12
|
+
source "$SDK/lib/gate.sh"
|
|
13
|
+
# shellcheck source=../lib/stages.sh
|
|
14
|
+
source "$KIT/lib/stages.sh"
|
|
15
|
+
|
|
16
|
+
DIR="${1:-$LIFECYCLE_KIT_SKILLS_DIR}"
|
|
17
|
+
[[ -d "$DIR" ]] || { echo "check-stage-skill-coverage: skills dir not found: $DIR" >&2; exit 2; }
|
|
18
|
+
|
|
19
|
+
missing=(); orphan=()
|
|
20
|
+
|
|
21
|
+
for s in "${LIFECYCLE_KIT_STAGES[@]}"; do
|
|
22
|
+
[[ -f "$DIR/$s.md" ]] || missing+=("$s (expected $DIR/$s.md)")
|
|
23
|
+
done
|
|
24
|
+
|
|
25
|
+
shopt -s nullglob
|
|
26
|
+
for f in "$DIR"/*.md; do
|
|
27
|
+
mapfile -t names < <(grep -oE 'enter-stage\.sh[[:space:]]+[a-z][a-z-]*' "$f" \
|
|
28
|
+
| sed -E 's/.*enter-stage\.sh[[:space:]]+//' | sort -u)
|
|
29
|
+
for n in "${names[@]}"; do
|
|
30
|
+
lifecycle_stage_known "$n" || orphan+=("$(basename "$f") invokes enter-stage.sh '$n', not a lifecycle stage")
|
|
31
|
+
done
|
|
32
|
+
done
|
|
33
|
+
shopt -u nullglob
|
|
34
|
+
|
|
35
|
+
if [[ ${#missing[@]} -gt 0 || ${#orphan[@]} -gt 0 ]]; then
|
|
36
|
+
echo "check-stage-skill-coverage: stage set (${LIFECYCLE_KIT_STAGES[*]}) and skills dir $DIR"
|
|
37
|
+
echo "are out of sync — a stage with no skill cannot be entered; an orphan stage skill"
|
|
38
|
+
echo "is a retired stage's dead entry point:"
|
|
39
|
+
for m in "${missing[@]}"; do echo " no skill for stage: $m"; done
|
|
40
|
+
for o in "${orphan[@]}"; do echo " orphan skill: $o"; done
|
|
41
|
+
echo " help: add the missing <stage>.md skill, or retire the orphan skill / fix the"
|
|
42
|
+
echo " stage name it invokes. The stage set is LIFECYCLE_KIT_STAGES (lifecycle-config.sh)."
|
|
43
|
+
exit 1
|
|
44
|
+
fi
|
|
45
|
+
|
|
46
|
+
echo "STAGE-SKILL-COVERAGE: clean (${#LIFECYCLE_KIT_STAGES[@]} stage(s) each have a skill; every enter-stage-invoking skill in $DIR names a live stage)"
|
|
47
|
+
exit 0
|