checkwright 0.0.1 → 0.18.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 +79 -0
- package/payload/canon-kit/SPEC.md +1410 -0
- package/payload/canon-kit/checks/check-amendment-queue.sh +116 -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-install-claim.sh +146 -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-install-claim/bad/README.md +12 -0
- package/payload/canon-kit/gate-tests/check-install-claim/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-install-claim/bad/install.md +24 -0
- package/payload/canon-kit/gate-tests/check-install-claim/bad/posts/note.md +7 -0
- package/payload/canon-kit/gate-tests/check-install-claim/bad/scripts/canon-config.sh +10 -0
- package/payload/canon-kit/gate-tests/check-install-claim/bad/scripts/install-transports.sh +7 -0
- package/payload/canon-kit/gate-tests/check-install-claim/good/README.md +12 -0
- package/payload/canon-kit/gate-tests/check-install-claim/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-install-claim/good/install.md +24 -0
- package/payload/canon-kit/gate-tests/check-install-claim/good/posts/note.md +7 -0
- package/payload/canon-kit/gate-tests/check-install-claim/good/scripts/canon-config.sh +10 -0
- package/payload/canon-kit/gate-tests/check-install-claim/good/scripts/install-transports.sh +7 -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 +505 -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 +790 -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 +792 -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 +881 -0
- package/payload/drift-kit/bin/drift-report.sh +155 -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 +46 -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-queue-net-delta.sh +74 -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 +1876 -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 +1492 -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/release-sweep.md +39 -0
- package/payload/lifecycle-kit/templates/stages/align.md +65 -0
- package/payload/lifecycle-kit/templates/stages/build.md +78 -0
- package/payload/lifecycle-kit/templates/stages/close.md +122 -0
- package/payload/lifecycle-kit/templates/stages/scope.md +112 -0
- package/payload/lifecycle-kit/templates/stages/spec.md +91 -0
- package/payload/lifecycle-kit/templates/stages/validate.md +54 -0
- package/payload/lifecycle-kit/templates/upgrade.md +41 -0
- package/payload/queue-kit/README.md +78 -0
- package/payload/queue-kit/SPEC.md +797 -0
- package/payload/queue-kit/bin/lesson-sink.sh +28 -0
- package/payload/queue-kit/bin/queue-index.sh +182 -0
- package/payload/queue-kit/bin/roadmap.sh +76 -0
- package/payload/queue-kit/checks/check-queue-entry-budget.sh +104 -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-roadmap-fresh.sh +110 -0
- package/payload/queue-kit/checks/check-tag-lead-line.sh +70 -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-entry-budget/bad/TASK-QUEUE.md +33 -0
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/expect.txt +4 -0
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/scripts/queue-config.sh +6 -0
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/TASK-QUEUE.md +35 -0
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/scripts/queue-config.sh +6 -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-roadmap-fresh/bad/TASK-QUEUE.md +24 -0
- package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/args +5 -0
- package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/emit.txt +8 -0
- package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/expect.txt +1 -0
- package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/projection.txt +16 -0
- package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/scripts/queue-config.sh +6 -0
- package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/TASK-QUEUE.md +22 -0
- package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/args +5 -0
- package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/emit.txt +7 -0
- package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/expect.txt +1 -0
- package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/projection.txt +16 -0
- package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/scripts/queue-config.sh +6 -0
- package/payload/queue-kit/gate-tests/check-tag-lead-line/bad/TASK-QUEUE.md +25 -0
- package/payload/queue-kit/gate-tests/check-tag-lead-line/bad/expect.txt +2 -0
- package/payload/queue-kit/gate-tests/check-tag-lead-line/good/TASK-QUEUE.md +30 -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 +159 -0
- package/payload/queue-kit/gate-tests/roadmap.test.sh +197 -0
- package/payload/queue-kit/lib/queue.sh +193 -0
- package/payload/queue-kit/smoke/install.sh +22 -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 +269 -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,28 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# spec: queue-kit/SPEC.md §bin/lesson-sink.sh — resolve a harvest tag's sink and stream the lesson body into it (a tool, not a gate; no # graph: manifest)
|
|
3
|
+
#
|
|
4
|
+
# usage: lesson-sink.sh <tag>
|
|
5
|
+
# reads the lesson body on stdin; runs the QUEUE_KIT_LESSON_SINKS command for
|
|
6
|
+
# <tag>, or appends to <workflow-dir>/<tag>-harvest.md when none is configured
|
|
7
|
+
set -uo pipefail
|
|
8
|
+
|
|
9
|
+
KIT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
10
|
+
# shellcheck source=../lib/queue.sh
|
|
11
|
+
source "$KIT/lib/queue.sh"
|
|
12
|
+
|
|
13
|
+
tag=""
|
|
14
|
+
while (($#)); do
|
|
15
|
+
case "$1" in
|
|
16
|
+
-h|--help) sed -n '4,6p' "${BASH_SOURCE[0]}" | sed 's/^# \{0,1\}//'; exit 0 ;;
|
|
17
|
+
-*) echo "lesson-sink: unknown option: $1" >&2; exit 2 ;;
|
|
18
|
+
*) tag="$1"; shift ;;
|
|
19
|
+
esac
|
|
20
|
+
done
|
|
21
|
+
[[ -n "$tag" ]] || { echo "lesson-sink: needs a <tag>" >&2; exit 2; }
|
|
22
|
+
|
|
23
|
+
if [[ -v QUEUE_KIT_LESSON_SINKS[$tag] ]]; then
|
|
24
|
+
# spec: queue-kit/SPEC.md §bin/lesson-sink.sh — a configured sink that fails is a red close step, never a silent fallback to staging
|
|
25
|
+
exec bash -c "${QUEUE_KIT_LESSON_SINKS[$tag]}"
|
|
26
|
+
fi
|
|
27
|
+
|
|
28
|
+
exec cat >> "${GATE_SDK_WORKFLOW_DIR:-.workflow}/${tag}-harvest.md"
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# spec: queue-kit/SPEC.md §bin/queue-index.sh — compact queue surface for task selection (a tool, not a gate; no # graph: manifest)
|
|
3
|
+
#
|
|
4
|
+
# usage: queue-index.sh [--collapse-deferred] [--extent <slug>] [--icebox-candidates] [queue-file]
|
|
5
|
+
# default: header + active (• ready / ✗ blocked) + deferred titles + icebox tally;
|
|
6
|
+
# --collapse-deferred: per-### tally; --extent <slug>: "<start> <end>"; --icebox-candidates: eviction worklist
|
|
7
|
+
set -uo pipefail
|
|
8
|
+
|
|
9
|
+
KIT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
10
|
+
# shellcheck source=../lib/queue.sh
|
|
11
|
+
source "$KIT/lib/queue.sh"
|
|
12
|
+
|
|
13
|
+
mode=index; collapse=0; slug=""; file=""
|
|
14
|
+
while (($#)); do
|
|
15
|
+
case "$1" in
|
|
16
|
+
--collapse-deferred) collapse=1; shift ;;
|
|
17
|
+
--extent) mode=extent; slug="${2:-}"; shift 2 || true ;;
|
|
18
|
+
--icebox-candidates) mode=candidates; shift ;;
|
|
19
|
+
-h|--help) sed -n '3,5p' "${BASH_SOURCE[0]}" | sed 's/^# \{0,1\}//'; exit 0 ;;
|
|
20
|
+
-*) echo "queue-index: unknown option: $1" >&2; exit 2 ;;
|
|
21
|
+
*) file="$1"; shift ;;
|
|
22
|
+
esac
|
|
23
|
+
done
|
|
24
|
+
FILE="${file:-$QUEUE_KIT_QUEUE_FILE}"
|
|
25
|
+
[[ -f "$FILE" ]] || { echo "queue-index: file not found: $FILE" >&2; exit 2; }
|
|
26
|
+
|
|
27
|
+
if [[ "$mode" == extent ]]; then
|
|
28
|
+
[[ -n "$slug" ]] || { echo "queue-index: --extent needs a <slug>" >&2; exit 2; }
|
|
29
|
+
range="$(awk -v slug="$slug" '
|
|
30
|
+
!found && $0 ~ /^[[:space:]]*-[[:space:]]+\*\*[a-z0-9][a-z0-9-]*\*\*/ {
|
|
31
|
+
match($0, /\*\*[a-z0-9][a-z0-9-]*\*\*/)
|
|
32
|
+
if (substr($0, RSTART + 2, RLENGTH - 4) == slug) {
|
|
33
|
+
found = 1; start = NR; ind = match($0, /[^[:space:]]/) - 1; next
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
found {
|
|
37
|
+
if ($0 ~ /^#/ || $0 ~ /^---[[:space:]]*$/) { print start, NR - 1; done = 1; exit }
|
|
38
|
+
if ($0 ~ /^[[:space:]]*-[[:space:]]/ && (match($0, /[^[:space:]]/) - 1) <= ind) {
|
|
39
|
+
print start, NR - 1; done = 1; exit
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
END { if (found && !done) print start, NR }
|
|
43
|
+
' "$FILE")"
|
|
44
|
+
[[ -n "$range" ]] || { echo "queue-index: slug not found: $slug" >&2; exit 1; }
|
|
45
|
+
echo "$range"
|
|
46
|
+
exit 0
|
|
47
|
+
fi
|
|
48
|
+
|
|
49
|
+
if [[ "$mode" == candidates ]]; then
|
|
50
|
+
cutoff="$(date -d "$QUEUE_KIT_ICEBOX_AGE_DAYS days ago" +%F 2>/dev/null)" \
|
|
51
|
+
|| { echo "queue-index: cannot compute the age cutoff (date -d unavailable)" >&2; exit 2; }
|
|
52
|
+
# spec: queue-kit/SPEC.md §bin/queue-index.sh — an advisory worklist, never a verdict: the age filter only bounds how much close must look at, and the cost-class opener is printed for the reading judgment rather than matched on
|
|
53
|
+
awk -v defre="$QUEUE_DEFERRED_RE" -v sectre="$QUEUE_SECTION_RE" -v cutoff="$cutoff" '
|
|
54
|
+
function opener(t) {
|
|
55
|
+
sub(/^.*\*\*Cost while deferred:?\*\*:?[[:space:]]*/, "", t)
|
|
56
|
+
sub(/[[:space:]]*$/, "", t)
|
|
57
|
+
if (length(t) > 48) t = substr(t, 1, 47) "…"
|
|
58
|
+
return (t == "" ? "(unstated)" : t)
|
|
59
|
+
}
|
|
60
|
+
# spec: queue-kit/SPEC.md §bin/queue-index.sh — the low cost class is matched on the opener as prose, which is an unacceptable heuristic in a gate and exactly the right ceiling in an advisory worklist; an uncosted entry is listed too, because an absent input appears rather than vanishing
|
|
61
|
+
function lowclass(t) { return (t ~ /^(low|zero|bounded|cosmetic)/) }
|
|
62
|
+
function flush( d) {
|
|
63
|
+
if (slug == "") return
|
|
64
|
+
d = (surfaced != "" ? surfaced : filed)
|
|
65
|
+
if ((d == "" || d < cutoff) && (cost == "" || lowclass(cost)))
|
|
66
|
+
printf "%-46s %4dl %-11s %s\n", slug, FNR - start, \
|
|
67
|
+
(d == "" ? "(undated)" : d), (cost == "" ? "(uncosted)" : cost)
|
|
68
|
+
slug = ""; surfaced = ""; filed = ""; cost = ""
|
|
69
|
+
}
|
|
70
|
+
$0 ~ sectre { flush(); ind = ($0 ~ defre); next }
|
|
71
|
+
!ind { next }
|
|
72
|
+
/^[[:space:]]*-[[:space:]]+\*\*[a-z0-9][a-z0-9-]*\*\*/ {
|
|
73
|
+
flush()
|
|
74
|
+
match($0, /\*\*[a-z0-9][a-z0-9-]*\*\*/)
|
|
75
|
+
slug = substr($0, RSTART + 2, RLENGTH - 4); start = FNR
|
|
76
|
+
}
|
|
77
|
+
slug == "" { next }
|
|
78
|
+
match($0, /Surfaced [0-9]{4}-[0-9]{2}-[0-9]{2}/) {
|
|
79
|
+
if (surfaced == "") surfaced = substr($0, RSTART + 9, 10)
|
|
80
|
+
}
|
|
81
|
+
match($0, /Filed [0-9]{4}-[0-9]{2}-[0-9]{2}/) {
|
|
82
|
+
if (filed == "") filed = substr($0, RSTART + 6, 10)
|
|
83
|
+
}
|
|
84
|
+
/\*\*Cost while deferred/ { if (cost == "") cost = opener($0) }
|
|
85
|
+
END { FNR++; flush() }
|
|
86
|
+
' "$FILE"
|
|
87
|
+
exit 0
|
|
88
|
+
fi
|
|
89
|
+
|
|
90
|
+
hdr="$(grep -m1 '^## Iteration:' "$FILE" || true)"
|
|
91
|
+
[[ -n "$hdr" ]] && { echo "$hdr"; echo ""; }
|
|
92
|
+
|
|
93
|
+
awk -v activere="$QUEUE_ACTIVE_RE" -v deferredre="$QUEUE_DEFERRED_RE" \
|
|
94
|
+
-v lessonsre="$QUEUE_LESSONS_RE" -v cap="$QUEUE_KIT_ATTEND_CAP" \
|
|
95
|
+
-v sectre="$QUEUE_SECTION_RE" -v collapse="$collapse" \
|
|
96
|
+
-v iceboxre="$QUEUE_ICEBOX_RE" -v iceboxname="$QUEUE_KIT_ICEBOX_SECTION" '
|
|
97
|
+
# spec: queue-kit/SPEC.md §bin/queue-index.sh — tags come off before the slug-and-dash strip so the dash is adjacent when that regex runs, and a title left empty renders as the bare slug rather than an orphaned separator
|
|
98
|
+
function title(line, t) {
|
|
99
|
+
t = line
|
|
100
|
+
sub(/^[[:space:]]*-[[:space:]]+/, "", t)
|
|
101
|
+
gsub(/\[[^]]*\]/, "", t)
|
|
102
|
+
sub(/^\*\*[a-z0-9][a-z0-9-]*\*\*[[:space:]]*(—[[:space:]]*)?/, "", t)
|
|
103
|
+
sub(/^[[:space:]]+/, "", t); sub(/[[:space:]]+$/, "", t)
|
|
104
|
+
if (length(t) > 64) t = substr(t, 1, 63) "…"
|
|
105
|
+
return t
|
|
106
|
+
}
|
|
107
|
+
function joined(sl, t) { return (t == "" ? sl : sl " — " t) }
|
|
108
|
+
function drainex(line, d) {
|
|
109
|
+
if (!match(line, /\[drain-exempt:[[:space:]]*[^]]+\]/)) return ""
|
|
110
|
+
d = substr(line, RSTART, RLENGTH)
|
|
111
|
+
sub(/\[drain-exempt:[[:space:]]*/, "", d); sub(/\][[:space:]]*$/, "", d)
|
|
112
|
+
return d
|
|
113
|
+
}
|
|
114
|
+
function blockers(line, s, r, b) {
|
|
115
|
+
s = line; r = ""
|
|
116
|
+
while (match(s, /\[blocked-by:[[:space:]]*[a-z0-9][a-z0-9-]*/)) {
|
|
117
|
+
b = substr(s, RSTART, RLENGTH); sub(/\[blocked-by:[[:space:]]*/, "", b)
|
|
118
|
+
r = r (r == "" ? "" : ", ") b
|
|
119
|
+
s = substr(s, RSTART + RLENGTH)
|
|
120
|
+
}
|
|
121
|
+
return r
|
|
122
|
+
}
|
|
123
|
+
$0 ~ activere { sec = "active"; next }
|
|
124
|
+
$0 ~ deferredre { sec = "deferred"; next }
|
|
125
|
+
iceboxre != "" && $0 ~ iceboxre { sec = "icebox"; next }
|
|
126
|
+
$0 ~ lessonsre { sec = "lessons"; next }
|
|
127
|
+
$0 ~ sectre { sec = "other"; next }
|
|
128
|
+
|
|
129
|
+
# spec: queue-kit/SPEC.md §bin/queue-index.sh — the icebox is a tally and never a listing: this surface is embedded in the always-loaded session brief, so listing the tier would re-import the very tokens the tier exists to remove
|
|
130
|
+
sec == "icebox" && /^-[[:space:]]/ && match($0, /\*\*[a-z0-9][a-z0-9-]*\*\*/) { ni++; next }
|
|
131
|
+
|
|
132
|
+
sec == "lessons" && /^-[[:space:]]/ && /\[attend\]/ {
|
|
133
|
+
nl++
|
|
134
|
+
if (nl <= cap) { line = $0; sub(/[[:space:]]+$/, "", line); att[nl] = line }
|
|
135
|
+
next
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
sec == "active" && /^-[[:space:]]/ && match($0, /\*\*[a-z0-9][a-z0-9-]*\*\*/) {
|
|
139
|
+
sl = substr($0, RSTART + 2, RLENGTH - 4)
|
|
140
|
+
bl = blockers($0); de = drainex($0)
|
|
141
|
+
na++; amark[na] = (bl == "" ? "•" : "✗")
|
|
142
|
+
atitle[na] = joined(sl, title($0)) \
|
|
143
|
+
(bl == "" ? "" : " [blocked-by: " bl "]") \
|
|
144
|
+
(de == "" ? "" : " [drain-exempt: " de "]")
|
|
145
|
+
next
|
|
146
|
+
}
|
|
147
|
+
sec == "deferred" && /^###[[:space:]]/ {
|
|
148
|
+
cur = $0; sub(/^###[[:space:]]+/, "", cur); sub(/[[:space:]]+$/, "", cur); next
|
|
149
|
+
}
|
|
150
|
+
sec == "deferred" && /^-[[:space:]]/ && match($0, /\*\*[a-z0-9][a-z0-9-]*\*\*/) {
|
|
151
|
+
sl = substr($0, RSTART + 2, RLENGTH - 4)
|
|
152
|
+
key = (cur == "" ? "(top)" : cur)
|
|
153
|
+
if (!(key in seen)) { seen[key] = 1; dord[++nd] = key }
|
|
154
|
+
cnt[key]++
|
|
155
|
+
dn++; dsub[dn] = key; dtitle[dn] = joined(sl, title($0))
|
|
156
|
+
next
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
END {
|
|
160
|
+
print "Active (pick the first •):"
|
|
161
|
+
if (na == 0) print " (none — active queue empty)"
|
|
162
|
+
for (i = 1; i <= na; i++) printf " %s %s\n", amark[i], atitle[i]
|
|
163
|
+
print ""
|
|
164
|
+
if (collapse == 1) {
|
|
165
|
+
print "Deferred (tally):"
|
|
166
|
+
if (nd == 0) print " (none)"
|
|
167
|
+
for (i = 1; i <= nd; i++) printf " %s: %d\n", dord[i], cnt[dord[i]]
|
|
168
|
+
} else {
|
|
169
|
+
print "Deferred:"
|
|
170
|
+
if (dn == 0) print " (none)"
|
|
171
|
+
for (i = 1; i <= dn; i++) printf " %s\n", dtitle[i]
|
|
172
|
+
}
|
|
173
|
+
if (iceboxre != "") printf "%s: %d entries\n", iceboxname, ni + 0
|
|
174
|
+
if (nl > 0) {
|
|
175
|
+
print ""
|
|
176
|
+
print "Attention (Lessons [attend], this iteration):"
|
|
177
|
+
lim = (nl < cap ? nl : cap)
|
|
178
|
+
for (i = 1; i <= lim; i++) printf " %s\n", att[i]
|
|
179
|
+
if (nl > cap) printf " (+%d more [attend])\n", nl - cap
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
' "$FILE"
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# spec: queue-kit/SPEC.md §bin/roadmap.sh — the public roadmap projected off the queue's [roadmap:] tags (a tool, not a gate; no # graph: manifest)
|
|
3
|
+
#
|
|
4
|
+
# usage: roadmap.sh [--emit|--write] [queue-file]
|
|
5
|
+
# --emit (default): print the generated block, the surface check-roadmap-fresh byte-compares.
|
|
6
|
+
# --write: splice that block between QUEUE_KIT_ROADMAP_FILE's markers, touching nothing outside them.
|
|
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/inject.sh
|
|
12
|
+
source "$SDK/lib/inject.sh"
|
|
13
|
+
# shellcheck source=../lib/queue.sh
|
|
14
|
+
source "$KIT/lib/queue.sh"
|
|
15
|
+
|
|
16
|
+
mode="emit"; file=""
|
|
17
|
+
while (($#)); do
|
|
18
|
+
case "$1" in
|
|
19
|
+
--emit) mode="emit"; shift ;;
|
|
20
|
+
--write) mode="write"; shift ;;
|
|
21
|
+
-h|--help) sed -n '3,6p' "${BASH_SOURCE[0]}" | sed 's/^# \{0,1\}//'; exit 0 ;;
|
|
22
|
+
-*) echo "roadmap: unknown option: $1" >&2; exit 2 ;;
|
|
23
|
+
*) file="$1"; shift ;;
|
|
24
|
+
esac
|
|
25
|
+
done
|
|
26
|
+
|
|
27
|
+
FILE="${file:-$QUEUE_KIT_QUEUE_FILE}"
|
|
28
|
+
[[ -f "$FILE" ]] || { echo "roadmap: queue file not found: $FILE" >&2; exit 2; }
|
|
29
|
+
[[ ${#QUEUE_KIT_HORIZONS[@]} -gt 0 ]] \
|
|
30
|
+
|| { echo "roadmap: QUEUE_KIT_HORIZONS is empty — no roadmap vocabulary is configured" >&2; exit 2; }
|
|
31
|
+
|
|
32
|
+
entries="$(queue_roadmap_entries "$FILE")"; st=$?
|
|
33
|
+
[[ "$st" -eq 0 ]] || { echo "roadmap: the queue parse failed (exit $st)" >&2; exit 2; }
|
|
34
|
+
|
|
35
|
+
# spec: queue-kit/SPEC.md §bin/roadmap.sh — every configured horizon gets its heading whether or not the queue fills it: an empty horizon is information, and a section that vanishes when it empties reads as a page that forgot it
|
|
36
|
+
emit_body() {
|
|
37
|
+
local first=1 h n ntags fieldv slug nsum summary track
|
|
38
|
+
for h in "${QUEUE_KIT_HORIZONS[@]}"; do
|
|
39
|
+
[[ "$first" -eq 1 ]] || printf '\n'
|
|
40
|
+
first=0
|
|
41
|
+
printf '### %s\n\n' "$h"
|
|
42
|
+
n=0
|
|
43
|
+
while IFS=$'\t' read -r ntags fieldv slug nsum summary; do
|
|
44
|
+
[[ -n "$slug" ]] || continue
|
|
45
|
+
[[ "$ntags" == 1 ]] || continue
|
|
46
|
+
[[ "$fieldv" == "$h/"* ]] || continue
|
|
47
|
+
track="${fieldv#*/}"
|
|
48
|
+
[[ -n "$track" && "$track" != */* ]] || continue
|
|
49
|
+
# spec: queue-kit/SPEC.md §bin/roadmap.sh — the whitelist: an entry with no single declaration contributes no prose, so unmarked body text can never reach the page even when the gate is bypassed
|
|
50
|
+
[[ "$nsum" == 1 && -n "$summary" ]] || continue
|
|
51
|
+
printf -- '- **`%s`** *(%s)* — %s\n' "$slug" "$track" "$summary"
|
|
52
|
+
n=$((n + 1))
|
|
53
|
+
done <<< "$entries"
|
|
54
|
+
[[ "$n" -gt 0 ]] || printf '%s\n' "_Nothing is queued under this horizon._"
|
|
55
|
+
done
|
|
56
|
+
# comment-tier-exempt: load-bearing blank — kramdown ends a list only on a blank
|
|
57
|
+
# line, else the :end marker abuts the last bullet and is absorbed into that <li>;
|
|
58
|
+
# command substitution strips it on both sides, so the byte-compare still holds.
|
|
59
|
+
printf '\n'
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if [[ "$mode" == emit ]]; then
|
|
63
|
+
emit_body
|
|
64
|
+
exit 0
|
|
65
|
+
fi
|
|
66
|
+
|
|
67
|
+
[[ -n "$QUEUE_KIT_ROADMAP_FILE" ]] \
|
|
68
|
+
|| { echo "roadmap: --write needs QUEUE_KIT_ROADMAP_FILE; it is empty (no projection page configured)" >&2; exit 2; }
|
|
69
|
+
[[ -f "$QUEUE_KIT_ROADMAP_FILE" ]] \
|
|
70
|
+
|| { echo "roadmap: projection page not found: $QUEUE_KIT_ROADMAP_FILE" >&2; exit 2; }
|
|
71
|
+
|
|
72
|
+
BEGIN="<!-- ${QUEUE_KIT_ROADMAP_MARKER}:begin -->"
|
|
73
|
+
END="<!-- ${QUEUE_KIT_ROADMAP_MARKER}:end -->"
|
|
74
|
+
action="$(emit_body | inject_marker_block "$QUEUE_KIT_ROADMAP_FILE" "$BEGIN" "$END")" \
|
|
75
|
+
|| { echo "roadmap: failed to write the roadmap block into $QUEUE_KIT_ROADMAP_FILE" >&2; exit 2; }
|
|
76
|
+
echo "roadmap: $action the $QUEUE_KIT_ROADMAP_MARKER block in $QUEUE_KIT_ROADMAP_FILE"
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# graph: couples=TASK-QUEUE.md dir=one valve=none tier=precommit
|
|
3
|
+
# spec: queue-kit/SPEC.md §check-queue-entry-budget — a deferred entry is a costed filing: bounded above so it is not an inlined amendment, bounded below so it is not a flag-and-skip; an icebox entry is its lead line and nothing else
|
|
4
|
+
#
|
|
5
|
+
# usage: check-queue-entry-budget.sh [queue-file]
|
|
6
|
+
# Defaults to the configured queue file (QUEUE_KIT_QUEUE_FILE).
|
|
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/queue.sh
|
|
14
|
+
source "$KIT/lib/queue.sh"
|
|
15
|
+
|
|
16
|
+
FILE="${1:-$QUEUE_KIT_QUEUE_FILE}"
|
|
17
|
+
[[ -f "$FILE" ]] || { echo "check-queue-entry-budget: file not found: $FILE" >&2; exit 2; }
|
|
18
|
+
|
|
19
|
+
out="$(awk -v defre="$QUEUE_DEFERRED_RE" -v icere="$QUEUE_ICEBOX_RE" \
|
|
20
|
+
-v sectre="$QUEUE_SECTION_RE" -v cap="$QUEUE_KIT_ENTRY_LINE_CAP" '
|
|
21
|
+
# spec: queue-kit/SPEC.md §check-queue-entry-budget — an extent runs from the lead line to the line before the next bullet at the same or shallower indent, the rule bin/queue-index.sh --extent already yields; a sub-task nests inside its parent and is measured as its own entry too
|
|
22
|
+
# spec: queue-kit/SPEC.md §check-queue-entry-budget — assertion A measures the raw extent (trailing blank included), the range an eviction deletes; assertion B counts content lines, because a blank before the next heading is not a continuation line
|
|
23
|
+
function emit(i, n) {
|
|
24
|
+
n = bound - o_start[i]
|
|
25
|
+
if (o_sec[i] == "deferred") {
|
|
26
|
+
if (n > cap) printf "size\t%d\t%s\t%d\n", o_start[i], o_slug[i], n
|
|
27
|
+
if (o_ind[i] == 0 && !o_costed[i]) printf "cost\t%d\t%s\t0\n", o_start[i], o_slug[i]
|
|
28
|
+
} else if (o_sec[i] == "icebox" && o_nb[i] > 1) {
|
|
29
|
+
printf "shape\t%d\t%s\t%d\n", o_start[i], o_slug[i], o_nb[i]
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function close_to(ind, i) {
|
|
33
|
+
for (i = nopen; i >= 1; i--) {
|
|
34
|
+
if (o_ind[i] < ind) break
|
|
35
|
+
emit(i); nopen--
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function cost_seen( i) { for (i = 1; i <= nopen; i++) o_costed[i] = 1 }
|
|
39
|
+
|
|
40
|
+
/^#/ || /^---[[:space:]]*$/ { bound = FNR; close_to(0) }
|
|
41
|
+
$0 ~ sectre {
|
|
42
|
+
sec = "other"
|
|
43
|
+
if ($0 ~ defre) sec = "deferred"
|
|
44
|
+
else if (icere != "" && $0 ~ icere) sec = "icebox"
|
|
45
|
+
next
|
|
46
|
+
}
|
|
47
|
+
sec != "deferred" && sec != "icebox" { next }
|
|
48
|
+
/^[[:space:]]*-[[:space:]]/ {
|
|
49
|
+
ind = match($0, /[^[:space:]]/) - 1
|
|
50
|
+
bound = FNR; close_to(ind)
|
|
51
|
+
if (!match($0, /^[[:space:]]*-[[:space:]]+\*\*[a-z0-9][a-z0-9-]*\*\*/)) {
|
|
52
|
+
for (i = 1; i <= nopen; i++) o_nb[i]++ # prose-note bullet: a content line
|
|
53
|
+
next
|
|
54
|
+
}
|
|
55
|
+
match($0, /\*\*[a-z0-9][a-z0-9-]*\*\*/)
|
|
56
|
+
for (i = 1; i <= nopen; i++) o_nb[i]++ # a sub-task is content of the parent too
|
|
57
|
+
nopen++
|
|
58
|
+
o_slug[nopen] = substr($0, RSTART + 2, RLENGTH - 4)
|
|
59
|
+
o_start[nopen] = FNR; o_ind[nopen] = ind; o_sec[nopen] = sec
|
|
60
|
+
o_costed[nopen] = 0; o_nb[nopen] = 1
|
|
61
|
+
if ($0 ~ /\*\*Cost while deferred/) cost_seen()
|
|
62
|
+
next
|
|
63
|
+
}
|
|
64
|
+
nopen > 0 && NF > 0 { for (i = 1; i <= nopen; i++) o_nb[i]++ }
|
|
65
|
+
nopen > 0 && /\*\*Cost while deferred/ { cost_seen() }
|
|
66
|
+
END { bound = FNR + 1; close_to(0) }
|
|
67
|
+
' "$FILE")"; st=$?
|
|
68
|
+
fail_closed "$st" check-queue-entry-budget awk
|
|
69
|
+
|
|
70
|
+
if [[ -n "$out" ]]; then
|
|
71
|
+
size=(); shape=(); cost=()
|
|
72
|
+
while IFS=$'\t' read -r class ln slug n; do
|
|
73
|
+
[[ -n "$class" ]] || continue
|
|
74
|
+
case "$class" in
|
|
75
|
+
size) size+=("$FILE:$ln: $slug — $n lines (cap $QUEUE_KIT_ENTRY_LINE_CAP)") ;;
|
|
76
|
+
shape) shape+=("$FILE:$ln: $slug — $n content lines; an icebox entry is exactly one") ;;
|
|
77
|
+
cost) cost+=("$FILE:$ln: $slug") ;;
|
|
78
|
+
esac
|
|
79
|
+
done <<< "$out"
|
|
80
|
+
echo "check-queue-entry-budget: deferred-pool entry budget violation(s):"
|
|
81
|
+
echo ""
|
|
82
|
+
if (( ${#size[@]} )); then
|
|
83
|
+
echo "over the per-entry line cap (a body that long is an amendment inlined where"
|
|
84
|
+
echo "the amendment gates cannot see it):"
|
|
85
|
+
printf ' %s\n' "${size[@]}"
|
|
86
|
+
fi
|
|
87
|
+
if (( ${#cost[@]} )); then
|
|
88
|
+
echo "no 'Cost while deferred' field (a gap you defer is costed and filed, never"
|
|
89
|
+
echo "flagged-and-skipped):"
|
|
90
|
+
printf ' %s\n' "${cost[@]}"
|
|
91
|
+
fi
|
|
92
|
+
if (( ${#shape[@]} )); then
|
|
93
|
+
echo "icebox entry carrying a body (the tier's whole purpose is minimum residency;"
|
|
94
|
+
echo "membership in it is itself the cost declaration):"
|
|
95
|
+
printf ' %s\n' "${shape[@]}"
|
|
96
|
+
fi
|
|
97
|
+
echo " help: compress the body to the cap, add the cost field, or evict the entry to"
|
|
98
|
+
echo " the icebox as a one-line lead. The removed narrative stays recoverable"
|
|
99
|
+
echo " from the evicting commit's own diff (git log -p -S'<slug>')."
|
|
100
|
+
exit 1
|
|
101
|
+
fi
|
|
102
|
+
|
|
103
|
+
echo "QUEUE-ENTRY-BUDGET: clean (every $QUEUE_KIT_DEFERRED_SECTION entry within $QUEUE_KIT_ENTRY_LINE_CAP lines and carrying a cost field in $FILE)"
|
|
104
|
+
exit 0
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# graph: couples=TASK-QUEUE.md dir=one valve=none tier=precommit
|
|
3
|
+
# spec: queue-kit/SPEC.md §check-queue-hygiene — the queue holds only tasks, tags, and structure: no HTML comments, no duplicate lines, no column-0 prose
|
|
4
|
+
#
|
|
5
|
+
# usage: check-queue-hygiene.sh [queue-file]
|
|
6
|
+
# Defaults to the configured queue file (QUEUE_KIT_QUEUE_FILE).
|
|
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/queue.sh
|
|
14
|
+
source "$KIT/lib/queue.sh"
|
|
15
|
+
|
|
16
|
+
FILE="${1:-$QUEUE_KIT_QUEUE_FILE}"
|
|
17
|
+
[[ -f "$FILE" ]] || { echo "check-queue-hygiene: file not found: $FILE" >&2; exit 2; }
|
|
18
|
+
|
|
19
|
+
out="$(awk -v leads="$(printf '%s\n' "${QUEUE_KIT_PROSE_LEADS[@]+"${QUEUE_KIT_PROSE_LEADS[@]}"}")" '
|
|
20
|
+
BEGIN { nl = split(leads, L, "\n") }
|
|
21
|
+
{
|
|
22
|
+
if ($0 ~ /<!--/ || $0 ~ /-->/)
|
|
23
|
+
printf "html\t%d\t%s\n", FNR, $0
|
|
24
|
+
|
|
25
|
+
if ($0 ~ /^[^[:space:]]/) { # column-0, non-blank line
|
|
26
|
+
ok = 0
|
|
27
|
+
if ($0 ~ /^#/) ok = 1 # heading
|
|
28
|
+
else if ($0 ~ /^-[[:space:]]/) ok = 1 # bullet
|
|
29
|
+
else if ($0 ~ /^---[[:space:]]*$/) ok = 1 # rule
|
|
30
|
+
else {
|
|
31
|
+
for (i = 1; i <= nl; i++)
|
|
32
|
+
if (L[i] != "" && index($0, L[i]) == 1) { ok = 1; break }
|
|
33
|
+
}
|
|
34
|
+
if (!ok) printf "prose\t%d\t%s\n", FNR, $0
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
if ($0 !~ /^[[:space:]]*$/ && $0 !~ /^---[[:space:]]*$/) {
|
|
38
|
+
if ($0 in seen)
|
|
39
|
+
printf "dup\t%d\t%s (first seen at line %d)\n", FNR, $0, seen[$0]
|
|
40
|
+
else
|
|
41
|
+
seen[$0] = FNR
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
' "$FILE")"; st=$?
|
|
45
|
+
fail_closed "$st" QUEUE-HYGIENE awk
|
|
46
|
+
|
|
47
|
+
html=(); prose=(); dup=()
|
|
48
|
+
while IFS=$'\t' read -r class ln text; do
|
|
49
|
+
[[ -n "$class" ]] || continue
|
|
50
|
+
case "$class" in
|
|
51
|
+
html) html+=("$FILE:$ln: $text") ;;
|
|
52
|
+
prose) prose+=("$FILE:$ln: $text") ;;
|
|
53
|
+
dup) dup+=("$FILE:$ln: $text") ;;
|
|
54
|
+
esac
|
|
55
|
+
done <<< "$out"
|
|
56
|
+
|
|
57
|
+
if [[ ${#html[@]} -gt 0 || ${#prose[@]} -gt 0 || ${#dup[@]} -gt 0 ]]; then
|
|
58
|
+
if [[ ${#html[@]} -gt 0 ]]; then
|
|
59
|
+
echo "check-queue-hygiene: HTML comment(s) in the queue (provenance belongs in git history):"
|
|
60
|
+
printf ' %s\n' "${html[@]}"
|
|
61
|
+
echo " help: delete the comment; record the why in the commit message, not the queue."
|
|
62
|
+
fi
|
|
63
|
+
if [[ ${#dup[@]} -gt 0 ]]; then
|
|
64
|
+
[[ ${#html[@]} -gt 0 ]] && echo ""
|
|
65
|
+
echo "check-queue-hygiene: exact-duplicate line(s) (copy-paste artifact):"
|
|
66
|
+
printf ' %s\n' "${dup[@]}"
|
|
67
|
+
echo " help: remove the duplicate; if two tasks genuinely share wording, differentiate them."
|
|
68
|
+
fi
|
|
69
|
+
if [[ ${#prose[@]} -gt 0 ]]; then
|
|
70
|
+
{ [[ ${#html[@]} -gt 0 ]] || [[ ${#dup[@]} -gt 0 ]]; } && echo ""
|
|
71
|
+
echo "check-queue-hygiene: column-0 prose (every column-0 line must be a heading,"
|
|
72
|
+
echo "a '- ' bullet, '---', or a configured QUEUE_KIT_PROSE_LEADS lead):"
|
|
73
|
+
printf ' %s\n' "${prose[@]}"
|
|
74
|
+
echo " help: indent the prose to a continuation line under its bullet, or (for a"
|
|
75
|
+
echo " recurring protocol lead) add its token to QUEUE_KIT_PROSE_LEADS."
|
|
76
|
+
fi
|
|
77
|
+
exit 1
|
|
78
|
+
fi
|
|
79
|
+
|
|
80
|
+
echo "QUEUE-HYGIENE: clean (no HTML comments, no duplicate lines, no column-0 prose in $FILE)"
|
|
81
|
+
exit 0
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# graph: couples=TASK-QUEUE.md dir=one valve=none tier=precommit
|
|
3
|
+
# spec: queue-kit/SPEC.md §check-queue-prose-precondition — no active entry states a forward precondition in prose without a blocked-by tag (selection trusts tags, not prose)
|
|
4
|
+
#
|
|
5
|
+
# usage: check-queue-prose-precondition.sh [queue-file]
|
|
6
|
+
# Defaults to the configured queue file (QUEUE_KIT_QUEUE_FILE); the forward
|
|
7
|
+
# trigger set is QUEUE_KIT_PRECONDITION_REGEX (matched against lowercased prose).
|
|
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/queue.sh
|
|
15
|
+
source "$KIT/lib/queue.sh"
|
|
16
|
+
|
|
17
|
+
FILE="${1:-$QUEUE_KIT_QUEUE_FILE}"
|
|
18
|
+
[[ -f "$FILE" ]] || { echo "check-queue-prose-precondition: file not found: $FILE" >&2; exit 2; }
|
|
19
|
+
|
|
20
|
+
out="$(awk -v activere="$QUEUE_ACTIVE_RE" -v sectre="$QUEUE_SECTION_RE" -v trig="$QUEUE_KIT_PRECONDITION_REGEX" '
|
|
21
|
+
function flush() {
|
|
22
|
+
if (startln == 0) return
|
|
23
|
+
b = tolower(body)
|
|
24
|
+
gsub(/\[[^]]*\]/, " ", b) # drop bracket tags/links from the prose
|
|
25
|
+
gsub(/(once|when|after)[^.,;]*(landed|shipped|merged|resolved|completed|was [a-z]+ed)/, " ", b) # strip past-tense narration
|
|
26
|
+
if (b ~ trig && !hasblock)
|
|
27
|
+
printf "%d\t%s\n", startln, lead
|
|
28
|
+
startln = 0; body = ""; lead = ""; hasblock = 0
|
|
29
|
+
}
|
|
30
|
+
$0 ~ activere { inq = 1; flush(); next }
|
|
31
|
+
$0 ~ sectre { inq = 0; flush(); next }
|
|
32
|
+
!inq { next }
|
|
33
|
+
/^-[[:space:]]/ { # a new top-level active entry
|
|
34
|
+
flush()
|
|
35
|
+
startln = FNR; lead = $0; body = $0
|
|
36
|
+
if ($0 ~ /\[blocked-by:/ || $0 ~ /\[precondition-ok:/) hasblock = 1
|
|
37
|
+
next
|
|
38
|
+
}
|
|
39
|
+
{
|
|
40
|
+
if (startln == 0) next
|
|
41
|
+
body = body " " $0
|
|
42
|
+
if ($0 ~ /\[blocked-by:/ || $0 ~ /\[precondition-ok:/) hasblock = 1
|
|
43
|
+
}
|
|
44
|
+
END { flush() }
|
|
45
|
+
' "$FILE")"; st=$?
|
|
46
|
+
fail_closed "$st" QUEUE-PROSE-PRECONDITION awk
|
|
47
|
+
|
|
48
|
+
if [[ -n "$out" ]]; then
|
|
49
|
+
echo "check-queue-prose-precondition: active entry states a forward precondition in prose"
|
|
50
|
+
echo "but carries no [blocked-by:] tag — selection trusts tags, so it is latently blocked"
|
|
51
|
+
echo "yet mechanically pickable as 'first unblocked':"
|
|
52
|
+
while IFS=$'\t' read -r ln lead; do
|
|
53
|
+
[[ -n "$ln" ]] || continue
|
|
54
|
+
echo " $FILE:$ln: $lead"
|
|
55
|
+
done <<< "$out"
|
|
56
|
+
echo " help: tag the real blocker '[blocked-by: <slug>]', or move the entry to the"
|
|
57
|
+
echo " Deferred section, or rephrase past-tense if the precondition is already"
|
|
58
|
+
echo " met, or opt out with '[precondition-ok: <reason>]' anywhere in the entry."
|
|
59
|
+
exit 1
|
|
60
|
+
fi
|
|
61
|
+
|
|
62
|
+
echo "QUEUE-PROSE-PRECONDITION: clean (no untagged forward precondition in the active sections of $FILE)"
|
|
63
|
+
exit 0
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# graph: couples=TASK-QUEUE.md dir=one valve=none tier=precommit
|
|
3
|
+
# spec: queue-kit/SPEC.md §check-queue-sections — the queue carries each required ## section heading exactly once, the fail-closed floor under every section-scoped scanner
|
|
4
|
+
#
|
|
5
|
+
# usage: check-queue-sections.sh [queue-file]
|
|
6
|
+
# Defaults to the configured queue file (QUEUE_KIT_QUEUE_FILE).
|
|
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/queue.sh
|
|
14
|
+
source "$KIT/lib/queue.sh"
|
|
15
|
+
|
|
16
|
+
FILE="${1:-$QUEUE_KIT_QUEUE_FILE}"
|
|
17
|
+
[[ -f "$FILE" ]] || { echo "check-queue-sections: file not found: $FILE" >&2; exit 2; }
|
|
18
|
+
|
|
19
|
+
missing=(); dup=()
|
|
20
|
+
for sec in "${QUEUE_KIT_REQUIRED_SECTIONS[@]}"; do
|
|
21
|
+
if [[ "$sec" == *: ]]; then re="^## ${sec}"; else re="^## ${sec}[[:space:]]*\$"; fi
|
|
22
|
+
n="$(grep -cE -- "$re" "$FILE")"; gst=$?
|
|
23
|
+
if [[ "$gst" -ge 2 ]]; then
|
|
24
|
+
echo "check-queue-sections: grep failed on '$re' (exit $gst) — cannot verify" >&2
|
|
25
|
+
exit 2
|
|
26
|
+
fi
|
|
27
|
+
if [[ "$n" -eq 0 ]]; then missing+=("$sec")
|
|
28
|
+
elif [[ "$n" -gt 1 ]]; then dup+=("$sec ($n occurrences)")
|
|
29
|
+
fi
|
|
30
|
+
done
|
|
31
|
+
|
|
32
|
+
if [[ ${#missing[@]} -gt 0 || ${#dup[@]} -gt 0 ]]; then
|
|
33
|
+
echo "check-queue-sections: required '##' section(s) not present exactly once in $FILE"
|
|
34
|
+
echo "(every section-scoped scanner — amendment-queue, task-names, conservation, the"
|
|
35
|
+
echo "session-context index — locates work by these headings and finds nothing when one drops):"
|
|
36
|
+
for s in "${missing[@]}"; do echo " missing: ## $s"; done
|
|
37
|
+
for s in "${dup[@]}"; do echo " duplicate: ## $s"; done
|
|
38
|
+
echo " help: restore the heading (spelled exactly), or remove the duplicate. The"
|
|
39
|
+
echo " required set is QUEUE_KIT_REQUIRED_SECTIONS (queue-config.sh)."
|
|
40
|
+
exit 1
|
|
41
|
+
fi
|
|
42
|
+
|
|
43
|
+
echo "QUEUE-SECTIONS: clean (${#QUEUE_KIT_REQUIRED_SECTIONS[@]} required section(s) each present once in $FILE)"
|
|
44
|
+
exit 0
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# graph: couples=TASK-QUEUE.md,scripts/*.sh dir=one valve=none tier=precommit
|
|
3
|
+
# spec: queue-kit/SPEC.md §check-queue-slug-liveness — every slug-shaped bold-code token in a configured prose surface resolves against the queue's live slug set
|
|
4
|
+
#
|
|
5
|
+
# usage: check-queue-slug-liveness.sh [scan-root] (default '.')
|
|
6
|
+
# Scans QUEUE_KIT_PROSE_SURFACE_GLOBS (empty default: no-op) under the root.
|
|
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/queue.sh
|
|
14
|
+
source "$KIT/lib/queue.sh"
|
|
15
|
+
|
|
16
|
+
ROOT="${1:-.}"
|
|
17
|
+
[[ -d "$ROOT" ]] || { echo "check-queue-slug-liveness: not a directory: $ROOT" >&2; exit 2; }
|
|
18
|
+
|
|
19
|
+
files=()
|
|
20
|
+
if [[ ${#QUEUE_KIT_PROSE_SURFACE_GLOBS[@]} -gt 0 ]]; then
|
|
21
|
+
shopt -s nullglob globstar
|
|
22
|
+
for g in "${QUEUE_KIT_PROSE_SURFACE_GLOBS[@]}"; do
|
|
23
|
+
for f in "$ROOT"/$g; do [[ -f "$f" ]] && files+=("$f"); done
|
|
24
|
+
done
|
|
25
|
+
shopt -u nullglob globstar
|
|
26
|
+
fi
|
|
27
|
+
|
|
28
|
+
if [[ ${#files[@]} -eq 0 ]]; then
|
|
29
|
+
echo "QUEUE-SLUG-LIVENESS: clean (no prose surface configured in QUEUE_KIT_PROSE_SURFACE_GLOBS — nothing to resolve)"
|
|
30
|
+
exit 0
|
|
31
|
+
fi
|
|
32
|
+
|
|
33
|
+
QUEUE="$QUEUE_KIT_QUEUE_FILE"
|
|
34
|
+
[[ -f "$QUEUE" ]] || QUEUE="$ROOT/$QUEUE_KIT_QUEUE_FILE"
|
|
35
|
+
[[ -f "$QUEUE" ]] || { echo "check-queue-slug-liveness: queue file not found: $QUEUE_KIT_QUEUE_FILE" >&2; exit 2; }
|
|
36
|
+
|
|
37
|
+
live_str="$(queue_live_slugs "$QUEUE" | tr '\n' ' ')"; st=${PIPESTATUS[0]}
|
|
38
|
+
fail_closed "$st" QUEUE-SLUG-LIVENESS queue_live_slugs
|
|
39
|
+
|
|
40
|
+
out="$(awk -v live="$live_str" '
|
|
41
|
+
BEGIN { n = split(live, a, " "); for (i = 1; i <= n; i++) L[a[i]] = 1 }
|
|
42
|
+
{
|
|
43
|
+
s = $0
|
|
44
|
+
while (match(s, /\*\*`[a-z0-9][a-z0-9-]*`\*\*/)) {
|
|
45
|
+
tok = substr(s, RSTART + 3, RLENGTH - 6)
|
|
46
|
+
if (!(tok in L)) printf "%s:%d:%s\n", FILENAME, FNR, tok
|
|
47
|
+
s = substr(s, RSTART + RLENGTH)
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
' "${files[@]}")"; st=$?
|
|
51
|
+
fail_closed "$st" QUEUE-SLUG-LIVENESS awk
|
|
52
|
+
|
|
53
|
+
if [[ -n "$out" ]]; then
|
|
54
|
+
echo "check-queue-slug-liveness: bold-code token claims queue membership but names no live task:"
|
|
55
|
+
while IFS= read -r line; do printf ' %s\n' "$line"; done <<< "$out"
|
|
56
|
+
echo " help: a **\`slug\`** token claims the slug is a live queue task. If the task"
|
|
57
|
+
echo " landed, drop the bold-code form and cite its owning SPEC; otherwise fix"
|
|
58
|
+
echo " the slug or restore the task to the queue."
|
|
59
|
+
exit 1
|
|
60
|
+
fi
|
|
61
|
+
|
|
62
|
+
echo "QUEUE-SLUG-LIVENESS: clean (${#files[@]} prose surface(s) scanned; every slug-shaped bold-code token resolves to a live task in $QUEUE)"
|
|
63
|
+
exit 0
|