checkwright 0.21.0 → 0.23.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 +1013 -50
- package/lib/common/digest.sh +18 -0
- package/lib/common/lock.sh +40 -0
- package/lib/common/profile.sh +33 -0
- package/lib/common/recipe.sh +56 -43
- package/lib/diff.sh +64 -0
- package/lib/doctor.sh +81 -7
- package/lib/init.sh +167 -52
- package/lib/uninstall.sh +212 -0
- package/lib/update.sh +34 -0
- package/package.json +2 -2
- package/payload/artifact/targets.list +30 -0
- package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates +0 -0
- package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates.sha256 +1 -0
- package/payload/canon-kit/README.md +2 -0
- package/payload/canon-kit/SPEC.md +666 -59
- package/payload/canon-kit/checks/check-amendment-queue.sh +1 -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.sh +12 -4
- 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.sh +1 -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.sh +1 -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.sh +1 -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-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/expect.txt +4 -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 +29 -5
- 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/bad/OUTSIDE.md +4 -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/good/OUTSIDE.md +4 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention/good/docs/methodology.md +8 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention.test.sh +94 -0
- package/payload/canon-kit/gate-tests/check-knob-citation.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 +32 -8
- 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-payload-claim/bad/README.md +15 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/bad/expect.txt +2 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/bad/install.md +19 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/bad/posts/note.md +6 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/bad/scripts/canon-config.sh +8 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/bad/scripts/payload-claims.sh +7 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/good/README.md +15 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/good/expect.txt +2 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/good/install.md +20 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/good/posts/note.md +6 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/good/scripts/canon-config.sh +8 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/good/scripts/payload-claims.sh +7 -0
- package/payload/canon-kit/gate-tests/check-prose-enum.test.sh +27 -4
- package/payload/canon-kit/gate-tests/check-spec-dod-singleton.test.sh +21 -7
- 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 +4 -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/bad/widget.sh +1 -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-spec-pointer/good/widget.sh +1 -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 +109 -70
- package/payload/canon-kit/smoke/install.sh +21 -1
- package/payload/canon-kit/templates/SPEC-amendment.md +9 -2
- package/payload/context-kit/README.md +4 -1
- package/payload/context-kit/SPEC.md +166 -9
- package/payload/context-kit/bin/env-probe.sh +19 -6
- package/payload/context-kit/checks/check-brevity.sh +1 -0
- package/payload/context-kit/checks/check-footprint-fresh.sh +1 -0
- package/payload/context-kit/checks/check-memory-off.sh +1 -0
- package/payload/context-kit/checks/check-settings-paths.sh +94 -0
- package/payload/context-kit/checks/check-settings-pins.sh +1 -0
- package/payload/context-kit/gate-tests/check-settings-paths/bad/args +1 -0
- 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/args +1 -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/index-tests/expected/toolfloor.txt +9 -0
- package/payload/context-kit/index-tests/toolfloor-cases.sh +20 -0
- package/payload/context-kit/lib/toolfloor.sh +15 -4
- package/payload/context-kit/smoke/agents-md.sh +12 -1
- package/payload/context-kit/smoke/install.sh +4 -1
- package/payload/delegation-kit/README.md +3 -3
- package/payload/delegation-kit/SPEC.md +499 -26
- package/payload/delegation-kit/bin/run-dispatch-guard-tests.sh +97 -0
- package/payload/delegation-kit/checks/check-agent-tier-explicit.sh +1 -0
- package/payload/delegation-kit/checks/check-gate-tamper.sh +2 -1
- package/payload/delegation-kit/checks/check-rule-citation.sh +1 -0
- package/payload/delegation-kit/lib/delegation.sh +1 -0
- package/payload/delegation-kit/smoke/install.sh +2 -1
- package/payload/delegation-kit/templates/agent-dispatch-guard.sh +61 -0
- package/payload/delegation-kit/templates/agent-execution.md +127 -12
- package/payload/delegation-kit/templates/delegation-config.sh +4 -0
- package/payload/delegation-kit/templates/dispatch-checklists.md +1 -1
- package/payload/delegation-kit/templates/statusline-usage.sh +23 -1
- package/payload/delegation-kit/usage-tests/dispatch-guard-cases.tsv +30 -0
- package/payload/doctrine-kit/DOCTRINE.md +112 -11
- package/payload/doctrine-kit/README.md +12 -3
- package/payload/doctrine-kit/SPEC.md +163 -11
- package/payload/doctrine-kit/bin/install-doctrine.sh +167 -17
- package/payload/doctrine-kit/checks/check-doctrine-registration.sh +41 -11
- 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 +82 -2
- package/payload/doctrine-kit/smoke/install.sh +167 -1
- package/payload/drift-kit/README.md +3 -2
- package/payload/drift-kit/SPEC.md +264 -22
- package/payload/drift-kit/bin/kfric.sh +21 -2
- package/payload/drift-kit/bin/stage-economics.sh +157 -3
- package/payload/drift-kit/kpis/kpi-incident-recurrence.sh +42 -0
- package/payload/drift-kit/smoke/install.sh +183 -1
- package/payload/drift-kit/templates/economics.md +9 -0
- package/payload/drift-kit/templates/kpis.list +6 -1
- package/payload/evidence-kit/README.md +20 -6
- package/payload/evidence-kit/SPEC.md +355 -17
- package/payload/evidence-kit/bin/run-validate.sh +51 -9
- package/payload/evidence-kit/checks/check-battery-roster.sh +87 -0
- package/payload/evidence-kit/checks/check-evidence-baseline.sh +1 -0
- package/payload/evidence-kit/checks/check-evidence-manifest.sh +1 -0
- package/payload/evidence-kit/checks/check-producer-liveness.sh +35 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/bad/args +1 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/bad/expect.txt +1 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/bad/runner.md +14 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/bad/scripts/evidence-config.sh +7 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/good/args +1 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/good/expect.txt +1 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/good/runner.md +14 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/good/scripts/evidence-config.sh +7 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster.test.sh +68 -0
- package/payload/evidence-kit/gate-tests/check-producer-liveness/bad/args +1 -0
- package/payload/evidence-kit/gate-tests/check-producer-liveness/bad/expect.txt +1 -0
- package/payload/evidence-kit/gate-tests/check-producer-liveness/bad/run-validate.lock +1 -0
- package/payload/evidence-kit/gate-tests/check-producer-liveness/good/args +1 -0
- package/payload/evidence-kit/gate-tests/check-producer-liveness/good/expect.txt +2 -0
- package/payload/evidence-kit/gate-tests/check-producer-liveness/good/run-validate.lock +1 -0
- package/payload/evidence-kit/gate-tests/producer-lock.test.sh +109 -0
- package/payload/evidence-kit/lib/evidence.sh +18 -0
- package/payload/evidence-kit/smoke/install.sh +17 -3
- package/payload/gate-sdk/README.md +17 -1
- package/payload/gate-sdk/SPEC.md +4427 -92
- package/payload/gate-sdk/bin/build-native.sh +38 -0
- package/payload/gate-sdk/bin/enforcement-map.sh +2 -1
- package/payload/gate-sdk/bin/gen-pre-commit.sh +32 -2
- package/payload/gate-sdk/bin/port-blockers.sh +445 -0
- package/payload/gate-sdk/bin/run-consumer-smoke.sh +129 -2
- package/payload/gate-sdk/bin/run-gate-tests.sh +61 -9
- package/payload/gate-sdk/bin/run-gates.sh +37 -2
- package/payload/gate-sdk/bin/upgrade-smoke.sh +55 -7
- package/payload/gate-sdk/checks/check-action-gh-repo.gate +3 -0
- package/payload/gate-sdk/checks/check-action-pinning.gate +3 -0
- package/payload/gate-sdk/checks/check-action-run-shell.sh +4 -1
- package/payload/gate-sdk/checks/check-assertion-strength.gate +3 -0
- package/payload/gate-sdk/checks/check-commit-msg.sh +1 -0
- package/payload/gate-sdk/checks/check-commit-subject.sh +1 -0
- package/payload/gate-sdk/checks/check-core-files.sh +28 -4
- package/payload/gate-sdk/checks/check-crate-arms.sh +61 -0
- package/payload/gate-sdk/checks/check-enforcement-fresh.sh +1 -0
- package/payload/gate-sdk/checks/check-exec-bit.sh +21 -1
- package/payload/gate-sdk/checks/check-gate-assertions.sh +31 -6
- package/payload/gate-sdk/checks/check-gate-binary-fresh.sh +107 -0
- package/payload/gate-sdk/checks/check-gate-exemption-tasks.sh +7 -7
- package/payload/gate-sdk/checks/check-gate-fail-closed.sh +1 -0
- package/payload/gate-sdk/checks/check-gate-fixture-coverage.sh +1 -0
- package/payload/gate-sdk/checks/check-gate-output.sh +41 -3
- package/payload/gate-sdk/checks/check-gate-substrate-parity.sh +333 -0
- package/payload/gate-sdk/checks/check-graph.sh +5 -5
- package/payload/gate-sdk/checks/check-hook-exec-bit.sh +1 -0
- package/payload/gate-sdk/checks/check-identity.sh +1 -0
- package/payload/gate-sdk/checks/check-install-disposition.sh +92 -0
- package/payload/gate-sdk/checks/check-kit-enum.sh +1 -0
- package/payload/gate-sdk/checks/check-kit-registration.gate +3 -0
- package/payload/gate-sdk/checks/check-readme-roster.sh +6 -0
- package/payload/gate-sdk/checks/check-reads-couples.sh +71 -21
- package/payload/gate-sdk/checks/check-root-tiering.sh +1 -0
- package/payload/gate-sdk/checks/check-shellcheck.sh +1 -0
- package/payload/gate-sdk/checks/check-smoke-entry-guard.gate +3 -0
- package/payload/gate-sdk/checks/check-template-copy-parity.sh +1 -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 +1 -0
- package/payload/gate-sdk/checks/check-workflow-tiering.sh +2 -1
- package/payload/gate-sdk/gate-tests/check-action-run-shell.test.sh +16 -1
- package/payload/gate-sdk/gate-tests/check-core-files.test.sh +64 -0
- 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-gate-assertions/good/expect.txt +1 -1
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/args +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/expect.txt +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/kitroot/checks/check-vendored.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/check-ported.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/gate-sdk-config.sh +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/gates.list +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/stamp.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/stub-bin +6 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/args +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/expect.txt +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/kitroot/checks/check-vendored.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/check-ported.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/gate-sdk-config.sh +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/gates.list +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/stamp.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/stub-bin +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh.test.sh +81 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/TASK-QUEUE.md +3 -1
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/expect.txt +3 -1
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/gates/check-sample.sh +3 -1
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/expect.txt +1 -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/check-sample.sh +1 -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/check-sample.sh +1 -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 +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 +111 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/args +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/conservation.md +7 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/expect.txt +12 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/impl/gate.rs +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/kitroot/check-orphan.rs +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/publish.yml +15 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-alpha.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-dup.gate +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-dup.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-orphan.gate +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gate-sdk-config.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gates.list +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/stub-bin +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/targets.list +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/args +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/conservation.md +8 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/expect.txt +7 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/impl/gate.rs +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/kitroot/check-other.rs +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/publish.yml +15 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-alpha.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-ported.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gate-sdk-config.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gates.list +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/stub-bin +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/targets.list +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity.test.sh +184 -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-registration.test.sh +6 -5
- package/payload/gate-sdk/gate-tests/check-reads-couples.test.sh +139 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/alpha-kit/templates/widgets.list +4 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/alpha-kit/widgets/widget-one.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/alpha-kit/widgets/widget-two.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/args +4 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/scripts/gate-sdk-config.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/alpha-kit/templates/widgets.list +4 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/alpha-kit/widgets/widget-one.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/alpha-kit/widgets/widget-two.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/args +8 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/beta-kit/templates/rules.list +5 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/beta-kit/templates/table.tsv +4 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/scripts/gate-sdk-config.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-test-hermetic-smoke.test.sh +2 -3
- package/payload/gate-sdk/gate-tests/lib-declaration.test.sh +4 -4
- package/payload/gate-sdk/gate-tests/lib-gate.test.sh +151 -1
- package/payload/gate-sdk/gate-tests/run-dispatch-streams.test.sh +73 -0
- package/payload/gate-sdk/gate-tests/run-gate-tests.test.sh +144 -0
- package/payload/gate-sdk/lib/consumer-smoke.sh +41 -4
- package/payload/gate-sdk/lib/gate.sh +208 -9
- package/payload/gate-sdk/lib/inject.sh +46 -1
- package/payload/gate-sdk/lib/test-hermetic.sh +26 -0
- package/payload/gate-sdk/smoke/install.sh +61 -1
- package/payload/guard-kit/README.md +18 -14
- package/payload/guard-kit/SPEC.md +366 -72
- package/payload/guard-kit/bin/compare-settings-allow.sh +40 -7
- package/payload/guard-kit/bin/run-guard-tests.sh +1 -0
- package/payload/guard-kit/gate-tests/compare-settings-allow.test.sh +64 -0
- package/payload/guard-kit/gate-tests/guard-read-path.test.sh +52 -0
- package/payload/guard-kit/guard-tests/cases.tsv +49 -7
- package/payload/guard-kit/lib/guard.sh +277 -54
- package/payload/guard-kit/templates/close-triage.md +38 -10
- package/payload/guard-kit/templates/guard-config.sh +3 -0
- package/payload/guard-kit/templates/settings-hooks.json +7 -1
- package/payload/lifecycle-kit/README.md +12 -1
- package/payload/lifecycle-kit/SPEC.md +991 -41
- package/payload/lifecycle-kit/bin/cite-survey.sh +81 -0
- package/payload/lifecycle-kit/bin/enter-stage.sh +139 -13
- package/payload/lifecycle-kit/bin/file-gap.sh +60 -2
- package/payload/lifecycle-kit/bin/file-survey.sh +69 -0
- package/payload/lifecycle-kit/checks/check-close-surfaces.sh +1 -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.sh +1 -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/check-close-surfaces.test.sh +1 -2
- 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/bad/.gitattributes +1 -0
- package/payload/lifecycle-kit/gate-tests/check-merge-attrs/good/.gitattributes +1 -0
- package/payload/lifecycle-kit/gate-tests/check-merge-attrs.test.sh +3 -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.test.sh +2 -3
- package/payload/lifecycle-kit/gate-tests/check-stage-evidence.test.sh +9 -5
- package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/args +2 -0
- package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/expect.txt +4 -0
- package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/record.md +18 -0
- package/payload/lifecycle-kit/gate-tests/check-survey-record/good/args +2 -0
- package/payload/lifecycle-kit/gate-tests/check-survey-record/good/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-survey-record/good/record.md +13 -0
- package/payload/lifecycle-kit/gate-tests/check-survey-record.test.sh +83 -0
- package/payload/lifecycle-kit/gate-tests/file-gap-recurrence.test.sh +122 -0
- package/payload/lifecycle-kit/gate-tests/rename-iteration.test.sh +142 -0
- package/payload/lifecycle-kit/gate-tests/survey-record-entry.test.sh +102 -0
- package/payload/lifecycle-kit/gate-tests/workflow-state-guard.test.sh +100 -0
- package/payload/lifecycle-kit/lib/stages.sh +12 -2
- package/payload/lifecycle-kit/smoke/install.sh +83 -4
- package/payload/lifecycle-kit/templates/consult.md +73 -0
- package/payload/lifecycle-kit/templates/lead.md +139 -7
- package/payload/lifecycle-kit/templates/stages/align.md +12 -0
- package/payload/lifecycle-kit/templates/stages/build.md +8 -0
- package/payload/lifecycle-kit/templates/stages/close.md +45 -5
- package/payload/lifecycle-kit/templates/stages/scope.md +42 -3
- package/payload/lifecycle-kit/templates/stages/spec.md +13 -1
- package/payload/lifecycle-kit/templates/stages/validate.md +8 -0
- package/payload/lifecycle-kit/templates/workflow-state-guard.sh +29 -0
- package/payload/queue-kit/README.md +6 -1
- package/payload/queue-kit/SPEC.md +350 -6
- package/payload/queue-kit/bin/queue-counts.sh +35 -0
- package/payload/queue-kit/bin/queue-edges.sh +78 -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.sh +1 -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.sh +1 -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-hygiene/good/TASK-QUEUE.md +5 -0
- package/payload/queue-kit/gate-tests/queue-counts.test.sh +116 -0
- package/payload/queue-kit/gate-tests/queue-edges.test.sh +130 -0
- package/payload/queue-kit/gate-tests/queue-lib-parity.test.sh +215 -0
- package/payload/queue-kit/lib/queue.sh +4 -19
- package/payload/queue-kit/smoke/install.sh +4 -1
- package/payload/queue-kit/templates/TASK-QUEUE.md +3 -0
- package/payload/site-kit/SPEC.md +64 -27
- package/payload/site-kit/checks/check-docs-cname-parity.sh +1 -0
- package/payload/site-kit/checks/check-docs-render-fidelity.sh +1 -0
- package/payload/site-kit/smoke/install.sh +9 -1
- package/profiles.list +36 -8
- package/payload/canon-kit/checks/check-comment-tier.sh +0 -211
- 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-install-claim.sh +0 -146
- package/payload/canon-kit/checks/check-knob-citation.sh +0 -117
- 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-prose-enum.sh +0 -115
- 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-fence-balance.sh +0 -42
- package/payload/canon-kit/checks/check-spec-pointer.sh +0 -180
- 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/gate-sdk/checks/check-action-gh-repo.sh +0 -321
- package/payload/gate-sdk/checks/check-action-pinning.sh +0 -55
- package/payload/gate-sdk/checks/check-assertion-strength.sh +0 -134
- package/payload/gate-sdk/checks/check-kit-registration.sh +0 -68
- package/payload/gate-sdk/checks/check-smoke-entry-guard.sh +0 -53
- package/payload/gate-sdk/checks/check-test-hermetic.sh +0 -119
- 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-evidence.sh +0 -81
- package/payload/lifecycle-kit/checks/check-stage-skill-coverage.sh +0 -47
- package/payload/queue-kit/checks/check-queue-entry-budget.sh +0 -104
- package/payload/queue-kit/checks/check-queue-hygiene.sh +0 -81
- 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-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
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# spec: lifecycle-kit/SPEC.md §The survey record — the citation affordance: emits one record block as an inline-ready snippet, so carrying a finding onto a permanent surface is one command rather than a pointer that dies at the next boundary
|
|
3
|
+
# usage: cite-survey.sh "<heading-substring>" (one, non-empty)
|
|
4
|
+
# writes the matched block's heading and all four witness fields to stdout as
|
|
5
|
+
# markdown for the author to paste; exit 2 on no match, an ambiguous match, or an empty record
|
|
6
|
+
set -uo pipefail
|
|
7
|
+
|
|
8
|
+
KIT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
9
|
+
# shellcheck source=../lib/stages.sh
|
|
10
|
+
source "$KIT/lib/stages.sh"
|
|
11
|
+
|
|
12
|
+
REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
|
|
13
|
+
cd "$REPO_ROOT" 2>/dev/null || exit 1
|
|
14
|
+
|
|
15
|
+
usage() {
|
|
16
|
+
printf 'usage: %s [-h|--help] [--] "<heading-substring>"\n' "$(basename "$0")"
|
|
17
|
+
printf ' emits the one matching block of %s as an inline-ready snippet\n' \
|
|
18
|
+
"$LIFECYCLE_KIT_SURVEY_RECORD_FILE"
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
# spec: gate-sdk/SPEC.md §The bin/-tool contract — free-text positionals validate shape, not only arity: help is stdout at exit 0, an unrecognized leading '-' is refused, '--' ends option processing
|
|
22
|
+
if [[ "${1:-}" == "-h" || "${1:-}" == "--help" ]]; then
|
|
23
|
+
usage
|
|
24
|
+
exit 0
|
|
25
|
+
fi
|
|
26
|
+
if [[ "${1:-}" == "--" ]]; then
|
|
27
|
+
shift
|
|
28
|
+
else
|
|
29
|
+
for _cs_arg in "$@"; do
|
|
30
|
+
[[ "$_cs_arg" == -* ]] || continue
|
|
31
|
+
printf '%s: unrecognized option: %s — a substring beginning with "-" is passed after a "--" separator\n' \
|
|
32
|
+
"$(basename "$0")" "$_cs_arg" >&2
|
|
33
|
+
usage >&2
|
|
34
|
+
exit 2
|
|
35
|
+
done
|
|
36
|
+
fi
|
|
37
|
+
|
|
38
|
+
if [[ $# -ne 1 || -z "${1:-}" ]]; then
|
|
39
|
+
usage >&2
|
|
40
|
+
exit 2
|
|
41
|
+
fi
|
|
42
|
+
|
|
43
|
+
RECORD="$LIFECYCLE_KIT_SURVEY_RECORD_FILE"
|
|
44
|
+
if [[ ! -f "$RECORD" ]]; then
|
|
45
|
+
printf 'cite-survey: no survey record at %s — nothing to cite.\n' "$RECORD" >&2
|
|
46
|
+
exit 2
|
|
47
|
+
fi
|
|
48
|
+
|
|
49
|
+
mapfile -t _cs_headings < <(grep -n '^## ' "$RECORD" | grep -F -- "$1" || true)
|
|
50
|
+
if [[ "${#_cs_headings[@]}" -eq 0 ]]; then
|
|
51
|
+
printf 'cite-survey: no block heading in %s contains: %s\n' "$RECORD" "$1" >&2
|
|
52
|
+
printf 'cite-survey: the record carries these headings —\n' >&2
|
|
53
|
+
grep '^## ' "$RECORD" >&2 || printf ' (none)\n' >&2
|
|
54
|
+
exit 2
|
|
55
|
+
fi
|
|
56
|
+
# spec: lifecycle-kit/SPEC.md §The survey record — an ambiguous substring is a refusal rather than a first-match guess: the author asked for one finding and a silently-chosen sibling would be pasted onto a permanent surface as if it were the one they read
|
|
57
|
+
if [[ "${#_cs_headings[@]}" -gt 1 ]]; then
|
|
58
|
+
printf 'cite-survey: %s block headings contain "%s" — narrow the substring:\n' "${#_cs_headings[@]}" "$1" >&2
|
|
59
|
+
printf ' %s\n' "${_cs_headings[@]}" >&2
|
|
60
|
+
exit 2
|
|
61
|
+
fi
|
|
62
|
+
|
|
63
|
+
_cs_start="${_cs_headings[0]%%:*}"
|
|
64
|
+
|
|
65
|
+
block="$(awk -v start="$_cs_start" '
|
|
66
|
+
FNR == start { inb = 1; print; next }
|
|
67
|
+
inb && /^## / { exit }
|
|
68
|
+
inb && /^- (corpus|oracle|rev|finding): / { print }
|
|
69
|
+
' "$RECORD")"; st=$?
|
|
70
|
+
[[ "$st" -eq 0 ]] || {
|
|
71
|
+
printf 'cite-survey: awk exited %s reading %s — the block could not be extracted.\n' "$st" "$RECORD" >&2
|
|
72
|
+
exit 2
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
heading="$(head -1 <<<"$block")"
|
|
76
|
+
heading="${heading#\#\# }"
|
|
77
|
+
|
|
78
|
+
printf '%s\n' "$block" | awk -v h="$heading" '
|
|
79
|
+
NR == 1 { printf "**Carried survey — %s**\n", h; next }
|
|
80
|
+
{ print }
|
|
81
|
+
'
|
|
@@ -5,24 +5,140 @@ set -uo pipefail
|
|
|
5
5
|
KIT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
6
6
|
# shellcheck source=../lib/stages.sh
|
|
7
7
|
source "$KIT/lib/stages.sh"
|
|
8
|
+
# spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — the kit's bin/ layer depends on gate-sdk, declared at load rather than inside the one arm that dispatches a gate: this tool resolves check-stage-evidence through gate_command instead of by script path, and writing a second dispatch resolver here is the duplicate the substrate exists to remove
|
|
9
|
+
SDK="${GATE_SDK_ROOT:-$KIT/../gate-sdk}"
|
|
10
|
+
# shellcheck source=../../gate-sdk/lib/gate.sh
|
|
11
|
+
source "$SDK/lib/gate.sh"
|
|
8
12
|
|
|
9
|
-
|
|
13
|
+
# spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — the unnamed-iteration placeholder, resolved once: the boundary reset's header rewrite and bootstrap stamp, the boundary-require skip, and --rename's refusal to write it all read this rather than repeating the glyph
|
|
14
|
+
UNNAMED="—"
|
|
15
|
+
|
|
16
|
+
usage() {
|
|
17
|
+
printf 'usage: %s [--simulate] <stage> (stage ∈ %s)\n' "$(basename "$0")" "${LIFECYCLE_KIT_STAGES[*]}"
|
|
18
|
+
printf ' %s [--simulate] --rename <name> (rename the iteration: queue header + column 1 of every stamp)\n' "$(basename "$0")"
|
|
19
|
+
printf ' %s [-h|--help]\n' "$(basename "$0")"
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
# spec: gate-sdk/SPEC.md §The bin/-tool contract — the help half; this tool's positionals are membership-validated, so it owes usage on stdout at exit 0 but no leading-'-' refusal
|
|
23
|
+
if [[ "${1:-}" == "-h" || "${1:-}" == "--help" ]]; then
|
|
24
|
+
usage
|
|
25
|
+
exit 0
|
|
26
|
+
fi
|
|
10
27
|
|
|
11
28
|
# 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
29
|
sim=0
|
|
13
30
|
if [[ "${1:-}" == "--simulate" ]]; then sim=1; shift; fi
|
|
14
31
|
sim_relay() { local l; while IFS= read -r l; do echo "enter-stage (simulate): $l"; done <<<"$1"; }
|
|
15
32
|
|
|
33
|
+
QUEUE="$LIFECYCLE_KIT_QUEUE_FILE"
|
|
34
|
+
STATE="$LIFECYCLE_KIT_STATE_FILE"
|
|
35
|
+
|
|
36
|
+
# spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — --rename: the two-surface iteration rename in one motion, no stamp appended and no stage token written, so the cursor is untouched and this is not stage motion
|
|
37
|
+
if [[ "${1:-}" == "--rename" ]]; then
|
|
38
|
+
rn_name="${2:-}"
|
|
39
|
+
if [[ $# -ne 2 ]]; then
|
|
40
|
+
echo "enter-stage: --rename takes exactly one <name> — nothing written." >&2
|
|
41
|
+
usage >&2
|
|
42
|
+
exit 2
|
|
43
|
+
fi
|
|
44
|
+
if [[ -z "$rn_name" ]]; then
|
|
45
|
+
echo "enter-stage: --rename <name> is empty — nothing written." >&2
|
|
46
|
+
exit 2
|
|
47
|
+
fi
|
|
48
|
+
# spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — the placeholder refusal precedes the slug grammar that would already reject it, so a session trying to un-name an iteration is told which writer owns that value rather than that its name is malformed
|
|
49
|
+
if [[ "$rn_name" == "$UNNAMED" ]]; then
|
|
50
|
+
echo "enter-stage: --rename must not write the unnamed placeholder '$UNNAMED' — only the iteration-boundary reset writes it; nothing written." >&2
|
|
51
|
+
exit 2
|
|
52
|
+
fi
|
|
53
|
+
# spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — the slug grammar is a refusal because column 1 is whitespace-delimited: a two-word name silently shifts every field of every stamp
|
|
54
|
+
if [[ ! "$rn_name" =~ ^[a-z0-9][a-z0-9-]*$ ]]; then
|
|
55
|
+
echo "enter-stage: --rename '$rn_name' is not a queue slug ([a-z0-9][a-z0-9-]*) — nothing written." >&2
|
|
56
|
+
exit 2
|
|
57
|
+
fi
|
|
58
|
+
[[ -f "$QUEUE" ]] || { echo "enter-stage: queue file not found: $QUEUE" >&2; exit 2; }
|
|
59
|
+
[[ -f "$STATE" ]] || { echo "enter-stage: state file not found: $STATE" >&2; exit 2; }
|
|
60
|
+
|
|
61
|
+
rn_hdr="$(lifecycle_header "$QUEUE")"
|
|
62
|
+
if [[ -z "$rn_hdr" ]]; then
|
|
63
|
+
echo "enter-stage: no '## Iteration:' header in $QUEUE — nothing written." >&2
|
|
64
|
+
exit 2
|
|
65
|
+
fi
|
|
66
|
+
rn_cur="$(lifecycle_header_iter "$rn_hdr")"
|
|
67
|
+
rn_moves="$(awk -v n="$rn_name" '/^---[[:space:]]*$/ { f = 1; next } f && NF && $1 != n { c++ } END { print c + 0 }' "$STATE")"
|
|
68
|
+
if [[ "$rn_cur" == "$rn_name" && "$rn_moves" == 0 ]]; then
|
|
69
|
+
if [[ "$sim" == 1 ]]; then
|
|
70
|
+
echo "enter-stage (simulate): the iteration is already named '$rn_name' in $QUEUE and in every stamp of $STATE — the real rename would be an idempotent no-op."
|
|
71
|
+
exit 0
|
|
72
|
+
fi
|
|
73
|
+
echo "enter-stage: the iteration is already named '$rn_name' in $QUEUE and in every stamp of $STATE — idempotent no-op, nothing written."
|
|
74
|
+
exit 0
|
|
75
|
+
fi
|
|
76
|
+
|
|
77
|
+
rn_tmpdir="${GATE_SDK_TMP_DIR:-.tmp}"
|
|
78
|
+
mkdir -p "$rn_tmpdir"
|
|
79
|
+
rn_tmpqueue="$rn_tmpdir/enter-stage.rename.queue.$$"
|
|
80
|
+
rn_tmpstate="$rn_tmpdir/enter-stage.rename.state.$$"
|
|
81
|
+
trap 'rm -f "$rn_tmpqueue" "$rn_tmpstate"' EXIT
|
|
82
|
+
|
|
83
|
+
awk -v n="$rn_name" '
|
|
84
|
+
!d && /^## Iteration:/ { print "## Iteration: " n; d = 1; next }
|
|
85
|
+
{ print }
|
|
86
|
+
' "$QUEUE" > "$rn_tmpqueue"
|
|
87
|
+
# spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — every data line's column 1 is rewritten, not only the last: the first-stage entry truncates the state file, so every line below the separator belongs to the current iteration by construction — which is what check-stage-evidence asserts — and rewriting all of them heals a half-landed hand-rename
|
|
88
|
+
awk -v n="$rn_name" '
|
|
89
|
+
!f { print; if ($0 ~ /^---[[:space:]]*$/) f = 1; next }
|
|
90
|
+
!NF { print; next }
|
|
91
|
+
{ $1 = n; print }
|
|
92
|
+
' "$STATE" > "$rn_tmpstate"
|
|
93
|
+
|
|
94
|
+
# spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — the columns-2-4 witness: the writer proves it touched only the field it meant to, which is the content predicate a PreToolUse guard would have to reconstruct a pre-edit file to compute
|
|
95
|
+
rn_fields() { awk '/^---[[:space:]]*$/ { f = 1; next } f && NF { print $2, $3, $4 }' "$1"; }
|
|
96
|
+
if [[ "$(rn_fields "$STATE")" != "$(rn_fields "$rn_tmpstate")" ]]; then
|
|
97
|
+
echo "enter-stage: the rename would alter columns 2-4 (stage, session id, date) of $STATE — refusing, nothing written." >&2
|
|
98
|
+
exit 2
|
|
99
|
+
fi
|
|
100
|
+
|
|
101
|
+
# spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — the rename pre-flight names the gate and never a substrate: gate_command yields the shell script's one-element argv or the binary's, prefixed by its bridged knobs, and the two positional arguments ride unchanged because that argv is prefix-shaped. An argv the bridge refused to build is exit 2 — the verdict the dispatcher gives it — never a rename that proceeds unchecked.
|
|
102
|
+
mapfile -t rn_argv < <(gate_command check-stage-evidence "$KIT/checks")
|
|
103
|
+
if [[ ${#rn_argv[@]} -eq 0 ]]; then
|
|
104
|
+
echo "enter-stage: check-stage-evidence could not be dispatched (see above) — the rename could not be pre-flighted; nothing written." >&2
|
|
105
|
+
exit 2
|
|
106
|
+
fi
|
|
107
|
+
if ! rn_pre="$("${rn_argv[@]}" "$rn_tmpqueue" "$rn_tmpstate" 2>&1)"; then
|
|
108
|
+
if [[ "$sim" == 1 ]]; then
|
|
109
|
+
echo "enter-stage (simulate): check-stage-evidence would refuse the rename to '$rn_name':" >&2
|
|
110
|
+
sim_relay "$rn_pre" >&2
|
|
111
|
+
exit 1
|
|
112
|
+
fi
|
|
113
|
+
echo "enter-stage: check-stage-evidence refuses the rename to '$rn_name' — nothing written:" >&2
|
|
114
|
+
printf '%s\n' "$rn_pre" >&2
|
|
115
|
+
exit 1
|
|
116
|
+
fi
|
|
117
|
+
|
|
118
|
+
if [[ "$sim" == 1 ]]; then
|
|
119
|
+
echo "enter-stage (simulate): --rename '$rn_name' would rewrite both surfaces — no write:"
|
|
120
|
+
sim_relay "$QUEUE: '## Iteration: $rn_cur' -> '## Iteration: $rn_name'"
|
|
121
|
+
sim_relay "$STATE: column 1 of $rn_moves stamp(s) -> '$rn_name'; columns 2-4 proved unchanged"
|
|
122
|
+
exit 0
|
|
123
|
+
fi
|
|
124
|
+
|
|
125
|
+
# spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — the rename is a whole-file rewrite by construction (every data line's column 1 moves), which is why it is the writer's own mode rather than an append like the stamp path
|
|
126
|
+
mv "$rn_tmpqueue" "$QUEUE"
|
|
127
|
+
mv "$rn_tmpstate" "$STATE"
|
|
128
|
+
trap - EXIT
|
|
129
|
+
echo "enter-stage: renamed the iteration to '$rn_name' — header in $QUEUE, column 1 of $rn_moves stamp(s) in $STATE; columns 2-4 proved unchanged."
|
|
130
|
+
echo " next: commit $QUEUE and $STATE together — the rename writes both, and check-stage-evidence requires them to agree."
|
|
131
|
+
exit 0
|
|
132
|
+
fi
|
|
133
|
+
|
|
16
134
|
stage="${1:-}"
|
|
17
|
-
if [[ -z "$stage" ]]; then usage; exit 2; fi
|
|
135
|
+
if [[ -z "$stage" ]]; then usage >&2; exit 2; fi
|
|
18
136
|
if ! lifecycle_stage_known "$stage"; then
|
|
19
137
|
echo "enter-stage: '$stage' is not a lifecycle stage (${LIFECYCLE_KIT_STAGES[*]})" >&2
|
|
20
|
-
usage
|
|
138
|
+
usage >&2
|
|
21
139
|
exit 2
|
|
22
140
|
fi
|
|
23
141
|
|
|
24
|
-
QUEUE="$LIFECYCLE_KIT_QUEUE_FILE"
|
|
25
|
-
STATE="$LIFECYCLE_KIT_STATE_FILE"
|
|
26
142
|
[[ -f "$QUEUE" ]] || { echo "enter-stage: queue file not found: $QUEUE" >&2; exit 2; }
|
|
27
143
|
[[ -f "$STATE" ]] || { echo "enter-stage: state file not found: $STATE" >&2; exit 2; }
|
|
28
144
|
|
|
@@ -30,7 +146,7 @@ hdr="$(lifecycle_header "$QUEUE")"
|
|
|
30
146
|
cur_iter="$(lifecycle_header_iter "$hdr")"
|
|
31
147
|
if [[ "$stage" == "$LIFECYCLE_KIT_FIRST_STAGE" ]]; then
|
|
32
148
|
first=1
|
|
33
|
-
stamp_iter="
|
|
149
|
+
stamp_iter="$UNNAMED"
|
|
34
150
|
else
|
|
35
151
|
first=0
|
|
36
152
|
stamp_iter="$cur_iter"
|
|
@@ -64,8 +180,8 @@ wiped=()
|
|
|
64
180
|
|
|
65
181
|
# 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
182
|
if [[ "$first" == 1 ]]; then
|
|
67
|
-
awk '
|
|
68
|
-
!d && /^## Iteration:/ { print "## Iteration:
|
|
183
|
+
awk -v u="$UNNAMED" '
|
|
184
|
+
!d && /^## Iteration:/ { print "## Iteration: " u; d = 1; next }
|
|
69
185
|
{ print }
|
|
70
186
|
' "$QUEUE" > "$tmpqueue"
|
|
71
187
|
header_only="$(awk '{ print } /^---[[:space:]]*$/ { exit }' "$STATE")"
|
|
@@ -144,7 +260,7 @@ if [[ "$first" == 1 && -f "$LIFECYCLE_KIT_GAP_INBOX_FILE" ]]; then
|
|
|
144
260
|
fi
|
|
145
261
|
|
|
146
262
|
# 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" != "
|
|
263
|
+
if [[ "$first" == 1 && "$cur_iter" != "$UNNAMED" ]]; then
|
|
148
264
|
for br in ${LIFECYCLE_KIT_BOUNDARY_REQUIRE[@]+"${LIFECYCLE_KIT_BOUNDARY_REQUIRE[@]}"}; do
|
|
149
265
|
req_msg=""
|
|
150
266
|
if [[ ! -f "$br" ]]; then
|
|
@@ -174,11 +290,12 @@ fi
|
|
|
174
290
|
|
|
175
291
|
if [[ "$first" == 1 ]]; then
|
|
176
292
|
mv "$tmpstate" "$STATE"
|
|
177
|
-
# spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — the kit-owned lesson
|
|
178
|
-
for bt in "$LIFECYCLE_KIT_LESSON_EVIDENCE_FILE" ${LIFECYCLE_KIT_BOUNDARY_TRUNCATE[@]+"${LIFECYCLE_KIT_BOUNDARY_TRUNCATE[@]}"}; do
|
|
293
|
+
# spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — the two kit-owned surfaces (lesson evidence, survey record) reset as built-in members (the kit owns them); LIFECYCLE_KIT_BOUNDARY_TRUNCATE stays reserved for files the kit does not own, and a defaulted array is replaced rather than merged when a consumer assigns it, so a built-in shipped as a default member would lose its reset in every configuring consumer
|
|
294
|
+
for bt in "$LIFECYCLE_KIT_LESSON_EVIDENCE_FILE" "$LIFECYCLE_KIT_SURVEY_RECORD_FILE" ${LIFECYCLE_KIT_BOUNDARY_TRUNCATE[@]+"${LIFECYCLE_KIT_BOUNDARY_TRUNCATE[@]}"}; do
|
|
179
295
|
[[ -f "$bt" ]] || continue
|
|
180
296
|
bttmp="$tmpdir/boundary-truncate.$$"
|
|
181
|
-
|
|
297
|
+
# spec: lifecycle-kit/SPEC.md §bin/enter-stage.sh — the header run stops at a markdown '## ' section heading as well as at the first data line: on a markdown surface whose blocks are '## ' headings (the survey record) a bare /^#/ predicate reads the first block's heading as part of the header and carries it across the boundary
|
|
298
|
+
awk 'drop { next } /^[[:space:]]*$/ { print; next } /^#([^#]|$)/ { print; next } { drop = 1 }' "$bt" > "$bttmp"
|
|
182
299
|
mv "$bttmp" "$bt"
|
|
183
300
|
truncated+=("$bt")
|
|
184
301
|
done
|
|
@@ -201,7 +318,7 @@ if [[ "$first" == 1 && -d "$tmpdir" ]]; then
|
|
|
201
318
|
fi
|
|
202
319
|
|
|
203
320
|
if [[ "$first" == 1 ]]; then
|
|
204
|
-
echo "enter-stage: iteration-boundary reset — stamped '$stamp_line'; header set to '## Iteration:
|
|
321
|
+
echo "enter-stage: iteration-boundary reset — stamped '$stamp_line'; header set to '## Iteration: $UNNAMED'."
|
|
205
322
|
echo " next: commit $QUEUE and $STATE together (the boundary reset writes both), hook enabled."
|
|
206
323
|
else
|
|
207
324
|
echo "enter-stage: stamped '$stamp_line'; the cursor is now '$stage' (no queue write — stage motion never touches it)."
|
|
@@ -213,3 +330,12 @@ fi
|
|
|
213
330
|
if [[ ${#wiped[@]} -gt 0 ]]; then
|
|
214
331
|
echo " note: boundary-wiped from $tmpdir: ${wiped[*]}"
|
|
215
332
|
fi
|
|
333
|
+
|
|
334
|
+
# spec: lifecycle-kit/SPEC.md §The survey record — the read trigger: the entry report prints the record's headings (the questions), never the findings, at the one moment a stage session is guaranteed to be looking. Findings stay behind the witness — printing them here would put a possibly-stale judgment into context ahead of the check that qualifies it. A non-empty record never refuses the boundary: unlike the gap inbox one line above, a survey owes nobody a disposition.
|
|
335
|
+
if [[ -f "$LIFECYCLE_KIT_SURVEY_RECORD_FILE" ]]; then
|
|
336
|
+
mapfile -t survey_qs < <(awk '/^##[[:space:]]/ { print }' "$LIFECYCLE_KIT_SURVEY_RECORD_FILE")
|
|
337
|
+
if [[ ${#survey_qs[@]} -gt 0 ]]; then
|
|
338
|
+
echo " note: $LIFECYCLE_KIT_SURVEY_RECORD_FILE carries ${#survey_qs[@]} survey(s) this iteration — before buying one of these again, run its witness (diff the corpus since its rev, re-run its oracle) and cite it if both hold:"
|
|
339
|
+
printf ' %s\n' "${survey_qs[@]}"
|
|
340
|
+
fi
|
|
341
|
+
fi
|
|
@@ -2,6 +2,7 @@
|
|
|
2
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
3
|
# usage: file-gap.sh "<gap prose>" (required, non-empty)
|
|
4
4
|
# appends one dated bullet '- <YYYY-MM-DD> — <gap prose>' to the committed gap inbox; exit 2 on misuse
|
|
5
|
+
# a prose naming a live queue slug additionally raises a stderr advisory; the bullet is unchanged
|
|
5
6
|
set -uo pipefail
|
|
6
7
|
|
|
7
8
|
KIT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
@@ -12,11 +13,30 @@ REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
|
|
|
12
13
|
cd "$REPO_ROOT" 2>/dev/null || exit 1
|
|
13
14
|
|
|
14
15
|
usage() {
|
|
15
|
-
printf 'usage: %s "<gap prose>"\n' "$(basename "$0")"
|
|
16
|
+
printf 'usage: %s [-h|--help] [--] "<gap prose>"\n' "$(basename "$0")"
|
|
17
|
+
printf ' appends one dated bullet to %s; "--" files prose beginning with "-"\n' \
|
|
18
|
+
"$LIFECYCLE_KIT_GAP_INBOX_FILE"
|
|
16
19
|
}
|
|
17
20
|
|
|
18
|
-
|
|
21
|
+
# spec: gate-sdk/SPEC.md §The bin/-tool contract — free-text positionals validate shape, not only arity: help is stdout at exit 0, an unrecognized leading '-' is refused, '--' ends option processing
|
|
22
|
+
if [[ "${1:-}" == "-h" || "${1:-}" == "--help" ]]; then
|
|
19
23
|
usage
|
|
24
|
+
exit 0
|
|
25
|
+
fi
|
|
26
|
+
if [[ "${1:-}" == "--" ]]; then
|
|
27
|
+
shift
|
|
28
|
+
else
|
|
29
|
+
for _fg_arg in "$@"; do
|
|
30
|
+
[[ "$_fg_arg" == -* ]] || continue
|
|
31
|
+
printf '%s: unrecognized option: %s — prose beginning with "-" is filed after a "--" separator\n' \
|
|
32
|
+
"$(basename "$0")" "$_fg_arg" >&2
|
|
33
|
+
usage >&2
|
|
34
|
+
exit 2
|
|
35
|
+
done
|
|
36
|
+
fi
|
|
37
|
+
|
|
38
|
+
if [[ $# -ne 1 || -z "${1:-}" ]]; then
|
|
39
|
+
usage >&2
|
|
20
40
|
exit 2
|
|
21
41
|
fi
|
|
22
42
|
|
|
@@ -26,10 +46,48 @@ mkdir -p "$(dirname "$INBOX")" 2>/dev/null || true
|
|
|
26
46
|
[[ -f "$INBOX" ]] \
|
|
27
47
|
|| 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
48
|
|
|
49
|
+
# spec: lifecycle-kit/SPEC.md §The committed gap inbox — resolve the prose against the live slug set to raise the advisory, never to stamp a verdict: every column-0 entry bullet outside the fixed-spelling Lessons section, which is active + deferred + configured icebox with done excluded by grammar (a bare-slug line) and Lessons by name (a lesson may be written in the entry shape); longest match wins, and this awk is lifecycle-kit's own rather than queue-kit's queue_live_slugs, which would close a cross-kit cycle
|
|
50
|
+
_fg_slug=""
|
|
51
|
+
if [[ -f "$LIFECYCLE_KIT_QUEUE_FILE" ]]; then
|
|
52
|
+
_fg_slug="$(awk -v prose="$1" '
|
|
53
|
+
function bounded(hay, needle, pos, off, before, after) {
|
|
54
|
+
off = 0
|
|
55
|
+
while ((pos = index(substr(hay, off + 1), needle)) > 0) {
|
|
56
|
+
pos += off
|
|
57
|
+
before = (pos == 1) ? "" : substr(hay, pos - 1, 1)
|
|
58
|
+
after = substr(hay, pos + length(needle), 1)
|
|
59
|
+
if (before !~ /[a-z0-9-]/ && after !~ /[a-z0-9-]/) return 1
|
|
60
|
+
off = pos
|
|
61
|
+
}
|
|
62
|
+
return 0
|
|
63
|
+
}
|
|
64
|
+
/^## Lessons Learned[[:space:]]*$/ { inl = 1; next }
|
|
65
|
+
/^## / { inl = 0 }
|
|
66
|
+
inl { next }
|
|
67
|
+
/^-[[:space:]]+\*\*[a-z0-9][a-z0-9-]*\*\*[[:space:]]/ {
|
|
68
|
+
match($0, /\*\*[a-z0-9][a-z0-9-]*\*\*/)
|
|
69
|
+
live[substr($0, RSTART + 2, RLENGTH - 4)] = 1
|
|
70
|
+
}
|
|
71
|
+
END {
|
|
72
|
+
hay = tolower(prose); best = ""
|
|
73
|
+
for (s in live)
|
|
74
|
+
if (length(s) > length(best) && bounded(hay, s)) best = s
|
|
75
|
+
if (best != "") print best
|
|
76
|
+
}
|
|
77
|
+
' "$LIFECYCLE_KIT_QUEUE_FILE" 2>/dev/null)"
|
|
78
|
+
fi
|
|
79
|
+
|
|
80
|
+
# spec: lifecycle-kit/SPEC.md §The committed gap inbox — one bullet shape for every filing, matching or not: the tool records the observation and never interposes a verdict
|
|
29
81
|
line="- $(date +%F) — $1"
|
|
30
82
|
printf '%s\n' "$line" >> "$INBOX"
|
|
31
83
|
printf 'file-gap: %s\n' "$line"
|
|
32
84
|
|
|
85
|
+
# spec: lifecycle-kit/SPEC.md §The committed gap inbox — the advisory asks rather than asserts: a slug in the prose is an input to the drain's judgment, so the question goes to the one party who can answer it while the finding is still in mind
|
|
86
|
+
if [[ -n "$_fg_slug" ]]; then
|
|
87
|
+
printf 'file-gap: this prose names live entry `%s`. If this bullet RE-FILES that finding, say so in the prose and say why; if it merely cites, corrects, or argues against that entry, say it is DISTINCT and why. The closing stage'"'"'s drain judges the recurrence and reads what you wrote — it has nothing else to go on.\n' \
|
|
88
|
+
"$_fg_slug" >&2
|
|
89
|
+
fi
|
|
90
|
+
|
|
33
91
|
# spec: lifecycle-kit/SPEC.md §The committed gap inbox — warn at the point of
|
|
34
92
|
# capture, while the filer can still act: after the iteration's last stage
|
|
35
93
|
# stamps there is no drainer left in the machine.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# spec: lifecycle-kit/SPEC.md §The survey record — the capture affordance; stamps the block grammar, no caller-side redirect (the file-gap.sh pattern)
|
|
3
|
+
# usage: file-survey.sh "<question>" "<corpus>" "<oracle>" "<finding>" (four, each non-empty)
|
|
4
|
+
# appends one block '## <YYYY-MM-DD> <stage> — <question>' plus its corpus/oracle/rev/finding
|
|
5
|
+
# lines to the committed survey record; exit 2 on misuse
|
|
6
|
+
set -uo pipefail
|
|
7
|
+
|
|
8
|
+
KIT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
9
|
+
# shellcheck source=../lib/stages.sh
|
|
10
|
+
source "$KIT/lib/stages.sh"
|
|
11
|
+
|
|
12
|
+
REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
|
|
13
|
+
cd "$REPO_ROOT" 2>/dev/null || exit 1
|
|
14
|
+
|
|
15
|
+
usage() {
|
|
16
|
+
printf 'usage: %s [-h|--help] [--] "<question>" "<corpus>" "<oracle>" "<finding>"\n' "$(basename "$0")"
|
|
17
|
+
printf ' appends one dated block to %s; "--" files a field beginning with "-"\n' \
|
|
18
|
+
"$LIFECYCLE_KIT_SURVEY_RECORD_FILE"
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
# spec: gate-sdk/SPEC.md §The bin/-tool contract — free-text positionals validate shape, not only arity: the refusal scans every positional, since arity alone leaves a flag safe in no slot but the first
|
|
22
|
+
if [[ "${1:-}" == "-h" || "${1:-}" == "--help" ]]; then
|
|
23
|
+
usage
|
|
24
|
+
exit 0
|
|
25
|
+
fi
|
|
26
|
+
if [[ "${1:-}" == "--" ]]; then
|
|
27
|
+
shift
|
|
28
|
+
else
|
|
29
|
+
for _fs_arg in "$@"; do
|
|
30
|
+
[[ "$_fs_arg" == -* ]] || continue
|
|
31
|
+
printf '%s: unrecognized option: %s — a field beginning with "-" is filed after a "--" separator\n' \
|
|
32
|
+
"$(basename "$0")" "$_fs_arg" >&2
|
|
33
|
+
usage >&2
|
|
34
|
+
exit 2
|
|
35
|
+
done
|
|
36
|
+
fi
|
|
37
|
+
|
|
38
|
+
if [[ $# -ne 4 || -z "${1:-}" || -z "${2:-}" || -z "${3:-}" || -z "${4:-}" ]]; then
|
|
39
|
+
usage >&2
|
|
40
|
+
exit 2
|
|
41
|
+
fi
|
|
42
|
+
|
|
43
|
+
# spec: lifecycle-kit/SPEC.md §The survey record — rev is machine-stamped because it is the field the whole re-use protocol turns on and the one an author gets wrong (a short sha, the rev they started at, or none at all); a tree with no HEAD cannot ground a witness, so it is a refusal rather than a blank field
|
|
44
|
+
if ! _fs_rev="$(git rev-parse HEAD 2>/dev/null)" || [[ ! "$_fs_rev" =~ ^[0-9a-f]{40}$ ]]; then
|
|
45
|
+
printf 'file-survey: no HEAD commit to stamp as the survey rev — the witness would have nothing to diff against; commit first.\n' >&2
|
|
46
|
+
exit 2
|
|
47
|
+
fi
|
|
48
|
+
|
|
49
|
+
RECORD="$LIFECYCLE_KIT_SURVEY_RECORD_FILE"
|
|
50
|
+
mkdir -p "$(dirname "$RECORD")" 2>/dev/null || true
|
|
51
|
+
# spec: lifecycle-kit/SPEC.md §The survey record — seed the contract header when the record does not yet exist (a fresh consumer's first filing); the iteration-boundary entry truncates back to this header
|
|
52
|
+
[[ -f "$RECORD" ]] \
|
|
53
|
+
|| printf '# contract: lifecycle-kit/SPEC.md §The survey record — carried surveys, one block per survey; boundary-truncated, cited only behind a passing witness.\n' > "$RECORD"
|
|
54
|
+
|
|
55
|
+
# spec: lifecycle-kit/SPEC.md §The survey record — the stage is derived from the cursor rather than asked for; a tree with no cursor yet stamps the never-named form the queue header already uses
|
|
56
|
+
_fs_stage="$(lifecycle_current_stage)"
|
|
57
|
+
[[ -n "$_fs_stage" ]] || _fs_stage="—"
|
|
58
|
+
|
|
59
|
+
printf '\n## %s %s — %s\n- corpus: %s\n- oracle: %s\n- rev: %s\n- finding: %s\n' \
|
|
60
|
+
"$(date +%F)" "$_fs_stage" "$1" "$2" "$3" "$_fs_rev" "$4" >> "$RECORD"
|
|
61
|
+
|
|
62
|
+
printf 'file-survey: ## %s %s — %s (rev %s)\n' "$(date +%F)" "$_fs_stage" "$1" "$_fs_rev"
|
|
63
|
+
|
|
64
|
+
if [[ "$3" == "none" ]]; then
|
|
65
|
+
printf 'file-survey: oracle "none" — this block is a note, not a re-usable survey: a later stage may read it for orientation and must re-derive before relying on it.\n' >&2
|
|
66
|
+
else
|
|
67
|
+
printf 'file-survey: the witness a later stage runs — git diff --quiet %s..HEAD -- %s, then re-run: %s\n' \
|
|
68
|
+
"$_fs_rev" "$2" "$3" >&2
|
|
69
|
+
fi
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# graph: couples=.workflow/*,kit:SPEC.md,.claude/commands/*.md,.gitignore dir=one valve=none tier=precommit
|
|
3
|
+
# install: on-surface
|
|
3
4
|
# 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
|
#
|
|
5
6
|
# usage: check-close-surfaces.sh [scan-root] (derives through bin/close-surfaces.sh)
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
# graph: couples=.workflow/gap-inbox.md dir=one valve=none tier=precommit
|
|
2
|
+
# install: on-surface
|
|
3
|
+
# spec: lifecycle-kit/SPEC.md §check-gap-inbox-neutrality — the capture surface records observations: every bullet is '- <YYYY-MM-DD> — <prose>', and no bullet's prose opens with the retired 'recurrence of `<slug>`:' verdict
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
# graph: couples=TASK-QUEUE.md,.workflow/lesson-evidence.txt dir=one valve=none tier=precommit
|
|
2
|
+
# install: never
|
|
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
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
# graph: couples=CLAUDE.md,lifecycle-kit/lib/stages.sh dir=one valve=none tier=precommit
|
|
2
|
+
# install: on-surface
|
|
3
|
+
# spec: lifecycle-kit/SPEC.md §check-lifecycle-registration — the always-loaded agent file carries a lifecycle-kit marker block whose content byte-matches the block regenerated from the live stage machine, fail-closed when the target or a marker is missing
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
# graph: couples=.gitattributes,lifecycle-kit/lib/stages.sh dir=one valve=none tier=precommit
|
|
2
|
+
# install: on-surface
|
|
3
|
+
# spec: lifecycle-kit/SPEC.md §check-merge-attrs — bidirectional parity between the derived iteration-scoped supersede set and the merge=iteration-scoped lines in .gitattributes (a smuggled ours-driver attribute on a path outside the set is the reverse-direction safety edge), plus forward-only parity for the derived union set (the gap inbox must carry merge=union; the git-native union driver is legitimate consumer usage elsewhere, so no reverse edge)
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
# graph: couples=TASK-QUEUE.md,*/SPEC.md,kit:lib/stages.sh dir=one valve=none tier=precommit
|
|
2
|
+
# install: on-surface
|
|
3
|
+
# spec: lifecycle-kit/SPEC.md §check-scratch-citation — no permanent surface carries a retrieval pointer into a boundary-truncated one, because that pointer resolves to nothing at the next iteration boundary
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
# graph: couples=.claude/commands/*.md,CLAUDE.md,kit:templates/*.md,lifecycle-kit/templates/stages/*.md dir=one valve=none tier=precommit
|
|
2
|
+
# install: never
|
|
3
|
+
# spec: lifecycle-kit/SPEC.md §check-shim-restatement — no binding shim shares an >=N-word normalized n-gram with the dedup corpus (CLAUDE.md + every kit's templates)
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
# graph: couples=.claude/commands/*.md,lifecycle-kit/templates/stages/*.md,lifecycle-kit/templates/lead.md,lifecycle-kit/templates/release-sweep.md,lifecycle-kit/templates/upgrade.md,lifecycle-kit/templates/consult.md,delegation-kit/templates/agent-execution.md dir=one valve=none tier=precommit
|
|
2
|
+
# install: never
|
|
3
|
+
# spec: lifecycle-kit/SPEC.md §check-skill-binding — every binding-shim skill names an existing template and binds exactly that template's slot set
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# graph: couples=TASK-QUEUE.md,.workflow/WORKFLOW-STATE.txt dir=one valve=none tier=precommit
|
|
3
|
+
# install: on-surface
|
|
3
4
|
# spec: lifecycle-kit/SPEC.md §check-stage-entry — prior-stage invocation-stamp ordering + drain-entry queue-empty + audit-trigger signal
|
|
4
5
|
set -uo pipefail
|
|
5
6
|
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
# graph: couples=TASK-QUEUE.md,.workflow/WORKFLOW-STATE.txt dir=one valve=none tier=precommit
|
|
2
|
+
# install: on-surface
|
|
3
|
+
# spec: lifecycle-kit/SPEC.md §check-stage-evidence — stamp grammar + name-axis agreement (staleness) between the header and every stamp; cross-stage session-id distinctness
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
# graph: couples=.claude/commands/*.md dir=one valve=none tier=precommit
|
|
2
|
+
# install: never
|
|
3
|
+
# spec: lifecycle-kit/SPEC.md §check-stage-skill-coverage — the configured stage set and the skills dir cover each other: every stage has a skill, every enter-stage-invoking skill names a live stage
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
# graph: couples=.workflow/survey-record.md dir=one valve=none tier=precommit
|
|
2
|
+
# install: on-surface
|
|
3
|
+
# spec: lifecycle-kit/SPEC.md §check-survey-record — every survey block carries its whole witness: the four keys in order, a full-sha rev naming a real commit, a non-empty corpus and a non-empty oracle
|
|
@@ -12,7 +12,6 @@ set -uo pipefail
|
|
|
12
12
|
source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
|
|
13
13
|
|
|
14
14
|
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" # lifecycle-kit/
|
|
15
|
-
GATE="$DIR/checks/check-close-surfaces.sh"
|
|
16
15
|
SANDBOX="$(mktemp -d)"
|
|
17
16
|
trap 'rm -rf "$SANDBOX"' EXIT
|
|
18
17
|
|
|
@@ -20,7 +19,7 @@ fails=0
|
|
|
20
19
|
|
|
21
20
|
check_case() { # $1=label $2=dir $3=want-rc $4=want-substring
|
|
22
21
|
local out rc
|
|
23
|
-
out="$("$
|
|
22
|
+
out="$(gate_run check-close-surfaces "$DIR/checks" "$2" 2>&1)"; rc=$?
|
|
24
23
|
if [[ "$rc" -ne "$3" ]]; then
|
|
25
24
|
echo " FAIL [$1]: want exit $3, got $rc -- $out"; fails=$((fails + 1)); return
|
|
26
25
|
fi
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# contract: lifecycle-kit/SPEC.md §The committed gap inbox — append-only mid-iteration gap capture, close-drained; one bullet per gap below.
|
|
2
|
+
- 2026-01-02 — recurrence of `queue-slug-liveness`: the liveness scan missed a slug the drain later found by hand.
|
|
3
|
+
- 2026-01-03 — the vendored hook drifts from the manifest and nothing catches it until a later commit reds.
|
|
4
|
+
* 2026-01-04 - a bullet that abandoned the grammar entirely.
|
|
5
|
+
- the date is missing from this bullet, so nothing dates the finding.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
GAP-INBOX-NEUTRALITY: clean (3 bullet(s)
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# contract: lifecycle-kit/SPEC.md §The committed gap inbox — append-only mid-iteration gap capture, close-drained; one bullet per gap below.
|
|
2
|
+
- 2026-01-02 — the vendored hook drifts from the manifest and nothing catches it until a later commit reds.
|
|
3
|
+
- 2026-01-03 — the release runbook's step 6 names a flag the workflow no longer passes. This re-files `release-channel-flag-unheld`: the same unpassed flag, observed a second time on a different tag, so the drain should judge it a recurrence rather than a fresh entry.
|
|
4
|
+
- 2026-01-04 — the drain skipped a bullet whose prose named `queue-slug-liveness` only to argue it is a *distinct* finding; recording the distinction here so the drain reads the grounds rather than the mention.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Behavioral test of
|
|
2
|
+
# Behavioral test of check-lesson-disposition — the scenarios the one
|
|
3
3
|
# good/bad pair cannot hold: (A) a malformed disposition line reds on grammar;
|
|
4
4
|
# (B) a Lessons entry still present in the worktree is not a removal, so it
|
|
5
5
|
# needs no stamp; (C) a stored prefix matches a longer lead line (prefix join).
|
|
@@ -9,7 +9,6 @@ set -uo pipefail
|
|
|
9
9
|
source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
|
|
10
10
|
|
|
11
11
|
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" # lifecycle-kit/
|
|
12
|
-
GATE="$DIR/checks/check-lesson-disposition.sh"
|
|
13
12
|
SANDBOX="$(mktemp -d)"
|
|
14
13
|
trap 'rm -rf "$SANDBOX"' EXIT
|
|
15
14
|
|
|
@@ -17,7 +16,7 @@ fails=0
|
|
|
17
16
|
|
|
18
17
|
check_case() { # $1=label $2=want-rc $3=want-substring $4=head $5=work $6=evid
|
|
19
18
|
local out rc
|
|
20
|
-
out="$("$
|
|
19
|
+
out="$(gate_run check-lesson-disposition "$DIR/checks" "$4" "$5" "$6" 2>&1)"; rc=$?
|
|
21
20
|
if [[ "$rc" -ne "$2" ]]; then
|
|
22
21
|
echo " FAIL [$1]: want exit $2, got $rc -- $out"; fails=$((fails + 1)); return
|
|
23
22
|
fi
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Behavioral test of
|
|
2
|
+
# Behavioral test of check-lifecycle-registration — the scenarios the
|
|
3
3
|
# one-pair good/bad harness cannot hold. The good/bad fixture pair covers the
|
|
4
4
|
# byte-lockstep-clean case and the stale-block case; this drives the
|
|
5
5
|
# block-absent finding, the unpaired-marker fail-closed, and the
|
|
@@ -10,7 +10,6 @@ set -uo pipefail
|
|
|
10
10
|
source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
|
|
11
11
|
|
|
12
12
|
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" # lifecycle-kit/
|
|
13
|
-
GATE="$DIR/checks/check-lifecycle-registration.sh"
|
|
14
13
|
SANDBOX="$(mktemp -d)"
|
|
15
14
|
trap 'rm -rf "$SANDBOX"' EXIT
|
|
16
15
|
|
|
@@ -18,7 +17,7 @@ fails=0
|
|
|
18
17
|
|
|
19
18
|
check_case() { # $1=label $2=sandbox-dir $3=want-rc $4=want-substring
|
|
20
19
|
local out rc
|
|
21
|
-
out="$(cd "$2" && "$
|
|
20
|
+
out="$(cd "$2" && gate_run check-lifecycle-registration "$DIR/checks" AGENT.md 2>&1)"; rc=$?
|
|
22
21
|
if [[ "$rc" -ne "$3" ]]; then
|
|
23
22
|
echo " FAIL [$1]: want exit $3, got $rc -- $out"; fails=$((fails + 1)); return
|
|
24
23
|
fi
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# lifecycle-kit:merge:begin
|
|
2
2
|
.workflow/WORKFLOW-STATE.txt merge=iteration-scoped
|
|
3
3
|
.workflow/lesson-evidence.txt merge=iteration-scoped
|
|
4
|
+
.workflow/survey-record.md merge=iteration-scoped
|
|
4
5
|
.workflow/gap-inbox.md merge=union
|
|
5
6
|
# lifecycle-kit:merge:end
|
|
6
7
|
README.md merge=iteration-scoped
|