checkwright 0.22.0 → 0.24.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 +855 -96
- package/lib/common/lock.sh +45 -9
- package/lib/common/profile.sh +33 -0
- package/lib/common/recipe.sh +50 -34
- package/lib/diff.sh +66 -0
- package/lib/doctor.sh +67 -42
- package/lib/init.sh +62 -46
- package/lib/uninstall.sh +214 -0
- package/lib/update.sh +34 -0
- package/package.json +2 -2
- package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates +0 -0
- package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates.sha256 +1 -1
- package/payload/canon-kit/README.md +1 -0
- package/payload/canon-kit/SPEC.md +527 -63
- package/payload/canon-kit/checks/check-amendment-queue.gate +3 -0
- package/payload/canon-kit/checks/check-comment-tier.gate +3 -0
- package/payload/canon-kit/checks/check-deprecation-task.gate +3 -0
- package/payload/canon-kit/checks/check-docs-cmd.gate +3 -0
- package/payload/canon-kit/checks/check-docs-link-convention.gate +3 -0
- package/payload/canon-kit/checks/check-install-claim.gate +3 -0
- package/payload/canon-kit/checks/check-knob-citation.gate +3 -0
- package/payload/canon-kit/checks/check-knob-default-coupling.gate +3 -0
- package/payload/canon-kit/checks/check-manifest-count.gate +3 -0
- package/payload/canon-kit/checks/check-manifest-temporal.gate +3 -0
- package/payload/canon-kit/checks/check-md-refs.gate +3 -0
- package/payload/canon-kit/checks/check-measured-claim.gate +3 -0
- package/payload/canon-kit/checks/check-payload-claim.gate +3 -0
- package/payload/canon-kit/checks/check-prose-enum.gate +3 -0
- package/payload/canon-kit/checks/check-prose-tells.gate +3 -0
- package/payload/canon-kit/checks/check-spec-derivable-section.gate +3 -0
- package/payload/canon-kit/checks/check-spec-dod-singleton.gate +3 -0
- package/payload/canon-kit/checks/check-spec-embedded-source.gate +3 -0
- package/payload/canon-kit/checks/check-spec-fence-balance.gate +3 -0
- package/payload/canon-kit/checks/check-spec-pointer.gate +3 -0
- package/payload/canon-kit/checks/check-surface-duplication.sh +1 -0
- package/payload/canon-kit/checks/check-todo-task-liveness.gate +3 -0
- package/payload/canon-kit/checks/check-tracking-claim.gate +3 -0
- package/payload/canon-kit/gate-tests/check-amendment-queue/bad/SPEC-orphan.md +6 -0
- package/payload/canon-kit/gate-tests/check-amendment-queue/bad/TASK-QUEUE.md +7 -2
- package/payload/canon-kit/gate-tests/check-amendment-queue/bad/expect.txt +8 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/bad/.workflow/fixture-state.txt +4 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/bad/bad.gate +4 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/bad/bad.rs +5 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/bad/bad.sh +3 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/bad/expect.txt +5 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/bad/templates/bad-tmpl.sh +4 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/good/.workflow/fixture-state.txt +3 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/good/expect.txt +1 -1
- package/payload/canon-kit/gate-tests/check-comment-tier/good/good.gate +4 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/good/good.rs +5 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/good/good.sh +3 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/good/templates/good-tmpl.sh +5 -0
- package/payload/canon-kit/gate-tests/check-comment-tier.test.sh +3 -2
- package/payload/canon-kit/gate-tests/check-deprecation-task/bad/.workflow/fixture-state.txt +3 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/bad/bad.gate +2 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/bad/bad.rs +4 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/bad/expect.txt +3 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/bad/scripts/canon-config.sh +6 -5
- package/payload/canon-kit/gate-tests/check-deprecation-task/bad/templates/tmpl.sh +5 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/good/.workflow/fixture-state.txt +3 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/good/expect.txt +1 -1
- package/payload/canon-kit/gate-tests/check-deprecation-task/good/good.gate +2 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/good/good.rs +4 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/good/scripts/canon-config.sh +6 -5
- package/payload/canon-kit/gate-tests/check-deprecation-task/good/templates/tmpl.sh +5 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task.test.sh +4 -3
- package/payload/canon-kit/gate-tests/check-docs-link-convention.test.sh +4 -4
- package/payload/canon-kit/gate-tests/check-knob-citation.test.sh +2 -2
- package/payload/canon-kit/gate-tests/check-knob-default-coupling.test.sh +2 -2
- package/payload/canon-kit/gate-tests/check-manifest-count/good/SPEC.md +4 -0
- package/payload/canon-kit/gate-tests/check-manifest-count.test.sh +27 -5
- package/payload/canon-kit/gate-tests/check-md-refs.test.sh +61 -9
- package/payload/canon-kit/gate-tests/check-measured-claim/bad/SPEC.md +12 -0
- package/payload/canon-kit/gate-tests/check-measured-claim/bad/expect.txt +3 -0
- package/payload/canon-kit/gate-tests/check-measured-claim/bad/scripts/canon-config.sh +6 -0
- package/payload/canon-kit/gate-tests/check-measured-claim/good/SPEC.md +23 -0
- package/payload/canon-kit/gate-tests/check-measured-claim/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-measured-claim/good/scripts/canon-config.sh +6 -0
- package/payload/canon-kit/gate-tests/check-measured-claim.test.sh +90 -0
- package/payload/canon-kit/gate-tests/check-prose-enum.test.sh +3 -3
- package/payload/canon-kit/gate-tests/check-spec-dod-singleton.test.sh +21 -7
- package/payload/canon-kit/gate-tests/check-spec-embedded-source/bad/SPEC-wire.md +18 -0
- package/payload/canon-kit/gate-tests/check-spec-embedded-source/bad/expect.txt +3 -1
- package/payload/canon-kit/gate-tests/check-spec-embedded-source/bad/widget.proto +13 -0
- package/payload/canon-kit/gate-tests/check-spec-embedded-source/good/SPEC-wire.md +22 -0
- package/payload/canon-kit/gate-tests/check-spec-embedded-source/good/SPEC.md +17 -0
- package/payload/canon-kit/gate-tests/check-spec-embedded-source/good/widget.proto +13 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/.workflow/fixture-state.txt +2 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/bad.gate +2 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/bad.rs +4 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/expect.txt +3 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/templates/tmpl.sh +5 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/.workflow/fixture-state.txt +2 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/expect.txt +1 -1
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/good.gate +2 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/good.rs +4 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/templates/tmpl.sh +5 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/.workflow/fixture-state.txt +3 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/bad.gate +2 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/bad.rs +4 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/expect.txt +3 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/templates/tmpl.sh +5 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/.workflow/fixture-state.txt +3 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/expect.txt +1 -1
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/good.gate +2 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/good.rs +4 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/templates/tmpl.sh +5 -0
- package/payload/canon-kit/gate-tests/check-tracking-claim.test.sh +1 -2
- package/payload/canon-kit/lib/spec.sh +91 -62
- package/payload/canon-kit/smoke/install.sh +2 -1
- package/payload/canon-kit/templates/SPEC-amendment.md +4 -1
- package/payload/context-kit/README.md +10 -5
- package/payload/context-kit/SPEC.md +364 -62
- package/payload/context-kit/bin/always-loaded.sh +5 -21
- package/payload/context-kit/bin/env-probe.sh +21 -23
- package/payload/context-kit/checks/check-brevity.gate +3 -0
- package/payload/context-kit/checks/check-footprint-fresh.gate +3 -0
- package/payload/context-kit/checks/check-memory-off.gate +3 -0
- package/payload/context-kit/checks/check-settings-paths.gate +3 -0
- package/payload/context-kit/checks/check-settings-pins.gate +3 -0
- package/payload/context-kit/gate-tests/check-brevity.test.sh +3 -2
- package/payload/context-kit/gate-tests/check-memory-off/bad/scripts/context-config.sh +4 -0
- package/payload/context-kit/gate-tests/check-memory-off/good/scripts/context-config.sh +4 -0
- package/payload/context-kit/gate-tests/check-memory-off.test.sh +18 -4
- package/payload/context-kit/gate-tests/check-settings-paths/bad/expect.txt +3 -0
- package/payload/context-kit/gate-tests/check-settings-paths/bad/settings.json +12 -0
- package/payload/context-kit/gate-tests/check-settings-paths/bad/tools/real-tool.sh +4 -0
- package/payload/context-kit/gate-tests/check-settings-paths/good/expect.txt +1 -0
- package/payload/context-kit/gate-tests/check-settings-paths/good/settings.json +16 -0
- package/payload/context-kit/gate-tests/check-settings-paths/good/tools/real-tool.sh +4 -0
- package/payload/context-kit/gate-tests/check-settings-pins.test.sh +70 -0
- package/payload/context-kit/index-tests/expected/toolfloor.txt +9 -0
- package/payload/context-kit/index-tests/toolfloor-cases.sh +20 -0
- package/payload/context-kit/lib/context.sh +56 -0
- package/payload/context-kit/lib/toolfloor.sh +15 -4
- package/payload/context-kit/smoke/agents-md.sh +27 -4
- package/payload/context-kit/smoke/install.sh +4 -2
- package/payload/context-kit/templates/session-context.sh +5 -5
- package/payload/delegation-kit/README.md +3 -3
- package/payload/delegation-kit/SPEC.md +400 -22
- package/payload/delegation-kit/checks/check-agent-tier-explicit.gate +3 -0
- package/payload/delegation-kit/checks/check-gate-tamper.gate +3 -0
- package/payload/delegation-kit/checks/check-rule-citation.gate +3 -0
- package/payload/delegation-kit/gate-tests/check-gate-tamper/bad/added-exemptions +5 -0
- package/payload/delegation-kit/gate-tests/check-gate-tamper/bad/expect.txt +2 -0
- package/payload/delegation-kit/gate-tests/check-gate-tamper.test.sh +108 -0
- package/payload/delegation-kit/smoke/install.sh +1 -1
- package/payload/delegation-kit/templates/agent-execution.md +109 -18
- package/payload/delegation-kit/templates/statusline-usage.sh +23 -1
- package/payload/doctrine-kit/DOCTRINE.md +86 -12
- package/payload/doctrine-kit/README.md +7 -3
- package/payload/doctrine-kit/SPEC.md +103 -10
- package/payload/doctrine-kit/bin/install-doctrine.sh +83 -13
- package/payload/doctrine-kit/checks/check-doctrine-registration.gate +3 -0
- package/payload/doctrine-kit/gate-tests/check-doctrine-registration/bad/DOCTRINE.md +3 -0
- package/payload/doctrine-kit/gate-tests/check-doctrine-registration/good/DOCTRINE.md +3 -0
- package/payload/doctrine-kit/gate-tests/check-doctrine-registration.test.sh +84 -5
- package/payload/doctrine-kit/smoke/install.sh +106 -3
- package/payload/drift-kit/README.md +2 -2
- package/payload/drift-kit/SPEC.md +84 -11
- package/payload/drift-kit/bin/kfric.sh +21 -2
- package/payload/drift-kit/bin/stage-economics.sh +1 -1
- package/payload/drift-kit/lib/drift.sh +43 -0
- package/payload/drift-kit/smoke/install.sh +49 -14
- package/payload/evidence-kit/README.md +3 -1
- package/payload/evidence-kit/SPEC.md +160 -19
- package/payload/evidence-kit/checks/check-battery-roster.gate +3 -0
- package/payload/evidence-kit/checks/check-evidence-baseline.gate +3 -0
- package/payload/evidence-kit/checks/check-evidence-manifest.gate +3 -0
- package/payload/evidence-kit/checks/check-producer-liveness.sh +43 -2
- package/payload/evidence-kit/gate-tests/check-battery-roster.test.sh +4 -3
- package/payload/evidence-kit/gate-tests/check-evidence-baseline.test.sh +8 -5
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/WORKFLOW-STATE.txt +1 -1
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/scripts/evidence-config.sh +9 -0
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/WORKFLOW-STATE.txt +1 -1
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/scripts/evidence-config.sh +9 -0
- package/payload/evidence-kit/gate-tests/check-evidence-manifest.test.sh +6 -4
- package/payload/evidence-kit/gate-tests/producer-lock.test.sh +42 -1
- package/payload/evidence-kit/lib/evidence.sh +2 -0
- package/payload/evidence-kit/smoke/install.sh +1 -1
- package/payload/gate-sdk/README.md +23 -7
- package/payload/gate-sdk/SPEC.md +6402 -291
- package/payload/gate-sdk/bin/build-native.sh +38 -0
- package/payload/gate-sdk/bin/gen-pre-commit.sh +23 -3
- package/payload/gate-sdk/bin/install-hooks.sh +14 -2
- package/payload/gate-sdk/bin/port-blockers.sh +473 -0
- package/payload/gate-sdk/bin/run-consumer-smoke.sh +8 -1
- package/payload/gate-sdk/bin/run-gate-tests.sh +27 -7
- package/payload/gate-sdk/bin/run-gates.sh +30 -2
- package/payload/gate-sdk/bin/upgrade-smoke.sh +70 -17
- package/payload/gate-sdk/checks/check-action-gh-repo.gate +1 -0
- package/payload/gate-sdk/checks/check-action-pinning.gate +1 -0
- package/payload/gate-sdk/checks/check-action-run-shell.sh +2 -0
- package/payload/gate-sdk/checks/check-assertion-strength.gate +3 -0
- package/payload/gate-sdk/checks/check-commit-msg.gate +3 -0
- package/payload/gate-sdk/checks/check-commit-subject.gate +3 -0
- package/payload/gate-sdk/checks/check-core-files.gate +3 -0
- package/payload/gate-sdk/checks/check-crate-arms.sh +62 -0
- package/payload/gate-sdk/checks/check-enforcement-fresh.gate +3 -0
- package/payload/gate-sdk/checks/check-exec-bit.gate +3 -0
- package/payload/gate-sdk/checks/check-gate-assertions.sh +32 -6
- package/payload/gate-sdk/checks/check-gate-binary-fresh.gate +3 -0
- package/payload/gate-sdk/checks/check-gate-exemption-tasks.gate +3 -0
- package/payload/gate-sdk/checks/check-gate-fail-closed.gate +3 -0
- package/payload/gate-sdk/checks/check-gate-fixture-coverage.gate +3 -0
- package/payload/gate-sdk/checks/check-gate-output.gate +3 -0
- package/payload/gate-sdk/checks/check-gate-substrate-parity.sh +109 -14
- package/payload/gate-sdk/checks/check-graph.gate +3 -0
- package/payload/gate-sdk/checks/check-hook-exec-bit.gate +3 -0
- package/payload/gate-sdk/checks/check-identity.gate +3 -0
- package/payload/gate-sdk/checks/check-install-disposition.sh +93 -0
- package/payload/gate-sdk/checks/check-kit-enum.gate +3 -0
- package/payload/gate-sdk/checks/check-kit-registration.gate +3 -0
- package/payload/gate-sdk/checks/check-readme-roster.gate +3 -0
- package/payload/gate-sdk/checks/check-reads-couples.gate +3 -0
- package/payload/gate-sdk/checks/check-root-tiering.gate +3 -0
- package/payload/gate-sdk/checks/check-shellcheck.sh +2 -0
- package/payload/gate-sdk/checks/check-smoke-entry-guard.gate +3 -0
- package/payload/gate-sdk/checks/check-template-copy-parity.gate +3 -0
- package/payload/gate-sdk/checks/check-template-registry-parity.gate +3 -0
- package/payload/gate-sdk/checks/check-test-hermetic.gate +3 -0
- package/payload/gate-sdk/checks/check-tree-terms.sh +2 -0
- package/payload/gate-sdk/checks/check-workflow-tiering.gate +3 -0
- package/payload/gate-sdk/gate-tests/check-commit-subject.test.sh +17 -12
- package/payload/gate-sdk/gate-tests/check-core-files.test.sh +4 -5
- package/payload/gate-sdk/gate-tests/check-crate-arms/bad/crate/Cargo.toml +7 -0
- package/payload/gate-sdk/gate-tests/check-crate-arms/bad/crate/src/lib.rs +12 -0
- package/payload/gate-sdk/gate-tests/check-crate-arms/bad/expect.txt +5 -0
- package/payload/gate-sdk/gate-tests/check-crate-arms/bad/scripts/gate-sdk-config.sh +2 -0
- package/payload/gate-sdk/gate-tests/check-crate-arms/good/crate/Cargo.toml +7 -0
- package/payload/gate-sdk/gate-tests/check-crate-arms/good/crate/src/lib.rs +11 -0
- package/payload/gate-sdk/gate-tests/check-crate-arms/good/expect.txt +2 -0
- package/payload/gate-sdk/gate-tests/check-crate-arms/good/scripts/gate-sdk-config.sh +2 -0
- package/payload/gate-sdk/gate-tests/check-exec-bit/bad/dump.txt +2 -1
- package/payload/gate-sdk/gate-tests/check-exec-bit/bad/expect.txt +2 -1
- package/payload/gate-sdk/gate-tests/check-exec-bit/good/dump.txt +3 -0
- package/payload/gate-sdk/gate-tests/check-exec-bit/good/expect.txt +1 -1
- package/payload/gate-sdk/gate-tests/check-exec-bit.test.sh +3 -4
- package/payload/gate-sdk/gate-tests/check-gate-assertions/good/expect.txt +1 -1
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh.test.sh +26 -4
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/args +6 -1
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/expect.txt +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/kitroot/checks/check-vendored-descriptor.gate +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/kitroot/checks/check-vendored.sh +14 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/scripts/check-descriptor.gate +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/scripts/check-held.sh +8 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/args +8 -1
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/expect.txt +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/kitroot/checks/check-vendored-descriptor.gate +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/kitroot/checks/check-vendored.sh +14 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/scripts/check-descriptor.gate +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/scripts/check-held.sh +8 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks.test.sh +77 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/bad/check-native-sample.gate +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/bad/expect.txt +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/bad/gates.list +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/bad/native/Cargo.toml +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/bad/native/src/gates/native_sample.rs +7 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/good/check-native-sample.gate +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/good/expect.txt +1 -1
- package/payload/gate-sdk/gate-tests/check-gate-output/good/gates.list +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/good/native/Cargo.toml +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/good/native/src/gates/native_sample.rs +11 -0
- package/payload/gate-sdk/gate-tests/check-gate-output.test.sh +110 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/expect.txt +7 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-alpha.sh +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-bare.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-both.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-heldtwice.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-orphan.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-twice.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gates.list +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/expect.txt +2 -1
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-alpha.sh +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-held.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gates.list +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity.test.sh +110 -4
- package/payload/gate-sdk/gate-tests/check-graph/bad/SPEC-example-gate.md +15 -5
- package/payload/gate-sdk/gate-tests/check-graph/bad/expect.txt +12 -0
- package/payload/gate-sdk/gate-tests/check-graph/good/SPEC-example-gate.md +27 -5
- package/payload/gate-sdk/gate-tests/check-graph/good/SPEC-second-gate.md +12 -0
- package/payload/gate-sdk/gate-tests/check-graph-cap.test.sh +5 -4
- package/payload/gate-sdk/gate-tests/check-graph-refs.test.sh +14 -12
- package/payload/gate-sdk/gate-tests/check-graph-theme.test.sh +43 -17
- package/payload/gate-sdk/gate-tests/check-graph-tree.test.sh +190 -0
- package/payload/gate-sdk/gate-tests/check-identity/bad/gh-hosts.yml +9 -0
- package/payload/gate-sdk/gate-tests/check-identity/bad/identity.conf +4 -2
- package/payload/gate-sdk/gate-tests/check-identity/bad/scripts/gate-sdk-config.sh +10 -0
- package/payload/gate-sdk/gate-tests/check-identity/good/gh-hosts.yml +11 -0
- package/payload/gate-sdk/gate-tests/check-identity/good/identity.conf +5 -1
- package/payload/gate-sdk/gate-tests/check-identity/good/scripts/gate-sdk-config.sh +10 -0
- package/payload/gate-sdk/gate-tests/check-identity.test.sh +114 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-alpha.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-delta.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-epsilon.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/smoke/install.sh +7 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/args +6 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/installer/lib/common/recipe.sh +9 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/scripts/gate-sdk-config.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-alpha.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-beta.gate +3 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-gamma.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/smoke/install.sh +8 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/args +6 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/installer/lib/common/recipe.sh +10 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/scripts/gate-sdk-config.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-kit-enum/bad/check-native-sample.gate +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-enum/bad/gates.list +4 -1
- package/payload/gate-sdk/gate-tests/check-kit-enum/good/check-native-sample.gate +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-enum/good/expect.txt +1 -1
- package/payload/gate-sdk/gate-tests/check-kit-enum/good/gates.list +5 -2
- package/payload/gate-sdk/gate-tests/check-kit-registration.test.sh +6 -5
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/args +3 -1
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/delta-kit/README.md +15 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/delta-kit/checks/check-delta-one.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/delta-kit/checks/check-delta-two.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/expect.txt +3 -1
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/scripts/gate-sdk-config.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/args +3 -1
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/delta-kit/README.md +13 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/delta-kit/checks/check-delta-one.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/epsilon-kit/README.md +14 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/epsilon-kit/checks/check-eps-one.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/epsilon-kit/checks/check-eps-two.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/scripts/gate-sdk-config.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-reads-couples.test.sh +87 -89
- package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/scripts/agent-budget-guard.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-template-copy-parity.test.sh +56 -0
- package/payload/gate-sdk/gate-tests/check-test-hermetic-smoke.test.sh +2 -3
- package/payload/gate-sdk/gate-tests/declaration-lib-parity.test.sh +211 -0
- package/payload/gate-sdk/gate-tests/enforcement-map.test.sh +16 -15
- package/payload/gate-sdk/gate-tests/lib-gate.test.sh +204 -1
- package/payload/gate-sdk/gate-tests/run-dispatch-streams.test.sh +73 -0
- package/payload/gate-sdk/lib/consumer-smoke.sh +24 -12
- package/payload/gate-sdk/lib/gate.sh +353 -22
- package/payload/gate-sdk/lib/inject.sh +25 -0
- package/payload/gate-sdk/lib/test-hermetic.sh +26 -0
- package/payload/gate-sdk/smoke/install.sh +47 -1
- package/payload/guard-kit/README.md +14 -11
- package/payload/guard-kit/SPEC.md +477 -82
- package/payload/guard-kit/bin/run-guard-tests.sh +7 -1
- package/payload/guard-kit/gate-tests/git-mutation-under-producer.test.sh +105 -0
- package/payload/guard-kit/gate-tests/guard-read-path.test.sh +52 -0
- package/payload/guard-kit/guard-tests/cases.tsv +84 -14
- package/payload/guard-kit/lib/guard.sh +440 -54
- package/payload/guard-kit/templates/close-triage.md +5 -5
- package/payload/guard-kit/templates/settings-hooks.json +7 -1
- package/payload/lifecycle-kit/README.md +14 -3
- package/payload/lifecycle-kit/SPEC.md +929 -93
- package/payload/lifecycle-kit/bin/cite-survey.sh +81 -0
- package/payload/lifecycle-kit/bin/enter-stage.sh +193 -38
- package/payload/lifecycle-kit/bin/file-gap.sh +29 -12
- package/payload/lifecycle-kit/bin/file-survey.sh +21 -2
- package/payload/lifecycle-kit/checks/check-close-surfaces.gate +3 -0
- package/payload/lifecycle-kit/checks/check-gap-inbox-neutrality.gate +3 -0
- package/payload/lifecycle-kit/checks/check-lesson-disposition.gate +3 -0
- package/payload/lifecycle-kit/checks/check-lifecycle-registration.gate +3 -0
- package/payload/lifecycle-kit/checks/check-merge-attrs.gate +3 -0
- package/payload/lifecycle-kit/checks/check-scratch-citation.gate +3 -0
- package/payload/lifecycle-kit/checks/check-shim-restatement.gate +3 -0
- package/payload/lifecycle-kit/checks/check-skill-binding.gate +3 -0
- package/payload/lifecycle-kit/checks/check-stage-entry.gate +3 -0
- package/payload/lifecycle-kit/checks/check-stage-evidence.gate +3 -0
- package/payload/lifecycle-kit/checks/check-stage-skill-coverage.gate +3 -0
- package/payload/lifecycle-kit/checks/check-survey-record.gate +3 -0
- package/payload/lifecycle-kit/gate-tests/boundary-scratch-wipe.test.sh +4 -4
- package/payload/lifecycle-kit/gate-tests/check-close-surfaces.test.sh +2 -3
- package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/bad/args +2 -0
- package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/bad/expect.txt +3 -0
- package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/bad/gap-inbox.md +5 -0
- package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/good/args +2 -0
- package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/good/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-gap-inbox-neutrality/good/gap-inbox.md +4 -0
- package/payload/lifecycle-kit/gate-tests/check-lesson-disposition.test.sh +2 -3
- package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration.test.sh +2 -3
- package/payload/lifecycle-kit/gate-tests/check-merge-attrs.test.sh +2 -3
- package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/scripts/lifecycle-config.sh +4 -0
- package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/surfaces/queue.md +13 -0
- package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/scripts/lifecycle-config.sh +4 -0
- package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/surfaces/queue.md +31 -0
- package/payload/lifecycle-kit/gate-tests/check-shim-restatement.test.sh +2 -3
- package/payload/lifecycle-kit/gate-tests/check-skill-binding.test.sh +2 -3
- package/payload/lifecycle-kit/gate-tests/check-stage-entry/bad/.workflow/WORKFLOW-STATE.txt +3 -3
- package/payload/lifecycle-kit/gate-tests/check-stage-entry/good/.workflow/WORKFLOW-STATE.txt +3 -3
- package/payload/lifecycle-kit/gate-tests/check-stage-entry.test.sh +24 -25
- package/payload/lifecycle-kit/gate-tests/check-stage-evidence/bad/.workflow/WORKFLOW-STATE.txt +2 -2
- package/payload/lifecycle-kit/gate-tests/check-stage-evidence/good/.workflow/WORKFLOW-STATE.txt +2 -2
- package/payload/lifecycle-kit/gate-tests/check-stage-evidence.test.sh +129 -15
- package/payload/lifecycle-kit/gate-tests/check-survey-record.test.sh +2 -3
- package/payload/lifecycle-kit/gate-tests/file-gap-recurrence.test.sh +54 -26
- package/payload/lifecycle-kit/gate-tests/gap-inbox-route.test.sh +123 -0
- package/payload/lifecycle-kit/gate-tests/rename-iteration.test.sh +142 -0
- package/payload/lifecycle-kit/gate-tests/survey-record-entry.test.sh +16 -5
- package/payload/lifecycle-kit/gate-tests/workflow-state-guard.test.sh +100 -0
- package/payload/lifecycle-kit/lib/stages.sh +9 -0
- package/payload/lifecycle-kit/smoke/install.sh +96 -19
- package/payload/lifecycle-kit/templates/lead.md +60 -0
- package/payload/lifecycle-kit/templates/stages/align.md +20 -2
- package/payload/lifecycle-kit/templates/stages/build.md +3 -3
- package/payload/lifecycle-kit/templates/stages/close.md +48 -15
- package/payload/lifecycle-kit/templates/stages/scope.md +29 -5
- package/payload/lifecycle-kit/templates/stages/spec.md +6 -2
- package/payload/lifecycle-kit/templates/stages/validate.md +1 -1
- package/payload/lifecycle-kit/templates/workflow-state-guard.sh +29 -0
- package/payload/queue-kit/README.md +12 -10
- package/payload/queue-kit/SPEC.md +411 -74
- package/payload/queue-kit/bin/queue-counts.sh +35 -0
- package/payload/queue-kit/checks/check-queue-entry-budget.gate +3 -0
- package/payload/queue-kit/checks/check-queue-hygiene.gate +3 -0
- package/payload/queue-kit/checks/check-queue-prose-precondition.gate +3 -0
- package/payload/queue-kit/checks/check-queue-sections.gate +3 -0
- package/payload/queue-kit/checks/check-queue-slug-liveness.gate +3 -0
- package/payload/queue-kit/checks/check-queue-wrap.gate +3 -0
- package/payload/queue-kit/checks/check-roadmap-fresh.gate +3 -0
- package/payload/queue-kit/checks/check-tag-lead-line.gate +3 -0
- package/payload/queue-kit/checks/check-task-conservation.gate +4 -0
- package/payload/queue-kit/checks/check-task-names.gate +3 -0
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/TASK-QUEUE.md +15 -0
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/expect.txt +2 -0
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/TASK-QUEUE.md +7 -0
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/expect.txt +4 -0
- package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/expect.txt +1 -1
- package/payload/queue-kit/gate-tests/queue-counts.test.sh +116 -0
- package/payload/queue-kit/gate-tests/queue-index.test.sh +55 -119
- package/payload/queue-kit/gate-tests/queue-lib-parity.test.sh +215 -0
- package/payload/queue-kit/gate-tests/roadmap.test.sh +22 -12
- package/payload/queue-kit/lib/queue.sh +4 -68
- package/payload/queue-kit/smoke/install.sh +1 -1
- package/payload/site-kit/SPEC.md +52 -2
- package/payload/site-kit/checks/check-docs-cname-parity.gate +3 -0
- package/payload/site-kit/checks/check-docs-render-fidelity.sh +2 -0
- package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/args +5 -4
- package/payload/site-kit/gate-tests/check-docs-cname-parity/good/args +6 -5
- package/payload/site-kit/gate-tests/check-docs-cname-parity/good/checks/check-sample.gate +3 -0
- package/payload/site-kit/gate-tests/check-docs-cname-parity/good/expect.txt +1 -1
- package/payload/site-kit/smoke/install.sh +1 -1
- package/profiles.list +36 -8
- package/payload/canon-kit/checks/check-amendment-queue.sh +0 -116
- package/payload/canon-kit/checks/check-comment-tier.sh +0 -216
- package/payload/canon-kit/checks/check-deprecation-task.sh +0 -90
- package/payload/canon-kit/checks/check-docs-cmd.sh +0 -153
- package/payload/canon-kit/checks/check-docs-link-convention.sh +0 -78
- package/payload/canon-kit/checks/check-install-claim.sh +0 -146
- package/payload/canon-kit/checks/check-knob-citation.sh +0 -117
- package/payload/canon-kit/checks/check-knob-default-coupling.sh +0 -239
- package/payload/canon-kit/checks/check-manifest-count.sh +0 -46
- package/payload/canon-kit/checks/check-manifest-temporal.sh +0 -83
- package/payload/canon-kit/checks/check-md-refs.sh +0 -128
- package/payload/canon-kit/checks/check-payload-claim.sh +0 -133
- package/payload/canon-kit/checks/check-prose-enum.sh +0 -115
- package/payload/canon-kit/checks/check-prose-tells.sh +0 -207
- package/payload/canon-kit/checks/check-spec-derivable-section.sh +0 -69
- package/payload/canon-kit/checks/check-spec-dod-singleton.sh +0 -45
- package/payload/canon-kit/checks/check-spec-embedded-source.sh +0 -133
- package/payload/canon-kit/checks/check-spec-fence-balance.sh +0 -42
- package/payload/canon-kit/checks/check-spec-pointer.sh +0 -187
- package/payload/canon-kit/checks/check-todo-task-liveness.sh +0 -80
- package/payload/canon-kit/checks/check-tracking-claim.sh +0 -136
- package/payload/context-kit/bin/footprint.sh +0 -144
- package/payload/context-kit/checks/check-brevity.sh +0 -123
- package/payload/context-kit/checks/check-footprint-fresh.sh +0 -38
- package/payload/context-kit/checks/check-memory-off.sh +0 -112
- package/payload/context-kit/checks/check-settings-pins.sh +0 -110
- package/payload/delegation-kit/checks/check-agent-tier-explicit.sh +0 -61
- package/payload/delegation-kit/checks/check-gate-tamper.sh +0 -139
- package/payload/delegation-kit/checks/check-rule-citation.sh +0 -76
- package/payload/doctrine-kit/checks/check-doctrine-registration.sh +0 -216
- package/payload/drift-kit/bin/trajectory.sh +0 -242
- package/payload/evidence-kit/checks/check-battery-roster.sh +0 -86
- package/payload/evidence-kit/checks/check-evidence-baseline.sh +0 -103
- package/payload/evidence-kit/checks/check-evidence-manifest.sh +0 -104
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/args +0 -3
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/args +0 -3
- package/payload/gate-sdk/bin/enforcement-map.sh +0 -272
- package/payload/gate-sdk/checks/check-assertion-strength.sh +0 -134
- package/payload/gate-sdk/checks/check-commit-msg.sh +0 -50
- package/payload/gate-sdk/checks/check-commit-subject.sh +0 -43
- package/payload/gate-sdk/checks/check-core-files.sh +0 -75
- package/payload/gate-sdk/checks/check-enforcement-fresh.sh +0 -37
- package/payload/gate-sdk/checks/check-exec-bit.sh +0 -95
- package/payload/gate-sdk/checks/check-gate-binary-fresh.sh +0 -106
- package/payload/gate-sdk/checks/check-gate-exemption-tasks.sh +0 -105
- package/payload/gate-sdk/checks/check-gate-fail-closed.sh +0 -84
- package/payload/gate-sdk/checks/check-gate-fixture-coverage.sh +0 -92
- package/payload/gate-sdk/checks/check-gate-output.sh +0 -73
- package/payload/gate-sdk/checks/check-graph.sh +0 -631
- package/payload/gate-sdk/checks/check-hook-exec-bit.sh +0 -45
- package/payload/gate-sdk/checks/check-identity.sh +0 -134
- package/payload/gate-sdk/checks/check-kit-enum.sh +0 -94
- package/payload/gate-sdk/checks/check-kit-registration.sh +0 -68
- package/payload/gate-sdk/checks/check-readme-roster.sh +0 -107
- package/payload/gate-sdk/checks/check-reads-couples.sh +0 -199
- package/payload/gate-sdk/checks/check-root-tiering.sh +0 -66
- package/payload/gate-sdk/checks/check-smoke-entry-guard.sh +0 -53
- package/payload/gate-sdk/checks/check-template-copy-parity.sh +0 -126
- package/payload/gate-sdk/checks/check-template-registry-parity.sh +0 -81
- package/payload/gate-sdk/checks/check-test-hermetic.sh +0 -119
- package/payload/gate-sdk/checks/check-workflow-tiering.sh +0 -84
- package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/args +0 -1
- package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/args +0 -1
- package/payload/gate-sdk/gate-tests/check-identity/bad/args +0 -1
- package/payload/gate-sdk/gate-tests/check-identity/good/args +0 -1
- package/payload/lifecycle-kit/bin/close-surfaces.sh +0 -94
- package/payload/lifecycle-kit/checks/check-close-surfaces.sh +0 -63
- package/payload/lifecycle-kit/checks/check-lesson-disposition.sh +0 -98
- package/payload/lifecycle-kit/checks/check-lifecycle-registration.sh +0 -54
- package/payload/lifecycle-kit/checks/check-merge-attrs.sh +0 -69
- package/payload/lifecycle-kit/checks/check-shim-restatement.sh +0 -97
- package/payload/lifecycle-kit/checks/check-skill-binding.sh +0 -59
- package/payload/lifecycle-kit/checks/check-stage-entry.sh +0 -197
- package/payload/lifecycle-kit/checks/check-stage-evidence.sh +0 -81
- package/payload/lifecycle-kit/checks/check-stage-skill-coverage.sh +0 -47
- package/payload/lifecycle-kit/checks/check-survey-record.sh +0 -102
- package/payload/queue-kit/bin/queue-index.sh +0 -182
- package/payload/queue-kit/bin/roadmap.sh +0 -76
- package/payload/queue-kit/checks/check-queue-entry-budget.sh +0 -106
- package/payload/queue-kit/checks/check-queue-hygiene.sh +0 -81
- package/payload/queue-kit/checks/check-queue-prose-precondition.sh +0 -63
- package/payload/queue-kit/checks/check-queue-sections.sh +0 -44
- package/payload/queue-kit/checks/check-queue-slug-liveness.sh +0 -63
- package/payload/queue-kit/checks/check-queue-wrap.sh +0 -56
- package/payload/queue-kit/checks/check-roadmap-fresh.sh +0 -110
- package/payload/queue-kit/checks/check-tag-lead-line.sh +0 -70
- package/payload/queue-kit/checks/check-task-conservation.sh +0 -50
- package/payload/queue-kit/checks/check-task-names.sh +0 -128
- package/payload/site-kit/checks/check-docs-cname-parity.sh +0 -80
- /package/payload/context-kit/gate-tests/{check-memory-off → check-settings-paths}/bad/args +0 -0
- /package/payload/context-kit/gate-tests/{check-memory-off → check-settings-paths}/good/args +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/{gates → scripts}/check-sample.sh +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/{gates → scripts}/check-sample.sh +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/{check-gamma.sh → scripts/check-gamma.sh} +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/{gate-tests → scripts/gate-tests}/check-alpha/bad/.keep +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/{gate-tests → scripts/gate-tests}/check-alpha/good/.keep +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/{gates.list → scripts/gates.list} +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/{check-beta.sh → scripts/check-beta.sh} +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/{gate-tests → scripts/gate-tests}/check-alpha/bad/.keep +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/{gate-tests → scripts/gate-tests}/check-alpha/good/.keep +0 -0
- /package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/{gates.list → scripts/gates.list} +0 -0
- /package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/{site-config.sh → scripts/site-config.sh} +0 -0
- /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{tree → docs}/CNAME +0 -0
- /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{tree → docs}/index.md +0 -0
- /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{tree/docs → docs}/posts/2026-01-01-legacy.md +0 -0
- /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{tree/pkg → pkg}/gate-tests/fixture.md +0 -0
- /package/payload/site-kit/gate-tests/check-docs-cname-parity/good/{site-config.sh → scripts/site-config.sh} +0 -0
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# graph: couples=kit:*.sh dir=one valve=none tier=precommit
|
|
3
|
-
# spec: delegation-kit/SPEC.md §Verify after every agent commit — a gate-weakening commit is blocked by shape (A gate edits stay meta-isolated; B a new path-exemption can't excuse a co-staged file)
|
|
4
|
-
#
|
|
5
|
-
# --fixture <dir> injects staged-files / added-exemptions lists; live mode reads git diff --cached.
|
|
6
|
-
set -uo pipefail
|
|
7
|
-
|
|
8
|
-
KIT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
9
|
-
# shellcheck source=../lib/delegation.sh
|
|
10
|
-
source "$KIT/lib/delegation.sh"
|
|
11
|
-
|
|
12
|
-
is_meta() {
|
|
13
|
-
local p="$1" pre
|
|
14
|
-
for pre in "${DELEGATION_KIT_META_PATHS[@]}"; do
|
|
15
|
-
[[ "$p" == "$pre"* ]] && return 0
|
|
16
|
-
done
|
|
17
|
-
[[ "$p" == *.md && "$p" != */* ]] && return 0 # root-level *.md is always meta
|
|
18
|
-
return 1
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
is_gate_file() {
|
|
22
|
-
local p="$1" g
|
|
23
|
-
for g in "${DELEGATION_KIT_GATE_FILES[@]}"; do
|
|
24
|
-
# shellcheck disable=SC2053 # $g is a glob pattern by design here
|
|
25
|
-
[[ "$p" == $g ]] && return 0
|
|
26
|
-
done
|
|
27
|
-
return 1
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
is_pathlike() {
|
|
31
|
-
case "$1" in
|
|
32
|
-
*/* | *'*'* | *'?'* | *'['*) return 0 ;;
|
|
33
|
-
*) return 1 ;;
|
|
34
|
-
esac
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
extract_exemptions() {
|
|
38
|
-
awk '
|
|
39
|
-
/^[[:space:]]*#[[:space:]]*exception-list:/ { tag=1; next }
|
|
40
|
-
tag==1 && /^[[:space:]]*[A-Za-z_][A-Za-z0-9_]*=\(/ {
|
|
41
|
-
tag=0; inarr=1
|
|
42
|
-
line=$0; sub(/#.*/,"",line)
|
|
43
|
-
ob=gsub(/\(/,"",line); cb=gsub(/\)/,"",line)
|
|
44
|
-
bal=ob-cb
|
|
45
|
-
if (bal<=0) inarr=0
|
|
46
|
-
next
|
|
47
|
-
}
|
|
48
|
-
inarr==1 {
|
|
49
|
-
line=$0; sub(/#.*/,"",line)
|
|
50
|
-
ob=gsub(/\(/,"",line); cb=gsub(/\)/,"",line)
|
|
51
|
-
v=line; sub(/^[[:space:]]+/,"",v); sub(/[[:space:]].*$/,"",v)
|
|
52
|
-
gsub(/\047/,"",v); gsub(/"/,"",v)
|
|
53
|
-
if (v != "" && v !~ /^[)(]/) print v
|
|
54
|
-
bal += ob - cb
|
|
55
|
-
if (bal<=0) inarr=0
|
|
56
|
-
}
|
|
57
|
-
'
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
declare -a STAGED=() ADDED=()
|
|
61
|
-
|
|
62
|
-
collect_live() {
|
|
63
|
-
mapfile -t STAGED < <(git diff --cached --name-only 2>/dev/null)
|
|
64
|
-
local f new old v
|
|
65
|
-
declare -A added_set=()
|
|
66
|
-
for f in "${STAGED[@]}"; do
|
|
67
|
-
is_gate_file "$f" || continue
|
|
68
|
-
new="$(git show ":$f" 2>/dev/null)" || new=""
|
|
69
|
-
old="$(git show "HEAD:$f" 2>/dev/null)" || old=""
|
|
70
|
-
declare -A old_set=()
|
|
71
|
-
while IFS= read -r v; do [[ -n "$v" ]] && old_set["$v"]=1; done \
|
|
72
|
-
< <(printf '%s\n' "$old" | extract_exemptions)
|
|
73
|
-
while IFS= read -r v; do
|
|
74
|
-
[[ -n "$v" && -z "${old_set[$v]:-}" ]] && added_set["$v"]=1
|
|
75
|
-
done < <(printf '%s\n' "$new" | extract_exemptions)
|
|
76
|
-
unset old_set
|
|
77
|
-
done
|
|
78
|
-
ADDED=("${!added_set[@]}")
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
collect_fixture() {
|
|
82
|
-
local dir="$1"
|
|
83
|
-
[[ -d "$dir" ]] || { echo "check-gate-tamper: fixture dir not found: $dir" >&2; exit 2; }
|
|
84
|
-
[[ -f "$dir/staged-files" ]] &&
|
|
85
|
-
mapfile -t STAGED < <(grep -vE '^[[:space:]]*(#|$)' "$dir/staged-files")
|
|
86
|
-
[[ -f "$dir/added-exemptions" ]] &&
|
|
87
|
-
mapfile -t ADDED < <(grep -vE '^[[:space:]]*(#|$)' "$dir/added-exemptions")
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
MODE=live
|
|
91
|
-
FIXTURE_DIR=""
|
|
92
|
-
while [[ $# -gt 0 ]]; do
|
|
93
|
-
case "$1" in
|
|
94
|
-
--fixture) MODE=fixture; FIXTURE_DIR="${2:-}"; shift 2 ;;
|
|
95
|
-
*) echo "check-gate-tamper: unknown argument: $1" >&2; exit 2 ;;
|
|
96
|
-
esac
|
|
97
|
-
done
|
|
98
|
-
|
|
99
|
-
if [[ "$MODE" == fixture ]]; then
|
|
100
|
-
collect_fixture "$FIXTURE_DIR"
|
|
101
|
-
else
|
|
102
|
-
collect_live
|
|
103
|
-
fi
|
|
104
|
-
|
|
105
|
-
viol_a=()
|
|
106
|
-
viol_b=()
|
|
107
|
-
|
|
108
|
-
# assertion A: gate-edit-isolation
|
|
109
|
-
gate_touched=0
|
|
110
|
-
for f in "${STAGED[@]}"; do is_gate_file "$f" && { gate_touched=1; break; }; done
|
|
111
|
-
if [[ "$gate_touched" -eq 1 ]]; then
|
|
112
|
-
for f in "${STAGED[@]}"; do is_meta "$f" || viol_a+=("$f"); done
|
|
113
|
-
fi
|
|
114
|
-
|
|
115
|
-
# assertion B: no-self-serving-exemption
|
|
116
|
-
for e in "${ADDED[@]}"; do
|
|
117
|
-
is_pathlike "$e" || continue
|
|
118
|
-
for f in "${STAGED[@]}"; do
|
|
119
|
-
# shellcheck disable=SC2053 # $e is a glob pattern by design here
|
|
120
|
-
[[ "$f" == $e ]] && viol_b+=("$e -> $f")
|
|
121
|
-
done
|
|
122
|
-
done
|
|
123
|
-
|
|
124
|
-
if [[ ${#viol_a[@]} -gt 0 || ${#viol_b[@]} -gt 0 ]]; then
|
|
125
|
-
if [[ ${#viol_a[@]} -gt 0 ]]; then
|
|
126
|
-
echo "check-gate-tamper: gate edit not isolated — a commit touching a gate file (${DELEGATION_KIT_GATE_FILES[*]}) may touch only meta-layer paths; these co-staged paths are not:"
|
|
127
|
-
printf ' %s\n' "${viol_a[@]}"
|
|
128
|
-
echo " help: split the gate change into its own commit (meta-layer paths only: ${DELEGATION_KIT_META_PATHS[*]} and root *.md); land the product change in a separate commit"
|
|
129
|
-
fi
|
|
130
|
-
if [[ ${#viol_b[@]} -gt 0 ]]; then
|
|
131
|
-
echo "check-gate-tamper: self-serving exemption — a newly added path/glob exemption matches a file staged in the same commit:"
|
|
132
|
-
printf ' %s\n' "${viol_b[@]}"
|
|
133
|
-
echo " help: an exemption must not excuse the very change it lands with; add the exemption in a separate commit, or drop the matched file from this commit"
|
|
134
|
-
fi
|
|
135
|
-
exit 1
|
|
136
|
-
fi
|
|
137
|
-
|
|
138
|
-
echo "GATE-TAMPER: clean (${#STAGED[@]} staged path(s); gate edits meta-isolated, no self-serving path-exemption)"
|
|
139
|
-
exit 0
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# graph: couples=delegation-kit/SPEC.md,delegation-kit/templates/agent-execution.md dir=one valve=none tier=precommit
|
|
3
|
-
# spec: delegation-kit/SPEC.md §One template, a resident pointer — every `the template's **<name>** rule` citation in SPEC §The delegation model resolves to a template bullet's bold lead-in (forward direction only)
|
|
4
|
-
#
|
|
5
|
-
# usage: check-rule-citation.sh [spec-file [template-file]]
|
|
6
|
-
# paths resolve relative to cwd (= repo root in a battery run); fixtures pass
|
|
7
|
-
# their own spec + template as the two positional arguments.
|
|
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
|
-
|
|
15
|
-
SPEC_FILE="${1:-delegation-kit/SPEC.md}"
|
|
16
|
-
TEMPLATE_FILE="${2:-delegation-kit/templates/agent-execution.md}"
|
|
17
|
-
for f in "$SPEC_FILE" "$TEMPLATE_FILE"; do
|
|
18
|
-
[[ -f "$f" ]] || { echo "check-rule-citation: not found: $f" >&2; exit 2; } # exit 2: fail-closed
|
|
19
|
-
done
|
|
20
|
-
|
|
21
|
-
tmpl_out="$(awk '
|
|
22
|
-
/^- \*\*/ {
|
|
23
|
-
line=$0; sub(/^- /,"",line)
|
|
24
|
-
rest=substr(line,3)
|
|
25
|
-
p=index(rest,"**")
|
|
26
|
-
if (p>0) {
|
|
27
|
-
name=substr(rest,1,p-1)
|
|
28
|
-
sub(/\.$/,"",name)
|
|
29
|
-
gsub(/`[^`]*`/,"",name)
|
|
30
|
-
print name
|
|
31
|
-
}
|
|
32
|
-
}' "$TEMPLATE_FILE")"; st=$?
|
|
33
|
-
fail_closed "$st" check-rule-citation awk
|
|
34
|
-
|
|
35
|
-
declare -A LEADIN=()
|
|
36
|
-
while IFS= read -r n; do [[ -n "$n" ]] && LEADIN["$n"]=1; done <<<"$tmpl_out"
|
|
37
|
-
|
|
38
|
-
cite_out="$(awk '
|
|
39
|
-
/^## The delegation model[[:space:]]*$/ { insec=1; next }
|
|
40
|
-
/^## / { insec=0 }
|
|
41
|
-
insec { sec = sec " " $0 }
|
|
42
|
-
END {
|
|
43
|
-
gsub(/`[^`]*`/, "", sec)
|
|
44
|
-
n=length(sec); i=1
|
|
45
|
-
while (i<=n) {
|
|
46
|
-
op=index(substr(sec,i),"**"); if (op==0) break
|
|
47
|
-
op=i+op-1; after=op+2
|
|
48
|
-
cl=index(substr(sec,after),"**"); if (cl==0) break
|
|
49
|
-
cl=after+cl-1
|
|
50
|
-
name=substr(sec,after,cl-after)
|
|
51
|
-
tail=substr(sec,cl+2)
|
|
52
|
-
if (tail ~ /^[[:space:]]+(rule|bullet)([^[:alnum:]]|$)/) {
|
|
53
|
-
c=name; sub(/\.$/,"",c); print c
|
|
54
|
-
}
|
|
55
|
-
i=cl+2
|
|
56
|
-
}
|
|
57
|
-
}' "$SPEC_FILE")"; st=$?
|
|
58
|
-
fail_closed "$st" check-rule-citation awk
|
|
59
|
-
|
|
60
|
-
unresolved=()
|
|
61
|
-
cites=0
|
|
62
|
-
while IFS= read -r c; do
|
|
63
|
-
[[ -n "$c" ]] || continue
|
|
64
|
-
cites=$((cites + 1))
|
|
65
|
-
[[ -n "${LEADIN[$c]:-}" ]] || unresolved+=("$c")
|
|
66
|
-
done <<<"$cite_out"
|
|
67
|
-
|
|
68
|
-
if [[ ${#unresolved[@]} -gt 0 ]]; then
|
|
69
|
-
echo "check-rule-citation: SPEC §The delegation model cites a rule that does not resolve to a template lead-in in $TEMPLATE_FILE:"
|
|
70
|
-
printf ' **%s**\n' "${unresolved[@]}"
|
|
71
|
-
echo " help: a citation names a template bullet's bold lead-in verbatim (minus its trailing period); fix the name or the renamed lead-in — delegation-kit/SPEC.md §One template, a resident pointer"
|
|
72
|
-
exit 1
|
|
73
|
-
fi
|
|
74
|
-
|
|
75
|
-
echo "RULE-CITATION: clean ($cites citation(s) in SPEC §The delegation model each resolve to a template lead-in; ${#LEADIN[@]} lead-in(s) available)"
|
|
76
|
-
exit 0
|
|
@@ -1,216 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# graph: couples=CLAUDE.md,doctrine-kit/DOCTRINE.md dir=one valve=none tier=precommit
|
|
3
|
-
# spec: doctrine-kit/SPEC.md §check-doctrine-registration — the always-loaded agent file links the doctrine file and holds its methodology-rule digest in per-rule lockstep with DOCTRINE.md, fail-closed when a scanned file or section is missing
|
|
4
|
-
#
|
|
5
|
-
# usage: check-doctrine-registration.sh [agent-file [doctrine-file]]
|
|
6
|
-
# paths resolve relative to cwd (= repo root in a battery run); defaults come
|
|
7
|
-
# from DOCTRINE_KIT_AGENT_FILE / DOCTRINE_KIT_DOCTRINE_FILE (doctrine-kit/lib/doctrine.sh).
|
|
8
|
-
set -uo pipefail
|
|
9
|
-
|
|
10
|
-
KIT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
11
|
-
SDK="${GATE_SDK_ROOT:-$KIT/../gate-sdk}"
|
|
12
|
-
# shellcheck source=../../gate-sdk/lib/gate.sh
|
|
13
|
-
source "$SDK/lib/gate.sh"
|
|
14
|
-
# shellcheck source=../lib/doctrine.sh
|
|
15
|
-
source "$KIT/lib/doctrine.sh"
|
|
16
|
-
|
|
17
|
-
AGENT_FILE="${1:-$DOCTRINE_KIT_AGENT_FILE}"
|
|
18
|
-
DOCTRINE_FILE="${2:-$DOCTRINE_KIT_DOCTRINE_FILE}"
|
|
19
|
-
[[ -f "$AGENT_FILE" ]] \
|
|
20
|
-
|| { echo "check-doctrine-registration: agent file not found: $AGENT_FILE" >&2; exit 2; } # exit 2: fail-closed
|
|
21
|
-
|
|
22
|
-
# spec: doctrine-kit/SPEC.md §check-doctrine-registration — the doctrine-side section headings are kit mechanism (the kit ships DOCTRINE.md), never config
|
|
23
|
-
METH_SECTION="## Methodology-maintenance rules"
|
|
24
|
-
CRAFT_SECTION="## Engineering-craft rules"
|
|
25
|
-
|
|
26
|
-
grep -qF -- "]($DOCTRINE_FILE" "$AGENT_FILE"; st=$?
|
|
27
|
-
if [[ "$st" -ne 0 ]]; then
|
|
28
|
-
[[ "$st" -eq 1 ]] || fail_closed "$st" check-doctrine-registration grep
|
|
29
|
-
echo "check-doctrine-registration: $AGENT_FILE carries no markdown link to the doctrine file:"
|
|
30
|
-
echo " $DOCTRINE_FILE"
|
|
31
|
-
echo " help: install the doctrine reference block into the always-loaded agent file —"
|
|
32
|
-
echo " bash doctrine-kit/bin/install-doctrine.sh — so a session that loads it"
|
|
33
|
-
echo " follows the link to the delivery doctrine. Override the paths with"
|
|
34
|
-
echo " DOCTRINE_KIT_AGENT_FILE / DOCTRINE_KIT_DOCTRINE_FILE."
|
|
35
|
-
exit 1
|
|
36
|
-
fi
|
|
37
|
-
|
|
38
|
-
[[ -f "$DOCTRINE_FILE" ]] \
|
|
39
|
-
|| { echo "check-doctrine-registration: doctrine file not found: $DOCTRINE_FILE" >&2; exit 2; } # exit 2: fail-closed
|
|
40
|
-
|
|
41
|
-
read -r -d '' SECTION_WALK <<'AWK' || true
|
|
42
|
-
function hlevel(line, n) {
|
|
43
|
-
if (line !~ /^#+[[:space:]]/) return 0
|
|
44
|
-
n = 0
|
|
45
|
-
while (substr(line, n + 1, 1) == "#") n++
|
|
46
|
-
return n
|
|
47
|
-
}
|
|
48
|
-
# Enter the governed section: heading line whose text starts with the knob.
|
|
49
|
-
!insec {
|
|
50
|
-
if (hlevel($0) > 0 && substr($0, 1, length(section)) == section) {
|
|
51
|
-
insec = 1; seen = 1; start_lvl = hlevel($0)
|
|
52
|
-
}
|
|
53
|
-
next
|
|
54
|
-
}
|
|
55
|
-
# A heading at the same level or higher closes the section.
|
|
56
|
-
insec && hlevel($0) > 0 && hlevel($0) <= start_lvl { insec = 0; next }
|
|
57
|
-
insec {
|
|
58
|
-
if (mode == "doctrine") {
|
|
59
|
-
# Numbered rule lead-in: bold name, trailing in-bold period dropped.
|
|
60
|
-
if ($0 ~ /^[0-9]+\.[[:space:]]+\*\*/) {
|
|
61
|
-
name = $0
|
|
62
|
-
sub(/^[0-9]+\.[[:space:]]+\*\*/, "", name)
|
|
63
|
-
sub(/\*\*.*/, "", name)
|
|
64
|
-
sub(/\.$/, "", name)
|
|
65
|
-
print "R\t" name
|
|
66
|
-
}
|
|
67
|
-
} else {
|
|
68
|
-
# Digest bullet lead-in.
|
|
69
|
-
if ($0 ~ /^- \*\*/) {
|
|
70
|
-
name = $0
|
|
71
|
-
sub(/^- \*\*/, "", name)
|
|
72
|
-
sub(/\*\*.*/, "", name)
|
|
73
|
-
print "D\t" name
|
|
74
|
-
# Declared trim: <!-- doctrine-digest-trim: <rule name> — <reason> -->
|
|
75
|
-
} else if ($0 ~ /doctrine-digest-trim:/) {
|
|
76
|
-
name = $0
|
|
77
|
-
sub(/^.*doctrine-digest-trim:[[:space:]]*/, "", name)
|
|
78
|
-
sub(/[[:space:]]*—.*$/, "", name)
|
|
79
|
-
print "T\t" name
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
next
|
|
83
|
-
}
|
|
84
|
-
END { if (!seen) print "@@NOSECTION" }
|
|
85
|
-
AWK
|
|
86
|
-
|
|
87
|
-
# spec: doctrine-kit/SPEC.md §check-doctrine-registration — assertion D: every craft rule carries exactly one *Stages:* trailer matching the grammar (comma list of lowercase stages, or —)
|
|
88
|
-
read -r -d '' CRAFT_WALK <<'AWK' || true
|
|
89
|
-
function hlevel(line, n) {
|
|
90
|
-
if (line !~ /^#+[[:space:]]/) return 0
|
|
91
|
-
n = 0
|
|
92
|
-
while (substr(line, n + 1, 1) == "#") n++
|
|
93
|
-
return n
|
|
94
|
-
}
|
|
95
|
-
function flush() {
|
|
96
|
-
if (have) print "C\t" cur_name "\t" scount "\t" bad
|
|
97
|
-
}
|
|
98
|
-
!insec {
|
|
99
|
-
if (hlevel($0) > 0 && substr($0, 1, length(section)) == section) {
|
|
100
|
-
insec = 1; seen = 1; start_lvl = hlevel($0)
|
|
101
|
-
}
|
|
102
|
-
next
|
|
103
|
-
}
|
|
104
|
-
insec && hlevel($0) > 0 && hlevel($0) <= start_lvl { flush(); insec = 0; have = 0; next }
|
|
105
|
-
insec {
|
|
106
|
-
if ($0 ~ /^[0-9]+\.[[:space:]]+\*\*/) {
|
|
107
|
-
flush()
|
|
108
|
-
name = $0
|
|
109
|
-
sub(/^[0-9]+\.[[:space:]]+\*\*/, "", name)
|
|
110
|
-
sub(/\*\*.*/, "", name)
|
|
111
|
-
sub(/\.$/, "", name)
|
|
112
|
-
cur_name = name; have = 1; scount = 0; bad = 0
|
|
113
|
-
} else if ($0 ~ /^[[:space:]]*\*Stages:\*/) {
|
|
114
|
-
scount++
|
|
115
|
-
val = $0
|
|
116
|
-
sub(/^[[:space:]]*\*Stages:\*[[:space:]]*/, "", val)
|
|
117
|
-
sub(/[[:space:]]+$/, "", val)
|
|
118
|
-
if (val != "—" && val !~ /^[a-z]+(,[[:space:]]+[a-z]+)*$/) bad = 1
|
|
119
|
-
}
|
|
120
|
-
next
|
|
121
|
-
}
|
|
122
|
-
END { flush(); if (!seen) print "@@NOSECTION" }
|
|
123
|
-
AWK
|
|
124
|
-
|
|
125
|
-
doctrine_out="$(awk -v section="$METH_SECTION" -v mode=doctrine "$SECTION_WALK" "$DOCTRINE_FILE")"; st=$?
|
|
126
|
-
fail_closed "$st" check-doctrine-registration awk
|
|
127
|
-
if [[ "$doctrine_out" == "@@NOSECTION" ]]; then
|
|
128
|
-
echo "check-doctrine-registration: no '$METH_SECTION' section in $DOCTRINE_FILE — cannot certify the digest against an unreadable rule set" >&2
|
|
129
|
-
echo " help: the methodology-maintenance section heading is kit mechanism; restore it in the doctrine file" >&2
|
|
130
|
-
exit 2 # exit 2: fail-closed
|
|
131
|
-
fi
|
|
132
|
-
|
|
133
|
-
digest_out="$(awk -v section="$DOCTRINE_KIT_DIGEST_SECTION" -v mode=digest "$SECTION_WALK" "$AGENT_FILE")"; st=$?
|
|
134
|
-
fail_closed "$st" check-doctrine-registration awk
|
|
135
|
-
if [[ "$digest_out" == "@@NOSECTION" ]]; then
|
|
136
|
-
printf 'check-doctrine-registration: no heading matches %s in %s: %s\n' \
|
|
137
|
-
DOCTRINE_KIT_DIGEST_SECTION "$AGENT_FILE" "'$DOCTRINE_KIT_DIGEST_SECTION'" >&2
|
|
138
|
-
echo " help: a renamed or deleted digest section silently disarms this gate — repoint DOCTRINE_KIT_DIGEST_SECTION at the live heading, or restore the heading it names" >&2
|
|
139
|
-
exit 2 # exit 2: fail-closed
|
|
140
|
-
fi
|
|
141
|
-
|
|
142
|
-
craft_out="$(awk -v section="$CRAFT_SECTION" "$CRAFT_WALK" "$DOCTRINE_FILE")"; st=$?
|
|
143
|
-
fail_closed "$st" check-doctrine-registration awk
|
|
144
|
-
if [[ "$craft_out" == "@@NOSECTION" ]]; then
|
|
145
|
-
echo "check-doctrine-registration: no '$CRAFT_SECTION' section in $DOCTRINE_FILE — cannot certify the stage-routing trailers against an unreadable rule set" >&2
|
|
146
|
-
echo " help: the engineering-craft section heading is kit mechanism; restore it in the doctrine file" >&2
|
|
147
|
-
exit 2 # exit 2: fail-closed
|
|
148
|
-
fi
|
|
149
|
-
|
|
150
|
-
craft_count=0
|
|
151
|
-
craft_findings=()
|
|
152
|
-
while IFS=$'\t' read -r kind name scount bad; do
|
|
153
|
-
[[ "$kind" == C ]] || continue
|
|
154
|
-
craft_count=$((craft_count + 1))
|
|
155
|
-
if [[ "$scount" -ne 1 ]]; then
|
|
156
|
-
craft_findings+=("craft rule carries $scount *Stages:* trailer(s), want exactly one: $name")
|
|
157
|
-
elif [[ "$bad" == 1 ]]; then
|
|
158
|
-
craft_findings+=("craft rule's *Stages:* value is malformed (want a comma list of lowercase stages, or —): $name")
|
|
159
|
-
fi
|
|
160
|
-
done <<< "$craft_out"
|
|
161
|
-
|
|
162
|
-
declare -A in_digest in_trim in_doctrine
|
|
163
|
-
digest_names=()
|
|
164
|
-
trim_count=0
|
|
165
|
-
while IFS=$'\t' read -r kind name; do
|
|
166
|
-
[[ -n "$name" ]] || continue
|
|
167
|
-
case "$kind" in
|
|
168
|
-
D) digest_names+=("$name"); in_digest["$name"]=1 ;;
|
|
169
|
-
T) in_trim["$name"]=1; trim_count=$((trim_count + 1)) ;;
|
|
170
|
-
esac
|
|
171
|
-
done <<< "$digest_out"
|
|
172
|
-
|
|
173
|
-
rule_count=0
|
|
174
|
-
missing=()
|
|
175
|
-
while IFS=$'\t' read -r _kind name; do
|
|
176
|
-
[[ -n "$name" ]] || continue
|
|
177
|
-
rule_count=$((rule_count + 1))
|
|
178
|
-
in_doctrine["$name"]=1
|
|
179
|
-
if [[ -z "${in_digest[$name]:-}" && -z "${in_trim[$name]:-}" ]]; then
|
|
180
|
-
missing+=("$name")
|
|
181
|
-
fi
|
|
182
|
-
done <<< "$doctrine_out"
|
|
183
|
-
|
|
184
|
-
orphans=()
|
|
185
|
-
for name in "${digest_names[@]+"${digest_names[@]}"}"; do
|
|
186
|
-
[[ -z "${in_doctrine[$name]:-}" ]] && orphans+=("$name")
|
|
187
|
-
done
|
|
188
|
-
|
|
189
|
-
if [[ ${#missing[@]} -gt 0 || ${#orphans[@]} -gt 0 || ${#craft_findings[@]} -gt 0 ]]; then
|
|
190
|
-
if [[ ${#missing[@]} -gt 0 || ${#orphans[@]} -gt 0 ]]; then
|
|
191
|
-
echo "check-doctrine-registration: the digest and the doctrine are out of lockstep in $AGENT_FILE:"
|
|
192
|
-
for name in "${missing[@]+"${missing[@]}"}"; do
|
|
193
|
-
echo " doctrine rule absent from the digest: $name"
|
|
194
|
-
done
|
|
195
|
-
for name in "${orphans[@]+"${orphans[@]}"}"; do
|
|
196
|
-
echo " digest bullet owns no doctrine rule: $name"
|
|
197
|
-
done
|
|
198
|
-
echo " help: a re-vendored DOCTRINE.md changed the methodology-rule set — reconcile the"
|
|
199
|
-
echo " '$DOCTRINE_KIT_DIGEST_SECTION' digest in $AGENT_FILE: add '- **<name>** — …' for"
|
|
200
|
-
echo " each absent rule (or declare a trim '<!-- doctrine-digest-trim: <name> — <reason> -->'),"
|
|
201
|
-
echo " and rename or remove any bullet that owns no rule."
|
|
202
|
-
fi
|
|
203
|
-
if [[ ${#craft_findings[@]} -gt 0 ]]; then
|
|
204
|
-
echo "check-doctrine-registration: the stage-routing trailers are out of grammar in $DOCTRINE_FILE:"
|
|
205
|
-
for f in "${craft_findings[@]}"; do
|
|
206
|
-
echo " $f"
|
|
207
|
-
done
|
|
208
|
-
echo " help: every engineering-craft rule owns exactly one '*Stages:* <stage>[, <stage>…]'"
|
|
209
|
-
echo " trailer ('*Stages:* —' for none) so a re-vendored DOCTRINE.md that adds an"
|
|
210
|
-
echo " untagged craft rule reddens instead of silently dropping out of stage routing."
|
|
211
|
-
fi
|
|
212
|
-
exit 1
|
|
213
|
-
fi
|
|
214
|
-
|
|
215
|
-
echo "DOCTRINE-REGISTRATION: clean ($AGENT_FILE links $DOCTRINE_FILE; $rule_count methodology rule(s) in per-rule digest lockstep, $trim_count declared trim(s); $craft_count craft rule(s) each carry one *Stages:* trailer)"
|
|
216
|
-
exit 0
|
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# spec: drift-kit/SPEC.md §The published-evidence extractor — governed-trajectory table, pure function of committed history
|
|
3
|
-
# usage: trajectory.sh [--emit] (bare: human header + table; --emit: table only, for the committed projection)
|
|
4
|
-
# advisory by construction: exit is always 0, never joins gates.list; the
|
|
5
|
-
# consumer freshness gate (check-trajectory-fresh) is what blocks a stale emission.
|
|
6
|
-
set -uo pipefail
|
|
7
|
-
|
|
8
|
-
REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
|
|
9
|
-
cd "$REPO_ROOT" 2>/dev/null || exit 0
|
|
10
|
-
|
|
11
|
-
_ds_cfg="${DRIFT_KIT_CONFIG_FILE:-}"
|
|
12
|
-
if [[ -n "$_ds_cfg" ]]; then
|
|
13
|
-
[[ -f "$_ds_cfg" ]] || {
|
|
14
|
-
echo "drift-kit: DRIFT_KIT_CONFIG_FILE not found: $_ds_cfg" >&2
|
|
15
|
-
exit 2
|
|
16
|
-
}
|
|
17
|
-
# shellcheck source=/dev/null # consumer config path is resolved at runtime
|
|
18
|
-
source "$_ds_cfg"
|
|
19
|
-
else
|
|
20
|
-
_ds_cfg="${GATE_SDK_GATES_DIR:-scripts}/drift-config.sh"
|
|
21
|
-
if [[ -f "$_ds_cfg" ]]; then
|
|
22
|
-
# shellcheck source=/dev/null # consumer config path is resolved at runtime
|
|
23
|
-
source "$_ds_cfg"
|
|
24
|
-
fi
|
|
25
|
-
fi
|
|
26
|
-
unset _ds_cfg
|
|
27
|
-
|
|
28
|
-
# spec: drift-kit/SPEC.md §Layout and configuration — DRIFT_KIT_TRAJECTORY_SURFACES is "<state-file> <evidence-file>"
|
|
29
|
-
_wf="${GATE_SDK_WORKFLOW_DIR:-.workflow}"
|
|
30
|
-
: "${DRIFT_KIT_TRAJECTORY_SURFACES:=$_wf/WORKFLOW-STATE.txt $_wf/validate-evidence.txt}"
|
|
31
|
-
: "${DRIFT_KIT_GATES_FILE:=${GATE_SDK_GATES_DIR:-scripts}/gates.list}"
|
|
32
|
-
unset _wf
|
|
33
|
-
read -r STATE_FILE EVIDENCE_FILE _ <<<"$DRIFT_KIT_TRAJECTORY_SURFACES"
|
|
34
|
-
|
|
35
|
-
# spec: drift-kit/SPEC.md §Layout and configuration — DRIFT_KIT_STAGES is the ordered stage roster the trajectory table renders; unset falls open to the historical five so standalone/un-upgraded emission stays byte-identical (drift re-derives with its own knob, never sourcing lifecycle — the DRIFT_KIT_STATE_FILE precedent)
|
|
36
|
-
declare -p DRIFT_KIT_STAGES &>/dev/null || DRIFT_KIT_STAGES=(scope align build validate close)
|
|
37
|
-
|
|
38
|
-
# spec: drift-kit/SPEC.md §The published-evidence extractor — each stage's slot label is its shortest prefix unique among the roster; header legend and cells read this one map so they cannot drift, and a non-colliding roster reduces every label to its single letter (five-stage default byte-identical)
|
|
39
|
-
declare -A STAGE_ABBR
|
|
40
|
-
for _s in "${DRIFT_KIT_STAGES[@]}"; do
|
|
41
|
-
_len=1
|
|
42
|
-
while (( _len < ${#_s} )); do
|
|
43
|
-
_pfx="${_s:0:_len}"
|
|
44
|
-
_collide=0
|
|
45
|
-
for _o in "${DRIFT_KIT_STAGES[@]}"; do
|
|
46
|
-
[[ "$_o" == "$_s" ]] && continue
|
|
47
|
-
[[ "${_o:0:_len}" == "$_pfx" ]] && { _collide=1; break; }
|
|
48
|
-
done
|
|
49
|
-
(( _collide )) || break
|
|
50
|
-
_len=$(( _len + 1 ))
|
|
51
|
-
done
|
|
52
|
-
STAGE_ABBR[$_s]="${_s:0:_len}"
|
|
53
|
-
done
|
|
54
|
-
_stage_legend=""
|
|
55
|
-
for _s in "${DRIFT_KIT_STAGES[@]}"; do
|
|
56
|
-
_stage_legend="$_stage_legend${_stage_legend:+ }${STAGE_ABBR[$_s]}"
|
|
57
|
-
done
|
|
58
|
-
unset _s _o _len _pfx _collide
|
|
59
|
-
|
|
60
|
-
# spec: drift-kit/SPEC.md §The published-evidence extractor — the case-arm membership test and the git-log grep pre-filter build one alternation from the roster, so the two roster reads cannot diverge
|
|
61
|
-
_stage_alt="$(IFS='|'; printf '%s' "${DRIFT_KIT_STAGES[*]}")"
|
|
62
|
-
|
|
63
|
-
emit=0
|
|
64
|
-
[[ "${1:-}" == "--emit" ]] && emit=1
|
|
65
|
-
|
|
66
|
-
# spec: drift-kit/SPEC.md §The published-evidence extractor — iteration+stages harvest; state file truncates at scope, history keeps every stamp
|
|
67
|
-
ITERS=() # iteration names, chronological (all, in-flight included — for range boundaries)
|
|
68
|
-
declare -A START_COMMIT # iter -> first commit that added any of its stamps
|
|
69
|
-
declare -A CLOSE_COMMIT # iter -> commit that added its 'close' stamp (unset if never closed)
|
|
70
|
-
declare -A STAGES # iter -> space-joined stage names seen, in first-seen order
|
|
71
|
-
|
|
72
|
-
if git cat-file -e "HEAD:$STATE_FILE" 2>/dev/null; then
|
|
73
|
-
while IFS= read -r line; do
|
|
74
|
-
case "$line" in
|
|
75
|
-
COMMIT\ *) cur_commit="${line#COMMIT }" ;;
|
|
76
|
-
+*)
|
|
77
|
-
stamp="${line#+}"
|
|
78
|
-
read -r it st _ <<<"$stamp"
|
|
79
|
-
case " ${DRIFT_KIT_STAGES[*]} " in
|
|
80
|
-
*" $st "*) ;;
|
|
81
|
-
*) continue ;;
|
|
82
|
-
esac
|
|
83
|
-
if [[ -z "${START_COMMIT[$it]:-}" ]]; then
|
|
84
|
-
START_COMMIT[$it]="$cur_commit"
|
|
85
|
-
ITERS+=("$it")
|
|
86
|
-
STAGES[$it]=""
|
|
87
|
-
fi
|
|
88
|
-
case " ${STAGES[$it]} " in
|
|
89
|
-
*" $st "*) ;;
|
|
90
|
-
*) STAGES[$it]="${STAGES[$it]:+${STAGES[$it]} }$st" ;;
|
|
91
|
-
esac
|
|
92
|
-
[[ "$st" == close ]] && CLOSE_COMMIT[$it]="$cur_commit"
|
|
93
|
-
;;
|
|
94
|
-
esac
|
|
95
|
-
done < <(git log --reverse --format='COMMIT %H' -p -U0 -- "$STATE_FILE" 2>/dev/null \
|
|
96
|
-
| grep -E "^COMMIT |^\+[a-z0-9-]+ ($_stage_alt) ")
|
|
97
|
-
fi
|
|
98
|
-
|
|
99
|
-
# spec: drift-kit/SPEC.md §The published-evidence extractor — every range-scoped column freezes at (close(N-1), close(N)]; no column reads HEAD, so the emission is a pure function of closed history
|
|
100
|
-
declare -A COMMIT_ITER FEAT DEBT # commit -> owning closed iteration (range-attributed); per-iteration feat/debt subject split
|
|
101
|
-
CLOSED_ITERS=()
|
|
102
|
-
for it in "${ITERS[@]}"; do
|
|
103
|
-
[[ -n "${CLOSE_COMMIT[$it]:-}" ]] && CLOSED_ITERS+=("$it")
|
|
104
|
-
done
|
|
105
|
-
prev_close=""
|
|
106
|
-
for it in "${CLOSED_ITERS[@]}"; do
|
|
107
|
-
close_c="${CLOSE_COMMIT[$it]}"
|
|
108
|
-
if [[ -n "$prev_close" ]]; then
|
|
109
|
-
range="$prev_close..$close_c" # (close(N-1), close(N)]
|
|
110
|
-
else
|
|
111
|
-
range="$close_c" # first row: close(0) is the empty boundary — every ancestor up to close(1)
|
|
112
|
-
fi
|
|
113
|
-
f=0; d=0
|
|
114
|
-
while IFS=' ' read -r h subj; do
|
|
115
|
-
COMMIT_ITER["$h"]="$it"
|
|
116
|
-
case "$subj" in
|
|
117
|
-
feat*) f=$((f + 1)) ;;
|
|
118
|
-
fix* | refactor*) d=$((d + 1)) ;;
|
|
119
|
-
esac
|
|
120
|
-
done < <(git log --format='%H %s' "$range" 2>/dev/null)
|
|
121
|
-
FEAT[$it]="$f"; DEBT[$it]="$d"
|
|
122
|
-
prev_close="$close_c"
|
|
123
|
-
done
|
|
124
|
-
|
|
125
|
-
# spec: drift-kit/SPEC.md §The published-evidence extractor — amendment-latency harvest, fixture/template paths excluded
|
|
126
|
-
declare -A ADD_DATE AMEND_COUNT AMEND_MAXLAG
|
|
127
|
-
while IFS= read -r line; do
|
|
128
|
-
case "$line" in
|
|
129
|
-
COMMIT\ *)
|
|
130
|
-
rest="${line#COMMIT }"
|
|
131
|
-
read -r cur_commit cur_date <<<"$rest"
|
|
132
|
-
;;
|
|
133
|
-
A$'\t'*)
|
|
134
|
-
path="${line#A$'\t'}"
|
|
135
|
-
case "$path" in */gate-tests/*|*/templates/*) continue ;; esac
|
|
136
|
-
ADD_DATE["$path"]="$cur_date"
|
|
137
|
-
;;
|
|
138
|
-
D$'\t'*)
|
|
139
|
-
path="${line#D$'\t'}"
|
|
140
|
-
case "$path" in */gate-tests/*|*/templates/*) continue ;; esac
|
|
141
|
-
add_date="${ADD_DATE[$path]:-}"
|
|
142
|
-
[[ -n "$add_date" ]] || continue
|
|
143
|
-
owner="${COMMIT_ITER[$cur_commit]:-}"
|
|
144
|
-
[[ -n "$owner" ]] || continue
|
|
145
|
-
a_epoch="$(date -d "$add_date" +%s 2>/dev/null)" || continue
|
|
146
|
-
d_epoch="$(date -d "$cur_date" +%s 2>/dev/null)" || continue
|
|
147
|
-
lag=$(((d_epoch - a_epoch) / 86400))
|
|
148
|
-
AMEND_COUNT[$owner]=$(( ${AMEND_COUNT[$owner]:-0} + 1 ))
|
|
149
|
-
[[ "$lag" -gt "${AMEND_MAXLAG[$owner]:-0}" ]] && AMEND_MAXLAG[$owner]="$lag"
|
|
150
|
-
;;
|
|
151
|
-
esac
|
|
152
|
-
done < <(git log --reverse --format='COMMIT %H %ad' --date=short --diff-filter=AD \
|
|
153
|
-
--name-status -- '*/SPEC-*.md' 'SPEC-*.md' 2>/dev/null)
|
|
154
|
-
|
|
155
|
-
# spec: drift-kit/SPEC.md §The published-evidence extractor — validate-attestation harvest (evidence manifest also truncates at scope)
|
|
156
|
-
declare -A VAL_SUITES VAL_FAIL VAL_PRESENT
|
|
157
|
-
if [[ -n "$EVIDENCE_FILE" ]] && git cat-file -e "HEAD:$EVIDENCE_FILE" 2>/dev/null; then
|
|
158
|
-
while IFS= read -r stamp; do
|
|
159
|
-
read -r it _suite rest <<<"$stamp"
|
|
160
|
-
[[ -n "$it" ]] || continue
|
|
161
|
-
VAL_PRESENT[$it]=1
|
|
162
|
-
VAL_SUITES[$it]=$(( ${VAL_SUITES[$it]:-0} + 1 ))
|
|
163
|
-
case "$rest" in
|
|
164
|
-
*"fail=0 "*) ;;
|
|
165
|
-
*"fail="*)
|
|
166
|
-
fv="${rest##*fail=}"; fv="${fv%% *}"
|
|
167
|
-
[[ "$fv" =~ ^[0-9]+$ ]] && VAL_FAIL[$it]=$(( ${VAL_FAIL[$it]:-0} + fv ))
|
|
168
|
-
;;
|
|
169
|
-
esac
|
|
170
|
-
done < <(
|
|
171
|
-
for c in $(git log --format='%H' -- "$EVIDENCE_FILE" 2>/dev/null); do
|
|
172
|
-
git show "$c:$EVIDENCE_FILE" 2>/dev/null
|
|
173
|
-
done | grep -E '^[a-z0-9-]+ [a-z_]+ sha256=' | sort -u
|
|
174
|
-
)
|
|
175
|
-
else
|
|
176
|
-
EVIDENCE_FILE="${EVIDENCE_FILE:-(unset)}"
|
|
177
|
-
fi
|
|
178
|
-
|
|
179
|
-
# spec: drift-kit/SPEC.md §The published-evidence extractor — gate-roster growth (gates.list count at close commit)
|
|
180
|
-
declare -A GATE_COUNT
|
|
181
|
-
for it in "${!CLOSE_COMMIT[@]}"; do
|
|
182
|
-
roster="$(git show "${CLOSE_COMMIT[$it]}:$DRIFT_KIT_GATES_FILE" 2>/dev/null)" \
|
|
183
|
-
&& GATE_COUNT[$it]="$(printf '%s\n' "$roster" | grep -Evc '^[[:space:]]*(#|$)')" \
|
|
184
|
-
|| GATE_COUNT[$it]="n/a"
|
|
185
|
-
done
|
|
186
|
-
|
|
187
|
-
# spec: drift-kit/SPEC.md §The published-evidence extractor — one slot per configured stage in roster order, present as its roster-unique abbreviation or absent as '·'
|
|
188
|
-
render_stages() {
|
|
189
|
-
local seen=" $1 " out="" s
|
|
190
|
-
for s in "${DRIFT_KIT_STAGES[@]}"; do
|
|
191
|
-
case "$seen" in
|
|
192
|
-
*" $s "*) out="$out${out:+ }${STAGE_ABBR[$s]}" ;;
|
|
193
|
-
*) out="$out${out:+ }·" ;;
|
|
194
|
-
esac
|
|
195
|
-
done
|
|
196
|
-
printf '%s' "$out"
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
state_missing=0
|
|
200
|
-
git cat-file -e "HEAD:$STATE_FILE" 2>/dev/null || state_missing=1
|
|
201
|
-
|
|
202
|
-
if [[ "$emit" -eq 0 ]]; then
|
|
203
|
-
echo "=== Governed trajectory (advisory — this repo's own committed history) ==="
|
|
204
|
-
echo "One row per closed iteration; pure function of committed history (drift-kit/SPEC.md)."
|
|
205
|
-
echo
|
|
206
|
-
fi
|
|
207
|
-
|
|
208
|
-
echo "| iteration | stages ($_stage_legend) | commits (feat/debt) | amendments (merged · max lag) | validate (suites) | gates.list |"
|
|
209
|
-
echo "| --- | --- | --- | --- | --- | --- |"
|
|
210
|
-
|
|
211
|
-
if [[ "$state_missing" -eq 1 ]]; then
|
|
212
|
-
echo "| n/a (no $STATE_FILE) | · | · | · | · | · |"
|
|
213
|
-
exit 0
|
|
214
|
-
fi
|
|
215
|
-
|
|
216
|
-
for it in "${ITERS[@]}"; do
|
|
217
|
-
[[ -n "${CLOSE_COMMIT[$it]:-}" ]] || continue # closed iterations only
|
|
218
|
-
|
|
219
|
-
stages_cell="$(render_stages "${STAGES[$it]}")"
|
|
220
|
-
commits_cell="${FEAT[$it]:-0}f/${DEBT[$it]:-0}d"
|
|
221
|
-
|
|
222
|
-
ac="${AMEND_COUNT[$it]:-0}"
|
|
223
|
-
if [[ "$ac" -eq 0 ]]; then
|
|
224
|
-
amend_cell="0"
|
|
225
|
-
else
|
|
226
|
-
amend_cell="$ac · ≤${AMEND_MAXLAG[$it]:-0}d"
|
|
227
|
-
fi
|
|
228
|
-
|
|
229
|
-
if [[ -n "${VAL_PRESENT[$it]:-}" ]]; then
|
|
230
|
-
vf="${VAL_FAIL[$it]:-0}"
|
|
231
|
-
if [[ "$vf" -eq 0 ]]; then
|
|
232
|
-
val_cell="${VAL_SUITES[$it]}s clean"
|
|
233
|
-
else
|
|
234
|
-
val_cell="${VAL_SUITES[$it]}s ${vf}✗"
|
|
235
|
-
fi
|
|
236
|
-
else
|
|
237
|
-
val_cell="n/a (pre-evidence-kit)"
|
|
238
|
-
fi
|
|
239
|
-
|
|
240
|
-
echo "| $it | $stages_cell | $commits_cell | $amend_cell | $val_cell | ${GATE_COUNT[$it]:-n/a} |"
|
|
241
|
-
done
|
|
242
|
-
exit 0
|