checkwright 0.25.0 → 0.27.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 +35 -1361
- package/bin/checkwright.ps1 +176 -0
- package/bin/checkwright.sh +187 -44
- package/package.json +15 -14
- package/payload/artifact/aarch64-apple-darwin/checkwright-gates +0 -0
- package/payload/artifact/aarch64-apple-darwin/checkwright-gates.sha256 +1 -0
- package/payload/artifact/aarch64-pc-windows-msvc/checkwright-gates.exe +0 -0
- package/payload/artifact/aarch64-pc-windows-msvc/checkwright-gates.exe.sha256 +1 -0
- package/payload/artifact/aarch64-unknown-linux-gnu/checkwright-gates +0 -0
- package/payload/artifact/aarch64-unknown-linux-gnu/checkwright-gates.sha256 +1 -0
- package/payload/artifact/aarch64-unknown-linux-musl/checkwright-gates +0 -0
- package/payload/artifact/aarch64-unknown-linux-musl/checkwright-gates.sha256 +1 -0
- package/payload/artifact/targets.list +133 -24
- package/payload/artifact/x86_64-apple-darwin/checkwright-gates +0 -0
- package/payload/artifact/x86_64-apple-darwin/checkwright-gates.sha256 +1 -0
- package/payload/artifact/x86_64-pc-windows-msvc/checkwright-gates.exe +0 -0
- package/payload/artifact/x86_64-pc-windows-msvc/checkwright-gates.exe.sha256 +1 -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 -1
- package/payload/artifact/x86_64-unknown-linux-musl/checkwright-gates +0 -0
- package/payload/artifact/x86_64-unknown-linux-musl/checkwright-gates.sha256 +1 -0
- package/payload/canon-kit/README.md +25 -37
- package/payload/canon-kit/checks/check-amendment-queue.gate +2 -2
- package/payload/canon-kit/checks/check-amendment-retired-spelling.gate +3 -0
- package/payload/canon-kit/checks/check-amendment-update-target.gate +1 -1
- package/payload/canon-kit/checks/check-citation-link.gate +4 -0
- package/payload/canon-kit/checks/check-comment-tier.gate +1 -1
- package/payload/canon-kit/checks/check-deprecation-task.gate +2 -1
- package/payload/canon-kit/checks/check-docs-cmd.gate +2 -2
- package/payload/canon-kit/checks/check-docs-link-convention.gate +1 -1
- package/payload/canon-kit/checks/check-docs-page-repeat.gate +4 -0
- package/payload/canon-kit/checks/check-docs-restatement-parity.gate +4 -0
- package/payload/canon-kit/checks/check-fence-command-head.gate +3 -0
- package/payload/canon-kit/checks/check-fence-run.gate +3 -0
- package/payload/canon-kit/checks/check-install-claim.gate +2 -1
- package/payload/canon-kit/checks/check-knob-citation.gate +1 -1
- package/payload/canon-kit/checks/check-manifest-count.gate +1 -1
- package/payload/canon-kit/checks/check-manifest-temporal.gate +1 -1
- package/payload/canon-kit/checks/check-md-refs.gate +1 -1
- package/payload/canon-kit/checks/check-md-unwrapped.gate +3 -0
- package/payload/canon-kit/checks/check-measured-claim.gate +2 -1
- package/payload/canon-kit/checks/check-payload-claim.gate +2 -1
- package/payload/canon-kit/checks/check-prose-bounds.gate +3 -0
- package/payload/canon-kit/checks/check-prose-enum.gate +2 -1
- package/payload/canon-kit/checks/check-prose-tells.gate +1 -1
- package/payload/canon-kit/checks/check-provenance-seam.gate +3 -0
- package/payload/canon-kit/checks/check-spec-derivable-section.gate +1 -1
- package/payload/canon-kit/checks/check-spec-dod-singleton.gate +1 -1
- package/payload/canon-kit/checks/check-spec-embedded-source.gate +1 -1
- package/payload/canon-kit/checks/check-spec-fence-balance.gate +1 -1
- package/payload/canon-kit/checks/check-spec-pointer.gate +2 -2
- package/payload/canon-kit/checks/check-surface-duplication.gate +3 -0
- package/payload/canon-kit/checks/check-todo-task-liveness.gate +1 -1
- package/payload/canon-kit/checks/check-tracking-claim.gate +1 -1
- package/payload/canon-kit/checks/check-unmarked-claim.gate +2 -1
- package/payload/canon-kit/gate-tests/check-amendment-queue/bad/SPEC-tidy.md +3 -0
- package/payload/canon-kit/gate-tests/check-amendment-queue/bad/TASK-QUEUE.md +37 -8
- package/payload/canon-kit/gate-tests/check-amendment-queue/bad/expect.txt +6 -3
- package/payload/canon-kit/gate-tests/check-amendment-queue/good/SPEC-widget.md +7 -0
- package/payload/canon-kit/gate-tests/check-amendment-queue/good/TASK-QUEUE.md +11 -3
- package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/bad/SPEC-nosection.md +16 -0
- package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/bad/SPEC-thing.md +26 -0
- package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/bad/expect.txt +8 -0
- package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/bad/surface/one.md +4 -0
- package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/bad/surface/two.md +3 -0
- package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/SPEC-tidy.md +20 -0
- package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/SPEC-widget.md +37 -0
- package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/component/README.md +4 -0
- package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/component/SPEC.md +4 -0
- package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-amendment-retired-spelling/good/unnamed.md +4 -0
- package/payload/canon-kit/gate-tests/check-amendment-update-target.test.sh +1 -1
- package/payload/canon-kit/gate-tests/check-citation-link/bad/expect.txt +6 -0
- package/payload/canon-kit/gate-tests/check-citation-link/bad/scripts/canon-config.knobs +2 -0
- package/payload/canon-kit/gate-tests/check-citation-link/bad/site/page.md +13 -0
- package/payload/canon-kit/gate-tests/check-citation-link/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-citation-link/good/scripts/canon-config.knobs +2 -0
- package/payload/canon-kit/gate-tests/check-citation-link/good/site/page.md +28 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/bad/.github/workflows/ci.yml +15 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/bad/expect.txt +2 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/bad/scripts/canon-config.knobs +2 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/good/.github/workflows/ci.yml +23 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/good/config.yml +2 -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.sh +1 -1
- package/payload/canon-kit/gate-tests/check-comment-tier/good/scripts/canon-config.knobs +2 -0
- package/payload/canon-kit/gate-tests/check-comment-tier.test.sh +37 -26
- package/payload/canon-kit/gate-tests/check-deprecation-task/bad/TASK-QUEUE.md +3 -1
- package/payload/canon-kit/gate-tests/check-deprecation-task/bad/scripts/canon-config.knobs +2 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/good/TASK-QUEUE.md +6 -2
- package/payload/canon-kit/gate-tests/check-deprecation-task/good/expect.txt +1 -1
- package/payload/canon-kit/gate-tests/check-deprecation-task/good/scripts/canon-config.knobs +2 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task.test.sh +12 -10
- package/payload/canon-kit/gate-tests/check-docs-cmd/good/doc.md +4 -1
- package/payload/canon-kit/gate-tests/check-docs-cmd.test.sh +61 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention/bad/expect.txt +3 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention.test.sh +21 -2
- package/payload/canon-kit/gate-tests/check-docs-page-repeat/bad/expect.txt +2 -0
- package/payload/canon-kit/gate-tests/check-docs-page-repeat/bad/scripts/canon-config.knobs +2 -0
- package/payload/canon-kit/gate-tests/check-docs-page-repeat/bad/site/page.md +8 -0
- package/payload/canon-kit/gate-tests/check-docs-page-repeat/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-docs-page-repeat/good/scripts/canon-config.knobs +2 -0
- package/payload/canon-kit/gate-tests/check-docs-page-repeat/good/site/page.md +24 -0
- package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/expect.txt +2 -0
- package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/kit/README.md +10 -0
- package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/kit/index.md +11 -0
- package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/scripts/canon-config.knobs +2 -0
- package/payload/canon-kit/gate-tests/check-docs-restatement-parity/bad/scripts/gate-sdk-config.knobs +2 -0
- package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/kit/README.md +12 -0
- package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/kit/index.md +13 -0
- package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/scripts/canon-config.knobs +2 -0
- package/payload/canon-kit/gate-tests/check-docs-restatement-parity/good/scripts/gate-sdk-config.knobs +2 -0
- package/payload/canon-kit/gate-tests/check-fence-command-head/bad/args +1 -0
- package/payload/canon-kit/gate-tests/check-fence-command-head/bad/doc.md +16 -0
- package/payload/canon-kit/gate-tests/check-fence-command-head/bad/expect.txt +5 -0
- package/payload/canon-kit/gate-tests/check-fence-command-head/good/args +1 -0
- package/payload/canon-kit/gate-tests/check-fence-command-head/good/bin/run.sh +3 -0
- package/payload/canon-kit/gate-tests/check-fence-command-head/good/doc.md +41 -0
- package/payload/canon-kit/gate-tests/check-fence-command-head/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-fence-command-head/good/lib/tool.sh +5 -0
- package/payload/canon-kit/gate-tests/check-fence-command-head/good/scripts/canon-config.knobs +2 -0
- package/payload/canon-kit/gate-tests/check-fence-run/bad/args +1 -0
- package/payload/canon-kit/gate-tests/check-fence-run/bad/doc.md +32 -0
- package/payload/canon-kit/gate-tests/check-fence-run/bad/expect.txt +7 -0
- package/payload/canon-kit/gate-tests/check-fence-run/good/args +1 -0
- package/payload/canon-kit/gate-tests/check-fence-run/good/doc.md +31 -0
- package/payload/canon-kit/gate-tests/check-fence-run/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-install-claim/bad/scripts/canon-config.knobs +7 -0
- package/payload/canon-kit/gate-tests/check-install-claim/good/scripts/canon-config.knobs +7 -0
- package/payload/canon-kit/gate-tests/check-knob-citation.test.sh +42 -7
- package/payload/canon-kit/gate-tests/check-knob-default-coupling/bad/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +1 -2
- package/payload/canon-kit/gate-tests/check-knob-default-coupling/good/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +2 -3
- package/payload/canon-kit/gate-tests/check-knob-default-coupling.test.sh +37 -8
- package/payload/canon-kit/gate-tests/check-manifest-count/bad/SPEC.md +3 -0
- package/payload/canon-kit/gate-tests/check-manifest-count/good/SPEC.md +10 -0
- package/payload/canon-kit/gate-tests/check-manifest-count.test.sh +6 -6
- package/payload/canon-kit/gate-tests/check-md-refs.test.sh +1 -1
- package/payload/canon-kit/gate-tests/check-md-unwrapped/bad/doc.md +13 -0
- package/payload/canon-kit/gate-tests/check-md-unwrapped/bad/expect.txt +4 -0
- package/payload/canon-kit/gate-tests/check-md-unwrapped/bad/scripts/canon-config.knobs +2 -0
- package/payload/canon-kit/gate-tests/check-md-unwrapped/good/doc.md +45 -0
- package/payload/canon-kit/gate-tests/check-md-unwrapped/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-md-unwrapped/good/scripts/canon-config.knobs +4 -0
- package/payload/canon-kit/gate-tests/check-measured-claim/bad/SPEC.md +3 -0
- package/payload/canon-kit/gate-tests/check-measured-claim/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-measured-claim/bad/scripts/canon-config.knobs +4 -0
- package/payload/canon-kit/gate-tests/check-measured-claim/good/SPEC.md +8 -0
- package/payload/canon-kit/gate-tests/check-measured-claim/good/scripts/canon-config.knobs +4 -0
- package/payload/canon-kit/gate-tests/check-measured-claim/good/worktrees/SPEC.md +12 -0
- package/payload/canon-kit/gate-tests/check-measured-claim.test.sh +32 -13
- package/payload/canon-kit/gate-tests/check-payload-claim/bad/scripts/canon-config.knobs +6 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/good/scripts/canon-config.knobs +6 -0
- package/payload/canon-kit/gate-tests/check-prose-bounds/bad/CLAUDE.md +9 -0
- package/payload/canon-kit/gate-tests/check-prose-bounds/bad/SPEC.md +11 -0
- package/payload/canon-kit/gate-tests/check-prose-bounds/bad/expect.txt +3 -0
- package/payload/canon-kit/gate-tests/check-prose-bounds/bad/scripts/canon-config.knobs +3 -0
- package/payload/canon-kit/gate-tests/check-prose-bounds/good/CLAUDE.md +10 -0
- package/payload/canon-kit/gate-tests/check-prose-bounds/good/SPEC.md +27 -0
- package/payload/canon-kit/gate-tests/check-prose-bounds/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-prose-bounds/good/scripts/canon-config.knobs +3 -0
- package/payload/canon-kit/gate-tests/check-prose-bounds.test.sh +98 -0
- package/payload/canon-kit/gate-tests/check-prose-enum/bad/scripts/canon-config.knobs +3 -0
- package/payload/canon-kit/gate-tests/check-prose-enum/good/scripts/canon-config.knobs +3 -0
- package/payload/canon-kit/gate-tests/check-prose-enum.test.sh +55 -25
- package/payload/canon-kit/gate-tests/check-prose-tells/bad/prose.md +2 -0
- package/payload/canon-kit/gate-tests/check-prose-tells/bad/scripts/canon-config.knobs +5 -0
- package/payload/canon-kit/gate-tests/check-prose-tells/good/prose.md +6 -0
- package/payload/canon-kit/gate-tests/check-prose-tells/good/scripts/{canon-config.sh → canon-config.knobs} +2 -5
- package/payload/canon-kit/gate-tests/check-prose-tells/good/worktrees/prose.md +17 -0
- package/payload/canon-kit/gate-tests/check-provenance-seam/bad/TASK-QUEUE.md +15 -0
- package/payload/canon-kit/gate-tests/check-provenance-seam/bad/expect.txt +8 -0
- package/payload/canon-kit/gate-tests/check-provenance-seam/bad/scripts/canon-config.knobs +3 -0
- package/payload/canon-kit/gate-tests/check-provenance-seam/bad/scripts/gate-sdk-config.knobs +2 -0
- package/payload/canon-kit/gate-tests/check-provenance-seam/bad/scripts/lifecycle-config.knobs +12 -0
- package/payload/canon-kit/gate-tests/check-provenance-seam/bad/widget-toolkit/SPEC.md +27 -0
- package/payload/canon-kit/gate-tests/check-provenance-seam/good/TASK-QUEUE.md +15 -0
- package/payload/canon-kit/gate-tests/check-provenance-seam/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-provenance-seam/good/scripts/canon-config.knobs +3 -0
- package/payload/canon-kit/gate-tests/check-provenance-seam/good/scripts/gate-sdk-config.knobs +2 -0
- package/payload/canon-kit/gate-tests/check-provenance-seam/good/scripts/lifecycle-config.knobs +12 -0
- package/payload/canon-kit/gate-tests/check-provenance-seam/good/widget-toolkit/SPEC.md +20 -0
- package/payload/canon-kit/gate-tests/check-provenance-seam.test.sh +136 -0
- package/payload/canon-kit/gate-tests/check-spec-dod-singleton.test.sh +1 -1
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/README.md +6 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/SPEC-widget.md +5 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/bad.rs +2 -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/scripts/canon-config.knobs +6 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/README.md +15 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/SPEC-widget.md +10 -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.rs +2 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/scripts/canon-config.knobs +6 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/vendored-kit/notes.txt +4 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/TASK-QUEUE.md +3 -1
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/TASK-QUEUE.md +9 -3
- package/payload/canon-kit/gate-tests/check-tracking-claim.test.sh +1 -1
- package/payload/canon-kit/gate-tests/check-unmarked-claim/bad/SPEC.md +3 -0
- package/payload/canon-kit/gate-tests/check-unmarked-claim/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-unmarked-claim/bad/scripts/canon-config.knobs +4 -0
- package/payload/canon-kit/gate-tests/check-unmarked-claim/good/SPEC.md +3 -0
- package/payload/canon-kit/gate-tests/check-unmarked-claim/good/scripts/canon-config.knobs +4 -0
- package/payload/canon-kit/gate-tests/check-unmarked-claim/good/worktrees/SPEC.md +11 -0
- package/payload/canon-kit/gate-tests/check-unmarked-claim.test.sh +53 -28
- package/payload/canon-kit/templates/SPEC-amendment.md +46 -25
- package/payload/canon-kit/templates/canon-config.knobs +1 -0
- package/payload/context-kit/README.md +33 -61
- package/payload/context-kit/checks/check-brevity.gate +2 -2
- package/payload/context-kit/checks/check-footprint-fresh.gate +3 -2
- package/payload/context-kit/checks/check-memory-off.gate +1 -1
- package/payload/context-kit/checks/check-settings-paths.gate +2 -2
- package/payload/context-kit/checks/check-settings-pins.gate +1 -1
- package/payload/context-kit/checks/check-surface-ratchet.gate +3 -0
- package/payload/context-kit/gate-tests/check-brevity/bad/CLAUDE.md +9 -2
- package/payload/context-kit/gate-tests/check-brevity/bad/expect.txt +1 -0
- package/payload/context-kit/gate-tests/check-brevity/good/CLAUDE.md +9 -4
- package/payload/context-kit/gate-tests/check-brevity/good/expect.txt +1 -1
- package/payload/context-kit/gate-tests/check-brevity.test.sh +107 -24
- package/payload/context-kit/gate-tests/check-footprint-fresh/good/CLAUDE.md +6 -0
- package/payload/context-kit/gate-tests/check-footprint-fresh/good/demo-kit/SPEC.md +3 -0
- package/payload/context-kit/gate-tests/check-footprint-fresh/good/demo-kit/templates/guide.md +3 -0
- package/payload/context-kit/gate-tests/check-footprint-fresh/good/docs/footprint.md +32 -0
- package/payload/context-kit/gate-tests/check-memory-off/bad/scripts/{context-config.sh → context-config.knobs} +1 -3
- package/payload/context-kit/gate-tests/check-memory-off/good/scripts/{context-config.sh → context-config.knobs} +1 -3
- package/payload/context-kit/gate-tests/check-memory-off.test.sh +1 -1
- package/payload/context-kit/gate-tests/check-settings-paths/bad/expect.txt +2 -0
- package/payload/context-kit/gate-tests/check-settings-paths/bad/settings.json +21 -0
- package/payload/context-kit/gate-tests/check-settings-paths/bad/tools/run-gates.sh +4 -0
- package/payload/context-kit/gate-tests/check-settings-paths/good/expect.txt +2 -1
- package/payload/context-kit/gate-tests/check-settings-paths/good/settings.json +48 -1
- package/payload/context-kit/gate-tests/check-settings-paths/good/tools/run-gates.sh +4 -0
- package/payload/context-kit/gate-tests/check-settings-pins.test.sh +1 -1
- package/payload/context-kit/gate-tests/check-surface-ratchet/bad/CLAUDE.md +5 -0
- package/payload/context-kit/gate-tests/check-surface-ratchet/bad/expect.txt +2 -0
- package/payload/context-kit/gate-tests/check-surface-ratchet/bad/scripts/context-config.knobs +4 -0
- package/payload/context-kit/gate-tests/check-surface-ratchet/bad/surface-ceiling.txt +2 -0
- package/payload/context-kit/gate-tests/check-surface-ratchet/bad/templates/ungoverned.md +3 -0
- package/payload/context-kit/gate-tests/check-surface-ratchet/good/CLAUDE.md +3 -0
- package/payload/context-kit/gate-tests/check-surface-ratchet/good/expect.txt +1 -0
- package/payload/context-kit/gate-tests/check-surface-ratchet/good/scripts/context-config.knobs +4 -0
- package/payload/context-kit/gate-tests/check-surface-ratchet/good/surface-ceiling.txt +4 -0
- package/payload/context-kit/gate-tests/check-surface-ratchet/good/templates/held.md +4 -0
- package/payload/context-kit/gate-tests/check-surface-ratchet.test.sh +76 -0
- package/payload/context-kit/index-tests/corpus/baseline.txt +1 -1
- package/payload/context-kit/index-tests/corpus/surface.md +1 -6
- package/payload/context-kit/index-tests/expected/always-loaded.txt +1 -1
- package/payload/context-kit/templates/close-brevity.md +9 -28
- package/payload/context-kit/templates/context-config.knobs +1 -0
- package/payload/context-kit/templates/session-context.sh +44 -29
- package/payload/delegation-kit/README.md +35 -69
- package/payload/delegation-kit/checks/check-agent-tier-explicit.gate +1 -1
- package/payload/delegation-kit/checks/check-gate-tamper.gate +1 -1
- package/payload/delegation-kit/gate-tests/check-gate-tamper.test.sh +23 -2
- package/payload/delegation-kit/templates/agent-execution.md +23 -389
- package/payload/delegation-kit/templates/delegation-config.knobs +4 -0
- package/payload/delegation-kit/templates/dispatch-checklists.md +8 -45
- package/payload/delegation-kit/usage-tests/dispatch-guard-cases.tsv +33 -17
- package/payload/doctrine-kit/DOCTRINE.md +92 -458
- package/payload/doctrine-kit/README.md +24 -55
- package/payload/doctrine-kit/checks/check-doctrine-registration.gate +1 -1
- package/payload/doctrine-kit/gate-tests/check-doctrine-registration.test.sh +48 -3
- package/payload/drift-kit/README.md +43 -89
- package/payload/drift-kit/templates/close-knowledge.md +7 -22
- package/payload/drift-kit/templates/drift-config.knobs +1 -0
- package/payload/drift-kit/templates/economics.md +10 -48
- package/payload/drift-kit/templates/kpi-deprecated-surface.sh +31 -9
- package/payload/drift-kit/templates/kpis.list +2 -1
- package/payload/drift-kit/templates/price-table.tsv +1 -1
- package/payload/evidence-kit/README.md +24 -43
- package/payload/evidence-kit/checks/check-battery-roster.gate +1 -1
- package/payload/evidence-kit/checks/check-evidence-baseline.gate +2 -2
- package/payload/evidence-kit/checks/check-evidence-manifest.gate +1 -1
- package/payload/evidence-kit/checks/check-producer-liveness.gate +3 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/bad/scripts/evidence-config.knobs +7 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/good/scripts/evidence-config.knobs +7 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster.test.sh +7 -7
- package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/TASK-QUEUE.md +3 -1
- package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/args +1 -0
- package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/expect.txt +2 -0
- package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/scripts/evidence-config.knobs +4 -0
- package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/validate-baseline.txt +1 -0
- package/payload/evidence-kit/gate-tests/check-evidence-baseline/good/TASK-QUEUE.md +3 -1
- package/payload/evidence-kit/gate-tests/check-evidence-baseline/good/args +1 -0
- package/payload/evidence-kit/gate-tests/check-evidence-baseline/good/scripts/evidence-config.knobs +3 -0
- package/payload/evidence-kit/gate-tests/check-evidence-baseline.test.sh +134 -14
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/scripts/{evidence-config.sh → evidence-config.knobs} +3 -5
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/scripts/{evidence-config.sh → evidence-config.knobs} +3 -5
- package/payload/evidence-kit/gate-tests/check-evidence-manifest.test.sh +5 -4
- package/payload/evidence-kit/gate-tests/diff-baseline-status.test.sh +128 -0
- package/payload/evidence-kit/gate-tests/evidence-lib.test.sh +51 -45
- package/payload/evidence-kit/gate-tests/pre-hook.test.sh +66 -0
- package/payload/evidence-kit/gate-tests/producer-lock.test.sh +29 -16
- package/payload/evidence-kit/templates/evidence-config.knobs +1 -0
- package/payload/gate-sdk/README.md +48 -79
- package/payload/gate-sdk/bin/build-native.sh +27 -4
- package/payload/gate-sdk/bin/run-gates.ps1 +266 -0
- package/payload/gate-sdk/bin/run-gates.sh +53 -277
- package/payload/gate-sdk/checks/check-action-gh-repo.gate +1 -1
- package/payload/gate-sdk/checks/check-action-job-ref.gate +3 -0
- package/payload/gate-sdk/checks/check-action-permissions.gate +3 -0
- package/payload/gate-sdk/checks/check-action-pinning.gate +1 -1
- package/payload/gate-sdk/checks/check-action-run-path.gate +3 -0
- package/payload/gate-sdk/checks/check-action-run-shell.gate +3 -0
- package/payload/gate-sdk/checks/check-commit-msg.gate +2 -1
- package/payload/gate-sdk/checks/check-commit-subject.gate +1 -1
- package/payload/gate-sdk/checks/check-core-files.gate +1 -1
- package/payload/gate-sdk/checks/check-crate-arms.gate +3 -0
- package/payload/gate-sdk/checks/check-enforcement-fresh.gate +3 -2
- package/payload/gate-sdk/checks/check-exec-bit.gate +1 -1
- package/payload/gate-sdk/checks/check-front-end-fail-open.gate +3 -0
- package/payload/gate-sdk/checks/check-gate-assertions.gate +2 -2
- package/payload/gate-sdk/checks/check-gate-binary-fresh.gate +1 -1
- package/payload/gate-sdk/checks/check-gate-exemption-tasks.gate +1 -1
- package/payload/gate-sdk/checks/check-gate-fail-closed.gate +1 -1
- package/payload/gate-sdk/checks/check-gate-fixture-coverage.gate +1 -1
- package/payload/gate-sdk/checks/check-gate-output.gate +1 -1
- package/payload/gate-sdk/checks/check-gate-substrate-parity.gate +3 -0
- package/payload/gate-sdk/checks/check-graph.gate +2 -1
- package/payload/gate-sdk/checks/check-hook-exec-bit.gate +1 -1
- package/payload/gate-sdk/checks/check-identity.gate +1 -1
- package/payload/gate-sdk/checks/check-install-disposition.gate +3 -0
- package/payload/gate-sdk/checks/check-kit-enum.gate +1 -1
- package/payload/gate-sdk/checks/check-kit-registration.gate +1 -1
- package/payload/gate-sdk/checks/check-kit-roots-dialect.gate +3 -0
- package/payload/gate-sdk/checks/check-packed-links.gate +3 -0
- package/payload/gate-sdk/checks/check-path-dialect.gate +3 -0
- package/payload/gate-sdk/checks/check-pipe-membership.gate +3 -0
- package/payload/gate-sdk/checks/check-portability-floor.gate +4 -0
- package/payload/gate-sdk/checks/check-projection-roster.gate +4 -0
- package/payload/gate-sdk/checks/check-reads-couples.gate +1 -1
- package/payload/gate-sdk/checks/check-root-tiering.gate +1 -1
- package/payload/gate-sdk/checks/check-shellcheck.gate +3 -0
- package/payload/gate-sdk/checks/check-template-copy-parity.gate +1 -1
- package/payload/gate-sdk/checks/check-tree-terms.gate +2 -1
- package/payload/gate-sdk/checks/check-workflow-tiering.gate +1 -1
- package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/args +2 -0
- package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/scripts/gate-sdk-config.knobs +1 -0
- package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/tree/notes.md +3 -0
- package/payload/gate-sdk/gate-tests/check-action-job-ref/bad/tree/workflows/ci.yml +8 -0
- package/payload/gate-sdk/gate-tests/check-action-job-ref/good/args +3 -0
- package/payload/gate-sdk/gate-tests/check-action-job-ref/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-action-job-ref/good/scripts/gate-sdk-config.knobs +1 -0
- package/payload/gate-sdk/gate-tests/check-action-job-ref/good/tree/notes.md +3 -0
- package/payload/gate-sdk/gate-tests/check-action-job-ref/good/tree/workflows/ci.yml +8 -0
- package/payload/gate-sdk/gate-tests/check-action-permissions/bad/args +3 -0
- package/payload/gate-sdk/gate-tests/check-action-permissions/bad/expect.txt +5 -0
- package/payload/gate-sdk/gate-tests/check-action-permissions/bad/tree/workflows/empty-allowlist.yml +29 -0
- package/payload/gate-sdk/gate-tests/check-action-permissions/bad/tree/workflows/gates.yml +25 -0
- package/payload/gate-sdk/gate-tests/check-action-permissions/good/args +5 -0
- package/payload/gate-sdk/gate-tests/check-action-permissions/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-action-permissions/good/tree/action.yml +9 -0
- package/payload/gate-sdk/gate-tests/check-action-permissions/good/tree/not-actions.yml +7 -0
- package/payload/gate-sdk/gate-tests/check-action-permissions/good/tree/workflows/declared.yml +69 -0
- package/payload/gate-sdk/gate-tests/check-action-permissions/good/tree/workflows/valves.yml +22 -0
- package/payload/gate-sdk/gate-tests/check-action-run-path/bad/args +4 -0
- package/payload/gate-sdk/gate-tests/check-action-run-path/bad/expect.txt +2 -0
- package/payload/gate-sdk/gate-tests/check-action-run-path/bad/tree/scripts/present.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-action-run-path/bad/tree/workflows/ci.yml +14 -0
- package/payload/gate-sdk/gate-tests/check-action-run-path/good/args +5 -0
- package/payload/gate-sdk/gate-tests/check-action-run-path/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-action-run-path/good/tree/scripts/build.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-action-run-path/good/tree/sub/scripts/inner.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-action-run-path/good/tree/workflows/ci.yml +36 -0
- package/payload/gate-sdk/gate-tests/check-action-run-shell/bad/args +4 -2
- package/payload/gate-sdk/gate-tests/check-action-run-shell/bad/expect.txt +2 -0
- package/payload/gate-sdk/gate-tests/check-action-run-shell/bad/tree/workflows/runner-dialect.yml +36 -0
- package/payload/gate-sdk/gate-tests/check-action-run-shell/good/args +3 -2
- package/payload/gate-sdk/gate-tests/check-action-run-shell/good/expect.txt +1 -1
- package/payload/gate-sdk/gate-tests/check-action-run-shell/good/tree/workflows/runner-dialect.yml +71 -0
- package/payload/gate-sdk/gate-tests/check-action-run-shell.test.sh +102 -9
- package/payload/gate-sdk/gate-tests/check-assertion-strength/bad/smoke/install.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-assertion-strength/good/smoke/install.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-assertion-strength.test.sh +55 -0
- package/payload/gate-sdk/gate-tests/check-commit-msg/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-commit-msg/bad/msg.txt +4 -0
- package/payload/gate-sdk/gate-tests/check-commit-msg/bad/patterns.list +5 -1
- package/payload/gate-sdk/gate-tests/check-commit-msg/good/msg.txt +7 -0
- package/payload/gate-sdk/gate-tests/check-commit-msg/good/patterns.list +5 -1
- package/payload/gate-sdk/gate-tests/check-commit-subject.test.sh +2 -2
- package/payload/gate-sdk/gate-tests/check-core-files.test.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-crate-arms/bad/scripts/gate-sdk-config.knobs +3 -0
- package/payload/gate-sdk/gate-tests/check-crate-arms/good/scripts/gate-sdk-config.knobs +3 -0
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/demo-kit/SPEC.md +3 -0
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/demo-kit/checks/check-demo.gate +1 -0
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/demo-kit/probe.conf +1 -0
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/demo-kit/templates/guide.md +3 -0
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/docs/enforcement.md +33 -0
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/scripts/gate-sdk-config.knobs +1 -0
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/scripts/gates.list +1 -0
- package/payload/gate-sdk/gate-tests/check-exec-bit.test.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-front-end-fail-open/bad/args +3 -0
- package/payload/gate-sdk/gate-tests/check-front-end-fail-open/bad/expect.txt +2 -0
- package/payload/gate-sdk/gate-tests/check-front-end-fail-open/bad/gate-sdk/bin/run-gates.ps1 +5 -0
- package/payload/gate-sdk/gate-tests/check-front-end-fail-open/bad/gate-sdk/bin/run-gates.sh +9 -0
- package/payload/gate-sdk/gate-tests/check-front-end-fail-open/good/args +4 -0
- package/payload/gate-sdk/gate-tests/check-front-end-fail-open/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-front-end-fail-open/good/gate-sdk/bin/run-gates.ps1 +5 -0
- package/payload/gate-sdk/gate-tests/check-front-end-fail-open/good/gate-sdk/bin/run-gates.sh +9 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/good/scripts/SPEC.md +4 -1
- package/payload/gate-sdk/gate-tests/check-gate-assertions.test.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/gate-sdk-config.knobs +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/gate-sdk-config.knobs +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh.test.sh +6 -12
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/TASK-QUEUE.md +5 -3
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/TASK-QUEUE.md +3 -1
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks.test.sh +4 -2
- package/payload/gate-sdk/gate-tests/check-gate-output.test.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/ci/build-artifact.sh +9 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/ci.yml +9 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/expect.txt +4 -2
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gate-sdk-config.knobs +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gates.list +6 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/ci/build-artifact.sh +9 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/ci.yml +16 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/expect.txt +7 -3
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gate-sdk-config.knobs +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gates.list +1 -1
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity.test.sh +222 -197
- package/payload/gate-sdk/gate-tests/check-graph/bad/SPEC-example-gate.md +7 -2
- package/payload/gate-sdk/gate-tests/check-graph/bad/expect.txt +4 -0
- package/payload/gate-sdk/gate-tests/check-graph/good/SPEC-second-gate.md +3 -1
- package/payload/gate-sdk/gate-tests/check-graph-cap.test.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-graph-refs.test.sh +8 -8
- package/payload/gate-sdk/gate-tests/check-graph-theme.test.sh +2 -2
- package/payload/gate-sdk/gate-tests/check-graph-tree.test.sh +49 -14
- package/payload/gate-sdk/gate-tests/check-identity/bad/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +4 -4
- package/payload/gate-sdk/gate-tests/check-identity/good/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +4 -4
- package/payload/gate-sdk/gate-tests/check-identity.test.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-eta.sh +7 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-iota.sh +7 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-theta.sh +7 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/checks/check-zeta.gate +3 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/alpha-kit/smoke/install.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/args +8 -5
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/expect.txt +5 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/native/src/installer/recipe.rs +10 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +2 -3
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/args +8 -4
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/expect.txt +2 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/scripts/{gate-sdk-config.sh → gate-sdk-config.knobs} +2 -3
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/{alpha-kit → site-kit}/checks/check-alpha.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/site-kit/checks/check-beta.gate +3 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/site-kit/checks/check-gamma.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/site-kit/checks/check-omega.sh +7 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/site-kit/checks/check-psi.sh +7 -0
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/{alpha-kit → site-kit}/smoke/install.sh +2 -2
- package/payload/gate-sdk/gate-tests/check-kit-registration/bad/registry-doc.md +15 -12
- package/payload/gate-sdk/gate-tests/check-kit-registration/good/args +7 -5
- package/payload/gate-sdk/gate-tests/check-kit-registration/good/scripts/gate-sdk-config.knobs +2 -0
- package/payload/gate-sdk/gate-tests/check-kit-registration.test.sh +2 -2
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/args +5 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/alpha-kit/checks/placeholder.txt +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/alpha-kit/gate-tests/alpha.test.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/alpha-kit/lib/alpha.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/beta-kit/checks/placeholder.txt +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/beta-kit/gate-tests/beta.test.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/beta-kit/lib/beta.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/gate-sdk/checks/placeholder.txt +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/gate-sdk/lib/gate.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/scripts/gate-sdk-config.knobs +7 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/bad/tree/scripts/gates.list +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/args +7 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/alpha-kit/checks/placeholder.txt +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/alpha-kit/gate-tests/alpha.test.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/alpha-kit/lib/alpha.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/beta-kit/checks/placeholder.txt +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/beta-kit/gate-tests/beta.test.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/beta-kit/lib/beta.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/gate-sdk/checks/placeholder.txt +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/gate-sdk/lib/gate.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-roots-dialect/good/tree/scripts/gates.list +3 -0
- package/payload/gate-sdk/gate-tests/check-packed-links/bad/alpha-kit/README.md +5 -0
- package/payload/gate-sdk/gate-tests/check-packed-links/bad/args +5 -0
- package/payload/gate-sdk/gate-tests/check-packed-links/bad/beta-kit/README.md +5 -0
- package/payload/gate-sdk/gate-tests/check-packed-links/bad/expect.txt +2 -0
- package/payload/gate-sdk/gate-tests/check-packed-links/bad/scripts/gate-sdk-config.knobs +4 -0
- package/payload/gate-sdk/gate-tests/check-packed-links/good/alpha-kit/README.md +5 -0
- package/payload/gate-sdk/gate-tests/check-packed-links/good/args +8 -0
- package/payload/gate-sdk/gate-tests/check-packed-links/good/beta-kit/README.md +9 -0
- package/payload/gate-sdk/gate-tests/check-packed-links/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-packed-links/good/gamma-kit/SPEC.md +4 -0
- package/payload/gate-sdk/gate-tests/check-packed-links/good/scripts/gate-sdk-config.knobs +6 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/bad/args +3 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/bad/expect.txt +15 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/bad/native/src/primitive.rs +19 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/bad/native/src/producer.rs +8 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/bad/native/src/walk.rs +13 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/bound-root.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/case-arm.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/commented.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/common-dir.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/glob-test.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/late-anchor.sh +7 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/logical-readback.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/probe.sh +7 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/bad/tree/two-root.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/args +3 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/expect.txt +13 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/commented.rs +5 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/local.rs +12 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/namespace.rs +11 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/typed.rs +10 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/verdict.rs +5 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/native/src/walk.rs +24 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/anchored.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/cd-only.sh +7 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/commented.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/one-root.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/probe.sh +8 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/rooted.sh +23 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/subshell.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/two-line.sh +8 -0
- package/payload/gate-sdk/gate-tests/check-path-dialect/good/tree/verdict.sh +7 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/args +4 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/expect.txt +6 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/scripts/gate-sdk-config.knobs +1 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/array-grep.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/echo-max-count.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/gate-tests/membership.test.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/loop-head.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/bad/tree/tests/relocated.test.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/good/args +5 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/good/expect.txt +3 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/full-reader.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/gate-tests/check-x/bad/violating.test.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/gate-tests/clean.test.sh +8 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/loop-membership.sh +8 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/no-pipefail.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-pipe-membership/good/tree/one-line-producer.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/bad/args +2 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/bad/expect.txt +8 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/bad/patterns.list +4 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/bad/scripts/gate-sdk-config.knobs +4 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/bad/tree/empty-reason-verb +5 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/bad/tree/strings.ps1 +6 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/bad/tree/too-far-verb +5 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/bad/tree/undeclared-verb +3 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/good/args +2 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/good/patterns.list +5 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/good/scripts/gate-sdk-config.knobs +4 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/good/tree/front.ps1 +7 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/good/tree/plain-verb +5 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/good/tree/portability-patterns.list +5 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor/good/tree/upgrade-verb +7 -0
- package/payload/gate-sdk/gate-tests/check-portability-floor.test.sh +154 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/bad/demo-kit/checks/check-beta.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/bad/docs/roster.md +11 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/bad/expect.txt +7 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/check-alpha.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/check-gamma.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/check-plain.gate +1 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/gate-sdk-config.knobs +3 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/bad/scripts/gates.list +4 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/good/demo-kit/checks/check-beta.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/good/docs/roster.md +16 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/check-alpha.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/check-delta.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/check-epsilon.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/check-plain.gate +1 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/gate-sdk-config.knobs +4 -0
- package/payload/gate-sdk/gate-tests/check-projection-roster/good/scripts/gates.list +5 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/scripts/gate-sdk-config.knobs +4 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/args +1 -1
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/scripts/gate-sdk-config.knobs +4 -0
- package/payload/gate-sdk/gate-tests/check-reads-couples/bad/expect.txt +1 -1
- package/payload/gate-sdk/gate-tests/check-reads-couples/bad/sandbox-gate.sh +4 -4
- package/payload/gate-sdk/gate-tests/check-reads-couples/good/sandbox-gate.sh +4 -4
- package/payload/gate-sdk/gate-tests/check-reads-couples.test.sh +25 -20
- package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/bad/alpha-kit/smoke/install.sh +1 -1
- package/payload/gate-sdk/gate-tests/{check-template-registry-parity/bad/scripts/gate-sdk-config.sh → check-smoke-entry-guard/bad/scripts/gate-sdk-config.knobs} +2 -3
- package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/alpha-kit/smoke/install.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/alpha-kit/smoke/violation.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/args +1 -1
- package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/beta-kit/smoke/install.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/scripts/gate-sdk-config.knobs +4 -0
- package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/args +3 -1
- package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/delegation-kit/templates/session-note.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/expect.txt +1 -1
- package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/scripts/session-note.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-template-copy-parity.test.sh +1 -1
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/args +2 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/drift-kit/templates/kpis.list +18 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/expect.txt +2 -0
- package/payload/gate-sdk/gate-tests/{check-smoke-entry-guard/bad/scripts/gate-sdk-config.sh → check-template-registry-parity/bad/scripts/gate-sdk-config.knobs} +2 -3
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/args +3 -1
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/drift-kit/templates/kpis.list +17 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/expect.txt +1 -1
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/scripts/gate-sdk-config.knobs +4 -0
- package/payload/gate-sdk/gate-tests/check-test-hermetic-smoke.test.sh +5 -5
- package/payload/gate-sdk/gate-tests/check-tree-terms/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/bad/patterns.list +4 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/bad/tree/accounts.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/good/expect.txt +1 -1
- package/payload/gate-sdk/gate-tests/check-tree-terms/good/patterns.list +5 -1
- package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/anchored.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/handles.txt +2 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms.test.sh +44 -5
- package/payload/gate-sdk/gate-tests/emit-arm-shape.test.sh +95 -0
- package/payload/gate-sdk/gate-tests/enforcement-map.test.sh +10 -10
- package/payload/gate-sdk/gate-tests/lib-gate.test.sh +10 -184
- package/payload/gate-sdk/gate-tests/reads-census.test.sh +96 -0
- package/payload/gate-sdk/gate-tests/run-arm-contract.test.sh +190 -0
- package/payload/gate-sdk/gate-tests/run-dispatch-streams.test.sh +64 -41
- package/payload/gate-sdk/gate-tests/run-for-path.test.sh +2 -2
- package/payload/gate-sdk/gate-tests/run-gate-tests.test.sh +121 -16
- package/payload/gate-sdk/gate-tests/run-gates-linked-worktree.test.sh +136 -0
- package/payload/gate-sdk/lib/gate.sh +231 -484
- package/payload/gate-sdk/lib/test-hermetic.sh +39 -9
- package/payload/gate-sdk/templates/check-skeleton.sh +3 -2
- package/payload/gate-sdk/templates/gates-workflow.yml +16 -32
- package/payload/gate-sdk/templates/msg-patterns.list +14 -5
- package/payload/gate-sdk/templates/portability-patterns.list +56 -0
- package/payload/guard-kit/README.md +43 -47
- package/payload/guard-kit/checks/check-door-binding.gate +3 -0
- package/payload/guard-kit/gate-tests/check-door-binding/bad/alpha-kit/README.md +6 -0
- package/payload/guard-kit/gate-tests/check-door-binding/bad/alpha-kit/templates/alpha-config.knobs +3 -0
- package/payload/guard-kit/gate-tests/check-door-binding/bad/args +5 -0
- package/payload/guard-kit/gate-tests/check-door-binding/bad/beta-kit/lib/beta.sh +6 -0
- package/payload/guard-kit/gate-tests/check-door-binding/bad/expect.txt +5 -0
- package/payload/guard-kit/gate-tests/check-door-binding/bad/scripts/gate-sdk-config.knobs +4 -0
- package/payload/guard-kit/gate-tests/check-door-binding/bad/scripts/guard-config.knobs +3 -0
- package/payload/guard-kit/gate-tests/check-door-binding/bad/site/banner.md +8 -0
- package/payload/guard-kit/gate-tests/check-door-binding/bad/site/landing.md +11 -0
- package/payload/guard-kit/gate-tests/check-door-binding/good/alpha-kit/README.md +8 -0
- package/payload/guard-kit/gate-tests/check-door-binding/good/alpha-kit/templates/settings-hooks.json +20 -0
- package/payload/guard-kit/gate-tests/check-door-binding/good/args +7 -0
- package/payload/guard-kit/gate-tests/check-door-binding/good/beta-kit/lib/beta.sh +6 -0
- package/payload/guard-kit/gate-tests/check-door-binding/good/expect.txt +1 -0
- package/payload/guard-kit/gate-tests/check-door-binding/good/scripts/gate-sdk-config.knobs +4 -0
- package/payload/guard-kit/gate-tests/check-door-binding/good/scripts/guard-config.knobs +3 -0
- package/payload/guard-kit/gate-tests/check-door-binding/good/site/mirror.md +12 -0
- package/payload/guard-kit/gate-tests/check-door-binding/good/site/register.md +24 -0
- package/payload/guard-kit/gate-tests/compare-settings-allow.test.sh +40 -27
- package/payload/guard-kit/gate-tests/consumer-rules.test.sh +189 -0
- package/payload/guard-kit/gate-tests/door-binding-corpus.test.sh +72 -0
- package/payload/guard-kit/gate-tests/git-mutation-under-producer.test.sh +48 -23
- package/payload/guard-kit/gate-tests/guard-config-knobs.test.sh +170 -0
- package/payload/guard-kit/gate-tests/rewrite.test.sh +73 -0
- package/payload/guard-kit/gate-tests/scan-prompts.test.sh +174 -8
- package/payload/guard-kit/gate-tests/scratch-run.test.sh +150 -13
- package/payload/guard-kit/gate-tests/worktree-confinement.test.sh +169 -0
- package/payload/guard-kit/guard-tests/background-cases.tsv +14 -5
- package/payload/guard-kit/guard-tests/cases.tsv +360 -54
- package/payload/guard-kit/guard-tests/powershell-background-cases.tsv +29 -0
- package/payload/guard-kit/guard-tests/powershell-cases.tsv +81 -0
- package/payload/guard-kit/templates/close-triage.md +15 -62
- package/payload/guard-kit/templates/guard-config.knobs +26 -0
- package/payload/guard-kit/templates/settings-allow.json +15 -0
- package/payload/guard-kit/templates/settings-hooks.json +5 -5
- package/payload/lifecycle-kit/README.md +50 -76
- package/payload/lifecycle-kit/checks/check-audit-roster.gate +3 -0
- package/payload/lifecycle-kit/checks/check-close-surfaces.gate +1 -1
- package/payload/lifecycle-kit/checks/check-dispatch-entry.gate +3 -0
- package/payload/lifecycle-kit/checks/check-gap-inbox-neutrality.gate +1 -1
- package/payload/lifecycle-kit/checks/check-lesson-disposition.gate +1 -1
- package/payload/lifecycle-kit/checks/check-lifecycle-registration.gate +1 -1
- package/payload/lifecycle-kit/checks/check-merge-attrs.gate +1 -1
- package/payload/lifecycle-kit/checks/check-scratch-citation.gate +1 -1
- package/payload/lifecycle-kit/checks/check-shim-restatement.gate +1 -1
- package/payload/lifecycle-kit/checks/check-skill-binding.gate +1 -1
- package/payload/lifecycle-kit/checks/check-stage-entry.gate +2 -2
- package/payload/lifecycle-kit/checks/check-stage-evidence.gate +1 -1
- package/payload/lifecycle-kit/checks/check-stage-skill-coverage.gate +2 -2
- package/payload/lifecycle-kit/checks/check-stamp-subject.gate +3 -0
- package/payload/lifecycle-kit/checks/check-survey-record.gate +2 -2
- package/payload/lifecycle-kit/gate-tests/boundary-scratch-wipe.test.sh +98 -21
- package/payload/lifecycle-kit/gate-tests/boundary-stage-journal.test.sh +196 -0
- package/payload/lifecycle-kit/gate-tests/boundary-worktree-refusal.test.sh +214 -0
- package/payload/lifecycle-kit/gate-tests/capture-linked-worktree.test.sh +53 -0
- package/payload/lifecycle-kit/gate-tests/check-audit-roster/bad/args +2 -0
- package/payload/lifecycle-kit/gate-tests/check-audit-roster/bad/expect.txt +6 -0
- package/payload/lifecycle-kit/gate-tests/check-audit-roster/bad/roster.txt +34 -0
- package/payload/lifecycle-kit/gate-tests/check-audit-roster/good/args +2 -0
- package/payload/lifecycle-kit/gate-tests/check-audit-roster/good/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-audit-roster/good/roster.txt +22 -0
- package/payload/lifecycle-kit/gate-tests/check-audit-roster.test.sh +101 -0
- package/payload/lifecycle-kit/gate-tests/check-close-surfaces/bad/scripts/lifecycle-config.knobs +2 -0
- package/payload/lifecycle-kit/gate-tests/check-close-surfaces/good/owners/worktrees/inbox.md +5 -0
- package/payload/lifecycle-kit/gate-tests/check-close-surfaces/good/scripts/lifecycle-config.knobs +2 -0
- package/payload/lifecycle-kit/gate-tests/check-close-surfaces.test.sh +21 -4
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/args +6 -0
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/head.txt +5 -0
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/marker.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/msg.txt +4 -0
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/paths.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/bad/staged.txt +5 -0
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/args +6 -0
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/head.txt +5 -0
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/marker.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/msg.txt +4 -0
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/paths.txt +2 -0
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry/good/staged.txt +6 -0
- package/payload/lifecycle-kit/gate-tests/check-dispatch-entry.test.sh +60 -0
- package/payload/lifecycle-kit/gate-tests/check-lesson-disposition.test.sh +1 -1
- package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration/bad/AGENT.md +1 -5
- package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration/good/AGENT.md +1 -5
- package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration.test.sh +1 -1
- package/payload/lifecycle-kit/gate-tests/check-merge-attrs.test.sh +2 -2
- package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/scripts/lifecycle-config.knobs +2 -0
- package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/scripts/lifecycle-config.knobs +2 -0
- package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/surfaces/worktrees/queue.md +13 -0
- package/payload/lifecycle-kit/gate-tests/check-shim-restatement.test.sh +1 -1
- package/payload/lifecycle-kit/gate-tests/check-skill-binding.test.sh +1 -1
- package/payload/lifecycle-kit/gate-tests/check-stage-entry.test.sh +165 -15
- package/payload/lifecycle-kit/gate-tests/check-stage-evidence.test.sh +27 -2
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/align.md +4 -1
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/build.md +4 -1
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/close.md +5 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/scope.md +4 -1
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/validate.md +1 -1
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/expect.txt +1 -1
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/align.md +4 -1
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/build.md +4 -1
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/close.md +4 -1
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/scope.md +4 -1
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/validate.md +4 -1
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage.test.sh +73 -0
- package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/args +4 -0
- package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/head.txt +5 -0
- package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/msg.txt +4 -0
- package/payload/lifecycle-kit/gate-tests/check-stamp-subject/bad/staged.txt +6 -0
- package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/args +4 -0
- package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/head.txt +5 -0
- package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/msg.txt +4 -0
- package/payload/lifecycle-kit/gate-tests/check-stamp-subject/good/staged.txt +7 -0
- package/payload/lifecycle-kit/gate-tests/check-stamp-subject.test.sh +59 -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 +33 -2
- package/payload/lifecycle-kit/gate-tests/check-survey-record/good/expect.txt +1 -1
- package/payload/lifecycle-kit/gate-tests/check-survey-record/good/record.md +19 -2
- package/payload/lifecycle-kit/gate-tests/check-survey-record.test.sh +66 -7
- package/payload/lifecycle-kit/gate-tests/dispatch-marker.test.sh +152 -0
- package/payload/lifecycle-kit/gate-tests/file-gap-recurrence.test.sh +23 -48
- package/payload/lifecycle-kit/gate-tests/gap-inbox-route.test.sh +7 -5
- package/payload/lifecycle-kit/gate-tests/lead-journal-open.test.sh +119 -0
- package/payload/lifecycle-kit/gate-tests/preflight-valve.test.sh +170 -0
- package/payload/lifecycle-kit/gate-tests/rename-iteration.test.sh +5 -3
- package/payload/lifecycle-kit/gate-tests/ruling-staleness.test.sh +89 -0
- package/payload/lifecycle-kit/gate-tests/stamp-before-write.test.sh +77 -0
- package/payload/lifecycle-kit/gate-tests/survey-record-entry.test.sh +12 -6
- package/payload/lifecycle-kit/templates/consult.md +9 -63
- package/payload/lifecycle-kit/templates/lead.md +147 -431
- package/payload/lifecycle-kit/templates/lifecycle-config.knobs +1 -0
- package/payload/lifecycle-kit/templates/release-sweep.md +6 -35
- package/payload/lifecycle-kit/templates/stages/align.md +14 -82
- package/payload/lifecycle-kit/templates/stages/build.md +30 -98
- package/payload/lifecycle-kit/templates/stages/close.md +21 -170
- package/payload/lifecycle-kit/templates/stages/scope.md +42 -167
- package/payload/lifecycle-kit/templates/stages/spec.md +31 -97
- package/payload/lifecycle-kit/templates/stages/validate.md +22 -59
- package/payload/lifecycle-kit/templates/upgrade.md +6 -37
- package/payload/queue-kit/README.md +33 -48
- package/payload/queue-kit/checks/check-deferred-board-tags.gate +3 -0
- package/payload/queue-kit/checks/check-queue-entry-budget.gate +2 -2
- package/payload/queue-kit/checks/check-queue-hygiene.gate +2 -2
- package/payload/queue-kit/checks/check-queue-prose-precondition.gate +1 -1
- package/payload/queue-kit/checks/check-queue-sections.gate +1 -1
- package/payload/queue-kit/checks/check-queue-slug-liveness.gate +2 -2
- package/payload/queue-kit/checks/check-queue-wrap.gate +2 -2
- package/payload/queue-kit/checks/check-roadmap-fresh.gate +3 -2
- package/payload/queue-kit/checks/check-tag-lead-line.gate +2 -2
- package/payload/queue-kit/checks/check-task-conservation.gate +1 -1
- package/payload/queue-kit/checks/check-task-names.gate +2 -2
- package/payload/queue-kit/gate-tests/check-deferred-board-tags/bad/TASK-QUEUE.md +41 -0
- package/payload/queue-kit/gate-tests/check-deferred-board-tags/bad/expect.txt +6 -0
- package/payload/queue-kit/gate-tests/check-deferred-board-tags/bad/widget-kit/README.md +3 -0
- package/payload/queue-kit/gate-tests/check-deferred-board-tags/good/TASK-QUEUE.md +39 -0
- package/payload/queue-kit/gate-tests/check-deferred-board-tags/good/expect.txt +1 -0
- package/payload/queue-kit/gate-tests/check-deferred-board-tags/good/widget-kit/README.md +3 -0
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/TASK-QUEUE.md +76 -31
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/expect.txt +12 -4
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/scripts/queue-config.knobs +4 -0
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/TASK-QUEUE.md +58 -19
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/expect.txt +8 -4
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/scripts/queue-config.knobs +4 -0
- package/payload/queue-kit/gate-tests/check-queue-entry-budget.test.sh +124 -0
- package/payload/queue-kit/gate-tests/check-queue-hygiene/bad/TASK-QUEUE.md +11 -1
- package/payload/queue-kit/gate-tests/check-queue-hygiene/bad/expect.txt +2 -0
- package/payload/queue-kit/gate-tests/check-queue-hygiene/good/TASK-QUEUE.md +30 -11
- package/payload/queue-kit/gate-tests/check-queue-prose-precondition/bad/TASK-QUEUE.md +3 -1
- package/payload/queue-kit/gate-tests/check-queue-prose-precondition/bad/expect.txt +1 -0
- package/payload/queue-kit/gate-tests/check-queue-prose-precondition/good/TASK-QUEUE.md +22 -6
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/TASK-QUEUE.md +3 -1
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/docs/page.md +1 -1
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/expect.txt +3 -1
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/scripts/queue-config.knobs +1 -0
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/TASK-QUEUE.md +6 -2
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/docs/page.md +3 -3
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/docs/worktrees/page.md +4 -0
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/scripts/queue-config.knobs +1 -0
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness.test.sh +100 -0
- package/payload/queue-kit/gate-tests/check-queue-wrap/bad/TASK-QUEUE.md +3 -1
- package/payload/queue-kit/gate-tests/check-queue-wrap/good/TASK-QUEUE.md +20 -6
- package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/TASK-QUEUE.md +15 -8
- package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/scripts/queue-config.knobs +5 -0
- package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/TASK-QUEUE.md +13 -6
- package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/scripts/queue-config.knobs +5 -0
- package/payload/queue-kit/gate-tests/check-tag-lead-line/bad/TASK-QUEUE.md +28 -7
- package/payload/queue-kit/gate-tests/check-tag-lead-line/bad/expect.txt +10 -2
- package/payload/queue-kit/gate-tests/check-tag-lead-line/good/TASK-QUEUE.md +30 -8
- package/payload/queue-kit/gate-tests/check-task-names/bad/TASK-QUEUE.md +18 -3
- package/payload/queue-kit/gate-tests/check-task-names/bad/expect.txt +9 -0
- package/payload/queue-kit/gate-tests/check-task-names/good/TASK-QUEUE.md +20 -6
- package/payload/queue-kit/gate-tests/entry-history.test.sh +197 -0
- package/payload/queue-kit/gate-tests/queue-counts.test.sh +77 -73
- package/payload/queue-kit/gate-tests/queue-edges.test.sh +168 -87
- package/payload/queue-kit/gate-tests/queue-index.test.sh +30 -16
- package/payload/queue-kit/gate-tests/roadmap.test.sh +65 -58
- package/payload/queue-kit/templates/TASK-QUEUE.md +36 -23
- package/payload/queue-kit/templates/queue-config.knobs +1 -0
- package/payload/site-kit/README.md +29 -45
- package/payload/site-kit/checks/check-docs-cname-parity.gate +1 -1
- package/payload/site-kit/checks/check-docs-collapsible.gate +3 -0
- package/payload/site-kit/checks/check-docs-highlight-coverage.gate +4 -0
- package/payload/site-kit/checks/check-docs-liquid-parse.gate +3 -0
- package/payload/site-kit/checks/check-docs-render-fidelity.gate +3 -0
- package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/args +1 -1
- package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/scripts/site-config.knobs +2 -0
- package/payload/site-kit/gate-tests/check-docs-cname-parity/good/args +2 -2
- package/payload/site-kit/gate-tests/check-docs-cname-parity/good/scripts/site-config.knobs +2 -0
- package/payload/site-kit/gate-tests/check-docs-collapsible/bad/docs/regions.md +23 -0
- package/payload/site-kit/gate-tests/check-docs-collapsible/bad/expect.txt +4 -0
- package/payload/site-kit/gate-tests/check-docs-collapsible/good/docs/plain.md +3 -0
- package/payload/site-kit/gate-tests/check-docs-collapsible/good/docs/regions.md +26 -0
- package/payload/site-kit/gate-tests/check-docs-collapsible/good/expect.txt +1 -0
- package/payload/site-kit/gate-tests/check-docs-highlight-coverage/bad/docs/_layouts/default.html +11 -0
- package/payload/site-kit/gate-tests/check-docs-highlight-coverage/bad/expect.txt +4 -0
- package/payload/site-kit/gate-tests/check-docs-highlight-coverage/bad/scripts/highlight-tokens.list +7 -0
- package/payload/site-kit/gate-tests/check-docs-highlight-coverage/bad/scripts/site-config.knobs +3 -0
- package/payload/site-kit/gate-tests/check-docs-highlight-coverage/good/docs/_layouts/default.html +14 -0
- package/payload/site-kit/gate-tests/check-docs-highlight-coverage/good/expect.txt +1 -0
- package/payload/site-kit/gate-tests/check-docs-highlight-coverage/good/scripts/highlight-tokens.list +7 -0
- package/payload/site-kit/gate-tests/check-docs-highlight-coverage/good/scripts/site-config.knobs +1 -0
- package/payload/site-kit/gate-tests/check-docs-liquid-parse/bad/docs/_layouts/default.html +4 -0
- package/payload/site-kit/gate-tests/check-docs-liquid-parse/bad/docs/span.md +3 -0
- package/payload/site-kit/gate-tests/check-docs-liquid-parse/bad/expect.txt +2 -0
- package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/_layouts/default.html +4 -0
- package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/front.md +7 -0
- package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/loop.md +5 -0
- package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/plain.html +1 -0
- package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/raw.md +3 -0
- package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/docs/search.json +4 -0
- package/payload/site-kit/gate-tests/check-docs-liquid-parse/good/expect.txt +1 -0
- package/payload/site-kit/gate-tests/check-docs-liquid-parse-parser.test.sh +62 -0
- package/payload/site-kit/gate-tests/check-docs-render-fidelity-batch.test.sh +40 -45
- package/payload/site-kit/gate-tests/check-docs-render-fidelity-foreign.test.sh +7 -4
- package/payload/site-kit/gate-tests/check-docs-render-fidelity-span.test.sh +7 -4
- package/payload/site-kit/gate-tests/check-docs-render-fidelity-table.test.sh +7 -4
- package/payload/site-kit/templates/site-health.yml +60 -88
- package/profiles.list +4 -5
- package/lib/common/digest.sh +0 -18
- package/lib/common/lock.sh +0 -75
- package/lib/common/profile.sh +0 -91
- package/lib/common/recipe.sh +0 -106
- package/lib/diff.sh +0 -66
- package/lib/doctor.sh +0 -164
- package/lib/init.sh +0 -428
- package/lib/uninstall.sh +0 -214
- package/lib/update.sh +0 -34
- package/payload/canon-kit/SPEC.md +0 -2443
- package/payload/canon-kit/checks/check-surface-duplication.sh +0 -106
- package/payload/canon-kit/gate-tests/check-deprecation-task/bad/scripts/canon-config.sh +0 -6
- package/payload/canon-kit/gate-tests/check-deprecation-task/good/scripts/canon-config.sh +0 -6
- package/payload/canon-kit/gate-tests/check-install-claim/bad/scripts/canon-config.sh +0 -10
- package/payload/canon-kit/gate-tests/check-install-claim/good/scripts/canon-config.sh +0 -10
- package/payload/canon-kit/gate-tests/check-measured-claim/bad/scripts/canon-config.sh +0 -6
- package/payload/canon-kit/gate-tests/check-measured-claim/good/scripts/canon-config.sh +0 -6
- package/payload/canon-kit/gate-tests/check-payload-claim/bad/scripts/canon-config.sh +0 -8
- package/payload/canon-kit/gate-tests/check-payload-claim/good/scripts/canon-config.sh +0 -8
- package/payload/canon-kit/gate-tests/check-prose-enum/bad/scripts/canon-config.sh +0 -4
- package/payload/canon-kit/gate-tests/check-prose-enum/good/scripts/canon-config.sh +0 -4
- package/payload/canon-kit/gate-tests/check-prose-tells/bad/scripts/canon-config.sh +0 -8
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/scripts/canon-config.sh +0 -5
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/scripts/canon-config.sh +0 -5
- package/payload/canon-kit/gate-tests/check-unmarked-claim/bad/scripts/canon-config.sh +0 -6
- package/payload/canon-kit/gate-tests/check-unmarked-claim/good/scripts/canon-config.sh +0 -6
- package/payload/canon-kit/lib/spec.sh +0 -560
- package/payload/canon-kit/smoke/install.sh +0 -58
- package/payload/canon-kit/smoke/violation.sh +0 -22
- package/payload/canon-kit/templates/canon-config.sh +0 -2
- package/payload/context-kit/SPEC.md +0 -1134
- package/payload/context-kit/bin/always-loaded.sh +0 -70
- package/payload/context-kit/bin/env-probe.sh +0 -142
- package/payload/context-kit/bin/md-index.sh +0 -80
- package/payload/context-kit/bin/md-section.sh +0 -63
- package/payload/context-kit/bin/pub-index.sh +0 -90
- package/payload/context-kit/bin/run-index-tests.sh +0 -91
- package/payload/context-kit/gate-tests/check-footprint-fresh/good/args +0 -4
- package/payload/context-kit/gate-tests/check-footprint-fresh/good/emit.txt +0 -12
- package/payload/context-kit/gate-tests/check-footprint-fresh/good/projection.txt +0 -12
- package/payload/context-kit/index-tests/expected/toolfloor.txt +0 -23
- package/payload/context-kit/index-tests/toolfloor-cases.sh +0 -49
- package/payload/context-kit/lib/context.sh +0 -56
- package/payload/context-kit/lib/pub-lang/rust.sh +0 -26
- package/payload/context-kit/lib/pub-lang/ts.sh +0 -32
- package/payload/context-kit/lib/toolfloor.sh +0 -58
- package/payload/context-kit/smoke/agents-md.sh +0 -139
- package/payload/context-kit/smoke/install.sh +0 -64
- package/payload/context-kit/smoke/violation.sh +0 -21
- package/payload/context-kit/templates/context-config.sh +0 -2
- package/payload/delegation-kit/SPEC.md +0 -2078
- package/payload/delegation-kit/bin/run-budget-guard-tests.sh +0 -88
- package/payload/delegation-kit/bin/run-dispatch-guard-tests.sh +0 -97
- package/payload/delegation-kit/bin/run-trend-tests.sh +0 -63
- package/payload/delegation-kit/bin/run-usage-tests.sh +0 -226
- package/payload/delegation-kit/bin/usage-trend.sh +0 -120
- package/payload/delegation-kit/bin/usage-verdict.sh +0 -144
- package/payload/delegation-kit/bin/wait-probe.sh +0 -184
- package/payload/delegation-kit/gate-tests/subagent-stop-liveness.test.sh +0 -99
- package/payload/delegation-kit/lib/delegation.sh +0 -84
- package/payload/delegation-kit/smoke/install.sh +0 -83
- package/payload/delegation-kit/smoke/violation.sh +0 -16
- package/payload/delegation-kit/templates/agent-budget-guard.sh +0 -18
- package/payload/delegation-kit/templates/agent-dispatch-guard.sh +0 -61
- package/payload/delegation-kit/templates/delegation-config.sh +0 -6
- package/payload/delegation-kit/templates/statusline-usage.sh +0 -101
- package/payload/delegation-kit/templates/subagent-stop-liveness.sh +0 -56
- package/payload/delegation-kit/templates/usage-poller.sh +0 -67
- package/payload/delegation-kit/usage-tests/budget-guard-cases.tsv +0 -20
- package/payload/doctrine-kit/SPEC.md +0 -385
- package/payload/doctrine-kit/bin/install-doctrine.sh +0 -194
- package/payload/doctrine-kit/bin/stage-rules.sh +0 -51
- package/payload/doctrine-kit/lib/doctrine.sh +0 -29
- package/payload/doctrine-kit/smoke/install.sh +0 -203
- package/payload/doctrine-kit/smoke/violation.sh +0 -13
- package/payload/drift-kit/SPEC.md +0 -1187
- package/payload/drift-kit/bin/drift-report.sh +0 -155
- package/payload/drift-kit/bin/kfric.sh +0 -61
- package/payload/drift-kit/bin/overhead-meter.sh +0 -106
- package/payload/drift-kit/bin/stage-economics.sh +0 -465
- package/payload/drift-kit/kpis/kpi-always-loaded.sh +0 -39
- package/payload/drift-kit/kpis/kpi-amendment-age.sh +0 -33
- package/payload/drift-kit/kpis/kpi-deferred-age.sh +0 -46
- package/payload/drift-kit/kpis/kpi-gate-backlog.sh +0 -52
- package/payload/drift-kit/kpis/kpi-gate-runtime.sh +0 -31
- package/payload/drift-kit/kpis/kpi-incident-recurrence.sh +0 -42
- package/payload/drift-kit/kpis/kpi-knowledge-friction.sh +0 -21
- package/payload/drift-kit/kpis/kpi-overhead.sh +0 -44
- package/payload/drift-kit/kpis/kpi-price-table-age.sh +0 -68
- package/payload/drift-kit/kpis/kpi-prompt-friction.sh +0 -38
- package/payload/drift-kit/kpis/kpi-queue-net-delta.sh +0 -74
- package/payload/drift-kit/kpis/kpi-settings-local.sh +0 -21
- package/payload/drift-kit/kpis/kpi-task-split.sh +0 -43
- package/payload/drift-kit/lib/drift.sh +0 -43
- package/payload/drift-kit/smoke/install.sh +0 -537
- package/payload/drift-kit/smoke/overhead-fixture.jsonl +0 -4
- package/payload/drift-kit/templates/drift-config.sh +0 -2
- package/payload/evidence-kit/SPEC.md +0 -740
- package/payload/evidence-kit/bin/diff-baseline.sh +0 -34
- package/payload/evidence-kit/bin/run-validate.sh +0 -124
- package/payload/evidence-kit/checks/check-producer-liveness.sh +0 -75
- package/payload/evidence-kit/gate-tests/check-battery-roster/bad/scripts/evidence-config.sh +0 -7
- package/payload/evidence-kit/gate-tests/check-battery-roster/good/scripts/evidence-config.sh +0 -7
- package/payload/evidence-kit/lib/evidence.sh +0 -193
- package/payload/evidence-kit/smoke/install.sh +0 -59
- package/payload/evidence-kit/smoke/violation.sh +0 -8
- package/payload/evidence-kit/templates/evidence-config.sh +0 -2
- package/payload/gate-sdk/SPEC.md +0 -10872
- package/payload/gate-sdk/bin/gen-pre-commit.sh +0 -297
- package/payload/gate-sdk/bin/install-hooks.sh +0 -60
- package/payload/gate-sdk/bin/port-blockers.sh +0 -473
- package/payload/gate-sdk/bin/run-consumer-smoke.sh +0 -239
- package/payload/gate-sdk/bin/run-gate-tests.sh +0 -179
- package/payload/gate-sdk/bin/upgrade-smoke.sh +0 -236
- package/payload/gate-sdk/checks/check-action-run-shell.sh +0 -223
- package/payload/gate-sdk/checks/check-crate-arms.sh +0 -62
- package/payload/gate-sdk/checks/check-gate-substrate-parity.sh +0 -450
- package/payload/gate-sdk/checks/check-install-disposition.sh +0 -93
- package/payload/gate-sdk/checks/check-shellcheck.sh +0 -57
- package/payload/gate-sdk/gate-tests/check-crate-arms/bad/scripts/gate-sdk-config.sh +0 -2
- package/payload/gate-sdk/gate-tests/check-crate-arms/good/scripts/gate-sdk-config.sh +0 -2
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/args +0 -4
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/emit.txt +0 -14
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/projection.txt +0 -14
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/gate-sdk-config.sh +0 -2
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/gate-sdk-config.sh +0 -2
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gate-sdk-config.sh +0 -6
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/stub-bin +0 -3
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gate-sdk-config.sh +0 -6
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/stub-bin +0 -3
- package/payload/gate-sdk/gate-tests/check-install-disposition/bad/installer/lib/common/recipe.sh +0 -9
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-beta.gate +0 -3
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/alpha-kit/checks/check-gamma.sh +0 -6
- package/payload/gate-sdk/gate-tests/check-install-disposition/good/installer/lib/common/recipe.sh +0 -10
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/scripts/gate-sdk-config.sh +0 -5
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/scripts/gate-sdk-config.sh +0 -5
- package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/scripts/gate-sdk-config.sh +0 -5
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/scripts/gate-sdk-config.sh +0 -5
- package/payload/gate-sdk/gate-tests/declaration-lib-parity.test.sh +0 -211
- package/payload/gate-sdk/gate-tests/lib-declaration.test.sh +0 -112
- package/payload/gate-sdk/lib/consumer-smoke.sh +0 -69
- package/payload/gate-sdk/lib/declaration.sh +0 -59
- package/payload/gate-sdk/lib/inject.sh +0 -80
- package/payload/gate-sdk/smoke/install.sh +0 -171
- package/payload/gate-sdk/smoke/violation.sh +0 -13
- package/payload/guard-kit/SPEC.md +0 -1415
- package/payload/guard-kit/bin/compare-settings-allow.sh +0 -115
- package/payload/guard-kit/bin/run-guard-tests.sh +0 -110
- package/payload/guard-kit/bin/scan-prompts.sh +0 -166
- package/payload/guard-kit/bin/scratch-run.sh +0 -34
- package/payload/guard-kit/gate-tests/guard-read-path.test.sh +0 -52
- package/payload/guard-kit/lib/guard.sh +0 -1014
- package/payload/guard-kit/smoke/install.sh +0 -26
- package/payload/guard-kit/templates/bash-guard.sh +0 -20
- package/payload/guard-kit/templates/escalation-guard.sh +0 -27
- package/payload/guard-kit/templates/guard-config.sh +0 -8
- package/payload/guard-kit/templates/wakeup-guard.sh +0 -20
- package/payload/lifecycle-kit/SPEC.md +0 -2884
- package/payload/lifecycle-kit/bin/cite-survey.sh +0 -81
- package/payload/lifecycle-kit/bin/enter-stage.sh +0 -380
- package/payload/lifecycle-kit/bin/file-gap.sh +0 -101
- package/payload/lifecycle-kit/bin/file-survey.sh +0 -69
- package/payload/lifecycle-kit/bin/install-lifecycle.sh +0 -36
- package/payload/lifecycle-kit/bin/session-id.sh +0 -75
- package/payload/lifecycle-kit/gate-tests/check-close-surfaces/bad/scripts/lifecycle-config.sh +0 -4
- package/payload/lifecycle-kit/gate-tests/check-close-surfaces/good/scripts/lifecycle-config.sh +0 -4
- package/payload/lifecycle-kit/gate-tests/check-scratch-citation/bad/scripts/lifecycle-config.sh +0 -4
- package/payload/lifecycle-kit/gate-tests/check-scratch-citation/good/scripts/lifecycle-config.sh +0 -4
- package/payload/lifecycle-kit/gate-tests/workflow-state-guard.test.sh +0 -100
- package/payload/lifecycle-kit/lib/stages.sh +0 -194
- package/payload/lifecycle-kit/smoke/install.sh +0 -434
- package/payload/lifecycle-kit/smoke/violation.sh +0 -8
- package/payload/lifecycle-kit/templates/lifecycle-config.sh +0 -2
- package/payload/lifecycle-kit/templates/workflow-state-guard.sh +0 -29
- package/payload/queue-kit/SPEC.md +0 -1436
- package/payload/queue-kit/bin/lesson-sink.sh +0 -28
- package/payload/queue-kit/bin/queue-counts.sh +0 -35
- package/payload/queue-kit/bin/queue-edges.sh +0 -78
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/bad/scripts/queue-config.sh +0 -6
- package/payload/queue-kit/gate-tests/check-queue-entry-budget/good/scripts/queue-config.sh +0 -6
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/scripts/queue-config.sh +0 -3
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/scripts/queue-config.sh +0 -3
- package/payload/queue-kit/gate-tests/check-roadmap-fresh/bad/scripts/queue-config.sh +0 -6
- package/payload/queue-kit/gate-tests/check-roadmap-fresh/good/scripts/queue-config.sh +0 -6
- package/payload/queue-kit/gate-tests/queue-lib-parity.test.sh +0 -215
- package/payload/queue-kit/lib/queue.sh +0 -129
- package/payload/queue-kit/smoke/install.sh +0 -25
- package/payload/queue-kit/smoke/violation.sh +0 -8
- package/payload/queue-kit/templates/queue-config.sh +0 -2
- package/payload/site-kit/SPEC.md +0 -601
- package/payload/site-kit/checks/check-docs-render-fidelity.sh +0 -242
- package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/scripts/site-config.sh +0 -7
- package/payload/site-kit/gate-tests/check-docs-cname-parity/good/scripts/site-config.sh +0 -7
- package/payload/site-kit/lib/site.sh +0 -43
- package/payload/site-kit/smoke/install.sh +0 -34
- package/payload/site-kit/smoke/violation.sh +0 -20
- /package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/{check-ported.gate → check-stage-entry.gate} +0 -0
|
@@ -1,1187 +0,0 @@
|
|
|
1
|
-
# drift-kit — drift reporting with pluggable KPIs and lead/lag honesty labels
|
|
2
|
-
|
|
3
|
-
Gates block what is mechanically decidable per commit; drift is what
|
|
4
|
-
accumulates *between* commits — trends no single diff violates. A backlog
|
|
5
|
-
ages, an always-loaded surface swells, friction recurs, and every individual
|
|
6
|
-
session looks fine, because no stateless session ever sees the slope. The
|
|
7
|
-
kit is the trend surface: an advisory report that collates KPIs from the
|
|
8
|
-
other kits' governed surfaces, groups them under honest weight labels
|
|
9
|
-
(lead indicators act before drift compounds; lag indicators undercount by
|
|
10
|
-
construction), and emits a one-line trend summary the session-start hook
|
|
11
|
-
injects — so every session opens seeing the slope it cannot otherwise see.
|
|
12
|
-
|
|
13
|
-
Advisory by construction: the report never fails a session, never joins
|
|
14
|
-
`gates.list`, and reads *trend, not level* — a KPI's absolute value is
|
|
15
|
-
noise, its direction across sessions is the signal.
|
|
16
|
-
|
|
17
|
-
The kit carries the report skeleton, the KPI plugin contract, a bundled set
|
|
18
|
-
of kit-coupled generic KPIs, and the knowledge-friction loop; a consumer's
|
|
19
|
-
product- and toolchain-shaped KPIs stay in the consumer repo (§Out of scope).
|
|
20
|
-
|
|
21
|
-
## The report skeleton
|
|
22
|
-
|
|
23
|
-
`bin/drift-report.sh` — the collator. It owns the frame; every measurement
|
|
24
|
-
lives in a plugin:
|
|
25
|
-
|
|
26
|
-
1. Read the KPI registry (`kpis.list` — one plugin name per line, `#`
|
|
27
|
-
comments; the gates.list grammar) and resolve each name against the
|
|
28
|
-
consumer KPI dir first, then each vendored kit's `kpis/` (the gate-sdk
|
|
29
|
-
resolution pattern: a consumer shadows a bundled KPI by dropping a
|
|
30
|
-
same-named file in its own dir).
|
|
31
|
-
2. Derive the iteration-start commit **before** the plugin export loop, not at
|
|
32
|
-
print time, and assign it to `DRIFT_KIT_ITERATION_START` so the loop carries
|
|
33
|
-
it to every plugin. Both the derivation and its invocation sit above the
|
|
34
|
-
loop — relocating the call alone would leave it undefined — and its inputs
|
|
35
|
-
are already set by that point. The report header keeps reading the same
|
|
36
|
-
value. **Priced, because the position is not free:** deriving it above the
|
|
37
|
-
loop runs it in `--trend` mode as well as in the full report, so one `grep`
|
|
38
|
-
and one single-file `git log -S` run on every session start through the
|
|
39
|
-
context hook. Accepted — a pickaxe over a file of a few dozen lines — but it
|
|
40
|
-
is a per-session cost rather than a per-report one.
|
|
41
|
-
3. Run each plugin, collect its rows, and group them into the two labeled
|
|
42
|
-
sections — the honesty labels are the frame's contract:
|
|
43
|
-
- header: `=== Drift KPIs (advisory — trend, not level) ===`, plus the
|
|
44
|
-
iteration-start commit when derivable;
|
|
45
|
-
- `--- Lead (weighted high — act before drift compounds) ---`;
|
|
46
|
-
- `--- Lag (weighted low — undercounts by construction) ---`;
|
|
47
|
-
- footer: `Read trend across sessions; lag KPIs lower-bound only.`
|
|
48
|
-
4. `--trend` emits a single compact line instead — the fragment each plugin
|
|
49
|
-
volunteers, joined with `·` — consumed by context-kit's session-context
|
|
50
|
-
hook (`CONTEXT_KIT_DRIFT_REPORT`, already wired in its template).
|
|
51
|
-
|
|
52
|
-
Degrade discipline: exit is always 0. A plugin that exits non-zero or
|
|
53
|
-
prints nothing yields a visible `<name> n/a (plugin failed)` row in the
|
|
54
|
-
lead section — fail-visible, not fail-closed, because a silently vanishing
|
|
55
|
-
KPI is itself drift. A plugin whose *surface* is missing (no log yet, no
|
|
56
|
-
timings file) degrades to `n/a (<reason>)` in its own value, not by dying.
|
|
57
|
-
|
|
58
|
-
## The KPI plugin contract
|
|
59
|
-
|
|
60
|
-
A plugin is `kpi-<name>.sh`, resolved through the registry and invoked
|
|
61
|
-
directly (`"$path"`, not `bash "$path"`) — so it must carry the execute bit or
|
|
62
|
-
the report degrades that row to its fail-visible read. Two modes:
|
|
63
|
-
|
|
64
|
-
- **Full (no args)** — one or more rows on stdout, each
|
|
65
|
-
`lead|lag<TAB><label><TAB><value>`: the section tag, a short human label,
|
|
66
|
-
and a freeform value that carries its own caveat parenthetical (reading
|
|
67
|
-
age, undercount note, pointer to the acting close-stage step). Multiple
|
|
68
|
-
rows are legitimate for one measurement with two axes.
|
|
69
|
-
- **`--trend`** — at most one compact `<key> <value>` fragment, or nothing
|
|
70
|
-
(a plugin may opt out of the trend line).
|
|
71
|
-
|
|
72
|
-
Plugins read **exported env only** — a plain assignment in the consumer
|
|
73
|
-
config reaches the collator's shell but never a child plugin. The collator
|
|
74
|
-
closes that gap structurally: before invoking plugins, `drift-report.sh`
|
|
75
|
-
exports every scalar `DRIFT_KIT_*` variable (`compgen` over the namespace;
|
|
76
|
-
arrays skipped — bash cannot export them, and array knobs like
|
|
77
|
-
`DRIFT_KIT_KPI_DIRS` are consumed inside the collator itself), so a config
|
|
78
|
-
override reaches writer and reader alike with no fixed export list to drift
|
|
79
|
-
out of parity. It also exports `DRIFT_KIT_KIT_ROOTS` — newline-separated kit
|
|
80
|
-
roots, `gate_kit_roots` when gate-sdk resolves, else the kit's parent; a
|
|
81
|
-
plugin needing sibling-kit surfaces reads it rather than re-deriving the
|
|
82
|
-
roster, and falls back to its own derivation when run standalone without it.
|
|
83
|
-
The driver's handoff, not a consumer knob: `drift-report.sh` recomputes it
|
|
84
|
-
every run.
|
|
85
|
-
|
|
86
|
-
`DRIFT_KIT_ITERATION_START` is the same *class* of handoff as
|
|
87
|
-
`DRIFT_KIT_KIT_ROOTS` — computed by the driver every run, reaching every plugin
|
|
88
|
-
as exported environment, never a consumer knob. What it does not share is the
|
|
89
|
-
parity hazard: it introduces no fixed export list that could drift out of step
|
|
90
|
-
with the knob set it travels beside. A plugin reading it gets the empty string
|
|
91
|
-
when no baseline is derivable and degrades to `n/a` on its own rows rather than
|
|
92
|
-
dying.
|
|
93
|
-
|
|
94
|
-
Plugins never block and never write outside `$DRIFT_KIT_TMP_DIR` scratch;
|
|
95
|
-
a measurement needing state (a baseline, a log) reads a file some
|
|
96
|
-
*other* mechanism owns and stamps its reading-age caveat when the file is a
|
|
97
|
-
past measurement rather than live state (the gate-runtime pattern below).
|
|
98
|
-
|
|
99
|
-
## Bundled KPIs
|
|
100
|
-
|
|
101
|
-
The generic set — each coupled to a kit-governed surface, each degrading to
|
|
102
|
-
`n/a` when the consumer lacks that surface. Lead:
|
|
103
|
-
|
|
104
|
-
- **kpi-task-split** — the feature↔debt split of the queue's Done slugs,
|
|
105
|
-
classified by their commit subjects (`feat` / `fix`+`refactor`); reads
|
|
106
|
-
the queue file and git. gate-sdk's check-commit-subject is the parse
|
|
107
|
-
guarantee this classification assumes — every subject carries a roster
|
|
108
|
-
type, so a mistyped prefix is a blocked commit, not a miscounted row.
|
|
109
|
-
A slug reaches its subject through `git log -1 --grep=<slug>`, so the
|
|
110
|
-
classification rests on the landing commit's *message naming the slug*;
|
|
111
|
-
a Done slug no commit message mentions counts as unclassified however
|
|
112
|
-
correctly that commit is typed, and a later `chore` commit naming the slug
|
|
113
|
-
wins the lookup over an earlier `fix` that did not.
|
|
114
|
-
- **kpi-gate-backlog** — proposed-but-absent gates: `check-*`/`scan-*`
|
|
115
|
-
names appearing anywhere in the queue with no file in any gate-resolution
|
|
116
|
-
dir, over the live gate count. A name with a file on disk is built and
|
|
117
|
-
drops out of the numerator.
|
|
118
|
-
- **kpi-amendment-age** — age in days of the oldest amendment on disk
|
|
119
|
-
(`SPEC-*.md`, git add-date; fixture and template paths excluded, matching the
|
|
120
|
-
published-evidence extractor's amendment-latency harvest); the pressure gauge
|
|
121
|
-
behind canon-kit's short-lived-amendment rule.
|
|
122
|
-
- **kpi-deferred-age** — age of the oldest **defer date** in the queue's
|
|
123
|
-
deferred section: premise-rot pressure on design-pending work. The defer
|
|
124
|
-
date is queue-kit/SPEC.md §The queue format's definition — the `Surfaced`
|
|
125
|
-
mark where an entry carries one, else the `Filed` provenance date — which
|
|
126
|
-
this plugin re-implements rather than sourcing, because a dependency on
|
|
127
|
-
queue-kit's lib would close a cross-kit cycle. Accepted residual: one owner
|
|
128
|
-
doc, two implementations, both carrying a `spec:` line citing the owner.
|
|
129
|
-
Both marks count, because a pool whose entries carry provenance lines rather
|
|
130
|
-
than `Surfaced` marks would otherwise leave the input covering a fraction of
|
|
131
|
-
it. The KPI de-duplicates the dates it finds and reports the oldest, so it
|
|
132
|
-
trends dates rather than counting entries. Its unknown-heading reset drops an
|
|
133
|
-
icebox placed after the deferred section out of the input **by
|
|
134
|
-
construction**, which is wanted: an evicted entry's age is not the thing this
|
|
135
|
-
KPI trends. gate-sdk's `check-gate-exemption-tasks` carries the
|
|
136
|
-
same-shaped scan with the opposite behavior, deliberately (gate-sdk/SPEC.md
|
|
137
|
-
§check-gate-exemption-tasks) — recorded so a later reader does not "fix" one
|
|
138
|
-
into agreement with the other.
|
|
139
|
-
- **kpi-queue-net-delta** — the design-pending pool at the iteration-start
|
|
140
|
-
commit against the worktree, as **two rows, because one number would be
|
|
141
|
-
gameable**: *entry net delta* (`filed − drained`, where filed is a slug now
|
|
142
|
-
deferred that was in neither section at the baseline and drained is a slug
|
|
143
|
-
that has left the pool entirely) and *carry weight* (the two sections' line
|
|
144
|
-
count now against the baseline). An icebox move counts as **neither** — it is
|
|
145
|
-
compression, not intake and not closure. The two axes move independently:
|
|
146
|
-
intake pressure moves the first, compression the second, so a session that
|
|
147
|
-
mass-evicted to flatter the delta row moves the weight row instead and the
|
|
148
|
-
gaming is visible rather than hidden — the argument `kpi-price-table-age`
|
|
149
|
-
makes for carrying two rows that point different ways. `--trend` volunteers
|
|
150
|
-
one fragment, `qnet <±N>`, per the one-per-plugin rule; the weight row
|
|
151
|
-
volunteers none, because intake is the axis a filing session can act on
|
|
152
|
-
inside the session. With no baseline (a standalone run, a fresh clone) both
|
|
153
|
-
rows degrade to `n/a (no iteration baseline)`.
|
|
154
|
-
- **kpi-prompt-friction** — distinct/total prompting calls via guard-kit's
|
|
155
|
-
`scan-prompts.sh --count`; `n/a` when guard-kit or its log is absent.
|
|
156
|
-
- **kpi-always-loaded** — the standing per-session surface: level and
|
|
157
|
-
since-baseline delta via context-kit's `always-loaded.sh` meter.
|
|
158
|
-
- **kpi-settings-local** — entry count of the untracked local permission
|
|
159
|
-
overlay (`.claude/settings.local.json` allow/deny/ask, via `jq`); the
|
|
160
|
-
notice signal for guard-kit's close-stage prune/promote step.
|
|
161
|
-
- **kpi-gate-runtime** — full-battery runtime from the runner's timings
|
|
162
|
-
file (`<tmp-dir>/gate-timings.txt`): total, the slowest gates by runtime, and
|
|
163
|
-
the file's reading age — a *measurement*, not live state, so the age
|
|
164
|
-
caveat rides the value.
|
|
165
|
-
- **kpi-overhead** — governance and gate-output share over the overhead
|
|
166
|
-
meter's log (§The overhead meter): the governance share (`pct` averaged
|
|
167
|
-
across the recent window of sessions, carrying the session-count and
|
|
168
|
-
reading-age caveats) and the gate-output share (`gate`/`total` — the axis the
|
|
169
|
-
deferred economy levers target). `--trend` emits `ovh <pct>%`. Degrades
|
|
170
|
-
fail-visible to a "run bin/overhead-meter.sh" n/a row when the log is absent.
|
|
171
|
-
- **kpi-price-table-age** — two rows off the consumer price table
|
|
172
|
-
(`DRIFT_KIT_PRICE_TABLE`, §The stage-economics meter input 3): the age in days
|
|
173
|
-
of its `priced-as-of:` header, and the time to — or past — its optional
|
|
174
|
-
`prices-valid-through:` header. **Both, because at the moment that matters they
|
|
175
|
-
point opposite ways.** Age measures when someone last *typed* the numbers;
|
|
176
|
-
expiry is when the numbers *stop being true*, and nothing makes the first
|
|
177
|
-
predict the second. The failure is an inversion rather than a correlation gap:
|
|
178
|
-
a table retyped the day before a known introductory-pricing row lapses reads
|
|
179
|
-
`priced 1d ago` — freshest exactly when it is least trustworthy. An age-only
|
|
180
|
-
KPI would read reassuringly at the one moment it was built to flag, which is
|
|
181
|
-
why the expiry row exists. Full mode emits
|
|
182
|
-
`priced <N>d ago (as-of <date>)` and either
|
|
183
|
-
`expires in <N>d (through <date>)` or
|
|
184
|
-
`EXPIRED <N>d ago — re-verify (through <date>)`; `--trend` emits `price <N>d`
|
|
185
|
-
and nothing when the age is `n/a`. The expiry row volunteers no second
|
|
186
|
-
fragment — the trend line takes at most one per plugin (§The KPI plugin
|
|
187
|
-
contract) and staleness is the one already specified. Age counts from the
|
|
188
|
-
wall clock (the `kpi-deferred-age` idiom); expiry counts whole calendar days
|
|
189
|
-
against the through-date, which is a calendar claim: `expires in 0d` on the
|
|
190
|
-
last valid day, `EXPIRED 1d ago` the next. Degrades per row and fail-visible:
|
|
191
|
-
`n/a (no priced-as-of: header)`, `n/a (unparseable priced-as-of date)`, and
|
|
192
|
-
for the expiry row `n/a (no prices-valid-through: header)` /
|
|
193
|
-
`n/a (unparseable prices-valid-through date)`. With **no table at all** it
|
|
194
|
-
emits the single `n/a (no price table)` age row and no expiry row — a table
|
|
195
|
-
that is not there has no expiry to report, and one row per absent surface is
|
|
196
|
-
the report's row-count shape. Advisory like every KPI: it never joins
|
|
197
|
-
`gates.list`. A freshness *gate* is ruled out by construction — prices are a
|
|
198
|
-
dated literal with no machine-readable feed, so checking them would mean
|
|
199
|
-
fetching externally, which reds on causes no commit produced and breaks
|
|
200
|
-
hermeticity (site-kit/SPEC.md §The monitor boundary). Reading a date in-tree
|
|
201
|
-
needs no network. The mechanism is kit-generic; no model id, price, or roster
|
|
202
|
-
enters the kit (§The stage-economics meter, the provenance seam).
|
|
203
|
-
|
|
204
|
-
Lag:
|
|
205
|
-
|
|
206
|
-
- **kpi-knowledge-friction** — re-derivations captured this iteration: the
|
|
207
|
-
line count of the knowledge-friction log (§The knowledge-friction loop).
|
|
208
|
-
Lag by construction: only what a session *noticed and logged* is counted,
|
|
209
|
-
so the value lower-bounds the real rate.
|
|
210
|
-
- **kpi-incident-recurrence** — re-filings of the same finding, summed over the
|
|
211
|
-
queue's `recurrence:` declarations (queue-kit/SPEC.md §The tag algebra owns the
|
|
212
|
-
grammar), plus the highest-count slug. Like `kpi-deferred-age` it re-implements
|
|
213
|
-
the read rather than sourcing queue-kit's lib, under the same accepted residual
|
|
214
|
-
— one owner doc, two implementations, both carrying a `spec:` line citing the
|
|
215
|
-
owner. **The lag label is a measurement claim, not a priority one.** A
|
|
216
|
-
recurrence nobody files is uncounted, exactly `kpi-knowledge-friction`'s
|
|
217
|
-
structure — and so is one no session **judged**, since each date records a
|
|
218
|
-
judgment rather than a derivation: the same lag structure, one step later in
|
|
219
|
-
the chain. So lag is the honest fidelity tier even though the metric is highly
|
|
220
|
-
actionable. **It is a judged count, so it is only comparable across a fixed
|
|
221
|
-
judging rule** — changing what counts as a recurrence breaks comparison across
|
|
222
|
-
the change, and a series spanning such a change is two series, not one.
|
|
223
|
-
Actionability rides lifecycle-kit's pre-emption rule and its
|
|
224
|
-
`LIFECYCLE_KIT_RECURRENCE_THRESHOLD`, never this report's weighting — which is
|
|
225
|
-
why the counter and the rule are two pieces and not one. A report-only signal
|
|
226
|
-
would have reproduced the defect the pair exists to fix: a faithful record no
|
|
227
|
-
ranking reads. `--trend` emits `recur <N>`; with no declaration anywhere it
|
|
228
|
-
degrades to `n/a (no recurrence declaration in the queue)`.
|
|
229
|
-
|
|
230
|
-
The lag section is expected to be sparse — most lag measurements (review
|
|
231
|
-
finding rates, detection latency) are manual tallies, and the kit ships no
|
|
232
|
-
fake automation for them; a consumer with a structured source adds its own
|
|
233
|
-
plugin.
|
|
234
|
-
|
|
235
|
-
## The knowledge-friction loop
|
|
236
|
-
|
|
237
|
-
guard-kit's friction loop catches *permission* friction — its log is fed by
|
|
238
|
-
a hook that fires on every command. Knowledge friction has no hook: a
|
|
239
|
-
session re-derives a fact no doc owns (reads it off an implementation, a
|
|
240
|
-
gate's source, a commit message, or a prior/sibling deliverable it consults
|
|
241
|
-
to shape a new one), gets the right answer, and moves on —
|
|
242
|
-
nothing prompts, nothing logs, and the next session re-pays the same
|
|
243
|
-
derivation. The loop mirrors guard-kit's, with capture moved to convention:
|
|
244
|
-
|
|
245
|
-
1. **Capture (any session)** — the moment a session catches itself
|
|
246
|
-
re-deriving a fact from a non-owning surface, it appends one line to the
|
|
247
|
-
knowledge-friction log (`.workflow/knowledge-friction.log` by default;
|
|
248
|
-
gitignored per-iteration scratch, the prompt-friction.log pattern):
|
|
249
|
-
`<date> <fact re-derived> ← <surface it was read from>`. One line,
|
|
250
|
-
written at the moment of re-derivation — deferred capture is no capture.
|
|
251
|
-
The affordance is `bin/kfric.sh [--] "<fact>" "<surface>"`: it stamps that
|
|
252
|
-
grammar (date from `date +%F`) into `DRIFT_KIT_KNOWLEDGE_LOG`, creating
|
|
253
|
-
the log's parent dir if missing, and refuses with a usage message and
|
|
254
|
-
exit 2 unless both arguments are present and non-empty. Both are free text,
|
|
255
|
-
so it also validates their **shape** — see
|
|
256
|
-
gate-sdk/SPEC.md §The bin/-tool contract —
|
|
257
|
-
scanning every positional rather than the first, two slots making arity
|
|
258
|
-
safe in neither. It exists so
|
|
259
|
-
capture is prompt-free — the raw form is a shell redirect
|
|
260
|
-
(`printf … >> <log>`) that no allowlist glob suppresses safely (a
|
|
261
|
-
mid-pattern wildcard is the command-injection shape the bash guard
|
|
262
|
-
catches, and a decorated write trips the guard's decoration rule
|
|
263
|
-
regardless), whereas the helper takes the fact as an argument with no
|
|
264
|
-
caller-side redirect, so its invocation is a safe end-wildcard prefix-glob
|
|
265
|
-
allowlist entry and a permission prompt never turns capture into deferred
|
|
266
|
-
capture. The raw append stays legal as the fallback — the grammar, not
|
|
267
|
-
the writer, is the log's contract; both consumers below read lines, not
|
|
268
|
-
provenance. The convention costs one always-loaded bullet in the
|
|
269
|
-
consumer's instructions file; that line is the loop's hook and must earn
|
|
270
|
-
its recurring cost by the log actually filling. **Seam:** kfric is the
|
|
271
|
-
narrow sensor for a *re-derived fact* only — a *work-shaped* mid-iteration
|
|
272
|
-
finding (a gap, a task, a defect) is not knowledge friction and routes to
|
|
273
|
-
the consumer's committed gap channel instead
|
|
274
|
-
(lifecycle-kit/SPEC.md §The committed gap inbox); overloading this log as a
|
|
275
|
-
backlog inbox dilutes the `kpi-knowledge-friction` signal it exists to carry.
|
|
276
|
-
The prior/sibling-deliverable cue does not relax that seam: consulting a
|
|
277
|
-
prior artifact to shape the next, the conclusion "this artifact's chrome
|
|
278
|
-
*should be owned or generated* rather than copied" is work-shaped and routes
|
|
279
|
-
to the gap inbox; what kfric captures is the narrower *fact re-derived* — the
|
|
280
|
-
specific value or structure reconstructed from the prior artifact because no
|
|
281
|
-
doc owns it.
|
|
282
|
-
2. **Triage (close)** — `templates/close-knowledge.md`, spliced into the
|
|
283
|
-
consumer's close skill (the close-triage/close-brevity pattern): walk
|
|
284
|
-
the log; for each entry, the remediation is a **doc-owner edit** — give
|
|
285
|
-
the fact a home under the consumer's tier contract (canon-kit's star
|
|
286
|
-
topology: one owner per fact), or a pointer from where the session
|
|
287
|
-
looked to where the owner is. Never a standing session-start
|
|
288
|
-
instruction: that converts one re-derivation into a permanent
|
|
289
|
-
per-session tax, exactly what context-kit's brevity machinery rejects.
|
|
290
|
-
Then clear the log — its named reclaim path. Nothing refuses a close that
|
|
291
|
-
skips the walk, so the log declares itself advisory on the close-surface
|
|
292
|
-
roster (lifecycle-kit/SPEC.md §The close-surface roster) with that clear as
|
|
293
|
-
its reclaim command:
|
|
294
|
-
|
|
295
|
-
close-surface: .workflow/knowledge-friction.log advisory reclaim=: > .workflow/knowledge-friction.log
|
|
296
|
-
3. **Aggregate (drift)** — `kpi-knowledge-friction` trends the per-iteration
|
|
297
|
-
count; it falls as the tier contract's holes fill. Detection is the
|
|
298
|
-
loop; elimination is a tiering edit.
|
|
299
|
-
|
|
300
|
-
The heavy alternative — periodic LLM-scan of session transcripts reduced to
|
|
301
|
-
each party's messages — is deliberately out of kit scope: it needs harness
|
|
302
|
-
transcript access no kit mechanism owns.
|
|
303
|
-
|
|
304
|
-
## The published-evidence extractor
|
|
305
|
-
|
|
306
|
-
The `trajectory` emit arm (gate-sdk/SPEC.md §The non-gate arm) publishes this
|
|
307
|
-
repo's own governed trajectory — the
|
|
308
|
-
evidence behind the docs evidence page. The benefits claim is
|
|
309
|
-
*self-referential* by ruling: the extractor emits the governed arm's real
|
|
310
|
-
history and states plainly that no controlled ungoverned baseline exists; a
|
|
311
|
-
synthetic controlled A/B experiment is the separate deferred
|
|
312
|
-
`benchmark-ab-experiment` rung, not this mechanism.
|
|
313
|
-
|
|
314
|
-
The extractor is a pure function of *closed* history — byte-stable across any
|
|
315
|
-
commit that is not a close. Each closed iteration N owns the commit range
|
|
316
|
-
`(close(N-1), close(N)]` (`close(0)` is the empty boundary — the first row runs
|
|
317
|
-
from the root up to its close commit); no range-scoped column reads HEAD, so an
|
|
318
|
-
interstitial commit — filed or hotfixed after a close, before the next scope —
|
|
319
|
-
falls into the *next* iteration's range and surfaces only when that iteration
|
|
320
|
-
closes, leaving every published row byte-identical until a new close lands. That
|
|
321
|
-
sentence is range arithmetic: it is descriptive of a commit that happens, and
|
|
322
|
-
*when* one may legitimately be made is lifecycle-kit/SPEC.md §Deviation
|
|
323
|
-
transitions' interstitial-mitigation rule, which leaves this accounting unchanged.
|
|
324
|
-
Totals conserve across rows: every commit up to the last close belongs to
|
|
325
|
-
exactly one range. The extractor reads no now-relative field (no age-from-today)
|
|
326
|
-
either, so re-emission over an unchanged closed history is byte-identical —
|
|
327
|
-
exactly what the consumer freshness gate below byte-compares. It emits one row
|
|
328
|
-
per **closed** iteration (one carrying a
|
|
329
|
-
`close` stamp): an in-flight iteration's counts are still moving, so including
|
|
330
|
-
it would stale the committed projection at every commit — the closed-only rule
|
|
331
|
-
keeps the projection stable between iteration boundaries. Per closed iteration
|
|
332
|
-
it harvests:
|
|
333
|
-
|
|
334
|
-
- **iteration + stages run** — the stamp lines from `WORKFLOW-STATE.txt`'s git
|
|
335
|
-
history (the file truncates at each scope boundary; history keeps every
|
|
336
|
-
stamp), rendered as one slot per configured stage (`DRIFT_KIT_STAGES`, roster
|
|
337
|
-
order), each labelled by its shortest roster-unique prefix, so a skipped or
|
|
338
|
-
non-roster stage reads as a gap.
|
|
339
|
-
- **validate attestations** — the evidence-manifest lines
|
|
340
|
-
(`validate-evidence.txt` history): the per-iteration suite roll-up and any
|
|
341
|
-
non-clean verdict. This is the primary satisfiable-drift surface — a
|
|
342
|
-
commitment made an iteration earlier that silently broke a surface shows as
|
|
343
|
-
a failing suite, not a consistent-looking pass.
|
|
344
|
-
- **amendment latency** — per amendment file, git add-date to delete-date
|
|
345
|
-
(merge), the longest lag in the iteration: the commitment-to-merge gauge. An
|
|
346
|
-
amendment is attributed to the iteration whose range contains its delete
|
|
347
|
-
(merge) commit; its add-date may precede the range start, since latency gauges
|
|
348
|
-
commitment-to-merge wherever the commitment was made. Fixture and template
|
|
349
|
-
amendment paths are excluded from the harvest from day one
|
|
350
|
-
(`kpi-amendment-age` applies the same `*/gate-tests/*`/`*/templates/*`
|
|
351
|
-
exclusion).
|
|
352
|
-
- **commit shape** — the feature/debt split of the iteration's commit subjects
|
|
353
|
-
(`kpi-task-split`'s classification, applied over the same
|
|
354
|
-
`(close(N-1), close(N)]` range).
|
|
355
|
-
- **gate-roster growth** — the `gates.list` member count at the iteration's
|
|
356
|
-
close commit; with the queue's proposed-gate mentions this bounds the
|
|
357
|
-
named-but-unbuilt backlog.
|
|
358
|
-
|
|
359
|
-
Excluded, and stated as a limitation on the framing page: knowledge-friction
|
|
360
|
-
counts — their log is gitignored per-iteration scratch, not committed history,
|
|
361
|
-
so the extractor cannot harvest it and that KPI stays a session-local lower
|
|
362
|
-
bound.
|
|
363
|
-
|
|
364
|
-
Interface: `bash gate-sdk/bin/run-gates.sh --emit trajectory` writes the markdown table (one row per closed
|
|
365
|
-
iteration, stable columns) to stdout — the shape the committed projection
|
|
366
|
-
pins; bare invocation prepends a human-oriented header. The extractor degrades
|
|
367
|
-
per surface to an `n/a (<reason>)` cell and exits 0 — drift-kit's fail-visible
|
|
368
|
-
discipline, registering no gate. `DRIFT_KIT_TRAJECTORY_SURFACES` overrides the
|
|
369
|
-
harvested state-file paths (§Layout and configuration).
|
|
370
|
-
|
|
371
|
-
Consumer wiring (this repo, not kit mechanism): the emission is committed at
|
|
372
|
-
`docs/evidence-data.md`, and the consumer gate
|
|
373
|
-
`check-trajectory-fresh` (registered in `gates.list`, declared by
|
|
374
|
-
`scripts/check-trajectory-fresh.gate` and dispatching to the compiled binary
|
|
375
|
-
since gate-sdk/SPEC.md §The consumer remainder cohort) re-emits and
|
|
376
|
-
byte-compares — the gen-pre-commit/check-graph freshness pattern — so a
|
|
377
|
-
hand-edited or stale number is red at commit. The gate carries its own
|
|
378
|
-
`# graph:` manifest coupling `docs/evidence-data.md` to the harvested state
|
|
379
|
-
files, and a `good/`+`bad/` fixture pair that exercises the byte-compare
|
|
380
|
-
hermetically: because the harvest reads real git history, the fixture supplies
|
|
381
|
-
a synthetic emission as a second argument rather than regenerating one.
|
|
382
|
-
`docs/evidence.md` — the framing page, owned by the docs site — carries the
|
|
383
|
-
narrative and cites the data file, hand-copying no numbers.
|
|
384
|
-
|
|
385
|
-
The freshness gate is blind at the enter-close commit by construction: the
|
|
386
|
-
extractor emits the closing iteration's row only once its `close` stamp is in
|
|
387
|
-
committed history, but during that commit's own pre-commit run the stamp is
|
|
388
|
-
not yet history, so the gate regenerates rowlessly and passes — the honest
|
|
389
|
-
limit of a pre-commit projection whose own close is an input. The consumer
|
|
390
|
-
contract closes the gap: the close ritual regenerates the projection in the
|
|
391
|
-
first commit *after* the close stamp lands — for a queue-clearing close, the
|
|
392
|
-
Done-clearing commit, where the regenerated file and the cleared queue ride
|
|
393
|
-
together. To make that commit fire the gate, the consumer freshness gate's
|
|
394
|
-
manifest names the queue file in `trigger=` (a trigger, not a coupled
|
|
395
|
-
surface — the projection's content derives from the state files, not the
|
|
396
|
-
queue, so `couples=` is unchanged and the couples⊆trigger parity holds); a
|
|
397
|
-
close that skipped the regeneration is then red at that commit. CI's full
|
|
398
|
-
battery stays the outer backstop (gate-sdk/SPEC.md §Enforcement tiers).
|
|
399
|
-
|
|
400
|
-
## The overhead meter
|
|
401
|
-
|
|
402
|
-
`bin/overhead-meter.sh [transcript.jsonl]` measures the methodology's own cost,
|
|
403
|
-
so efficiency claims cut both ways: what fraction of a session's volume is
|
|
404
|
-
governance (gate output, hook payloads, stage ritual, governed-doc reads)
|
|
405
|
-
versus task work. A bare invocation resolves the newest transcript under
|
|
406
|
-
`DRIFT_KIT_SESSIONS_DIR`; the tool is advisory by construction — exit is always
|
|
407
|
-
0 and it never joins `gates.list`, and a missing transcript is a 0-exit notice,
|
|
408
|
-
not a failure.
|
|
409
|
-
|
|
410
|
-
The measurement is a **byte-proxy at line granularity**, honesty first. Each
|
|
411
|
-
JSONL transcript line is classified whole by a fixed marker table in the script
|
|
412
|
-
— gate-verdict shapes to `gate`, hook/system-reminder blocks and stage-skill
|
|
413
|
-
loads and governed-doc reads to the rest of governance, everything unmatched to
|
|
414
|
-
task work — and its byte length lands in that category. The markers are
|
|
415
|
-
mechanism (kit names, gate-output shapes), never a private vocabulary, so the
|
|
416
|
-
table crosses no provenance seam. Bytes are not tokens and a line is not a
|
|
417
|
-
message: the only claim this buys is *proportion across sessions of the same
|
|
418
|
-
shape*, and every emitting surface carries that caveat parenthetical. No
|
|
419
|
-
transcript content is written out — the meter emits counts and percentages
|
|
420
|
-
only, and its log lives under the gitignored `DRIFT_KIT_METRIC_DIR` (the
|
|
421
|
-
persistent measurement home — an append-only trend must survive the scratch
|
|
422
|
-
wipes `DRIFT_KIT_TMP_DIR` invites), so the private transcript stays private.
|
|
423
|
-
|
|
424
|
-
One line is appended per measured session to `DRIFT_KIT_OVERHEAD_LOG`, grammar
|
|
425
|
-
`<date> <session8> total=<bytes> gov=<bytes> gate=<bytes> pct=<n>` where `pct`
|
|
426
|
-
is the governance share. `session8` is the dedup key the meter reads on append
|
|
427
|
-
— re-measuring a session replaces its line rather than double-counting it. The
|
|
428
|
-
per-category breakdown beyond `gate=` (hook, stage, governed-doc) stays on the
|
|
429
|
-
meter's stdout at measurement time; a log field with no reader is a field
|
|
430
|
-
removed. Field readers: `kpi-overhead` reads `pct`, `gate`, and `total`
|
|
431
|
-
(§Bundled KPIs), plus `date` for the reading-age caveat and the line count for
|
|
432
|
-
the session-count caveat.
|
|
433
|
-
|
|
434
|
-
The producer of the log is the consumer's close-stage binding — this repo's
|
|
435
|
-
`.claude/commands/close.md` invokes the meter on the closing session (consumer
|
|
436
|
-
config, not a lifecycle-kit change) — and any session may invoke it ad hoc.
|
|
437
|
-
Both knobs carry working defaults, so the enabling config ships on by default,
|
|
438
|
-
and the sessions-dir default matches the harness layout this repo already reads
|
|
439
|
-
for stage stamps.
|
|
440
|
-
|
|
441
|
-
The economy levers this meter exists to inform stay *behind* it: **commit-first**
|
|
442
|
-
(the generated hook already runs and prints the coupled gates, so a separate
|
|
443
|
-
pre-battery run duplicates that output) and **failures-only run-gates output**
|
|
444
|
-
(clean lines carry no decision value at battery scale) are evaluation targets,
|
|
445
|
-
not deliverables. Neither lands, and the consumer's always-loaded battery
|
|
446
|
-
wording does not change, until the meter shows gate-output share material over
|
|
447
|
-
several measured sessions — the wording changes *with* the measurement, not
|
|
448
|
-
ahead of it. Their design (a gate-sdk output-mode knob) is a future amendment
|
|
449
|
-
against that data.
|
|
450
|
-
|
|
451
|
-
Sibling meter: §The stage-economics meter prices the token draw this byte-proxy
|
|
452
|
-
does not — they share the `DRIFT_KIT_METRIC_DIR` retention contract and the
|
|
453
|
-
advisory exit-0 posture.
|
|
454
|
-
|
|
455
|
-
## The stage-economics meter
|
|
456
|
-
|
|
457
|
-
`bin/stage-economics.sh` answers the one question no built-in surface prices:
|
|
458
|
-
**real spend by lifecycle stage × model × iteration**. The overhead meter
|
|
459
|
-
measures governance-versus-task *bytes* and delegation-kit's usage-trend the
|
|
460
|
-
rate-window *percentage*; neither converts a stage's token draw into money. This
|
|
461
|
-
tool does, so the operator can see close-over-close whether the posture that
|
|
462
|
-
rides every stage on Opus (the current all-stages-Opus posture recorded in the
|
|
463
|
-
lead command's ruling-config binding, not a scope-only choice) earns its cost.
|
|
464
|
-
|
|
465
|
-
It is advisory by the same contract as the overhead meter (§The overhead meter):
|
|
466
|
-
exit is always 0, it never joins `gates.list`, and a missing input is a 0-exit
|
|
467
|
-
notice, not a failure. It writes only under `DRIFT_KIT_METRIC_DIR` (the
|
|
468
|
-
gitignored, account-bearing persistent home) and **emits no account
|
|
469
|
-
identifiers** — the trend log carries stage, model, iteration, token counts, and
|
|
470
|
-
priced cost, never the account the tokens billed to.
|
|
471
|
-
|
|
472
|
-
**The join.** Three inputs, joined on the session:
|
|
473
|
-
|
|
474
|
-
1. **Stamps** — the WORKFLOW-STATE data lines, one per stage-skill invocation,
|
|
475
|
-
grammar `<iteration> <stage> <session-id> <date> <head>` (owned by
|
|
476
|
-
lifecycle-kit/SPEC.md §The state machine; this tool is a read-only consumer of
|
|
477
|
-
that contract, it changes nothing there — its parse names a catch-all past the
|
|
478
|
-
date, which is why the fifth field arrived here as a restatement to update and
|
|
479
|
-
not as a reader to fix). The `<session-id>` field is not a raw
|
|
480
|
-
transcript id: it is lifecycle's `session-id.sh` *normalization* of one — a
|
|
481
|
-
leading `agent-` stripped, then the first 8 chars (lifecycle-kit/SPEC.md
|
|
482
|
-
§bin/session-id.sh) — so this repo's stamps carry an 8-char value, `session8`
|
|
483
|
-
below. The stamp supplies the iteration↔stage↔session8 mapping. Read from
|
|
484
|
-
`DRIFT_KIT_STATE_FILE` (§Layout and configuration), defaulting to the same
|
|
485
|
-
state-file path the trajectory extractor already reads — and read as
|
|
486
|
-
**history ∪ live**: that path's *committed history* (added lines in its diff
|
|
487
|
-
across history, the technique §The published-evidence extractor already uses)
|
|
488
|
-
unioned with its *current content*, so a `/scope` boundary truncation of the
|
|
489
|
-
live file destroys no economics. Union rather than replacement because
|
|
490
|
-
replacement blinds the meter to a stage that has stamped but not yet committed
|
|
491
|
-
— precisely the in-flight stage whose economics are being read — and rather
|
|
492
|
-
than fallback because the live file is almost always present and almost always
|
|
493
|
-
truncated, so a fallback arm would never fire on the path that needs it. The
|
|
494
|
-
union costs nothing: the `iteration/stage/session8` dedup already collapses a
|
|
495
|
-
stamp seen in both arms. The reconstruction is **unbounded and carries no depth
|
|
496
|
-
knob**: the trajectory extractor sets the in-kit precedent, and the effective
|
|
497
|
-
bound is already self-enforcing from the transcript side — a stamp whose
|
|
498
|
-
session has aged out of `DRIFT_KIT_SESSIONS_DIR` takes the unmatched path below
|
|
499
|
-
and costs one skipped row. A depth knob would be a second bound with no reader.
|
|
500
|
-
Because unbounded history would turn a per-stamp skip notice into unbounded
|
|
501
|
-
output, unmatched stamps are **counted into one summary line** rather than
|
|
502
|
-
listed; the skipped rows were never logged and still are not.
|
|
503
|
-
**Diagnosing a stage absent from the trend log** — the union makes truncation
|
|
504
|
-
a *non-cause*, and saying so here is the point: a stage whose stamps were
|
|
505
|
-
truncated out of the live file still prices off history, so a missing
|
|
506
|
-
`(iteration, stage)` row means that stamp resolved no transcript (aged out of
|
|
507
|
-
`DRIFT_KIT_SESSIONS_DIR`, counted in the unmatched summary) or that the
|
|
508
|
-
transcript carried no assistant-turn usage — both reported at measurement
|
|
509
|
-
time — and never that the boundary truncation lost it. The standing
|
|
510
|
-
misdiagnosis runs the other way: the union backfills a truncated stage only
|
|
511
|
-
on the first run that reads far enough back, so a log sampled before that run
|
|
512
|
-
shows the stage missing and reads as permanent loss. It is not; re-run the
|
|
513
|
-
meter before concluding the history arm is lossy.
|
|
514
|
-
2. **Transcripts** — under `DRIFT_KIT_SESSIONS_DIR` (the knob the overhead meter
|
|
515
|
-
already resolves). A stamp's `session8` selects a transcript by applying that
|
|
516
|
-
**same normalization** to each candidate basename and matching — not by a raw
|
|
517
|
-
filename prefix: this repo's stage sessions are subagent transcripts named
|
|
518
|
-
`agent-<hex>.jsonl` whose stamp is `<hex>` truncated to 8 chars, so a raw
|
|
519
|
-
prefix match against the `agent-` prefix would select nothing. Candidates are
|
|
520
|
-
two-tiered, because a subagent transcript is not a sibling of its lead's: a
|
|
521
|
-
lead session sits directly under the sessions dir, while the sessions it
|
|
522
|
-
dispatches sit two levels deep under `<lead-session-id>/subagents/`. The scan
|
|
523
|
-
globs both tiers, so a stage session dispatched by a live lead is found on the
|
|
524
|
-
nested tier and a stage run without one on the flat tier. The tool sums
|
|
525
|
-
the matched session's assistant-turn usage into four token categories —
|
|
526
|
-
`input`, `output`, `cache_read`, `cache_creation` — per model id seen on those
|
|
527
|
-
turns. A streaming transcript repeats a message id across lines (input/cache
|
|
528
|
-
constant, output growing), so the sum keeps the last usage per message id
|
|
529
|
-
before aggregating — summing raw lines would multi-count. Because this repo runs
|
|
530
|
-
one session per stage under `LIFECYCLE_KIT_SESSION_BOUNDARY` (lifecycle-kit/SPEC.md
|
|
531
|
-
§The state machine; its roster owns the setting), a session maps to exactly one
|
|
532
|
-
stage, so per-session usage *is* per-stage usage. Under an iteration-boundary
|
|
533
|
-
consumer a session may span stages, and then it bears **several stamps**. The
|
|
534
|
-
join therefore keys on the **session, not the stamp**: a session's usage is
|
|
535
|
-
summed once and attributed to the `(iteration, stage)` of its **last** stamp,
|
|
536
|
-
and every stamp it yielded takes no row at all, named in a caveat listing the
|
|
537
|
-
yielded pairs. Keying on the stamp is the over-count defect this rule exists to
|
|
538
|
-
forbid — it makes two stamps two keys, resolves the same transcript twice, and
|
|
539
|
-
bills one session's whole burn to both stages in full, so a per-stage figure
|
|
540
|
-
read off it compares one number against a copy of itself. *Assignment, not a
|
|
541
|
-
split*: apportioning a spanning session across its stages would need an
|
|
542
|
-
allocation key — relative effort per stage — that nothing in the join measures,
|
|
543
|
-
and a fabricated key folded into figures a tier decision is read off is worse
|
|
544
|
-
than a stated one, the same rule that decides supervision below (the reserved
|
|
545
|
-
`supervision` value, under The trend log). Last rather than first because the
|
|
546
|
-
stamp is a stage's *first* step, so
|
|
547
|
-
everything after the final stamp is that stage's; the honest limit is that the
|
|
548
|
-
yielded stages under-report, which is why the caveat names them and makes the
|
|
549
|
-
residue countable rather than invisible. Parsing the transcript
|
|
550
|
-
needs `jq`; its absence degrades to a token-less notice rather than a failure.
|
|
551
|
-
3. **Price table** — a consumer-supplied data file mapping model id → per-token
|
|
552
|
-
price for each of the four categories. This is **consumer config, never a kit
|
|
553
|
-
literal** (the provenance seam, the `check-graph`/`graph-vocab` pattern): the
|
|
554
|
-
per-token prices are public facts, but the *roster of models a consumer runs*
|
|
555
|
-
is theirs, and a kit literal enumerating it would publish that roster. The kit
|
|
556
|
-
ships `templates/price-table.tsv` with placeholder rows and the column schema;
|
|
557
|
-
the consumer copies it and fills their roster. Resolved from
|
|
558
|
-
`DRIFT_KIT_PRICE_TABLE` (§Layout and configuration).
|
|
559
|
-
**Two dating headers, on the same consumer-owned header block.** Each is read
|
|
560
|
-
as the first line of the file matching
|
|
561
|
-
`^#[[:space:]]*<field>:[[:space:]]*<YYYY-MM-DD>`, trailing prose on the same
|
|
562
|
-
line ignored: `priced-as-of:` (when the numbers were last transcribed) and
|
|
563
|
-
`prices-valid-through:` (the last date every row is still true, **optional**).
|
|
564
|
-
Their reader is `kpi-price-table-age` (§Bundled KPIs), not this meter — the
|
|
565
|
-
KPI reads the table's header and never its rows, so an expired table still
|
|
566
|
-
prices, loudly rather than silently, and the meter's arithmetic is untouched
|
|
567
|
-
by either header. Where a row is time-boxed, `prices-valid-through:` **owns**
|
|
568
|
-
that date and the file's own prose cites the header rather than restating it;
|
|
569
|
-
a second copy of a date the day it becomes machine-read is the duplication
|
|
570
|
-
the header exists to remove (de-literalization).
|
|
571
|
-
|
|
572
|
-
**Degradation.** An absent live state file is a notice and the run continues to
|
|
573
|
-
the history arm — committed history can carry stamps for a file absent from the
|
|
574
|
-
working tree — and the 0-exit "nothing to read" notice fires only when *both*
|
|
575
|
-
sources yield no stamps. A price table that is absent, or that has no row for a
|
|
576
|
-
model the transcripts name, degrades that model's cost cell to `n/a` and the tool emits the
|
|
577
|
-
token counts alone — the same degradation contract the trajectory extractor
|
|
578
|
-
applies to an unreadable surface (§Bundled KPIs / §Layout and configuration). Cost
|
|
579
|
-
is additive over priced cells only; an `n/a` cell never poisons the total
|
|
580
|
-
silently — the output carries an "incomplete pricing" caveat when any contributing
|
|
581
|
-
cell degraded.
|
|
582
|
-
|
|
583
|
-
**The under-count bound.** The unmatched counter reports the *stamp with no
|
|
584
|
-
transcript* and is structurally blind to its inverse — the **transcript with no
|
|
585
|
-
stamp**. A stage that continues in a new session (a credential swap mid-stage,
|
|
586
|
-
any resume) leaves that session unstamped, so it matches no stamp and is never
|
|
587
|
-
sought; its burn is invisible rather than wrong. The meter therefore counts the
|
|
588
|
-
transcripts under `DRIFT_KIT_SESSIONS_DIR` that no row claimed and reports the
|
|
589
|
-
count.
|
|
590
|
-
|
|
591
|
-
The bound is **tighter than the stamp side alone**, because a dispatched
|
|
592
|
-
transcript *can* now be placed — through its anchor, by the fan-out row below.
|
|
593
|
-
What remains in the count is the transcript that resolved **no anchor**, and for
|
|
594
|
-
that residue it is still an **upper bound, never an attribution**: an unanchored
|
|
595
|
-
transcript carries no iteration and no stage *and descends from no session that
|
|
596
|
-
does*, so nothing in the join could place it. The reading that most of the
|
|
597
|
-
residue is ordinary non-lifecycle sessions becomes **more** true rather than
|
|
598
|
-
less, since the fan-out pass drains the lifecycle subtrees out of it. The one
|
|
599
|
-
case the fan-out row cannot reach is the unstamped **continuation**: it is a
|
|
600
|
-
resumption rather than a dispatch, so it has no parent edge to walk. Sizing that
|
|
601
|
-
blind spot is the whole of what drift-kit can do alone — attributing a
|
|
602
|
-
continuation would need the *stamp* side to record it, which is lifecycle-kit's
|
|
603
|
-
contract and no part of this meter's read-only consumption of it.
|
|
604
|
-
|
|
605
|
-
**The trend log.** One line is appended per `(iteration, stage, model)` triple to
|
|
606
|
-
`DRIFT_KIT_STAGE_ECONOMICS_LOG`, grammar:
|
|
607
|
-
|
|
608
|
-
```
|
|
609
|
-
<date> <iteration> <stage> <model> in=<tok> out=<tok> cr=<tok> cw=<tok> cost=<usd|n/a>
|
|
610
|
-
```
|
|
611
|
-
|
|
612
|
-
`<stage>` is the **stage-or-role** column — a lifecycle stage, a cost-bearing
|
|
613
|
-
role, or either of those with the fan-out suffix appended (the reserved
|
|
614
|
-
`supervision` value and the fan-out row, below). `cr` is cache-read and `cw` is
|
|
615
|
-
cache-creation. `cr` is the headline field: the
|
|
616
|
-
motivating dig showed cache-read of accumulated context — not model choice — is
|
|
617
|
-
the dominant burn (build ~73% of session cost, climbing 37M→86M cr-tokens per
|
|
618
|
-
session), so the field exists to keep that lever visible close-over-close. The
|
|
619
|
-
dedup key read on append is the `<iteration> <stage> <model>` triple —
|
|
620
|
-
re-measuring a triple replaces its line rather than double-counting, exactly as
|
|
621
|
-
the overhead meter dedups on `session8`. That key is also what makes the
|
|
622
|
-
history ∪ live read safe with no added mechanism: a history arm re-derives rows
|
|
623
|
-
already logged, and re-derivation replaces a triple's line rather than
|
|
624
|
-
double-counting it. Any per-model sub-breakdown beyond these
|
|
625
|
-
fields stays on stdout at measurement time; a log field with no reader is a field
|
|
626
|
-
removed. Field readers: the `/economics` narrative reads `cost` and the four token
|
|
627
|
-
fields (`cr` headline); the operator reads `cost` close-over-close; the deferred
|
|
628
|
-
`benchmark-ab-experiment` rung's measurement half consumes this log rather than
|
|
629
|
-
rebuilding it; `date` carries the reading-age caveat. `date` is the
|
|
630
|
-
**measurement** date, not the stage's — and under the history read the two can be
|
|
631
|
-
far apart, because re-deriving an old iteration restamps its row to the day it
|
|
632
|
-
was re-measured. The reading-age caveat stays correct (it ages the reading, which
|
|
633
|
-
is what it says), but the field may not be read as "when this stage ran": the
|
|
634
|
-
stage's own date is in the stamp, and the trajectory extractor is the surface
|
|
635
|
-
that renders it.
|
|
636
|
-
|
|
637
|
-
**The reserved `supervision` value — the lead's burn is its own row.** Under a
|
|
638
|
-
split-lead posture the lead session dispatches, verifies, and runs batteries
|
|
639
|
-
while carrying **no stamp**, so it appears in no row and every per-stage total
|
|
640
|
-
understates the iteration's true cost by the whole supervision line item. The
|
|
641
|
-
meter emits it as a distinct row instead, labelled by
|
|
642
|
-
`DRIFT_KIT_SUPERVISION_LABEL` (§Layout and configuration). *A row rather than an
|
|
643
|
-
apportionment across stages*: spreading the lead's burn over stages would need
|
|
644
|
-
an allocation key with no basis in anything measured — the lead's burn is not
|
|
645
|
-
proportional to any stage's tokens — and would fold a fabricated number into
|
|
646
|
-
figures a tier decision is read off, where a distinct row is a visible line item
|
|
647
|
-
the operator can accept, discount, or ignore. The meter's contract is that a
|
|
648
|
-
degraded or absent measurement is visible, never silently folded (§The report
|
|
649
|
-
skeleton); the same rule decides this.
|
|
650
|
-
|
|
651
|
-
- **The column's widened meaning.** `<stage>` reads **stage *or* cost-bearing
|
|
652
|
-
role**, not stage alone. A supervision row is a role that carries cost and no
|
|
653
|
-
stamp — never a lifecycle stage that dropped out of the roster. The column's
|
|
654
|
-
members were roster-closed until this value existed, and a reader who assumes
|
|
655
|
-
they still are would misdiagnose the row as roster drift. The column widens
|
|
656
|
-
once more for the fan-out row below, which admits *either* member with a
|
|
657
|
-
suffix appended.
|
|
658
|
-
- **The producer — derivation from the transcript path, not from a stamp.** The
|
|
659
|
-
two-tier scan above already resolves a dispatched stage session at
|
|
660
|
-
`<sessions-dir>/<lead-session-id>/subagents/<agent>.jsonl` while a lead sits
|
|
661
|
-
directly under the sessions dir. So for every stamp whose transcript resolved
|
|
662
|
-
on the **nested** tier, that path's `<lead-session-id>` component names the
|
|
663
|
-
supervisor and the stamp supplies the iteration. The meter collects
|
|
664
|
-
`(lead-session, iteration)` → dispatch count, resolves each lead's own
|
|
665
|
-
transcript on the flat tier, and sums its assistant-turn usage per model with
|
|
666
|
-
the same last-usage-per-message-id reader — no second parser. **No lifecycle
|
|
667
|
-
change**: the lead still stamps nothing and moves no cursor; the supervising
|
|
668
|
-
session is *derived*, which is what keeps this a read-only consumption of
|
|
669
|
-
lifecycle-kit/SPEC.md §The state machine.
|
|
670
|
-
- **The attribution invariant.** A transcript's usage is attributed to exactly
|
|
671
|
-
**one row key** — either an `(iteration, stage-or-role)` pair or that pair's
|
|
672
|
-
fan-out value. That is the rule the session-keyed join above enforces for stage
|
|
673
|
-
rows, the reason a lead whose own transcript already carried a stage row yields
|
|
674
|
-
no supervision row, and (below) the reason a dispatched transcript resolves
|
|
675
|
-
exactly one anchor. One guard serves all three: a transcript already claimed by
|
|
676
|
-
a row is never a candidate for another. In the ordinary case a lead supervises one
|
|
677
|
-
iteration and its whole usage lands on that iteration's supervision row —
|
|
678
|
-
exact, no key. A lead spanning two or more iterations **apportions in
|
|
679
|
-
proportion to the number of stamped stage sessions it dispatched per
|
|
680
|
-
iteration**, integer-split with the remainder to the iteration holding the most
|
|
681
|
-
dispatches (ties broken by iteration name, so the split is deterministic and
|
|
682
|
-
the parts re-sum to the whole). The run's caveat names that key: a disclosed
|
|
683
|
-
key is honest and a silent one is not.
|
|
684
|
-
- **Collision rule.** If any stamp the run reads names a stage equal to the
|
|
685
|
-
label, the meter emits a visible notice naming `DRIFT_KIT_SUPERVISION_LABEL`
|
|
686
|
-
and emits **no** supervision rows that run. It is checkable from data the meter
|
|
687
|
-
already reads — its own stamps — so this adds no roster dependency and no
|
|
688
|
-
second bound to drift. **A suppressed anchor suppresses its fan-out**: with no
|
|
689
|
-
supervision row emitted the lead is no anchor, so its direct fan-out finds none
|
|
690
|
-
and emits nothing. A fan-out row for a role that emitted no row of its own
|
|
691
|
-
would be an orphan the reader cannot place, and the suppression is structural
|
|
692
|
-
rather than a second rule — the anchor registers only where the row did.
|
|
693
|
-
- **Degradation.** A run with no nested-tier match (a stage run without a live
|
|
694
|
-
lead) emits no supervision row and no notice: zero supervision burn is the
|
|
695
|
-
honest reading, not a missing measurement. A lead transcript aged out of the
|
|
696
|
-
sessions dir takes the existing unmatched-summary path.
|
|
697
|
-
- **No new field.** The four token fields, `cost`, and `date` carry a supervision
|
|
698
|
-
row exactly as they carry a stage row, and the dedup key, the
|
|
699
|
-
replace-on-re-measure behavior, and every existing reader work unchanged —
|
|
700
|
-
`supervision` is a value in an existing column, not a new field. The
|
|
701
|
-
apportionment key and the collision notice are **stdout caveats at measurement
|
|
702
|
-
time**, not log fields; a log field with no reader is a field removed, and
|
|
703
|
-
neither has one. The row's own named reader is the `/economics` narrative's
|
|
704
|
-
supervision line item (§The `/economics` skill).
|
|
705
|
-
- **Blast radius of the widened column.** The log has one parsing reader in
|
|
706
|
-
production code — this meter's own dedup grep — and one asserting reader in the
|
|
707
|
-
harness, `smoke/install.sh`, which counts log lines. No *gate* reads it (it
|
|
708
|
-
lives under the gitignored `DRIFT_KIT_METRIC_DIR`), and the `/economics`
|
|
709
|
-
narrative reads it as prose rather than parsing the stage column.
|
|
710
|
-
**The trajectory arm does not parse this column at all** — the reader worth
|
|
711
|
-
naming, since it is the surface a hardcoded stage roster once broke; it reads
|
|
712
|
-
stamps and its own `DRIFT_KIT_STAGES` roster, never this log. So a non-stage
|
|
713
|
-
value in the column cannot silently fall out of a roster the way the
|
|
714
|
-
trajectory's stamps did. The same three readers were re-verified when the
|
|
715
|
-
column widened again for the fan-out value, and the conclusion is unchanged.
|
|
716
|
-
|
|
717
|
-
**The fan-out row — a stage's dispatched subtree is its own line item.** A stage
|
|
718
|
-
session that dispatches agents pays for their whole subtree, yet every dispatched
|
|
719
|
-
transcript carries no stamp of its own, so its burn lands in no row and each
|
|
720
|
-
per-stage figure understates that stage by its entire fan-out. The meter bills the
|
|
721
|
-
subtree to a row whose `<stage>` value is the **anchor's stage-or-role with
|
|
722
|
-
`DRIFT_KIT_FANOUT_SUFFIX` appended** (§Layout and configuration) — `build+fanout`,
|
|
723
|
-
`close+fanout`, `supervision+fanout`.
|
|
724
|
-
|
|
725
|
-
- **A suffixed value rather than a bare reserved label.** A bare `fanout` label —
|
|
726
|
-
the shape `supervision` takes — would answer "what did fan-out cost this
|
|
727
|
-
iteration" and lose *which stage's* fan-out it was, the question the motivating
|
|
728
|
-
measurement asked. The suffix keeps the `(iteration, stage)` join intact and
|
|
729
|
-
sorts the subtree row adjacent to its own stage row.
|
|
730
|
-
- **A separate row rather than a fold into the stage row.** Separability *is* the
|
|
731
|
-
deliverable: a folded total answers the operator's question only through a
|
|
732
|
-
stdout caveat the trend log does not carry, so the close-over-close series — the
|
|
733
|
-
log's whole purpose — would be blind to the split it was extended to show. A
|
|
734
|
-
fold would also silently redefine a value already logged, a `close` row written
|
|
735
|
-
before this change and one written after meaning different things under one
|
|
736
|
-
name, which is the drift the dedup key exists to prevent rather than to hide.
|
|
737
|
-
- **What it is not: a dispatch-type breakdown.** The row carries **no
|
|
738
|
-
dispatch-type dimension** — a fork's spend and a typed dispatch's spend fold
|
|
739
|
-
into one anchor total. It is an aggregate proxy for "what this stage's
|
|
740
|
-
delegation cost", never an isolation of fork cost, and a reader who splits a
|
|
741
|
-
posture decision on fork-versus-dispatch cannot get that split from this row.
|
|
742
|
-
- **The anchor set.** An anchor is a transcript that already holds a row of its
|
|
743
|
-
own: every **stamped stage session whose transcript resolved**, anchoring its
|
|
744
|
-
subtree to that stamp's `(iteration, stage)`; and every **lead that emitted a
|
|
745
|
-
supervision row**, anchoring its own direct fan-out to
|
|
746
|
-
`(iteration, DRIFT_KIT_SUPERVISION_LABEL)` — a lead's audit sweeps are as
|
|
747
|
-
unbilled as a stage's, and omitting them would fix half the tier. The two
|
|
748
|
-
conditions differ deliberately: a stage anchors on its stamp **resolving**,
|
|
749
|
-
because a stamped stage whose transcript carries no usage is still a real,
|
|
750
|
-
placeable `(iteration, stage)` for its subtree, while a supervision role that
|
|
751
|
-
emitted no row is not a role at all. A lead that already carried a stage row
|
|
752
|
-
yields no supervision row (the invariant above) and its fan-out anchors to that
|
|
753
|
-
**stage** row instead — the anchor lookup finds it and needs no special case.
|
|
754
|
-
- **The producer — the parent walk, nearest anchor wins.** A dispatched
|
|
755
|
-
transcript's *path* names only the root session: a grandchild sits flat in the
|
|
756
|
-
same `<root>/subagents/` directory as a child, so the path cannot carry the
|
|
757
|
-
parent edge. The harness writes it one file over, as a `.meta.json` sibling of
|
|
758
|
-
each nested transcript, whose `parentAgentId` names the parent agent — a **bare**
|
|
759
|
-
id, resolved against `agent-<id>.jsonl` in the same directory (the bare spelling
|
|
760
|
-
`<id>.jsonl` is accepted as a fallback, so neither spelling is guessed). A record
|
|
761
|
-
with no `parentAgentId` is a direct child of the root session that names the
|
|
762
|
-
directory. For each `subagents/` transcript that is neither an anchor nor
|
|
763
|
-
already holding a row, the meter walks parents by that rule until an anchor is
|
|
764
|
-
reached and gives the **nearest** anchor the transcript's usage; intermediate
|
|
765
|
-
non-anchor agents are transparent, which is what puts a deep fork under the
|
|
766
|
-
stage session that ultimately caused it rather than under the sweep that
|
|
767
|
-
happened to spawn it. A walk reaching the root session without meeting an anchor
|
|
768
|
-
emits **no** row and the transcript stays in the under-count bound — the correct
|
|
769
|
-
reading, since an ordinary non-lifecycle session's fan-out belongs to no
|
|
770
|
-
iteration and no stage. The walk is **bounded by the transcript population and
|
|
771
|
-
by a visited set**, so a cycle or a dangling `parentAgentId` costs a counted
|
|
772
|
-
notice rather than a loop. The parent forest is read with one pass per
|
|
773
|
-
`subagents/` directory rather than one per hop; the usage itself is the same
|
|
774
|
-
last-usage-per-message-id reader the stage rows use, so the pass costs one
|
|
775
|
-
transcript parse per attributed subtree member and no second parser.
|
|
776
|
-
- **Reading a harness-private artifact — why the coupling is admissible.** The
|
|
777
|
-
meta sibling is under no contract, and the meter reads it anyway on one ground:
|
|
778
|
-
it is the **same coupling class the meter already runs on**, one file over from
|
|
779
|
-
the transcript JSONL usage schema and the `<root>/subagents/` layout it already
|
|
780
|
-
depends on, and the failure mode of the shape changing is bounded to a *visible
|
|
781
|
-
no-op* rather than a wrong figure. That is the difference between coupling to a
|
|
782
|
-
shape for an **enrichment** and coupling to it for the pricing arithmetic; the
|
|
783
|
-
ruling is yes here and would be no there. The rejected alternative — taking the
|
|
784
|
-
key from a dispatcher-minted path instead — fails on the axis that decides it: a
|
|
785
|
-
convention a dispatcher can forget produces a **silent** under-count in the exact
|
|
786
|
-
tier this row exists to stop under-counting, it relocates the harness coupling
|
|
787
|
-
rather than removing it (parsing a child's first user message for a string the
|
|
788
|
-
meter must then trust), and it cannot reach a **fork** at all, since a fork
|
|
789
|
-
inherits context rather than receiving an authored prompt.
|
|
790
|
-
- **Apportionment.** Where a lead spans several iterations, its fan-out
|
|
791
|
-
apportions by the **same dispatch-count key, with the same integer split**, that
|
|
792
|
-
apportions its supervision row. Reusing the key rather than minting a second one
|
|
793
|
-
is the point: two keys over one lead would let the supervision row and its
|
|
794
|
-
fan-out row disagree about which iteration the lead belonged to.
|
|
795
|
-
- **Several anchors, one row — the fold, not a race.** One `(iteration, stage)`
|
|
796
|
-
can hold **several** anchors: a stage run as several sessions in one iteration
|
|
797
|
-
(a batch split) stamps once per session, and each session anchors its own
|
|
798
|
-
subtree. Their subtrees **sum into the single fan-out row** for that pair. This
|
|
799
|
-
follows from the invariant above rather than adding to it — the attribution unit
|
|
800
|
-
is the *row key*, not the anchor — and the alternative is not a second row but a
|
|
801
|
-
**lost** one: two appends under one `<iteration> <stage> <model>` triple make
|
|
802
|
-
the dedup key replace the first with the second, stranding its transcripts
|
|
803
|
-
attributed to a row the replacement erased. Apportionment happens **first and the
|
|
804
|
-
fold second**, since the dispatch-count split is a property of the anchor while
|
|
805
|
-
the row is not. The stdout caveat names the contributing anchor count where it
|
|
806
|
-
exceeds one, so a folded row is never read as one session's.
|
|
807
|
-
- **Collision rule.** The default suffix is collision-proof by construction — the
|
|
808
|
-
stamp reader's stage-field alphabet is lowercase alphanumerics and hyphens, so a
|
|
809
|
-
`+` can never appear in a stamped stage name. A consumer overriding the knob can
|
|
810
|
-
break that, so the check mirrors the supervision label's: if any stamp the run
|
|
811
|
-
reads names a stage **ending in** the suffix, the meter emits a visible notice
|
|
812
|
-
naming `DRIFT_KIT_FANOUT_SUFFIX` and emits **no** fan-out rows that run. It is
|
|
813
|
-
checkable from the stamps the meter already reads, so it adds no roster
|
|
814
|
-
dependency and no second bound to drift.
|
|
815
|
-
- **Degradation — the contract that bounds the coupling.** Every arm degrades to a
|
|
816
|
-
visible absence, never to a wrong figure, and never to a non-zero exit:
|
|
817
|
-
|
|
818
|
-
| what is missing | behavior |
|
|
819
|
-
| --- | --- |
|
|
820
|
-
| the meta layer entirely | no fan-out rows; one notice; every existing row unchanged — the meter's behavior before this row existed |
|
|
821
|
-
| one transcript's meta record | that transcript takes no fan-out row and stays in the under-count bound; counted in the unresolved notice |
|
|
822
|
-
| `parentAgentId` naming an agent with no transcript | same — counted, never guessed |
|
|
823
|
-
| a cycle or an over-long chain | same — the walk is bounded and the transcript counted |
|
|
824
|
-
| `jq` absent | already fatal to the whole join upstream; the fan-out pass never runs |
|
|
825
|
-
| the price table absent or missing a model row | the row's `cost` degrades to `n/a` and raises the existing incomplete-pricing caveat, exactly as a stage row's does |
|
|
826
|
-
|
|
827
|
-
- **No new field.** The four token fields, `cost`, and `date` carry a fan-out row
|
|
828
|
-
exactly as they carry a supervision row; the dedup key stays the
|
|
829
|
-
`<iteration> <stage> <model>` triple and a re-measure replaces the row's line
|
|
830
|
-
like any other. The split, the transcript count, and every degradation stay
|
|
831
|
-
**stdout caveats at measurement time** — a log field with no reader is a field
|
|
832
|
-
removed, and none of these has one. The row's own named readers are the
|
|
833
|
-
`/economics` narrative's fan-out line item (§The `/economics` skill), the
|
|
834
|
-
operator reading the trend log close-over-close, and the deferred
|
|
835
|
-
`benchmark-ab-experiment` rung's measurement half, which consumes this log
|
|
836
|
-
rather than rebuilding it and inherits the row with no change.
|
|
837
|
-
**No dispatch-type dimension either, and that is the answer to a question the
|
|
838
|
-
row invites.** A fork is distinguishable at the meta layer — its record carries
|
|
839
|
-
`isFork` beside an `agentType` naming the fork type, and carries no `model` —
|
|
840
|
-
but the row folds a stage's whole subtree into one line, so "what did forking
|
|
841
|
-
cost" is not a query this log answers. It is re-derived by walking
|
|
842
|
-
`parentAgentId` and pricing the fork transcripts directly, which is the honest
|
|
843
|
-
cost of leaving the dimension out until a reader for it exists.
|
|
844
|
-
- **No lifecycle change.** No stamp is added, no cursor moves, no stage-skill
|
|
845
|
-
template changes. The fan-out edge is *derived*, exactly as the supervision edge
|
|
846
|
-
is, which is what keeps this a read-only consumption of lifecycle-kit/SPEC.md
|
|
847
|
-
§The state machine.
|
|
848
|
-
|
|
849
|
-
## The `/economics` skill
|
|
850
|
-
|
|
851
|
-
`/economics` is the customer-facing post-iteration narrative: run at close, it
|
|
852
|
-
chains `bin/overhead-meter.sh` → `bin/stage-economics.sh` into one report
|
|
853
|
-
answering "what did this iteration cost, where, and was the model posture worth
|
|
854
|
-
it". `stage-economics` is the sole cost-attribution surface — it prices
|
|
855
|
-
per-transcript, per-stage, per-model token draw (the token SSOT), while
|
|
856
|
-
`overhead-meter` contributes the governance share, not a cost figure. The
|
|
857
|
-
narrative deliberately excludes delegation-kit's usage-trend budget-%: that
|
|
858
|
-
rate-window footprint is account-wide — confounded by overlapping sessions and
|
|
859
|
-
by a second operator on the same account — so it is the wrong instrument for
|
|
860
|
-
per-iteration cost attribution, and carrying it beside the per-transcript token
|
|
861
|
-
SSOT put a confounded advisory number next to a clean one a reader could
|
|
862
|
-
over-trust as this iteration's cost. It ships as a drift-kit skill
|
|
863
|
-
template `templates/economics.md`, materialized in the consumer as the copy
|
|
864
|
-
`.claude/commands/economics.md` — the template↔consumer-copy split the guard/hook
|
|
865
|
-
skills use, its one bound slot the consumer's model posture. It is not a lifecycle
|
|
866
|
-
stage (it moves no cursor, stamps nothing) and so is outside
|
|
867
|
-
`check-stage-skill-coverage`'s stage roster; it is a reporting ritual the close
|
|
868
|
-
skill may invoke, never a gate.
|
|
869
|
-
|
|
870
|
-
## lib/drift.sh
|
|
871
|
-
|
|
872
|
-
The kit's sourced knob resolution — values, never tool structure. It exists for
|
|
873
|
-
one reason: `gate-sdk/SPEC.md §lib/gate.sh`'s config bridge resolves a compiled
|
|
874
|
-
member's declared knob by sourcing **the owning kit's** `lib/*.sh`, and the owner
|
|
875
|
-
is derived from the knob's own `DRIFT_KIT_` prefix. So a knob this kit owns can
|
|
876
|
-
only be resolved from here; there is no other place that would work, and a knob
|
|
877
|
-
no library defines is the bridge's third refusal.
|
|
878
|
-
|
|
879
|
-
**The trajectory arm's four knobs live here for exactly that reason, and their
|
|
880
|
-
move is what the port paid.** `DRIFT_KIT_CONFIG_FILE`,
|
|
881
|
-
`DRIFT_KIT_TRAJECTORY_SURFACES`, `DRIFT_KIT_GATES_FILE` and `DRIFT_KIT_STAGES`
|
|
882
|
-
were resolved inside `bin/trajectory.sh` while the extractor was a shell tool
|
|
883
|
-
that could source its own config. A compiled arm cannot: it reads the bridge, the
|
|
884
|
-
bridge sources this library and nothing else, so a default left in the tool would
|
|
885
|
-
have made every one of them the bridge's third refusal. **Sourcing the consumer
|
|
886
|
-
config is part of that**, and it happens here first — a knob a consumer config
|
|
887
|
-
sets would otherwise resolve to the platform default and silently ignore the
|
|
888
|
-
override, which is the failure mode that looks like success
|
|
889
|
-
(gate-sdk/SPEC.md §The non-gate arm). The config path itself takes
|
|
890
|
-
`DRIFT_KIT_KPIS_FILE`'s two adoption modes below, for the same reason: an
|
|
891
|
-
explicitly-set path that does not exist is adopted-but-broken.
|
|
892
|
-
|
|
893
|
-
`DRIFT_KIT_TRAJECTORY_SURFACES` keeps its **scalar** two-field shape
|
|
894
|
-
(`"<state-file> <evidence-file>"`) across the substrate move rather than becoming
|
|
895
|
-
an array, so a consumer that set it need not learn a second spelling; the reader
|
|
896
|
-
splits its two whitespace-separated fields exactly as the shell form's `read -r`
|
|
897
|
-
did.
|
|
898
|
-
|
|
899
|
-
**`DRIFT_KIT_KPIS_FILE` resolves to the KPI registry path, and the two adoption
|
|
900
|
-
modes are preserved here rather than at the reader.** They are the same two the
|
|
901
|
-
enforcement map states for every registry it reads — *adopted-but-broken refuses
|
|
902
|
-
where not-adopted degrades*:
|
|
903
|
-
|
|
904
|
-
- **Explicitly set to a path that does not exist** is adopted-but-broken: exit 2
|
|
905
|
-
naming the knob. Under the config bridge that refusal fires inside the
|
|
906
|
-
resolution subshell and refuses the whole invocation, so a consumer who
|
|
907
|
-
misconfigured the registry gets a failure rather than a quietly shorter page.
|
|
908
|
-
- **Unset, with the default path absent**, is not-adopted: the knob resolves to
|
|
909
|
-
the **empty string**, which a reader takes as *no registry, drop the section*.
|
|
910
|
-
|
|
911
|
-
**A guarded default would have collapsed both into the refusing mode** — the
|
|
912
|
-
idiom every other knob here could have used is wrong for this one, because it
|
|
913
|
-
erases the set-ness the two modes are told apart by, turning a consumer that
|
|
914
|
-
never adopted KPIs into a hard failure. Emptiness carries the not-adopted signal
|
|
915
|
-
instead, which is what lets **a reader reached through the bridge carry no
|
|
916
|
-
default**: a reader that had to recognise the default path would be a second home
|
|
917
|
-
for it.
|
|
918
|
-
|
|
919
|
-
**The default has a second home today, and the scope of the claim above is
|
|
920
|
-
exactly the bridge.** `bin/drift-report.sh` resolves the same knob inline with
|
|
921
|
-
its own copy of the default and is *not* a bridge reader, so it is untouched by
|
|
922
|
-
this library and nothing holds the two literals in lockstep. The duplication is
|
|
923
|
-
real, bounded, and the ordinary transitional state — collapsing it means
|
|
924
|
-
`drift-report.sh` sourcing this library, which would also give it this library's
|
|
925
|
-
refusal where it currently degrades in both modes, a behaviour change outside the
|
|
926
|
-
amendment that introduced this file. It is filed rather than absorbed
|
|
927
|
-
(`drift-kpis-default-two-homes`), not left for a later reader to rediscover.
|
|
928
|
-
|
|
929
|
-
## Layout and configuration
|
|
930
|
-
|
|
931
|
-
```
|
|
932
|
-
drift-kit/
|
|
933
|
-
lib/drift.sh # sourced knob resolution; the config bridge sources it
|
|
934
|
-
bin/drift-report.sh
|
|
935
|
-
bin/kfric.sh # the knowledge-friction capture affordance
|
|
936
|
-
bin/overhead-meter.sh # the governance-overhead byte-proxy meter
|
|
937
|
-
bin/stage-economics.sh # the stage × model × iteration spend pricer
|
|
938
|
-
kpis/kpi-*.sh # the bundled generic set
|
|
939
|
-
templates/drift-config.sh
|
|
940
|
-
templates/kpis.list # the shipped registry: every bundled KPI (consumer copies + prunes)
|
|
941
|
-
templates/kpi-deprecated-surface.sh # example toolchain-shaped KPI (§Out of scope)
|
|
942
|
-
templates/close-knowledge.md
|
|
943
|
-
templates/price-table.tsv # placeholder + schema for the stage-economics price table (consumer fills the roster)
|
|
944
|
-
templates/economics.md # the /economics close-cadence skill template
|
|
945
|
-
smoke/install.sh
|
|
946
|
-
smoke/overhead-fixture.jsonl # synthetic transcript driving the classifier smoke
|
|
947
|
-
```
|
|
948
|
-
|
|
949
|
-
Registers no gates (advisory; the guard-kit precedent), so no `checks/`,
|
|
950
|
-
`gate-tests/`, or `smoke/violation.sh`.
|
|
951
|
-
|
|
952
|
-
`templates/kpis.list` names every plugin in `kpis/`, never a starter subset: it
|
|
953
|
-
is the kit's claim about what it bundles, which the roster above, this SPEC, and
|
|
954
|
-
the smoke's per-KPI row assertion are all stated over. Pruning is the
|
|
955
|
-
*consumer's* act on its own copy, and the template's header says so.
|
|
956
|
-
`gate-sdk/SPEC.md §check-template-registry-parity` holds the two in parity both
|
|
957
|
-
ways — the sibling-directory pairing is what puts this template in that gate's
|
|
958
|
-
population, and `templates/kpi-deprecated-surface.sh`, an example a consumer
|
|
959
|
-
adapts rather than a bundled plugin, out of it.
|
|
960
|
-
|
|
961
|
-
Config follows the established kit pattern: copy `templates/drift-config.sh`
|
|
962
|
-
into the gates dir (or point `DRIFT_KIT_CONFIG_FILE` elsewhere) and override
|
|
963
|
-
any knob; defaults fill what the consumer left unset, and a set-but-missing
|
|
964
|
-
`DRIFT_KIT_CONFIG_FILE` exits 2 rather than silently running on defaults.
|
|
965
|
-
Knobs (this repo's layout as defaults):
|
|
966
|
-
|
|
967
|
-
- `DRIFT_KIT_KPIS_FILE` — the registry; default
|
|
968
|
-
`${GATE_SDK_GATES_DIR:-scripts}/kpis.list`.
|
|
969
|
-
- `DRIFT_KIT_KPI_DIRS` — extra resolution roots searched before the
|
|
970
|
-
vendored kits' `kpis/` dirs; default: the consumer gates dir.
|
|
971
|
-
- `DRIFT_KIT_QUEUE_FILE` — default `${GATE_SDK_QUEUE_FILE:-TASK-QUEUE.md}`.
|
|
972
|
-
- `DRIFT_KIT_KNOWLEDGE_LOG` — default
|
|
973
|
-
`${GATE_SDK_WORKFLOW_DIR:-.workflow}/knowledge-friction.log`.
|
|
974
|
-
- `DRIFT_KIT_TIMINGS_FILE` — default
|
|
975
|
-
`${GATE_SDK_TMP_DIR:-.tmp}/gate-timings.txt`.
|
|
976
|
-
- `DRIFT_KIT_TMP_DIR` — plugin scratch root; default
|
|
977
|
-
`${GATE_SDK_TMP_DIR:-.tmp}`. Members are regenerated on every run, so a
|
|
978
|
-
scratch wipe is harmless.
|
|
979
|
-
- `DRIFT_KIT_METRIC_DIR` — the persistent measurement home, distinct from
|
|
980
|
-
`DRIFT_KIT_TMP_DIR` by retention contract: metric-dir members are
|
|
981
|
-
append-only trend logs that survive scratch wipes. Default `.metric`. The
|
|
982
|
-
dir must be gitignored and never committed — trend samples carry account
|
|
983
|
-
identifiers and per-session refs, so committing it publishes them (the
|
|
984
|
-
retention/privacy contract is kit-generic; a consumer's provenance seam
|
|
985
|
-
makes the gitignore load-bearing).
|
|
986
|
-
- `DRIFT_KIT_SESSIONS_DIR` — the agent transcript directory the overhead
|
|
987
|
-
meter reads for a bare invocation; default
|
|
988
|
-
`${CLAUDE_CONFIG_DIR:-$HOME/.claude}/projects/<cwd-slug>`, where `<cwd-slug>`
|
|
989
|
-
is the working directory with every non-alphanumeric replaced by `-` (the
|
|
990
|
-
derivation lifecycle-kit's stage stamps already apply; drift-kit re-derives
|
|
991
|
-
with its own knob rather than importing a sibling kit's bin contract).
|
|
992
|
-
- `DRIFT_KIT_OVERHEAD_LOG` — the overhead meter's append log; default
|
|
993
|
-
`$DRIFT_KIT_METRIC_DIR/overhead-log.txt` (gitignored, so the private
|
|
994
|
-
transcript's derived counts never enter version control; the meter
|
|
995
|
-
`mkdir -p`s the log's dirname). All three resolvers — the meter,
|
|
996
|
-
`kpi-overhead`, and the collator's namespace export — compute this same
|
|
997
|
-
default, and the smoke's writer/reader assertion holds them together
|
|
998
|
-
(§Testing).
|
|
999
|
-
- `DRIFT_KIT_DONE_SECTION` / `DRIFT_KIT_DEFERRED_SECTION` — queue section
|
|
1000
|
-
headings the task-split and deferred-age KPIs scan; defaults `Done` /
|
|
1001
|
-
`Deferred` (queue-kit's).
|
|
1002
|
-
- `DRIFT_KIT_ICEBOX_SECTION` — the design-pending pool's second section,
|
|
1003
|
-
queue-kit's optional icebox tier; default **empty**, meaning the pool is the
|
|
1004
|
-
deferred section alone. Read by `kpi-queue-net-delta` so an eviction reads as
|
|
1005
|
-
compression rather than as closure. The same independent-knob shape
|
|
1006
|
-
queue-kit and canon-kit carry: a consumer enabling the tier sets each, and
|
|
1007
|
-
one left unset degrades that kit to "no icebox".
|
|
1008
|
-
- `DRIFT_KIT_TRAJECTORY_SURFACES` — the state-file paths the trajectory
|
|
1009
|
-
extractor harvests, given as `<state-file> <evidence-file>`; default
|
|
1010
|
-
`${GATE_SDK_WORKFLOW_DIR:-.workflow}/WORKFLOW-STATE.txt` and its
|
|
1011
|
-
`validate-evidence.txt` sibling. A surface it cannot read degrades that
|
|
1012
|
-
iteration's cell to `n/a`.
|
|
1013
|
-
- `DRIFT_KIT_GATES_FILE` — the registry whose member count the trajectory
|
|
1014
|
-
extractor reads at each close commit (gate-roster growth); default
|
|
1015
|
-
`${GATE_SDK_GATES_DIR:-scripts}/gates.list`.
|
|
1016
|
-
- `DRIFT_KIT_STAGES` — the ordered stage roster the trajectory extractor
|
|
1017
|
-
renders (one slot per stage, labelled by its shortest roster-unique prefix);
|
|
1018
|
-
default `(scope align build validate close)`, which reduces to the frozen
|
|
1019
|
-
single-letter header. A consumer running a wider roster derives this from its
|
|
1020
|
-
sole roster owner — this repo's `scripts/drift-config.sh` sources
|
|
1021
|
-
`scripts/lifecycle-config.sh` and copies `LIFECYCLE_KIT_STAGES`, the SSOT
|
|
1022
|
-
activation — rather than re-listing. Third instance of drift-kit re-deriving a
|
|
1023
|
-
cross-kit fact with its own knob rather than importing a sibling kit's bin
|
|
1024
|
-
contract (alongside `DRIFT_KIT_SESSIONS_DIR` and `DRIFT_KIT_STATE_FILE`).
|
|
1025
|
-
- `DRIFT_KIT_STAGE_ECONOMICS_LOG` — the stage-economics append trend log; default
|
|
1026
|
-
`$DRIFT_KIT_METRIC_DIR/stage-economics-log.txt` (gitignored; the meter
|
|
1027
|
-
`mkdir -p`s the dirname).
|
|
1028
|
-
- `DRIFT_KIT_PRICE_TABLE` — the consumer-owned model→price roster the
|
|
1029
|
-
stage-economics meter prices through; default
|
|
1030
|
-
`${GATE_SDK_GATES_DIR:-scripts}/price-table.tsv` (beside `graph-vocab.sh`, the
|
|
1031
|
-
consumer-config precedent). Absent, cost degrades to `n/a` and tokens still report.
|
|
1032
|
-
- `DRIFT_KIT_SUPERVISION_LABEL` — the reserved value the stage-economics meter
|
|
1033
|
-
writes into the trend log's `<stage>` column for a lead's own burn
|
|
1034
|
-
(§The stage-economics meter, the reserved `supervision` value); default
|
|
1035
|
-
`supervision`. A consumer whose
|
|
1036
|
-
lifecycle roster already carries that word renames it here; a stamp naming the
|
|
1037
|
-
label collides and suppresses the rows for that run rather than blending two
|
|
1038
|
-
meanings into one column value.
|
|
1039
|
-
- `DRIFT_KIT_FANOUT_SUFFIX` — the suffix the stage-economics meter appends to an
|
|
1040
|
-
anchor's stage-or-role value to name its dispatched subtree's row
|
|
1041
|
-
(§The stage-economics meter, the fan-out row); default `+fanout`. The default is
|
|
1042
|
-
collision-proof by construction (`+` is outside the stamp's stage alphabet); an
|
|
1043
|
-
override that a stamped stage name ends in collides and suppresses the fan-out
|
|
1044
|
-
rows for that run. Deliberately the *only* new knob: a meta-filename or
|
|
1045
|
-
field-name knob would imply a portability the mechanism does not have (a
|
|
1046
|
-
consumer on a different harness has a different artifact, not a differently
|
|
1047
|
-
named one), and an opt-out for reading the meta layer would either default on
|
|
1048
|
-
and be set by nobody or default off and ship the feature as dead code — the
|
|
1049
|
-
degradation contract already gives a consumer the only thing an opt-out buys.
|
|
1050
|
-
- `DRIFT_KIT_STATE_FILE` — the WORKFLOW-STATE path whose *committed history and
|
|
1051
|
-
live content* the stage-economics join reads for stamps (§The stage-economics
|
|
1052
|
-
meter, history ∪ live); default `${GATE_SDK_WORKFLOW_DIR:-.workflow}/WORKFLOW-STATE.txt` (the
|
|
1053
|
-
same default the trajectory extractor's surface list computes — drift-kit
|
|
1054
|
-
re-derives with its own knob rather than importing a sibling kit's bin contract,
|
|
1055
|
-
the established `DRIFT_KIT_SESSIONS_DIR` precedent).
|
|
1056
|
-
|
|
1057
|
-
Per-KPI couplings (which meter, which log, which scan flag) are the
|
|
1058
|
-
plugins' own headers, not knobs — a consumer retargeting one edits its copy
|
|
1059
|
-
in the consumer dir (registry shadowing), the guard/hook consumer-copy
|
|
1060
|
-
precedent.
|
|
1061
|
-
|
|
1062
|
-
## Testing
|
|
1063
|
-
|
|
1064
|
-
The report and every bundled plugin are advisory plain text over live git
|
|
1065
|
-
state — not fixture-stable, so no expected-output corpus (the gate
|
|
1066
|
-
contracts do not fit; context-kit's reasoning). `smoke/install.sh` builds
|
|
1067
|
-
the throwaway consumer, registers the bundled set, and asserts: exit 0 with
|
|
1068
|
-
both section headers and **at least** one row per registered KPI; a registry
|
|
1069
|
-
naming a missing plugin yields its visible `n/a` row without failing; `--trend`
|
|
1070
|
-
emits exactly one line; and, per registered name resolving to a bundled plugin,
|
|
1071
|
-
that **the plugin itself emits a row when invoked directly**.
|
|
1072
|
-
|
|
1073
|
-
A floor, not equality, because a plugin owns one *or more* rows —
|
|
1074
|
-
`kpi-queue-net-delta` (§Bundled KPIs) emits two by design — so equality would red
|
|
1075
|
-
the moment the bundled set contains a multi-row plugin. The per-plugin probe
|
|
1076
|
-
beside it is what carries the bite the floor cannot: the report substitutes its
|
|
1077
|
-
own `n/a (plugin failed)` row for a plugin that exits non-zero or emits nothing,
|
|
1078
|
-
so the row count holds even where every plugin is silent, and a multi-row plugin
|
|
1079
|
-
would in any case offset a sibling contributing none. Contribution is the
|
|
1080
|
-
property, not health — an `n/a` row is a row — and a name resolving to no plugin
|
|
1081
|
-
is skipped, that row being the report's own and asserted separately. The probe
|
|
1082
|
-
asserts it probed something, so a resolution change cannot make it vacuous.
|
|
1083
|
-
Residual limit, stated because it is real: neither assertion pins *which* plugin
|
|
1084
|
-
emitted a given row, so a plugin emitting the wrong number of rows is not caught.
|
|
1085
|
-
The trajectory extractor needs committed history the
|
|
1086
|
-
throwaway consumer lacks, so `smoke/install.sh` proves it against a hermetic
|
|
1087
|
-
fake-history repo — one closed, range-bounded iteration — and asserts the
|
|
1088
|
-
table parses, that iteration's row is emitted, and the in-flight iteration's
|
|
1089
|
-
is not. The overhead meter has a fixed classifier, so it *is* fixture-stable:
|
|
1090
|
-
`smoke/overhead-fixture.jsonl` carries known category bytes, and
|
|
1091
|
-
`smoke/install.sh` drives the meter over it and asserts the log-line grammar,
|
|
1092
|
-
that the task line is excluded from governance, that `gate` is a proper subset
|
|
1093
|
-
of `gov`, that `pct` is the rounded governance share, and that a re-measure
|
|
1094
|
-
replaces the session's line rather than doubling it; kpi-overhead is exercised
|
|
1095
|
-
over that log (its two lead rows and the `ovh` trend fragment) and in its
|
|
1096
|
-
log-absent degradation. The writer/reader-divergence assertion runs meter and
|
|
1097
|
-
KPI under one `DRIFT_KIT_METRIC_DIR` override with no explicit
|
|
1098
|
-
`DRIFT_KIT_OVERHEAD_LOG` and asserts the reader finds the log the writer
|
|
1099
|
-
wrote — the surviving divergence surface the namespace export cannot guard:
|
|
1100
|
-
writer and reader computing *defaults* independently. The stage-economics meter
|
|
1101
|
-
is likewise fixture-driven: `smoke/install.sh` drives the join over a synthetic
|
|
1102
|
-
fixture set — a small WORKFLOW-STATE stamp file, a synthetic transcript carrying
|
|
1103
|
-
usage records for the stamped `session8`, and a placeholder price table — and
|
|
1104
|
-
asserts the emitted trend line's fields (the `<iteration> <stage> <model>`
|
|
1105
|
-
grouping and the `in`/`out`/`cr`/`cw`/`cost` values), that a re-measure replaces
|
|
1106
|
-
the triple's line rather than doubling it, and the `n/a` cost cell plus the
|
|
1107
|
-
incomplete-pricing caveat when the priced model has no row (the price-table-absent
|
|
1108
|
-
degradation). Its **history ∪ live** read is proved against the same hermetic
|
|
1109
|
-
fake-history repo the trajectory extractor uses, which already carries the
|
|
1110
|
-
truncation shape: that repo's live WORKFLOW-STATE was overwritten with the
|
|
1111
|
-
in-flight iteration's stamp, so the closed iteration's stamps survive only in
|
|
1112
|
-
committed history. One run asserts both arms — the history-only stamp prices
|
|
1113
|
-
(replacement would lose it) and the live-only stamp prices (a history-only read
|
|
1114
|
-
would lose the uncommitted tail). Two further stage-economics fixtures each get
|
|
1115
|
-
**their own sessions dir, state file, and log**, because the flat fixture set's
|
|
1116
|
-
log is asserted to hold exactly one line and a second row there would red that
|
|
1117
|
-
assertion rather than the behavior under test. (i) A *two-stamp* fixture — one
|
|
1118
|
-
session stamped into a further stage — asserts the log holds exactly one line, that
|
|
1119
|
-
the row names the **last** stamp's stage, and that the yielded stamp is named in
|
|
1120
|
-
the collapsed caveat; a transcript matching no stamp sits in the same dir and
|
|
1121
|
-
asserts the unstamped-transcript bound reports it. (ii) A *nested-tier* fixture —
|
|
1122
|
-
a synthetic `<lead>/subagents/<agent>.jsonl` beside a flat `<lead>.jsonl` —
|
|
1123
|
-
asserts exactly one supervision row is emitted for the iteration carrying the
|
|
1124
|
-
lead transcript's own usage, that the dispatched session keeps its own stage row,
|
|
1125
|
-
that the row's label is `DRIFT_KIT_SUPERVISION_LABEL`'s value rather than a
|
|
1126
|
-
literal, and that a stamp naming the label suppresses the row with the collision
|
|
1127
|
-
notice. (iii) A *fan-out* fixture — a synthetic three-level tree: a flat
|
|
1128
|
-
`<lead>.jsonl`, and under `<lead>/subagents/` a stamped stage transcript with a
|
|
1129
|
-
`spawnDepth` 1 meta record, a child at `spawnDepth` 2 naming it as
|
|
1130
|
-
`parentAgentId`, and a grandchild at `spawnDepth` 3 naming the child; plus a
|
|
1131
|
-
**second session stamped into the same `(iteration, stage)`** carrying no
|
|
1132
|
-
assistant usage, with a child of its own — the batch-split shape, which is also
|
|
1133
|
-
the one that proves a stage anchors on its stamp *resolving* rather than on
|
|
1134
|
-
emitting a row. It asserts exactly one fan-out row for the stamped stage whose
|
|
1135
|
-
tokens are the **sum over the whole subtree** (so both a walk that stopped at
|
|
1136
|
-
depth 2 and two anchors racing under the dedup key instead of folding red), that
|
|
1137
|
-
the contributing anchor count is named where it exceeds one, that the stage
|
|
1138
|
-
row still carries only the stage session's own usage (so a fold reds), that the
|
|
1139
|
-
suffix comes from `DRIFT_KIT_FANOUT_SUFFIX` rather than a literal, that a stamp
|
|
1140
|
-
whose stage ends in the suffix raises the collision notice and suppresses the row,
|
|
1141
|
-
and that the under-count bound excludes every transcript the pass attributed.
|
|
1142
|
-
Its two **degradation** assertions are what make the coupling's bounded failure
|
|
1143
|
-
testable rather than asserted, and neither may be dropped for brevity: deleting
|
|
1144
|
-
the grandchild's meta record moves it back into the under-count bound and raises
|
|
1145
|
-
the counted unresolved notice while every row the pass does not own stays
|
|
1146
|
-
byte-identical, and deleting the whole meta layer emits zero fan-out rows plus the
|
|
1147
|
-
single notice with — again — every other row byte-identical.
|
|
1148
|
-
`kpi-price-table-age` is fixture-stable in the same way — it reads two
|
|
1149
|
-
dates out of a file the fixture writes — so `smoke/install.sh` drives it over
|
|
1150
|
-
purpose-built tables and asserts the age row, the `price <N>d` trend fragment,
|
|
1151
|
-
each header's absence degrading its own row independently, and — **the
|
|
1152
|
-
inversion the KPI exists for** — that a table whose `priced-as-of:` is *today*
|
|
1153
|
-
and whose `prices-valid-through:` has passed reads a fresh age row and an
|
|
1154
|
-
`EXPIRED` expiry row in the same breath. A fixture that pins only the age row
|
|
1155
|
-
has not tested the feature: the age row is reassuring in exactly that case,
|
|
1156
|
-
which is the defect. The no-table degradation is asserted to emit its single
|
|
1157
|
-
`n/a (no price table)` row, and the report-wide one-row-per-registered-KPI
|
|
1158
|
-
assertion covers that shape from the other side. `kpi-incident-recurrence` is
|
|
1159
|
-
fixture-stable on the same grounds — it reads declarations out of a queue file the
|
|
1160
|
-
fixture writes — so `smoke/install.sh` drives it over a purpose-built queue and
|
|
1161
|
-
asserts the single lag row, that the count **sums dates across declarations**
|
|
1162
|
-
rather than counting declarations, the highest-count slug, the `recur <N>` trend
|
|
1163
|
-
fragment, and both degradations (a queue with no declaration, and no queue file at
|
|
1164
|
-
all) including the trend's silence under the first. Gate-sdk's `check-shellcheck`
|
|
1165
|
-
lints all kit sources as usual.
|
|
1166
|
-
|
|
1167
|
-
## Out of scope
|
|
1168
|
-
|
|
1169
|
-
Toolchain-shaped KPIs are consumer content: orphan-crate and bare-`#[allow]`
|
|
1170
|
-
scans (Rust-specific dead-surface detection) and a `TODO(spec-ambiguity)`
|
|
1171
|
-
marker count (a marker convention is consumer vocabulary; generalize the
|
|
1172
|
-
convention first if it ever ships). A deprecated-surface trend is the same
|
|
1173
|
-
shape — it counts markers over the consumer's `CANON_KIT_DEPRECATION_MARKERS`
|
|
1174
|
-
roster (canon-kit's `check-deprecation-task` vocabulary), so it ships as
|
|
1175
|
-
`templates/kpi-deprecated-surface.sh`, an **example** the consumer registers in
|
|
1176
|
-
its `kpis.list` rather than a bundled plugin under `kpis/`: the marker spelling
|
|
1177
|
-
is a consumer literal, and the kit stays deprecation-neutral. Registered, it
|
|
1178
|
-
trends the live-marker backlog between majors so it surfaces gradually instead
|
|
1179
|
-
of at one release; it degrades to `n/a` when the roster is unset (the bundled
|
|
1180
|
-
plugins' fail-visible discipline). The release-boundary disposition walk over
|
|
1181
|
-
the same roster is lifecycle-kit's `release-sweep` skill template. So are product-workflow KPIs: gate
|
|
1182
|
-
exemptions (a `scan-exceptions` disposition split) and backlog-aging finding
|
|
1183
|
-
counts — both read consumer gates. A narration-marker by-eye count is
|
|
1184
|
-
superseded by canon-kit's `check-manifest-temporal`, which gates the same axis
|
|
1185
|
-
instead of trending it. The always-loaded baseline mechanics are context-kit's
|
|
1186
|
-
surface; drift-kit ships only the `kpi-always-loaded` plugin that reads its
|
|
1187
|
-
meter.
|