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,94 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# spec: lifecycle-kit/SPEC.md §The close-surface roster — the derivation: every close-surface: declaration, unioned with the workflow directory's capture tier so an undeclared capture surface is reported rather than missing
|
|
3
|
+
# usage: close-surfaces.sh [scan-root] (default: the repo toplevel)
|
|
4
|
+
# prints one tab-separated '<path> <mode> <reclaim> <owner>' row per surface,
|
|
5
|
+
# sorted by path; exit 2 on an unreadable configuration or declaration surface
|
|
6
|
+
set -uo pipefail
|
|
7
|
+
|
|
8
|
+
ROOT="${1:-}"
|
|
9
|
+
KIT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
10
|
+
SDK="${GATE_SDK_ROOT:-$KIT/../gate-sdk}"
|
|
11
|
+
[[ -n "$ROOT" ]] && { cd "$ROOT" || exit 2; }
|
|
12
|
+
# shellcheck source=../../gate-sdk/lib/gate.sh
|
|
13
|
+
source "$SDK/lib/gate.sh"
|
|
14
|
+
# shellcheck source=../lib/stages.sh
|
|
15
|
+
source "$KIT/lib/stages.sh"
|
|
16
|
+
|
|
17
|
+
if [[ -z "$ROOT" ]]; then
|
|
18
|
+
REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null)" || {
|
|
19
|
+
echo "close-surfaces: not a git repository — the capture tier is underivable" >&2; exit 2; }
|
|
20
|
+
cd "$REPO_ROOT" || exit 2
|
|
21
|
+
fi
|
|
22
|
+
git rev-parse --git-dir >/dev/null 2>&1 || {
|
|
23
|
+
echo "close-surfaces: not a git repository — the capture tier is underivable" >&2; exit 2; }
|
|
24
|
+
|
|
25
|
+
declare -a SURFACES=()
|
|
26
|
+
_add_surface() {
|
|
27
|
+
local f s
|
|
28
|
+
f="${1#./}"
|
|
29
|
+
for s in ${SURFACES[@]+"${SURFACES[@]}"}; do [[ "$s" == "$f" ]] && return 0; done
|
|
30
|
+
SURFACES+=("$f")
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
while IFS= read -r r; do
|
|
34
|
+
[[ -n "$r" ]] || continue
|
|
35
|
+
[[ -f "${r%/}/$LIFECYCLE_KIT_ROSTER_BASENAME" ]] && _add_surface "${r%/}/$LIFECYCLE_KIT_ROSTER_BASENAME"
|
|
36
|
+
done < <(gate_kit_roots_rel)
|
|
37
|
+
|
|
38
|
+
shopt -s nullglob globstar
|
|
39
|
+
for g in ${LIFECYCLE_KIT_CLOSE_SURFACE_GLOBS[@]+"${LIFECYCLE_KIT_CLOSE_SURFACE_GLOBS[@]}"}; do
|
|
40
|
+
for f in $g; do [[ -f "$f" ]] && _add_surface "$f"; done
|
|
41
|
+
done
|
|
42
|
+
shopt -u nullglob globstar
|
|
43
|
+
|
|
44
|
+
# spec: lifecycle-kit/SPEC.md §The close-surface roster — fenced blocks are skipped, so the directive's own grammar is quotable where it is specified (check-spec-pointer's carve-out, same reason)
|
|
45
|
+
read -r -d '' EXTRACT <<'AWK' || true
|
|
46
|
+
/^[[:space:]]*```/ { fence = !fence; next }
|
|
47
|
+
fence { next }
|
|
48
|
+
/^[[:space:]]*close-surface:[[:space:]]/ { print }
|
|
49
|
+
AWK
|
|
50
|
+
|
|
51
|
+
declare -a ROWS=()
|
|
52
|
+
declare -a DECLARED=()
|
|
53
|
+
for s in ${SURFACES[@]+"${SURFACES[@]}"}; do
|
|
54
|
+
[[ -r "$s" ]] || { echo "close-surfaces: declaration surface not readable: $s" >&2; exit 2; }
|
|
55
|
+
while IFS= read -r line; do
|
|
56
|
+
[[ -n "$line" ]] || continue
|
|
57
|
+
body="${line#"${line%%close-surface:*}"}"
|
|
58
|
+
body="${body#close-surface:}"
|
|
59
|
+
body="${body#"${body%%[![:space:]]*}"}"
|
|
60
|
+
body="${body%"${body##*[![:space:]]}"}"
|
|
61
|
+
reclaim="-"
|
|
62
|
+
if [[ "$body" == *" reclaim="* ]]; then
|
|
63
|
+
reclaim="${body#* reclaim=}"
|
|
64
|
+
body="${body%% reclaim=*}"
|
|
65
|
+
fi
|
|
66
|
+
path="${body%%[[:space:]]*}"
|
|
67
|
+
mode="${body#"$path"}"
|
|
68
|
+
mode="${mode#"${mode%%[![:space:]]*}"}"
|
|
69
|
+
mode="${mode%"${mode##*[![:space:]]}"}"
|
|
70
|
+
ROWS+=("$path $mode $reclaim $s")
|
|
71
|
+
DECLARED+=("$path")
|
|
72
|
+
done < <(awk "$EXTRACT" "$s")
|
|
73
|
+
done
|
|
74
|
+
|
|
75
|
+
WF="${GATE_SDK_WORKFLOW_DIR:-.workflow}"
|
|
76
|
+
if [[ -d "$WF" ]]; then
|
|
77
|
+
shopt -s nullglob dotglob
|
|
78
|
+
for m in "$WF"/*; do
|
|
79
|
+
[[ -f "$m" ]] || continue
|
|
80
|
+
git check-ignore -q -- "$m"; st=$?
|
|
81
|
+
case "$st" in
|
|
82
|
+
0) ;;
|
|
83
|
+
1) continue ;;
|
|
84
|
+
*) echo "close-surfaces: git check-ignore exited $st on $m" >&2; exit 2 ;;
|
|
85
|
+
esac
|
|
86
|
+
seen=0
|
|
87
|
+
for d in ${DECLARED[@]+"${DECLARED[@]}"}; do [[ "$d" == "$m" ]] && { seen=1; break; }; done
|
|
88
|
+
[[ "$seen" == 1 ]] || ROWS+=("$m (undeclared) - -")
|
|
89
|
+
done
|
|
90
|
+
shopt -u nullglob dotglob
|
|
91
|
+
fi
|
|
92
|
+
|
|
93
|
+
[[ ${#ROWS[@]} -eq 0 ]] && exit 0
|
|
94
|
+
printf '%s\n' "${ROWS[@]}" | LC_ALL=C sort -t' ' -k1,1
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — the deterministic stamp half of a stage transition, mechanized (judgment stays in the skill)
|
|
3
|
+
set -uo pipefail
|
|
4
|
+
|
|
5
|
+
KIT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
6
|
+
# shellcheck source=../lib/stages.sh
|
|
7
|
+
source "$KIT/lib/stages.sh"
|
|
8
|
+
|
|
9
|
+
usage() { echo "usage: enter-stage.sh [--simulate] <stage> (stage ∈ ${LIFECYCLE_KIT_STAGES[*]})" >&2; }
|
|
10
|
+
|
|
11
|
+
# spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — --simulate: read-only preflight, every line prefixed 'enter-stage (simulate):' so a transcript can never read as a stamp
|
|
12
|
+
sim=0
|
|
13
|
+
if [[ "${1:-}" == "--simulate" ]]; then sim=1; shift; fi
|
|
14
|
+
sim_relay() { local l; while IFS= read -r l; do echo "enter-stage (simulate): $l"; done <<<"$1"; }
|
|
15
|
+
|
|
16
|
+
stage="${1:-}"
|
|
17
|
+
if [[ -z "$stage" ]]; then usage; exit 2; fi
|
|
18
|
+
if ! lifecycle_stage_known "$stage"; then
|
|
19
|
+
echo "enter-stage: '$stage' is not a lifecycle stage (${LIFECYCLE_KIT_STAGES[*]})" >&2
|
|
20
|
+
usage
|
|
21
|
+
exit 2
|
|
22
|
+
fi
|
|
23
|
+
|
|
24
|
+
QUEUE="$LIFECYCLE_KIT_QUEUE_FILE"
|
|
25
|
+
STATE="$LIFECYCLE_KIT_STATE_FILE"
|
|
26
|
+
[[ -f "$QUEUE" ]] || { echo "enter-stage: queue file not found: $QUEUE" >&2; exit 2; }
|
|
27
|
+
[[ -f "$STATE" ]] || { echo "enter-stage: state file not found: $STATE" >&2; exit 2; }
|
|
28
|
+
|
|
29
|
+
hdr="$(lifecycle_header "$QUEUE")"
|
|
30
|
+
cur_iter="$(lifecycle_header_iter "$hdr")"
|
|
31
|
+
if [[ "$stage" == "$LIFECYCLE_KIT_FIRST_STAGE" ]]; then
|
|
32
|
+
first=1
|
|
33
|
+
stamp_iter="—"
|
|
34
|
+
else
|
|
35
|
+
first=0
|
|
36
|
+
stamp_iter="$cur_iter"
|
|
37
|
+
fi
|
|
38
|
+
|
|
39
|
+
if ! id="$(bash "$KIT/bin/session-id.sh")"; then
|
|
40
|
+
echo "enter-stage: could not read the session id (see above) — nothing written." >&2
|
|
41
|
+
exit 2
|
|
42
|
+
fi
|
|
43
|
+
today="$(date +%F)"
|
|
44
|
+
stamp_line="$stamp_iter $stage $id $today"
|
|
45
|
+
|
|
46
|
+
last="$(awk '/^---[[:space:]]*$/ { f = 1; next } f && NF { last = $0 } END { print last }' "$STATE")"
|
|
47
|
+
read -r f_iter f_stage f_id _ <<<"$last"
|
|
48
|
+
if [[ "$f_iter" == "$stamp_iter" && "$f_stage" == "$stage" && "$f_id" == "$id" ]]; then
|
|
49
|
+
if [[ "$sim" == 1 ]]; then
|
|
50
|
+
echo "enter-stage (simulate): '$stamp_line' is already the last stamp in $STATE — the real entry would be an idempotent no-op."
|
|
51
|
+
exit 0
|
|
52
|
+
fi
|
|
53
|
+
echo "enter-stage: '$stamp_line' already stamped in $STATE — idempotent no-op, nothing written."
|
|
54
|
+
exit 0
|
|
55
|
+
fi
|
|
56
|
+
|
|
57
|
+
tmpdir="${GATE_SDK_TMP_DIR:-.tmp}"
|
|
58
|
+
mkdir -p "$tmpdir"
|
|
59
|
+
tmpqueue="$tmpdir/enter-stage.queue.$$"
|
|
60
|
+
tmpstate="$tmpdir/enter-stage.state.$$"
|
|
61
|
+
trap 'rm -f "$tmpqueue" "$tmpstate"' EXIT
|
|
62
|
+
truncated=()
|
|
63
|
+
wiped=()
|
|
64
|
+
|
|
65
|
+
# spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — the pre-flight hand-off: the cursor is the last stamp, so the temp file carrying the candidate transition is the STATE file, not the queue. The boundary reset additionally renames the header (dropping any residual pre-upgrade [stage:] field), so the first stage passes a temp queue too; every later entry passes the live queue untouched — stage motion no longer writes it.
|
|
66
|
+
if [[ "$first" == 1 ]]; then
|
|
67
|
+
awk '
|
|
68
|
+
!d && /^## Iteration:/ { print "## Iteration: —"; d = 1; next }
|
|
69
|
+
{ print }
|
|
70
|
+
' "$QUEUE" > "$tmpqueue"
|
|
71
|
+
header_only="$(awk '{ print } /^---[[:space:]]*$/ { exit }' "$STATE")"
|
|
72
|
+
printf '%s\n\n%s\n' "$header_only" "$stamp_line" > "$tmpstate"
|
|
73
|
+
pre_queue="$tmpqueue"
|
|
74
|
+
else
|
|
75
|
+
cp "$STATE" "$tmpstate"
|
|
76
|
+
printf '%s\n' "$stamp_line" >> "$tmpstate"
|
|
77
|
+
pre_queue="$QUEUE"
|
|
78
|
+
fi
|
|
79
|
+
|
|
80
|
+
if ! preflight="$(bash "$KIT/checks/check-stage-entry.sh" "$pre_queue" "$tmpstate" 2>&1)"; then
|
|
81
|
+
if [[ "$sim" == 1 ]]; then
|
|
82
|
+
echo "enter-stage (simulate): check-stage-entry would refuse the entry to '$stage':" >&2
|
|
83
|
+
sim_relay "$preflight" >&2
|
|
84
|
+
exit 1
|
|
85
|
+
fi
|
|
86
|
+
echo "enter-stage: check-stage-entry refuses the entry to '$stage' — nothing written:" >&2
|
|
87
|
+
printf '%s\n' "$preflight" >&2
|
|
88
|
+
echo " help: resolve the finding above, or (to override deliberately) perform the stamp by hand." >&2
|
|
89
|
+
exit 1
|
|
90
|
+
fi
|
|
91
|
+
|
|
92
|
+
# spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — LIFECYCLE_KIT_ENTRY_PREFLIGHT: each entry matching the entered stage runs after the built-in pre-flight with the same '<queue> <state>' argv the built-in gets — the candidate-carrying temp file is the state file, the queue passes through live; a non-zero exit refuses the entry, nothing written
|
|
93
|
+
for pf in ${LIFECYCLE_KIT_ENTRY_PREFLIGHT[@]+"${LIFECYCLE_KIT_ENTRY_PREFLIGHT[@]}"}; do
|
|
94
|
+
[[ "${pf%%=*}" == "$stage" ]] || continue
|
|
95
|
+
read -r -a pf_argv <<<"${pf#*=}"
|
|
96
|
+
if ! pf_out="$("${pf_argv[@]}" "$pre_queue" "$tmpstate" 2>&1)"; then
|
|
97
|
+
if [[ "$sim" == 1 ]]; then
|
|
98
|
+
echo "enter-stage (simulate): LIFECYCLE_KIT_ENTRY_PREFLIGHT command for '$stage' would refuse the entry:" >&2
|
|
99
|
+
sim_relay "$pf_out" >&2
|
|
100
|
+
exit 1
|
|
101
|
+
fi
|
|
102
|
+
echo "enter-stage: LIFECYCLE_KIT_ENTRY_PREFLIGHT command for '$stage' refuses the entry — nothing written:" >&2
|
|
103
|
+
printf '%s\n' "$pf_out" >&2
|
|
104
|
+
echo " help: resolve the finding above, or (to override deliberately) perform the stamp by hand." >&2
|
|
105
|
+
exit 1
|
|
106
|
+
fi
|
|
107
|
+
done
|
|
108
|
+
|
|
109
|
+
# spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — the iteration-boundary entry refuses on a non-empty ## Lessons Learned: an untriaged lesson must not cross into the next iteration (no [attend] injection may outlive its iteration), the same refusal contract as the check-stage-entry precondition
|
|
110
|
+
if [[ "$first" == 1 ]]; then
|
|
111
|
+
lessons="$(awk '
|
|
112
|
+
/^## Lessons Learned[[:space:]]*$/ { inl = 1; next }
|
|
113
|
+
/^## / { inl = 0 }
|
|
114
|
+
inl && /^-[[:space:]]/ { print }
|
|
115
|
+
' "$QUEUE")"
|
|
116
|
+
if [[ -n "$lessons" ]]; then
|
|
117
|
+
if [[ "$sim" == 1 ]]; then
|
|
118
|
+
echo "enter-stage (simulate): iteration-boundary entry to '$stage' would be refused — ## Lessons Learned is non-empty:" >&2
|
|
119
|
+
sim_relay "$lessons" >&2
|
|
120
|
+
exit 1
|
|
121
|
+
fi
|
|
122
|
+
echo "enter-stage: iteration-boundary entry to '$stage' refused — ## Lessons Learned is non-empty; the close stage must disposition every lesson before the next iteration begins (nothing written):" >&2
|
|
123
|
+
printf '%s\n' "$lessons" >&2
|
|
124
|
+
echo " help: run the close ritual's disposition step (rule/task/harvest/discard, stamping $LIFECYCLE_KIT_LESSON_EVIDENCE_FILE), clear the section, then re-run enter-stage $stage." >&2
|
|
125
|
+
exit 1
|
|
126
|
+
fi
|
|
127
|
+
fi
|
|
128
|
+
|
|
129
|
+
# spec: lifecycle-kit/SPEC.md §The committed gap inbox — the iteration-boundary entry refuses while the gap inbox holds bullets: a mid-iteration gap must be dispositioned by close's drain before the next iteration begins (the same refusal contract as the Lessons check), so no gap outlives its iteration untriaged.
|
|
130
|
+
if [[ "$first" == 1 && -f "$LIFECYCLE_KIT_GAP_INBOX_FILE" ]]; then
|
|
131
|
+
gaps="$(awk '/^-[[:space:]]/ { print }' "$LIFECYCLE_KIT_GAP_INBOX_FILE")"
|
|
132
|
+
if [[ -n "$gaps" ]]; then
|
|
133
|
+
if [[ "$sim" == 1 ]]; then
|
|
134
|
+
echo "enter-stage (simulate): iteration-boundary entry to '$stage' would be refused — $LIFECYCLE_KIT_GAP_INBOX_FILE holds untriaged gap bullets:" >&2
|
|
135
|
+
sim_relay "$gaps" >&2
|
|
136
|
+
exit 1
|
|
137
|
+
fi
|
|
138
|
+
echo "enter-stage: iteration-boundary entry to '$stage' refused — $LIFECYCLE_KIT_GAP_INBOX_FILE holds untriaged gap bullets; every gap is dispositioned before the next iteration begins (nothing written):" >&2
|
|
139
|
+
printf '%s\n' "$gaps" >&2
|
|
140
|
+
echo " help: if the closing stage has not run yet, run its gap-drain step — disposition each bullet (promote to a deferred [design-pending] entry, fix inline, or discard with cause in the commit message), then truncate the inbox to its header." >&2
|
|
141
|
+
echo " help: if it has already run, these bullets were filed after the drain and no stage is coming back for them: disposition them here, in this entering session — promote each directly to the deferred queue (or fix it), truncate the inbox to its header, commit, and re-run enter-stage $stage. Deleting a bullet without a disposition is not a drain." >&2
|
|
142
|
+
exit 1
|
|
143
|
+
fi
|
|
144
|
+
fi
|
|
145
|
+
|
|
146
|
+
# spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — LIFECYCLE_KIT_BOUNDARY_REQUIRE: at the iteration boundary each member must carry a data line whose first token is the closing iteration's name, else the entry refuses (fail-closed on a missing file); a never-named (—) closing iteration has nothing to disposition and skips the check. Runs after the Lessons refusal and before the boundary truncation, the same refusal contract.
|
|
147
|
+
if [[ "$first" == 1 && "$cur_iter" != "—" ]]; then
|
|
148
|
+
for br in ${LIFECYCLE_KIT_BOUNDARY_REQUIRE[@]+"${LIFECYCLE_KIT_BOUNDARY_REQUIRE[@]}"}; do
|
|
149
|
+
req_msg=""
|
|
150
|
+
if [[ ! -f "$br" ]]; then
|
|
151
|
+
req_msg="required boundary-disposition file not found: $br"
|
|
152
|
+
elif ! awk -v it="$cur_iter" '
|
|
153
|
+
/^#/ || /^[[:space:]]*$/ { next }
|
|
154
|
+
$1 == it { found = 1 }
|
|
155
|
+
END { exit found ? 0 : 1 }
|
|
156
|
+
' "$br"; then
|
|
157
|
+
req_msg="no disposition line naming the closing iteration '$cur_iter' in $br"
|
|
158
|
+
fi
|
|
159
|
+
[[ -z "$req_msg" ]] && continue
|
|
160
|
+
if [[ "$sim" == 1 ]]; then
|
|
161
|
+
echo "enter-stage (simulate): iteration-boundary entry to '$stage' would be refused — $req_msg" >&2
|
|
162
|
+
exit 1
|
|
163
|
+
fi
|
|
164
|
+
echo "enter-stage: iteration-boundary entry to '$stage' refused — $req_msg (nothing written)." >&2
|
|
165
|
+
echo " help: the close stage must disposition the iteration at the release boundary, stamping a '<iteration> release <version|none> — <basis>' line into $br before the next iteration begins." >&2
|
|
166
|
+
exit 1
|
|
167
|
+
done
|
|
168
|
+
fi
|
|
169
|
+
|
|
170
|
+
if [[ "$sim" == 1 ]]; then
|
|
171
|
+
echo "enter-stage (simulate): entry to '$stage' would proceed — no stamp, nothing written."
|
|
172
|
+
exit 0
|
|
173
|
+
fi
|
|
174
|
+
|
|
175
|
+
if [[ "$first" == 1 ]]; then
|
|
176
|
+
mv "$tmpstate" "$STATE"
|
|
177
|
+
# spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — the kit-owned lesson-evidence file resets as a built-in member (kit owns this surface); LIFECYCLE_KIT_BOUNDARY_TRUNCATE stays reserved for files the kit does not own
|
|
178
|
+
for bt in "$LIFECYCLE_KIT_LESSON_EVIDENCE_FILE" ${LIFECYCLE_KIT_BOUNDARY_TRUNCATE[@]+"${LIFECYCLE_KIT_BOUNDARY_TRUNCATE[@]}"}; do
|
|
179
|
+
[[ -f "$bt" ]] || continue
|
|
180
|
+
bttmp="$tmpdir/boundary-truncate.$$"
|
|
181
|
+
awk 'drop { next } /^#/ || /^[[:space:]]*$/ { print; next } { drop = 1 }' "$bt" > "$bttmp"
|
|
182
|
+
mv "$bttmp" "$bt"
|
|
183
|
+
truncated+=("$bt")
|
|
184
|
+
done
|
|
185
|
+
mv "$tmpqueue" "$QUEUE"
|
|
186
|
+
else
|
|
187
|
+
# spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — the live stamp is an append, never a rewrite of the pre-flight temp copy: a concurrent session's stamp landing between the copy and the write would be lost by a whole-file move
|
|
188
|
+
printf '%s\n' "$stamp_line" >> "$STATE"
|
|
189
|
+
fi
|
|
190
|
+
trap - EXIT
|
|
191
|
+
rm -f "$tmpqueue" "$tmpstate"
|
|
192
|
+
|
|
193
|
+
# spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — the boundary scratch wipe, distinct from the truncate above (that rewrites a tracked file to its header; this deletes untracked scratch outright). Runs last so this run's own enter-stage.*.$$ temporaries are already gone and never candidates. '.gitkeep' is the kit invariant LIFECYCLE_KIT_BOUNDARY_PRESERVE cannot unset — a consumer that tracks its scratch dir's scaffolding must not have it deleted at the moment the boundary reset is committed.
|
|
194
|
+
if [[ "$first" == 1 && -d "$tmpdir" ]]; then
|
|
195
|
+
wipe_args=(-mindepth 1 -depth ! -name .gitkeep)
|
|
196
|
+
for bp in ${LIFECYCLE_KIT_BOUNDARY_PRESERVE[@]+"${LIFECYCLE_KIT_BOUNDARY_PRESERVE[@]}"}; do
|
|
197
|
+
wipe_args+=(! -name "$bp")
|
|
198
|
+
done
|
|
199
|
+
# spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — stderr is suppressed because a preserved basename inside a doomed subdirectory makes that subdirectory's own delete fail; the failure is noise, never an abort
|
|
200
|
+
mapfile -t wiped < <(find "$tmpdir" "${wipe_args[@]}" -print -delete 2>/dev/null)
|
|
201
|
+
fi
|
|
202
|
+
|
|
203
|
+
if [[ "$first" == 1 ]]; then
|
|
204
|
+
echo "enter-stage: iteration-boundary reset — stamped '$stamp_line'; header set to '## Iteration: —'."
|
|
205
|
+
echo " next: commit $QUEUE and $STATE together (the boundary reset writes both), hook enabled."
|
|
206
|
+
else
|
|
207
|
+
echo "enter-stage: stamped '$stamp_line'; the cursor is now '$stage' (no queue write — stage motion never touches it)."
|
|
208
|
+
echo " next: commit $STATE, hook enabled."
|
|
209
|
+
fi
|
|
210
|
+
if [[ ${#truncated[@]} -gt 0 ]]; then
|
|
211
|
+
echo " note: boundary-truncated to the '# contract:' header: ${truncated[*]} — commit alongside the reset."
|
|
212
|
+
fi
|
|
213
|
+
if [[ ${#wiped[@]} -gt 0 ]]; then
|
|
214
|
+
echo " note: boundary-wiped from $tmpdir: ${wiped[*]}"
|
|
215
|
+
fi
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# spec: lifecycle-kit/SPEC.md §The committed gap inbox — the capture affordance; stamps the bullet grammar, no caller-side redirect (the kfric.sh pattern)
|
|
3
|
+
# usage: file-gap.sh "<gap prose>" (required, non-empty)
|
|
4
|
+
# appends one dated bullet '- <YYYY-MM-DD> — <gap prose>' to the committed gap inbox; exit 2 on misuse
|
|
5
|
+
set -uo pipefail
|
|
6
|
+
|
|
7
|
+
KIT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
8
|
+
# shellcheck source=../lib/stages.sh
|
|
9
|
+
source "$KIT/lib/stages.sh"
|
|
10
|
+
|
|
11
|
+
REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
|
|
12
|
+
cd "$REPO_ROOT" 2>/dev/null || exit 1
|
|
13
|
+
|
|
14
|
+
usage() {
|
|
15
|
+
printf 'usage: %s "<gap prose>"\n' "$(basename "$0")" >&2
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
if [[ $# -ne 1 || -z "${1:-}" ]]; then
|
|
19
|
+
usage
|
|
20
|
+
exit 2
|
|
21
|
+
fi
|
|
22
|
+
|
|
23
|
+
INBOX="$LIFECYCLE_KIT_GAP_INBOX_FILE"
|
|
24
|
+
mkdir -p "$(dirname "$INBOX")" 2>/dev/null || true
|
|
25
|
+
# spec: lifecycle-kit/SPEC.md §The committed gap inbox — seed the contract header when the inbox does not yet exist (a fresh consumer's first filing); close's drain truncates back to this header
|
|
26
|
+
[[ -f "$INBOX" ]] \
|
|
27
|
+
|| printf '# contract: lifecycle-kit/SPEC.md §The committed gap inbox — append-only mid-iteration gap capture, close-drained; one bullet per gap below.\n' > "$INBOX"
|
|
28
|
+
|
|
29
|
+
line="- $(date +%F) — $1"
|
|
30
|
+
printf '%s\n' "$line" >> "$INBOX"
|
|
31
|
+
printf 'file-gap: %s\n' "$line"
|
|
32
|
+
|
|
33
|
+
# spec: lifecycle-kit/SPEC.md §The committed gap inbox — warn at the point of
|
|
34
|
+
# capture, while the filer can still act: after the iteration's last stage
|
|
35
|
+
# stamps there is no drainer left in the machine.
|
|
36
|
+
_fg_stage="$(lifecycle_current_stage)"
|
|
37
|
+
if [[ "$_fg_stage" == "${LIFECYCLE_KIT_STAGES[-1]}" ]]; then
|
|
38
|
+
printf 'file-gap: WARNING — the cursor is at %s, the last stage of the iteration. Disposition this bullet before the iteration ends: once that stage has finished, none is left to drain it, and the next %s entry refuses until an entering session promotes it directly.\n' \
|
|
39
|
+
"$_fg_stage" "$LIFECYCLE_KIT_FIRST_STAGE" >&2
|
|
40
|
+
else
|
|
41
|
+
printf 'file-gap: this bullet blocks the next %s entry until close drains it.\n' \
|
|
42
|
+
"$LIFECYCLE_KIT_FIRST_STAGE" >&2
|
|
43
|
+
fi
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# spec: lifecycle-kit/SPEC.md §bin/install-lifecycle.sh — idempotent insert/replace of the resident registration block between fixed markers in the always-loaded agent file
|
|
3
|
+
set -euo pipefail
|
|
4
|
+
|
|
5
|
+
KIT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
6
|
+
SDK="${GATE_SDK_ROOT:-$KIT/../gate-sdk}"
|
|
7
|
+
# shellcheck source=../lib/stages.sh
|
|
8
|
+
source "$KIT/lib/stages.sh"
|
|
9
|
+
# shellcheck source=../../gate-sdk/lib/inject.sh
|
|
10
|
+
source "$SDK/lib/inject.sh"
|
|
11
|
+
|
|
12
|
+
AGENT_FILE="${1:-$LIFECYCLE_KIT_AGENT_FILE}"
|
|
13
|
+
[[ -f "$AGENT_FILE" ]] \
|
|
14
|
+
|| { echo "install-lifecycle: agent file not found: $AGENT_FILE — nothing to install into" >&2; exit 2; }
|
|
15
|
+
|
|
16
|
+
BEGIN="<!-- lifecycle-kit:begin -->"
|
|
17
|
+
END="<!-- lifecycle-kit:end -->"
|
|
18
|
+
|
|
19
|
+
action="$(lifecycle_registration_block | inject_marker_block "$AGENT_FILE" "$BEGIN" "$END")" || exit $?
|
|
20
|
+
echo "install-lifecycle: $action the lifecycle registration block in $AGENT_FILE"
|
|
21
|
+
|
|
22
|
+
# spec: lifecycle-kit/SPEC.md §bin/install-lifecycle.sh — the merge-attribute step: inject the derived iteration-scoped supersede lines into .gitattributes (marker-bounded, idempotent). Unlike the agent file this installer legitimately mints .gitattributes when absent (it is not an always-loaded file the consumer authored).
|
|
23
|
+
ATTRS=".gitattributes"
|
|
24
|
+
ABEGIN="# lifecycle-kit:merge:begin"
|
|
25
|
+
AEND="# lifecycle-kit:merge:end"
|
|
26
|
+
[[ -f "$ATTRS" ]] || : > "$ATTRS"
|
|
27
|
+
aaction="$(lifecycle_merge_attrs_block | inject_marker_block "$ATTRS" "$ABEGIN" "$AEND")" || exit $?
|
|
28
|
+
echo "install-lifecycle: $aaction the iteration-scoped merge attributes in $ATTRS"
|
|
29
|
+
|
|
30
|
+
# spec: lifecycle-kit/SPEC.md §bin/install-lifecycle.sh — the driver-config step: register the keep-ours merge driver, per-clone (the install-hooks.sh opt-in class). The .gitattributes attribute is inert without it (recorded honest limit); a non-repo cwd degrades to a skip, never a hard failure.
|
|
31
|
+
if git rev-parse --git-dir >/dev/null 2>&1; then
|
|
32
|
+
git config merge.iteration-scoped.driver true
|
|
33
|
+
echo "install-lifecycle: registered the keep-ours merge.iteration-scoped driver (per-clone git config)"
|
|
34
|
+
else
|
|
35
|
+
echo "install-lifecycle: not a git repository — skipped the merge.iteration-scoped driver (the .gitattributes attribute stays inert until 'git config merge.iteration-scoped.driver true' is run in a clone)" >&2
|
|
36
|
+
fi
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# spec: lifecycle-kit/SPEC.md §bin/session-id.sh — the per-stage stamp id via the env-first derivation order (not hand-picked)
|
|
3
|
+
set -uo pipefail
|
|
4
|
+
|
|
5
|
+
sessions_dir() {
|
|
6
|
+
if [[ -n "${LIFECYCLE_KIT_SESSIONS_DIR:-}" ]]; then
|
|
7
|
+
printf '%s\n' "$LIFECYCLE_KIT_SESSIONS_DIR"
|
|
8
|
+
return 0
|
|
9
|
+
fi
|
|
10
|
+
local home slug
|
|
11
|
+
home="${CLAUDE_CONFIG_DIR:-$HOME/.claude}"
|
|
12
|
+
slug="$(pwd | sed 's/[^a-zA-Z0-9]/-/g')"
|
|
13
|
+
printf '%s/projects/%s\n' "$home" "$slug"
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
normalize() { # strip a leading agent- token, then take the first 8 chars
|
|
17
|
+
local id="${1#agent-}"
|
|
18
|
+
printf '%s\n' "${id:0:8}"
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
if [[ -n "${LIFECYCLE_KIT_SESSION_ID:-}" ]]; then
|
|
22
|
+
normalize "$LIFECYCLE_KIT_SESSION_ID"
|
|
23
|
+
exit 0
|
|
24
|
+
fi
|
|
25
|
+
|
|
26
|
+
if [[ -z "${CLAUDE_CODE_CHILD_SESSION:-}" && -n "${CLAUDE_CODE_SESSION_ID:-}" ]]; then
|
|
27
|
+
normalize "$CLAUDE_CODE_SESSION_ID"
|
|
28
|
+
exit 0
|
|
29
|
+
fi
|
|
30
|
+
|
|
31
|
+
dir="$(sessions_dir)"
|
|
32
|
+
[[ -d "$dir" ]] || {
|
|
33
|
+
echo "session-id: sessions dir not found: $dir" >&2
|
|
34
|
+
echo " help: set LIFECYCLE_KIT_SESSIONS_DIR to the agent transcript directory for this tree." >&2
|
|
35
|
+
exit 2
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
newest=""
|
|
39
|
+
pick() { # advance $newest across a (possibly empty) glob
|
|
40
|
+
local f
|
|
41
|
+
for f in "$@"; do
|
|
42
|
+
[[ -e "$f" ]] || continue
|
|
43
|
+
[[ -z "$newest" || "$f" -nt "$newest" ]] && newest="$f"
|
|
44
|
+
done
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
shopt -s nullglob
|
|
48
|
+
if [[ -n "${CLAUDE_CODE_CHILD_SESSION:-}" && -n "${CLAUDE_CODE_SESSION_ID:-}" ]]; then
|
|
49
|
+
pick "$dir/${CLAUDE_CODE_SESSION_ID}/subagents"/*.jsonl # the lead's own subagents/ dir alone
|
|
50
|
+
else
|
|
51
|
+
pick "$dir"/*.jsonl
|
|
52
|
+
pick "$dir"/*/subagents/*.jsonl
|
|
53
|
+
fi
|
|
54
|
+
shopt -u nullglob
|
|
55
|
+
|
|
56
|
+
[[ -n "$newest" ]] || {
|
|
57
|
+
if [[ -n "${CLAUDE_CODE_CHILD_SESSION:-}" && -n "${CLAUDE_CODE_SESSION_ID:-}" ]]; then
|
|
58
|
+
# spec: lifecycle-kit/SPEC.md §bin/session-id.sh — empty narrowed scan + a top-level
|
|
59
|
+
# transcript for the env uuid marks the flag spurious: the uuid names a live top-level
|
|
60
|
+
# session, not a lead, so fall back to it rather than exiting 2.
|
|
61
|
+
if [[ -e "$dir/${CLAUDE_CODE_SESSION_ID}.jsonl" ]]; then
|
|
62
|
+
normalize "$CLAUDE_CODE_SESSION_ID"
|
|
63
|
+
exit 0
|
|
64
|
+
fi
|
|
65
|
+
echo "session-id: no subagent transcript under $dir/${CLAUDE_CODE_SESSION_ID}/subagents and no top-level $dir/${CLAUDE_CODE_SESSION_ID}.jsonl" >&2
|
|
66
|
+
else
|
|
67
|
+
echo "session-id: no transcript (*.jsonl) under $dir" >&2
|
|
68
|
+
fi
|
|
69
|
+
echo " help: confirm this is the right sessions dir (LIFECYCLE_KIT_SESSIONS_DIR)." >&2
|
|
70
|
+
exit 2
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
base="${newest##*/}" # <uuid>.jsonl or agent-<hex>.jsonl
|
|
74
|
+
base="${base%.jsonl}"
|
|
75
|
+
normalize "$base"
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# graph: couples=.workflow/*,kit:SPEC.md,.claude/commands/*.md,.gitignore dir=one valve=none tier=precommit
|
|
3
|
+
# spec: lifecycle-kit/SPEC.md §check-close-surfaces — the derived close-surface roster is complete and moded: no undeclared capture surface, every declaration carries a mode with a well-formed forced= citation, every capture-tier declaration names a reclaim command
|
|
4
|
+
#
|
|
5
|
+
# usage: check-close-surfaces.sh [scan-root] (derives through bin/close-surfaces.sh)
|
|
6
|
+
set -uo pipefail
|
|
7
|
+
|
|
8
|
+
KIT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
9
|
+
SDK="${GATE_SDK_ROOT:-$KIT/../gate-sdk}"
|
|
10
|
+
# shellcheck source=../../gate-sdk/lib/gate.sh
|
|
11
|
+
source "$SDK/lib/gate.sh"
|
|
12
|
+
|
|
13
|
+
declare -a ROOTARG=()
|
|
14
|
+
if [[ -n "${1:-}" ]]; then
|
|
15
|
+
cd "$1" || { echo "check-close-surfaces: not a directory: $1" >&2; exit 2; }
|
|
16
|
+
ROOTARG=(.)
|
|
17
|
+
fi
|
|
18
|
+
|
|
19
|
+
roster="$(bash "$KIT/bin/close-surfaces.sh" ${ROOTARG[@]+"${ROOTARG[@]}"})"; st=$?
|
|
20
|
+
fail_closed "$st" CLOSE-SURFACES "bin/close-surfaces.sh"
|
|
21
|
+
|
|
22
|
+
WF="${GATE_SDK_WORKFLOW_DIR:-.workflow}"
|
|
23
|
+
FORCED_RE='^forced=[A-Za-z0-9._/-]+\.md[[:space:]]+§[^[:space:]]'
|
|
24
|
+
|
|
25
|
+
errors=()
|
|
26
|
+
declarations=0
|
|
27
|
+
captures=0
|
|
28
|
+
while IFS=$'\t' read -r path mode reclaim owner; do
|
|
29
|
+
[[ -n "$path" ]] || continue
|
|
30
|
+
|
|
31
|
+
# assertion A: no undeclared capture surface
|
|
32
|
+
if [[ "$mode" == "(undeclared)" ]]; then
|
|
33
|
+
captures=$((captures + 1))
|
|
34
|
+
errors+=("$path: capture-tier workflow member with no 'close-surface:' declaration — close would read it only by luck")
|
|
35
|
+
continue
|
|
36
|
+
fi
|
|
37
|
+
declarations=$((declarations + 1))
|
|
38
|
+
|
|
39
|
+
# assertion B: every declaration carries a mode; a forced= citation is well-formed
|
|
40
|
+
if [[ -z "$mode" ]]; then
|
|
41
|
+
errors+=("$owner: 'close-surface: $path' carries no mode — say 'advisory' or 'forced=<owner-path>.md §<section>'")
|
|
42
|
+
elif [[ "$mode" != "advisory" ]]; then
|
|
43
|
+
if [[ ! "$mode" =~ $FORCED_RE ]]; then
|
|
44
|
+
errors+=("$owner: 'close-surface: $path' mode is neither 'advisory' nor a well-formed 'forced=<owner-path>.md §<section>': $mode")
|
|
45
|
+
fi
|
|
46
|
+
fi
|
|
47
|
+
|
|
48
|
+
# assertion C: a capture-tier declaration names its reclaim command
|
|
49
|
+
if [[ "$path" == "$WF"/* ]] && git check-ignore -q -- "$path" 2>/dev/null; then
|
|
50
|
+
captures=$((captures + 1))
|
|
51
|
+
[[ "$reclaim" == "-" || -z "$reclaim" ]] \
|
|
52
|
+
&& errors+=("$owner: 'close-surface: $path' is capture-tier (gitignored) and names no reclaim= command")
|
|
53
|
+
fi
|
|
54
|
+
done <<<"$roster"
|
|
55
|
+
|
|
56
|
+
if [[ ${#errors[@]} -gt 0 ]]; then
|
|
57
|
+
echo "check-close-surfaces: ${#errors[@]} close-surface roster violation(s):"
|
|
58
|
+
printf ' %s\n' "${errors[@]}"
|
|
59
|
+
echo " help: declare the surface with a full-line 'close-surface: <path> <mode> [reclaim=<command>]' directive in the SPEC section that already owns it — never a central list. <mode> is 'advisory' (no forcing function; a skip is a visible judgment) or 'forced=<owner-path>.md §<section>' naming the structural forcing function. A gitignored capture surface names the drain that empties it as the trailing reclaim=<command>."
|
|
60
|
+
exit 1
|
|
61
|
+
fi
|
|
62
|
+
echo "CLOSE-SURFACES: clean ($declarations declared surface(s), $captures capture-tier; every capture member declared, every declaration moded, every capture-tier declaration reclaimed)"
|
|
63
|
+
exit 0
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# graph: couples=TASK-QUEUE.md,.workflow/lesson-evidence.txt dir=one valve=none tier=precommit
|
|
3
|
+
# spec: lifecycle-kit/SPEC.md §check-lesson-disposition — every Lessons entry present at HEAD and gone from the worktree leaves a well-formed disposition stamp in the evidence file
|
|
4
|
+
#
|
|
5
|
+
# usage: check-lesson-disposition.sh [queue-head] [queue-worktree] [evidence-file]
|
|
6
|
+
# bare compares git show HEAD:<queue> vs the worktree + LIFECYCLE_KIT_LESSON_EVIDENCE_FILE;
|
|
7
|
+
# three explicit file args drive it hermetically (the check-task-conservation precedent).
|
|
8
|
+
set -uo pipefail
|
|
9
|
+
|
|
10
|
+
KIT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
11
|
+
SDK="${GATE_SDK_ROOT:-$KIT/../gate-sdk}"
|
|
12
|
+
# shellcheck source=../../gate-sdk/lib/gate.sh
|
|
13
|
+
source "$SDK/lib/gate.sh"
|
|
14
|
+
# shellcheck source=../lib/stages.sh
|
|
15
|
+
source "$KIT/lib/stages.sh"
|
|
16
|
+
|
|
17
|
+
cleanup=()
|
|
18
|
+
trap 'rm -f ${cleanup[@]+"${cleanup[@]}"}' EXIT
|
|
19
|
+
|
|
20
|
+
if [[ -n "${1:-}" ]]; then
|
|
21
|
+
HEAD_FILE="$1"; WORK_FILE="${2:-}"; EVID_FILE="${3:-}"
|
|
22
|
+
[[ -f "$HEAD_FILE" ]] || { echo "check-lesson-disposition: queue-head not found: $HEAD_FILE" >&2; exit 2; }
|
|
23
|
+
[[ -f "$WORK_FILE" ]] || { echo "check-lesson-disposition: queue-worktree not found: $WORK_FILE" >&2; exit 2; }
|
|
24
|
+
[[ -f "$EVID_FILE" ]] || { echo "check-lesson-disposition: evidence file not found: $EVID_FILE" >&2; exit 2; }
|
|
25
|
+
else
|
|
26
|
+
QUEUE="$LIFECYCLE_KIT_QUEUE_FILE"
|
|
27
|
+
git rev-parse --git-dir >/dev/null 2>&1 || {
|
|
28
|
+
echo "LESSON-DISPOSITION: clean (no git repository — no HEAD baseline to compare)"; exit 0; }
|
|
29
|
+
ht="$(mktemp)"; cleanup+=("$ht")
|
|
30
|
+
if ! git show "HEAD:$QUEUE" >"$ht" 2>/dev/null; then
|
|
31
|
+
echo "LESSON-DISPOSITION: clean ($QUEUE not at HEAD — no prior lessons to disposition)"; exit 0
|
|
32
|
+
fi
|
|
33
|
+
[[ -f "$QUEUE" ]] || { echo "check-lesson-disposition: worktree queue not found: $QUEUE" >&2; exit 2; }
|
|
34
|
+
HEAD_FILE="$ht"; WORK_FILE="$QUEUE"; EVID_FILE="$LIFECYCLE_KIT_LESSON_EVIDENCE_FILE"
|
|
35
|
+
[[ -f "$EVID_FILE" ]] || { echo "check-lesson-disposition: evidence file not found: $EVID_FILE" >&2; exit 2; }
|
|
36
|
+
fi
|
|
37
|
+
|
|
38
|
+
lessons_of() { # queue-file -> one normalized Lessons lead line per top-level entry
|
|
39
|
+
awk '
|
|
40
|
+
/^## Lessons Learned[[:space:]]*$/ { inl = 1; next }
|
|
41
|
+
/^## / { inl = 0 }
|
|
42
|
+
inl && /^-[[:space:]]/ {
|
|
43
|
+
line = $0
|
|
44
|
+
sub(/^[[:space:]]*-[[:space:]]+/, "", line)
|
|
45
|
+
sub(/[[:space:]]+$/, "", line)
|
|
46
|
+
print line
|
|
47
|
+
}
|
|
48
|
+
' "$1"
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
parsed="$(awk 'BEGIN { FS = " — " }
|
|
52
|
+
/^[[:space:]]*#/ || /^[[:space:]]*$/ { next }
|
|
53
|
+
{
|
|
54
|
+
if (NF < 2 || $1 !~ /^[^ ]+ lesson (rule|task|harvest|discard) /) { print "BAD\t" $0; next }
|
|
55
|
+
p = $2; for (i = 3; i <= NF; i++) p = p FS $i
|
|
56
|
+
print "OK\t" p
|
|
57
|
+
}
|
|
58
|
+
' "$EVID_FILE")"; st=$?
|
|
59
|
+
fail_closed "$st" LESSON-DISPOSITION awk
|
|
60
|
+
|
|
61
|
+
malformed=(); prefixes=()
|
|
62
|
+
while IFS=$'\t' read -r kind rest; do
|
|
63
|
+
[[ -n "$kind" ]] || continue
|
|
64
|
+
if [[ "$kind" == BAD ]]; then malformed+=("$rest"); else prefixes+=("$rest"); fi
|
|
65
|
+
done <<<"$parsed"
|
|
66
|
+
|
|
67
|
+
if [[ ${#malformed[@]} -gt 0 ]]; then
|
|
68
|
+
echo "check-lesson-disposition: malformed disposition line(s) in $EVID_FILE"
|
|
69
|
+
echo "(grammar: <iteration> lesson <rule <file>|task <slug>|harvest <tag>|discard <reason>> — <lead-line prefix>):"
|
|
70
|
+
printf ' %s\n' "${malformed[@]}"
|
|
71
|
+
echo " help: rewrite each line to the grammar above; the ' — ' separates the disposition from the lead-line prefix it dispositions."
|
|
72
|
+
exit 1
|
|
73
|
+
fi
|
|
74
|
+
|
|
75
|
+
declare -A in_work=()
|
|
76
|
+
while IFS= read -r l; do [[ -n "$l" ]] && in_work["$l"]=1; done < <(lessons_of "$WORK_FILE")
|
|
77
|
+
|
|
78
|
+
undispositioned=(); matched=0
|
|
79
|
+
while IFS= read -r entry; do
|
|
80
|
+
[[ -n "$entry" ]] || continue
|
|
81
|
+
[[ -n "${in_work[$entry]:-}" ]] && continue # still present in the worktree — not a removal
|
|
82
|
+
hit=0
|
|
83
|
+
for p in ${prefixes[@]+"${prefixes[@]}"}; do
|
|
84
|
+
[[ -n "$p" && "$entry" == "$p"* ]] && { hit=1; break; }
|
|
85
|
+
done
|
|
86
|
+
if [[ "$hit" == 1 ]]; then matched=$((matched + 1)); else undispositioned+=("$entry"); fi
|
|
87
|
+
done < <(lessons_of "$HEAD_FILE")
|
|
88
|
+
|
|
89
|
+
if [[ ${#undispositioned[@]} -gt 0 ]]; then
|
|
90
|
+
echo "check-lesson-disposition: Lessons entr(y|ies) removed since HEAD with no disposition"
|
|
91
|
+
echo "stamp in $EVID_FILE (a lesson cleared without a rule/task/harvest/discard record):"
|
|
92
|
+
printf ' %s\n' "${undispositioned[@]}"
|
|
93
|
+
echo " help: stamp each removed lesson in $EVID_FILE — '<iteration> lesson <kind> <ref> — <lead-line prefix>' — or restore the entry."
|
|
94
|
+
exit 1
|
|
95
|
+
fi
|
|
96
|
+
|
|
97
|
+
echo "LESSON-DISPOSITION: clean ($matched removed lesson(s) each matched a disposition stamp; grammar holds in $EVID_FILE)"
|
|
98
|
+
exit 0
|