checkwright 0.0.1 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +260 -4
- package/bin/checkwright.sh +53 -0
- package/lib/common/lock.sh +28 -0
- package/lib/common/profile.sh +58 -0
- package/lib/common/recipe.sh +93 -0
- package/lib/doctor.sh +90 -0
- package/lib/init.sh +289 -0
- package/package.json +15 -3
- package/payload/canon-kit/README.md +78 -0
- package/payload/canon-kit/SPEC.md +1264 -0
- package/payload/canon-kit/checks/check-amendment-queue.sh +115 -0
- package/payload/canon-kit/checks/check-comment-tier.sh +211 -0
- package/payload/canon-kit/checks/check-deprecation-task.sh +90 -0
- package/payload/canon-kit/checks/check-docs-cmd.sh +153 -0
- package/payload/canon-kit/checks/check-docs-link-convention.sh +71 -0
- package/payload/canon-kit/checks/check-knob-citation.sh +117 -0
- package/payload/canon-kit/checks/check-knob-default-coupling.sh +239 -0
- package/payload/canon-kit/checks/check-manifest-count.sh +46 -0
- package/payload/canon-kit/checks/check-manifest-temporal.sh +83 -0
- package/payload/canon-kit/checks/check-md-refs.sh +115 -0
- package/payload/canon-kit/checks/check-prose-enum.sh +115 -0
- package/payload/canon-kit/checks/check-prose-tells.sh +207 -0
- package/payload/canon-kit/checks/check-spec-derivable-section.sh +69 -0
- package/payload/canon-kit/checks/check-spec-dod-singleton.sh +45 -0
- package/payload/canon-kit/checks/check-spec-embedded-source.sh +133 -0
- package/payload/canon-kit/checks/check-spec-fence-balance.sh +42 -0
- package/payload/canon-kit/checks/check-spec-pointer.sh +176 -0
- package/payload/canon-kit/checks/check-surface-duplication.sh +105 -0
- package/payload/canon-kit/checks/check-todo-task-liveness.sh +80 -0
- package/payload/canon-kit/checks/check-tracking-claim.sh +136 -0
- package/payload/canon-kit/gate-tests/check-amendment-queue/bad/SPEC-tidy.md +5 -0
- package/payload/canon-kit/gate-tests/check-amendment-queue/bad/TASK-QUEUE.md +15 -0
- package/payload/canon-kit/gate-tests/check-amendment-queue/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-amendment-queue/good/SPEC-widget.md +6 -0
- package/payload/canon-kit/gate-tests/check-amendment-queue/good/TASK-QUEUE.md +15 -0
- package/payload/canon-kit/gate-tests/check-amendment-queue/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/bad/bad.sh +25 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-comment-tier/good/good.sh +32 -0
- package/payload/canon-kit/gate-tests/check-comment-tier.test.sh +146 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/bad/TASK-QUEUE.md +19 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/bad/bad.sh +6 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/bad/scripts/canon-config.sh +5 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/good/TASK-QUEUE.md +21 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/good/good.sh +5 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task/good/scripts/canon-config.sh +5 -0
- package/payload/canon-kit/gate-tests/check-deprecation-task.test.sh +98 -0
- package/payload/canon-kit/gate-tests/check-docs-cmd/bad/args +1 -0
- package/payload/canon-kit/gate-tests/check-docs-cmd/bad/doc.md +9 -0
- package/payload/canon-kit/gate-tests/check-docs-cmd/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-docs-cmd/good/args +1 -0
- package/payload/canon-kit/gate-tests/check-docs-cmd/good/bin/tool.sh +3 -0
- package/payload/canon-kit/gate-tests/check-docs-cmd/good/doc.md +18 -0
- package/payload/canon-kit/gate-tests/check-docs-cmd/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention/bad/args +4 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention/bad/docs/demokit/index.md +5 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention/bad/docs/index.md +3 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention/good/args +4 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention/good/docs/demokit/index.md +6 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention/good/docs/index.md +3 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention/good/docs/methodology.md +3 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-knob-citation/bad/SPEC.md +10 -0
- package/payload/canon-kit/gate-tests/check-knob-citation/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-knob-citation/good/SPEC.md +19 -0
- package/payload/canon-kit/gate-tests/check-knob-citation/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-knob-citation.test.sh +71 -0
- package/payload/canon-kit/gate-tests/check-knob-default-coupling/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-knob-default-coupling/bad/scripts/gate-sdk-config.sh +4 -0
- package/payload/canon-kit/gate-tests/check-knob-default-coupling/bad/widget-kit/SPEC.md +4 -0
- package/payload/canon-kit/gate-tests/check-knob-default-coupling/bad/widget-kit/lib/widget-cli.sh +3 -0
- package/payload/canon-kit/gate-tests/check-knob-default-coupling/bad/widget-kit/lib/widget.sh +5 -0
- package/payload/canon-kit/gate-tests/check-knob-default-coupling/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-knob-default-coupling/good/scripts/gate-sdk-config.sh +5 -0
- package/payload/canon-kit/gate-tests/check-knob-default-coupling/good/widget-kit/SPEC.md +7 -0
- package/payload/canon-kit/gate-tests/check-knob-default-coupling/good/widget-kit/lib/widget-cli.sh +3 -0
- package/payload/canon-kit/gate-tests/check-knob-default-coupling/good/widget-kit/lib/widget.sh +5 -0
- package/payload/canon-kit/gate-tests/check-knob-default-coupling.test.sh +73 -0
- package/payload/canon-kit/gate-tests/check-manifest-count/bad/SPEC.md +15 -0
- package/payload/canon-kit/gate-tests/check-manifest-count/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-manifest-count/good/SPEC.md +37 -0
- package/payload/canon-kit/gate-tests/check-manifest-count/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-manifest-count.test.sh +104 -0
- package/payload/canon-kit/gate-tests/check-manifest-temporal/bad/SPEC.md +6 -0
- package/payload/canon-kit/gate-tests/check-manifest-temporal/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-manifest-temporal/good/SPEC.md +17 -0
- package/payload/canon-kit/gate-tests/check-manifest-temporal/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-md-refs/bad/args +1 -0
- package/payload/canon-kit/gate-tests/check-md-refs/bad/doc.md +3 -0
- package/payload/canon-kit/gate-tests/check-md-refs/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-md-refs/good/args +1 -0
- package/payload/canon-kit/gate-tests/check-md-refs/good/doc.md +3 -0
- package/payload/canon-kit/gate-tests/check-md-refs/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-md-refs/good/target.md +1 -0
- package/payload/canon-kit/gate-tests/check-md-refs.test.sh +82 -0
- package/payload/canon-kit/gate-tests/check-prose-enum/bad/SPEC.md +4 -0
- package/payload/canon-kit/gate-tests/check-prose-enum/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-prose-enum/bad/scripts/canon-config.sh +4 -0
- package/payload/canon-kit/gate-tests/check-prose-enum/good/SPEC.md +16 -0
- package/payload/canon-kit/gate-tests/check-prose-enum/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-prose-enum/good/scripts/canon-config.sh +4 -0
- package/payload/canon-kit/gate-tests/check-prose-enum.test.sh +127 -0
- package/payload/canon-kit/gate-tests/check-prose-tells/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-prose-tells/bad/prose.md +15 -0
- package/payload/canon-kit/gate-tests/check-prose-tells/bad/scripts/canon-config.sh +8 -0
- package/payload/canon-kit/gate-tests/check-prose-tells/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-prose-tells/good/prose.md +21 -0
- package/payload/canon-kit/gate-tests/check-prose-tells/good/scripts/canon-config.sh +8 -0
- package/payload/canon-kit/gate-tests/check-spec-derivable-section/bad/SPEC.md +20 -0
- package/payload/canon-kit/gate-tests/check-spec-derivable-section/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-spec-derivable-section/good/SPEC.md +13 -0
- package/payload/canon-kit/gate-tests/check-spec-derivable-section/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-spec-dod-singleton/bad/SPEC.md +15 -0
- package/payload/canon-kit/gate-tests/check-spec-dod-singleton/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-spec-dod-singleton/good/SPEC.md +13 -0
- package/payload/canon-kit/gate-tests/check-spec-dod-singleton/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-spec-dod-singleton.test.sh +63 -0
- package/payload/canon-kit/gate-tests/check-spec-embedded-source/bad/SPEC.md +16 -0
- package/payload/canon-kit/gate-tests/check-spec-embedded-source/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-spec-embedded-source/bad/widget.sh +9 -0
- package/payload/canon-kit/gate-tests/check-spec-embedded-source/good/SPEC.md +19 -0
- package/payload/canon-kit/gate-tests/check-spec-embedded-source/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-spec-embedded-source/good/widget.sh +9 -0
- package/payload/canon-kit/gate-tests/check-spec-fence-balance/bad/args +1 -0
- package/payload/canon-kit/gate-tests/check-spec-fence-balance/bad/doc.md +8 -0
- package/payload/canon-kit/gate-tests/check-spec-fence-balance/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-spec-fence-balance/good/args +1 -0
- package/payload/canon-kit/gate-tests/check-spec-fence-balance/good/doc.md +9 -0
- package/payload/canon-kit/gate-tests/check-spec-fence-balance/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/README.md +4 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/SPEC-target.md +6 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/SPEC-widget.md +5 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/cand-tmpl.md +5 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/scripts/canon-config.sh +5 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/widget.sh +5 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/README.md +4 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/SPEC-target.md +6 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/SPEC-widget.md +5 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/cand-tmpl.md +7 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/scripts/canon-config.sh +5 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/widget.sh +6 -0
- package/payload/canon-kit/gate-tests/check-surface-duplication/bad/GLOSSARY.md +11 -0
- package/payload/canon-kit/gate-tests/check-surface-duplication/bad/VISION.md +6 -0
- package/payload/canon-kit/gate-tests/check-surface-duplication/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-surface-duplication/good/GLOSSARY.md +11 -0
- package/payload/canon-kit/gate-tests/check-surface-duplication/good/VISION.md +6 -0
- package/payload/canon-kit/gate-tests/check-surface-duplication/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/TASK-QUEUE.md +19 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/bad.sh +5 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/TASK-QUEUE.md +23 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-todo-task-liveness/good/good.sh +5 -0
- package/payload/canon-kit/gate-tests/check-tracking-claim/bad/README.md +4 -0
- package/payload/canon-kit/gate-tests/check-tracking-claim/bad/args +1 -0
- package/payload/canon-kit/gate-tests/check-tracking-claim/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-tracking-claim/bad/kept.txt +1 -0
- package/payload/canon-kit/gate-tests/check-tracking-claim/good/README.md +7 -0
- package/payload/canon-kit/gate-tests/check-tracking-claim/good/args +1 -0
- package/payload/canon-kit/gate-tests/check-tracking-claim/good/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-tracking-claim/good/kept.txt +1 -0
- package/payload/canon-kit/gate-tests/check-tracking-claim/good/roster.list +1 -0
- package/payload/canon-kit/gate-tests/check-tracking-claim.test.sh +86 -0
- package/payload/canon-kit/lib/spec.sh +475 -0
- package/payload/canon-kit/smoke/install.sh +36 -0
- package/payload/canon-kit/smoke/violation.sh +22 -0
- package/payload/canon-kit/templates/SPEC-amendment.md +55 -0
- package/payload/canon-kit/templates/canon-config.sh +2 -0
- package/payload/context-kit/README.md +82 -0
- package/payload/context-kit/SPEC.md +785 -0
- package/payload/context-kit/bin/always-loaded.sh +86 -0
- package/payload/context-kit/bin/env-probe.sh +144 -0
- package/payload/context-kit/bin/footprint.sh +144 -0
- package/payload/context-kit/bin/md-index.sh +80 -0
- package/payload/context-kit/bin/md-section.sh +63 -0
- package/payload/context-kit/bin/pub-index.sh +90 -0
- package/payload/context-kit/bin/run-index-tests.sh +91 -0
- package/payload/context-kit/checks/check-brevity.sh +123 -0
- package/payload/context-kit/checks/check-footprint-fresh.sh +38 -0
- package/payload/context-kit/checks/check-memory-off.sh +112 -0
- package/payload/context-kit/checks/check-settings-pins.sh +110 -0
- package/payload/context-kit/gate-tests/check-brevity/bad/CLAUDE.md +14 -0
- package/payload/context-kit/gate-tests/check-brevity/bad/args +2 -0
- package/payload/context-kit/gate-tests/check-brevity/bad/expect.txt +1 -0
- package/payload/context-kit/gate-tests/check-brevity/good/CLAUDE.md +20 -0
- package/payload/context-kit/gate-tests/check-brevity/good/args +2 -0
- package/payload/context-kit/gate-tests/check-brevity/good/expect.txt +1 -0
- package/payload/context-kit/gate-tests/check-brevity.test.sh +89 -0
- package/payload/context-kit/gate-tests/check-footprint-fresh/bad/args +4 -0
- package/payload/context-kit/gate-tests/check-footprint-fresh/bad/emit.txt +12 -0
- package/payload/context-kit/gate-tests/check-footprint-fresh/bad/expect.txt +1 -0
- package/payload/context-kit/gate-tests/check-footprint-fresh/bad/projection.txt +11 -0
- package/payload/context-kit/gate-tests/check-footprint-fresh/good/args +4 -0
- package/payload/context-kit/gate-tests/check-footprint-fresh/good/emit.txt +12 -0
- package/payload/context-kit/gate-tests/check-footprint-fresh/good/expect.txt +1 -0
- package/payload/context-kit/gate-tests/check-footprint-fresh/good/projection.txt +12 -0
- package/payload/context-kit/gate-tests/check-memory-off/bad/args +1 -0
- package/payload/context-kit/gate-tests/check-memory-off/bad/expect.txt +1 -0
- package/payload/context-kit/gate-tests/check-memory-off/bad/memory/example-fact.md +6 -0
- package/payload/context-kit/gate-tests/check-memory-off/good/args +1 -0
- package/payload/context-kit/gate-tests/check-memory-off/good/expect.txt +1 -0
- package/payload/context-kit/gate-tests/check-memory-off/good/memory/.gitkeep +0 -0
- package/payload/context-kit/gate-tests/check-memory-off.test.sh +54 -0
- package/payload/context-kit/gate-tests/check-settings-pins/bad/args +1 -0
- package/payload/context-kit/gate-tests/check-settings-pins/bad/expect.txt +1 -0
- package/payload/context-kit/gate-tests/check-settings-pins/bad/settings-pins.conf +3 -0
- package/payload/context-kit/gate-tests/check-settings-pins/bad/settings.json +6 -0
- package/payload/context-kit/gate-tests/check-settings-pins/good/args +1 -0
- package/payload/context-kit/gate-tests/check-settings-pins/good/expect.txt +1 -0
- package/payload/context-kit/gate-tests/check-settings-pins/good/settings-pins.conf +3 -0
- package/payload/context-kit/gate-tests/check-settings-pins/good/settings.json +6 -0
- package/payload/context-kit/index-tests/corpus/baseline.txt +2 -0
- package/payload/context-kit/index-tests/corpus/hook-sample.txt +4 -0
- package/payload/context-kit/index-tests/corpus/sample.md +23 -0
- package/payload/context-kit/index-tests/corpus/sample.rs +24 -0
- package/payload/context-kit/index-tests/corpus/sample.ts +34 -0
- package/payload/context-kit/index-tests/corpus/surface.md +6 -0
- package/payload/context-kit/index-tests/expected/always-loaded.txt +1 -0
- package/payload/context-kit/index-tests/expected/md-index.txt +6 -0
- package/payload/context-kit/index-tests/expected/md-section.txt +6 -0
- package/payload/context-kit/index-tests/expected/pub-index-shadow.txt +2 -0
- package/payload/context-kit/index-tests/expected/pub-index-ts.txt +12 -0
- package/payload/context-kit/index-tests/expected/pub-index.txt +10 -0
- package/payload/context-kit/index-tests/expected/toolfloor.txt +14 -0
- package/payload/context-kit/index-tests/toolfloor-cases.sh +29 -0
- package/payload/context-kit/lib/pub-lang/rust.sh +26 -0
- package/payload/context-kit/lib/pub-lang/ts.sh +32 -0
- package/payload/context-kit/lib/toolfloor.sh +47 -0
- package/payload/context-kit/smoke/agents-md.sh +116 -0
- package/payload/context-kit/smoke/install.sh +60 -0
- package/payload/context-kit/smoke/violation.sh +21 -0
- package/payload/context-kit/templates/close-brevity.md +30 -0
- package/payload/context-kit/templates/context-config.sh +2 -0
- package/payload/context-kit/templates/session-context.sh +133 -0
- package/payload/context-kit/templates/settings-sessionstart.json +12 -0
- package/payload/delegation-kit/README.md +87 -0
- package/payload/delegation-kit/SPEC.md +780 -0
- package/payload/delegation-kit/bin/run-budget-guard-tests.sh +88 -0
- package/payload/delegation-kit/bin/run-trend-tests.sh +63 -0
- package/payload/delegation-kit/bin/run-usage-tests.sh +226 -0
- package/payload/delegation-kit/bin/usage-trend.sh +120 -0
- package/payload/delegation-kit/bin/usage-verdict.sh +144 -0
- package/payload/delegation-kit/checks/check-gate-tamper.sh +139 -0
- package/payload/delegation-kit/checks/check-rule-citation.sh +76 -0
- package/payload/delegation-kit/gate-tests/check-gate-tamper/bad/args +1 -0
- package/payload/delegation-kit/gate-tests/check-gate-tamper/bad/expect.txt +1 -0
- package/payload/delegation-kit/gate-tests/check-gate-tamper/bad/staged-files +5 -0
- package/payload/delegation-kit/gate-tests/check-gate-tamper/good/added-exemptions +2 -0
- package/payload/delegation-kit/gate-tests/check-gate-tamper/good/args +1 -0
- package/payload/delegation-kit/gate-tests/check-gate-tamper/good/expect.txt +1 -0
- package/payload/delegation-kit/gate-tests/check-gate-tamper/good/staged-files +5 -0
- package/payload/delegation-kit/gate-tests/check-rule-citation/bad/args +1 -0
- package/payload/delegation-kit/gate-tests/check-rule-citation/bad/expect.txt +1 -0
- package/payload/delegation-kit/gate-tests/check-rule-citation/bad/spec.md +9 -0
- package/payload/delegation-kit/gate-tests/check-rule-citation/bad/tmpl.md +4 -0
- package/payload/delegation-kit/gate-tests/check-rule-citation/good/args +1 -0
- package/payload/delegation-kit/gate-tests/check-rule-citation/good/expect.txt +1 -0
- package/payload/delegation-kit/gate-tests/check-rule-citation/good/spec.md +20 -0
- package/payload/delegation-kit/gate-tests/check-rule-citation/good/tmpl.md +5 -0
- package/payload/delegation-kit/lib/delegation.sh +81 -0
- package/payload/delegation-kit/smoke/install.sh +61 -0
- package/payload/delegation-kit/smoke/violation.sh +16 -0
- package/payload/delegation-kit/templates/agent-budget-guard.sh +18 -0
- package/payload/delegation-kit/templates/agent-execution.md +136 -0
- package/payload/delegation-kit/templates/delegation-config.sh +2 -0
- package/payload/delegation-kit/templates/dispatch-checklists.md +60 -0
- package/payload/delegation-kit/templates/statusline-usage.sh +79 -0
- package/payload/delegation-kit/templates/usage-poller.sh +67 -0
- package/payload/delegation-kit/usage-tests/budget-guard-cases.tsv +20 -0
- package/payload/delegation-kit/usage-tests/cases.tsv +44 -0
- package/payload/delegation-kit/usage-tests/trend-history.log +20 -0
- package/payload/doctrine-kit/DOCTRINE.md +386 -0
- package/payload/doctrine-kit/README.md +70 -0
- package/payload/doctrine-kit/SPEC.md +233 -0
- package/payload/doctrine-kit/bin/install-doctrine.sh +44 -0
- package/payload/doctrine-kit/bin/stage-rules.sh +51 -0
- package/payload/doctrine-kit/checks/check-doctrine-registration.sh +216 -0
- package/payload/doctrine-kit/gate-tests/check-doctrine-registration/bad/AGENT.md +14 -0
- package/payload/doctrine-kit/gate-tests/check-doctrine-registration/bad/DOCTRINE.md +12 -0
- package/payload/doctrine-kit/gate-tests/check-doctrine-registration/bad/args +1 -0
- package/payload/doctrine-kit/gate-tests/check-doctrine-registration/bad/expect.txt +1 -0
- package/payload/doctrine-kit/gate-tests/check-doctrine-registration/good/AGENT.md +15 -0
- package/payload/doctrine-kit/gate-tests/check-doctrine-registration/good/DOCTRINE.md +12 -0
- package/payload/doctrine-kit/gate-tests/check-doctrine-registration/good/args +1 -0
- package/payload/doctrine-kit/gate-tests/check-doctrine-registration/good/expect.txt +1 -0
- package/payload/doctrine-kit/gate-tests/check-doctrine-registration.test.sh +208 -0
- package/payload/doctrine-kit/lib/doctrine.sh +29 -0
- package/payload/doctrine-kit/smoke/install.sh +24 -0
- package/payload/doctrine-kit/smoke/violation.sh +13 -0
- package/payload/drift-kit/README.md +115 -0
- package/payload/drift-kit/SPEC.md +828 -0
- package/payload/drift-kit/bin/drift-report.sh +152 -0
- package/payload/drift-kit/bin/kfric.sh +42 -0
- package/payload/drift-kit/bin/overhead-meter.sh +106 -0
- package/payload/drift-kit/bin/stage-economics.sh +311 -0
- package/payload/drift-kit/bin/trajectory.sh +242 -0
- package/payload/drift-kit/kpis/kpi-always-loaded.sh +39 -0
- package/payload/drift-kit/kpis/kpi-amendment-age.sh +33 -0
- package/payload/drift-kit/kpis/kpi-deferred-age.sh +44 -0
- package/payload/drift-kit/kpis/kpi-gate-backlog.sh +52 -0
- package/payload/drift-kit/kpis/kpi-gate-runtime.sh +31 -0
- package/payload/drift-kit/kpis/kpi-knowledge-friction.sh +21 -0
- package/payload/drift-kit/kpis/kpi-overhead.sh +44 -0
- package/payload/drift-kit/kpis/kpi-price-table-age.sh +68 -0
- package/payload/drift-kit/kpis/kpi-prompt-friction.sh +38 -0
- package/payload/drift-kit/kpis/kpi-settings-local.sh +21 -0
- package/payload/drift-kit/kpis/kpi-task-split.sh +43 -0
- package/payload/drift-kit/smoke/install.sh +348 -0
- package/payload/drift-kit/smoke/overhead-fixture.jsonl +4 -0
- package/payload/drift-kit/templates/close-knowledge.md +24 -0
- package/payload/drift-kit/templates/drift-config.sh +2 -0
- package/payload/drift-kit/templates/economics.md +45 -0
- package/payload/drift-kit/templates/kpi-deprecated-surface.sh +32 -0
- package/payload/drift-kit/templates/kpis.list +22 -0
- package/payload/drift-kit/templates/price-table.tsv +21 -0
- package/payload/evidence-kit/README.md +59 -0
- package/payload/evidence-kit/SPEC.md +261 -0
- package/payload/evidence-kit/bin/diff-baseline.sh +34 -0
- package/payload/evidence-kit/bin/run-validate.sh +82 -0
- package/payload/evidence-kit/checks/check-evidence-baseline.sh +103 -0
- package/payload/evidence-kit/checks/check-evidence-manifest.sh +104 -0
- package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/TASK-QUEUE.md +3 -0
- package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/args +2 -0
- package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/expect.txt +1 -0
- package/payload/evidence-kit/gate-tests/check-evidence-baseline/bad/validate-baseline.txt +3 -0
- package/payload/evidence-kit/gate-tests/check-evidence-baseline/good/TASK-QUEUE.md +3 -0
- package/payload/evidence-kit/gate-tests/check-evidence-baseline/good/args +2 -0
- package/payload/evidence-kit/gate-tests/check-evidence-baseline/good/expect.txt +1 -0
- package/payload/evidence-kit/gate-tests/check-evidence-baseline/good/validate-baseline.txt +3 -0
- package/payload/evidence-kit/gate-tests/check-evidence-baseline.test.sh +84 -0
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/TASK-QUEUE.md +1 -0
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/WORKFLOW-STATE.txt +3 -0
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/args +3 -0
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/expect.txt +1 -0
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/bad/validate-evidence.txt +2 -0
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/TASK-QUEUE.md +1 -0
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/WORKFLOW-STATE.txt +3 -0
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/args +3 -0
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/expect.txt +1 -0
- package/payload/evidence-kit/gate-tests/check-evidence-manifest/good/validate-evidence.txt +2 -0
- package/payload/evidence-kit/gate-tests/check-evidence-manifest.test.sh +107 -0
- package/payload/evidence-kit/gate-tests/evidence-lib.test.sh +82 -0
- package/payload/evidence-kit/lib/evidence.sh +173 -0
- package/payload/evidence-kit/smoke/install.sh +45 -0
- package/payload/evidence-kit/smoke/violation.sh +8 -0
- package/payload/evidence-kit/templates/evidence-config.sh +2 -0
- package/payload/gate-sdk/README.md +124 -0
- package/payload/gate-sdk/SPEC.md +1861 -0
- package/payload/gate-sdk/bin/enforcement-map.sh +272 -0
- package/payload/gate-sdk/bin/gen-pre-commit.sh +267 -0
- package/payload/gate-sdk/bin/install-hooks.sh +48 -0
- package/payload/gate-sdk/bin/run-consumer-smoke.sh +112 -0
- package/payload/gate-sdk/bin/run-gate-tests.sh +128 -0
- package/payload/gate-sdk/bin/run-gates.sh +147 -0
- package/payload/gate-sdk/bin/upgrade-smoke.sh +163 -0
- package/payload/gate-sdk/checks/check-action-pinning.sh +55 -0
- package/payload/gate-sdk/checks/check-action-run-shell.sh +219 -0
- package/payload/gate-sdk/checks/check-assertion-strength.sh +134 -0
- package/payload/gate-sdk/checks/check-commit-msg.sh +50 -0
- package/payload/gate-sdk/checks/check-commit-subject.sh +43 -0
- package/payload/gate-sdk/checks/check-core-files.sh +52 -0
- package/payload/gate-sdk/checks/check-enforcement-fresh.sh +37 -0
- package/payload/gate-sdk/checks/check-exec-bit.sh +76 -0
- package/payload/gate-sdk/checks/check-gate-assertions.sh +123 -0
- package/payload/gate-sdk/checks/check-gate-exemption-tasks.sh +106 -0
- package/payload/gate-sdk/checks/check-gate-fail-closed.sh +84 -0
- package/payload/gate-sdk/checks/check-gate-fixture-coverage.sh +92 -0
- package/payload/gate-sdk/checks/check-gate-output.sh +65 -0
- package/payload/gate-sdk/checks/check-graph.sh +632 -0
- package/payload/gate-sdk/checks/check-hook-exec-bit.sh +45 -0
- package/payload/gate-sdk/checks/check-identity.sh +134 -0
- package/payload/gate-sdk/checks/check-kit-enum.sh +94 -0
- package/payload/gate-sdk/checks/check-kit-registration.sh +68 -0
- package/payload/gate-sdk/checks/check-readme-roster.sh +102 -0
- package/payload/gate-sdk/checks/check-reads-couples.sh +148 -0
- package/payload/gate-sdk/checks/check-root-tiering.sh +66 -0
- package/payload/gate-sdk/checks/check-shellcheck.sh +55 -0
- package/payload/gate-sdk/checks/check-smoke-entry-guard.sh +53 -0
- package/payload/gate-sdk/checks/check-template-copy-parity.sh +126 -0
- package/payload/gate-sdk/checks/check-test-hermetic.sh +119 -0
- package/payload/gate-sdk/checks/check-tree-terms.sh +61 -0
- package/payload/gate-sdk/checks/check-workflow-tiering.sh +84 -0
- package/payload/gate-sdk/gate-tests/check-action-pinning/bad/args +1 -0
- package/payload/gate-sdk/gate-tests/check-action-pinning/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-action-pinning/bad/tree/mutable.yml +11 -0
- package/payload/gate-sdk/gate-tests/check-action-pinning/bad/tree/nested/pinned.yml +5 -0
- package/payload/gate-sdk/gate-tests/check-action-pinning/good/args +1 -0
- package/payload/gate-sdk/gate-tests/check-action-pinning/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-action-pinning/good/tree/nested/deep.yml +5 -0
- package/payload/gate-sdk/gate-tests/check-action-pinning/good/tree/no-refs.yaml +8 -0
- package/payload/gate-sdk/gate-tests/check-action-pinning/good/tree/pinned.yml +10 -0
- package/payload/gate-sdk/gate-tests/check-action-run-shell/bad/args +3 -0
- package/payload/gate-sdk/gate-tests/check-action-run-shell/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-action-run-shell/bad/tree/workflows/ci.yml +15 -0
- package/payload/gate-sdk/gate-tests/check-action-run-shell/good/args +3 -0
- package/payload/gate-sdk/gate-tests/check-action-run-shell/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-action-run-shell/good/tree/action.yml +14 -0
- package/payload/gate-sdk/gate-tests/check-action-run-shell/good/tree/not-actions.yml +16 -0
- package/payload/gate-sdk/gate-tests/check-action-run-shell/good/tree/workflows/ci.yml +106 -0
- package/payload/gate-sdk/gate-tests/check-action-run-shell.test.sh +88 -0
- package/payload/gate-sdk/gate-tests/check-assertion-strength/bad/args +3 -0
- package/payload/gate-sdk/gate-tests/check-assertion-strength/bad/bin/verdict.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-assertion-strength/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-assertion-strength/bad/smoke/install.sh +11 -0
- package/payload/gate-sdk/gate-tests/check-assertion-strength/good/args +3 -0
- package/payload/gate-sdk/gate-tests/check-assertion-strength/good/bin/verdict.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-assertion-strength/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-assertion-strength/good/smoke/install.sh +16 -0
- package/payload/gate-sdk/gate-tests/check-commit-msg/bad/args +2 -0
- package/payload/gate-sdk/gate-tests/check-commit-msg/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-commit-msg/bad/msg.txt +5 -0
- package/payload/gate-sdk/gate-tests/check-commit-msg/bad/patterns.list +5 -0
- package/payload/gate-sdk/gate-tests/check-commit-msg/good/args +2 -0
- package/payload/gate-sdk/gate-tests/check-commit-msg/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-commit-msg/good/msg.txt +5 -0
- package/payload/gate-sdk/gate-tests/check-commit-msg/good/patterns.list +5 -0
- package/payload/gate-sdk/gate-tests/check-commit-subject/bad/args +2 -0
- package/payload/gate-sdk/gate-tests/check-commit-subject/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-commit-subject/bad/msg.txt +4 -0
- package/payload/gate-sdk/gate-tests/check-commit-subject/good/args +2 -0
- package/payload/gate-sdk/gate-tests/check-commit-subject/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-commit-subject/good/msg.txt +5 -0
- package/payload/gate-sdk/gate-tests/check-commit-subject.test.sh +73 -0
- package/payload/gate-sdk/gate-tests/check-core-files/bad/args +1 -0
- package/payload/gate-sdk/gate-tests/check-core-files/bad/core-files.list +3 -0
- package/payload/gate-sdk/gate-tests/check-core-files/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-core-files/bad/present.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-core-files/good/args +1 -0
- package/payload/gate-sdk/gate-tests/check-core-files/good/core-files.list +5 -0
- package/payload/gate-sdk/gate-tests/check-core-files/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-core-files/good/nested/also-present.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-core-files/good/present.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/bad/args +4 -0
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/bad/emit.txt +14 -0
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/bad/projection.txt +7 -0
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/args +4 -0
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/emit.txt +14 -0
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-enforcement-fresh/good/projection.txt +14 -0
- package/payload/gate-sdk/gate-tests/check-exec-bit/bad/args +1 -0
- package/payload/gate-sdk/gate-tests/check-exec-bit/bad/dump.txt +7 -0
- package/payload/gate-sdk/gate-tests/check-exec-bit/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-exec-bit/good/args +1 -0
- package/payload/gate-sdk/gate-tests/check-exec-bit/good/dump.txt +7 -0
- package/payload/gate-sdk/gate-tests/check-exec-bit/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-exec-bit.test.sh +46 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/args +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/scripts/SPEC.md +13 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/scripts/check-baz.sh +13 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/bad/scripts/check-foo.sh +10 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/good/args +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/good/scripts/SPEC.md +20 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/good/scripts/check-baz.sh +12 -0
- package/payload/gate-sdk/gate-tests/check-gate-assertions/good/scripts/check-foo.sh +9 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/TASK-QUEUE.md +9 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/args +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/gates/check-sample.sh +11 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/TASK-QUEUE.md +9 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/args +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/gates/check-sample.sh +11 -0
- package/payload/gate-sdk/gate-tests/check-gate-fail-closed/bad/args +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-fail-closed/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-fail-closed/bad/gates/check-sample.sh +8 -0
- package/payload/gate-sdk/gate-tests/check-gate-fail-closed/good/args +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-fail-closed/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-fail-closed/good/gates/check-sample.sh +8 -0
- package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/args +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/check-gamma.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/gate-tests/check-alpha/bad/.keep +0 -0
- package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/gate-tests/check-alpha/good/.keep +0 -0
- package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/bad/gates.list +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/args +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/check-beta.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/gate-tests/check-alpha/bad/.keep +0 -0
- package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/gate-tests/check-alpha/good/.keep +0 -0
- package/payload/gate-sdk/gate-tests/check-gate-fixture-coverage/good/gates.list +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/bad/args +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/bad/check-sample.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/bad/gates.list +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/good/args +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/good/check-sample.sh +9 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/good/gates.list +3 -0
- package/payload/gate-sdk/gate-tests/check-graph/bad/SPEC-example-gate.md +12 -0
- package/payload/gate-sdk/gate-tests/check-graph/bad/args +1 -0
- package/payload/gate-sdk/gate-tests/check-graph/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-graph/good/SPEC-example-gate.md +20 -0
- package/payload/gate-sdk/gate-tests/check-graph/good/args +3 -0
- package/payload/gate-sdk/gate-tests/check-graph/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-graph-cap.test.sh +51 -0
- package/payload/gate-sdk/gate-tests/check-graph-refs.test.sh +55 -0
- package/payload/gate-sdk/gate-tests/check-graph-theme.test.sh +63 -0
- package/payload/gate-sdk/gate-tests/check-hook-exec-bit/bad/args +1 -0
- package/payload/gate-sdk/gate-tests/check-hook-exec-bit/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-hook-exec-bit/bad/hooks/pre-commit +2 -0
- package/payload/gate-sdk/gate-tests/check-hook-exec-bit/good/args +1 -0
- package/payload/gate-sdk/gate-tests/check-hook-exec-bit/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-hook-exec-bit/good/hooks/pre-commit +2 -0
- package/payload/gate-sdk/gate-tests/check-identity/bad/args +1 -0
- package/payload/gate-sdk/gate-tests/check-identity/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-identity/bad/git-config-email +1 -0
- package/payload/gate-sdk/gate-tests/check-identity/bad/git-remotes +2 -0
- package/payload/gate-sdk/gate-tests/check-identity/bad/identity.conf +4 -0
- package/payload/gate-sdk/gate-tests/check-identity/good/args +1 -0
- package/payload/gate-sdk/gate-tests/check-identity/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-identity/good/git-config-email +1 -0
- package/payload/gate-sdk/gate-tests/check-identity/good/git-remotes +3 -0
- package/payload/gate-sdk/gate-tests/check-identity/good/identity.conf +5 -0
- package/payload/gate-sdk/gate-tests/check-kit-enum/bad/args +1 -0
- package/payload/gate-sdk/gate-tests/check-kit-enum/bad/check-sample.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-kit-enum/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-kit-enum/bad/gates.list +4 -0
- package/payload/gate-sdk/gate-tests/check-kit-enum/good/args +1 -0
- package/payload/gate-sdk/gate-tests/check-kit-enum/good/check-sample.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-kit-enum/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-kit-enum/good/gates.list +3 -0
- package/payload/gate-sdk/gate-tests/check-kit-registration/bad/args +4 -0
- package/payload/gate-sdk/gate-tests/check-kit-registration/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-kit-registration/bad/registry-doc.md +20 -0
- package/payload/gate-sdk/gate-tests/check-kit-registration/good/args +5 -0
- package/payload/gate-sdk/gate-tests/check-kit-registration/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-kit-registration.test.sh +75 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/alpha-kit/README.md +14 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/alpha-kit/checks/check-alpha-one.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/alpha-kit/checks/check-alpha-two.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/args +4 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/gamma-kit/README.md +5 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/gamma-kit/checks/check-gamma-one.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/bad/scripts/gate-sdk-config.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/alpha-kit/README.md +16 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/alpha-kit/checks/check-alpha-one.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/alpha-kit/checks/check-alpha-two.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/args +6 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/beta-kit/smoke/install.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-readme-roster/good/scripts/gate-sdk-config.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-reads-couples/bad/args +2 -0
- package/payload/gate-sdk/gate-tests/check-reads-couples/bad/corpus/sub/deep.md +1 -0
- package/payload/gate-sdk/gate-tests/check-reads-couples/bad/corpus/top.md +1 -0
- package/payload/gate-sdk/gate-tests/check-reads-couples/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-reads-couples/bad/sandbox-gate.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-reads-couples/good/args +3 -0
- package/payload/gate-sdk/gate-tests/check-reads-couples/good/corpus/sub/deep.md +1 -0
- package/payload/gate-sdk/gate-tests/check-reads-couples/good/corpus/top.md +1 -0
- package/payload/gate-sdk/gate-tests/check-reads-couples/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-reads-couples/good/sandbox-gate.sh +8 -0
- package/payload/gate-sdk/gate-tests/check-root-tiering/bad/allow.list +1 -0
- package/payload/gate-sdk/gate-tests/check-root-tiering/bad/args +1 -0
- package/payload/gate-sdk/gate-tests/check-root-tiering/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-root-tiering/bad/root/README.md +1 -0
- package/payload/gate-sdk/gate-tests/check-root-tiering/bad/root/stray.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-root-tiering/good/allow.list +3 -0
- package/payload/gate-sdk/gate-tests/check-root-tiering/good/args +1 -0
- package/payload/gate-sdk/gate-tests/check-root-tiering/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-root-tiering/good/root/LICENSE +1 -0
- package/payload/gate-sdk/gate-tests/check-root-tiering/good/root/README.md +1 -0
- package/payload/gate-sdk/gate-tests/check-root-tiering/good/root/somedir/keep.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-shellcheck/bad/args +1 -0
- package/payload/gate-sdk/gate-tests/check-shellcheck/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-shellcheck/bad/warn.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-shellcheck/good/args +1 -0
- package/payload/gate-sdk/gate-tests/check-shellcheck/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-shellcheck/good/ok.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/bad/alpha-kit/smoke/install.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/bad/alpha-kit/smoke/violation.sh +7 -0
- package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/bad/args +4 -0
- package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/bad/scripts/gate-sdk-config.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/alpha-kit/smoke/install.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/alpha-kit/smoke/violation.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/args +6 -0
- package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/beta-kit/smoke/install.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-smoke-entry-guard/good/scripts/gate-sdk-config.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-template-copy-parity/bad/args +9 -0
- package/payload/gate-sdk/gate-tests/check-template-copy-parity/bad/delegation-kit/templates/agent-budget-guard.sh +16 -0
- package/payload/gate-sdk/gate-tests/check-template-copy-parity/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-template-copy-parity/bad/scripts/agent-budget-guard.sh +17 -0
- package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/args +8 -0
- package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/delegation-kit/templates/agent-budget-guard.sh +16 -0
- package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/delegation-kit/templates/delegation-config.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/delegation-kit/templates/usage-poller.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/scripts/agent-budget-guard.sh +16 -0
- package/payload/gate-sdk/gate-tests/check-template-copy-parity/good/scripts/delegation-config.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-test-hermetic/bad/args +3 -0
- package/payload/gate-sdk/gate-tests/check-test-hermetic/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-test-hermetic/bad/leaky.test.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-test-hermetic/good/args +3 -0
- package/payload/gate-sdk/gate-tests/check-test-hermetic/good/exempt.test.sh +4 -0
- package/payload/gate-sdk/gate-tests/check-test-hermetic/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-test-hermetic/good/sourced.test.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-test-hermetic-smoke.test.sh +84 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/bad/args +2 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/bad/patterns.list +3 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/bad/tree/leak.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/good/args +2 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/good/patterns.list +3 -0
- package/payload/gate-sdk/gate-tests/check-tree-terms/good/tree/clean.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-workflow-tiering/bad/.workflow/payload.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-workflow-tiering/bad/.workflow/projection.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-workflow-tiering/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-workflow-tiering/good/.workflow/projection.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-workflow-tiering/good/.workflow/wire.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-workflow-tiering/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/enforcement-map.test.sh +87 -0
- package/payload/gate-sdk/gate-tests/lib-gate.test.sh +78 -0
- package/payload/gate-sdk/gate-tests/run-for-path.test.sh +77 -0
- package/payload/gate-sdk/lib/consumer-smoke.sh +32 -0
- package/payload/gate-sdk/lib/gate.sh +216 -0
- package/payload/gate-sdk/lib/inject.sh +35 -0
- package/payload/gate-sdk/lib/test-hermetic.sh +11 -0
- package/payload/gate-sdk/smoke/install.sh +84 -0
- package/payload/gate-sdk/smoke/violation.sh +13 -0
- package/payload/gate-sdk/templates/check-skeleton.sh +23 -0
- package/payload/gate-sdk/templates/gates-workflow.yml +55 -0
- package/payload/gate-sdk/templates/msg-patterns.list +21 -0
- package/payload/guard-kit/README.md +65 -0
- package/payload/guard-kit/SPEC.md +590 -0
- package/payload/guard-kit/bin/compare-settings-allow.sh +58 -0
- package/payload/guard-kit/bin/run-guard-tests.sh +86 -0
- package/payload/guard-kit/bin/scan-prompts.sh +166 -0
- package/payload/guard-kit/bin/scratch-run.sh +34 -0
- package/payload/guard-kit/gate-tests/scan-prompts.test.sh +70 -0
- package/payload/guard-kit/gate-tests/scratch-run.test.sh +62 -0
- package/payload/guard-kit/guard-tests/cases.tsv +117 -0
- package/payload/guard-kit/guard-tests/escalation-cases.tsv +13 -0
- package/payload/guard-kit/lib/guard.sh +448 -0
- package/payload/guard-kit/smoke/install.sh +26 -0
- package/payload/guard-kit/templates/bash-guard.sh +18 -0
- package/payload/guard-kit/templates/close-triage.md +31 -0
- package/payload/guard-kit/templates/escalation-guard.sh +27 -0
- package/payload/guard-kit/templates/guard-config.sh +2 -0
- package/payload/guard-kit/templates/settings-hooks.json +19 -0
- package/payload/guard-kit/templates/wakeup-guard.sh +20 -0
- package/payload/lifecycle-kit/README.md +106 -0
- package/payload/lifecycle-kit/SPEC.md +1469 -0
- package/payload/lifecycle-kit/bin/close-surfaces.sh +94 -0
- package/payload/lifecycle-kit/bin/enter-stage.sh +215 -0
- package/payload/lifecycle-kit/bin/file-gap.sh +43 -0
- package/payload/lifecycle-kit/bin/install-lifecycle.sh +36 -0
- package/payload/lifecycle-kit/bin/session-id.sh +75 -0
- package/payload/lifecycle-kit/checks/check-close-surfaces.sh +63 -0
- package/payload/lifecycle-kit/checks/check-lesson-disposition.sh +98 -0
- package/payload/lifecycle-kit/checks/check-lifecycle-registration.sh +54 -0
- package/payload/lifecycle-kit/checks/check-merge-attrs.sh +69 -0
- package/payload/lifecycle-kit/checks/check-shim-restatement.sh +97 -0
- package/payload/lifecycle-kit/checks/check-skill-binding.sh +59 -0
- package/payload/lifecycle-kit/checks/check-stage-entry.sh +197 -0
- package/payload/lifecycle-kit/checks/check-stage-evidence.sh +81 -0
- package/payload/lifecycle-kit/checks/check-stage-skill-coverage.sh +47 -0
- package/payload/lifecycle-kit/gate-tests/boundary-scratch-wipe.test.sh +96 -0
- package/payload/lifecycle-kit/gate-tests/check-close-surfaces/bad/args +1 -0
- package/payload/lifecycle-kit/gate-tests/check-close-surfaces/bad/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-close-surfaces/bad/owners/inbox.md +5 -0
- package/payload/lifecycle-kit/gate-tests/check-close-surfaces/bad/scripts/lifecycle-config.sh +4 -0
- package/payload/lifecycle-kit/gate-tests/check-close-surfaces/good/args +1 -0
- package/payload/lifecycle-kit/gate-tests/check-close-surfaces/good/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-close-surfaces/good/owners/inbox.md +5 -0
- package/payload/lifecycle-kit/gate-tests/check-close-surfaces/good/scripts/lifecycle-config.sh +4 -0
- package/payload/lifecycle-kit/gate-tests/check-close-surfaces.test.sh +66 -0
- package/payload/lifecycle-kit/gate-tests/check-lesson-disposition/bad/args +2 -0
- package/payload/lifecycle-kit/gate-tests/check-lesson-disposition/bad/evidence.txt +2 -0
- package/payload/lifecycle-kit/gate-tests/check-lesson-disposition/bad/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-lesson-disposition/bad/queue-head.md +8 -0
- package/payload/lifecycle-kit/gate-tests/check-lesson-disposition/bad/queue-work.md +5 -0
- package/payload/lifecycle-kit/gate-tests/check-lesson-disposition/good/args +2 -0
- package/payload/lifecycle-kit/gate-tests/check-lesson-disposition/good/evidence.txt +3 -0
- package/payload/lifecycle-kit/gate-tests/check-lesson-disposition/good/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-lesson-disposition/good/queue-head.md +8 -0
- package/payload/lifecycle-kit/gate-tests/check-lesson-disposition/good/queue-work.md +5 -0
- package/payload/lifecycle-kit/gate-tests/check-lesson-disposition.test.sh +56 -0
- package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration/bad/AGENT.md +11 -0
- package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration/bad/args +1 -0
- package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration/bad/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration/good/AGENT.md +11 -0
- package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration/good/args +1 -0
- package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration/good/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-lifecycle-registration.test.sh +59 -0
- package/payload/lifecycle-kit/gate-tests/check-merge-attrs/bad/.gitattributes +6 -0
- package/payload/lifecycle-kit/gate-tests/check-merge-attrs/bad/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-merge-attrs/good/.gitattributes +5 -0
- package/payload/lifecycle-kit/gate-tests/check-merge-attrs/good/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-merge-attrs.test.sh +113 -0
- package/payload/lifecycle-kit/gate-tests/check-shim-restatement/bad/args +2 -0
- package/payload/lifecycle-kit/gate-tests/check-shim-restatement/bad/commands/build.md +6 -0
- package/payload/lifecycle-kit/gate-tests/check-shim-restatement/bad/corpus.md +4 -0
- package/payload/lifecycle-kit/gate-tests/check-shim-restatement/bad/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-shim-restatement/good/args +2 -0
- package/payload/lifecycle-kit/gate-tests/check-shim-restatement/good/commands/build.md +5 -0
- package/payload/lifecycle-kit/gate-tests/check-shim-restatement/good/corpus.md +4 -0
- package/payload/lifecycle-kit/gate-tests/check-shim-restatement/good/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-shim-restatement.test.sh +80 -0
- package/payload/lifecycle-kit/gate-tests/check-skill-binding/bad/args +1 -0
- package/payload/lifecycle-kit/gate-tests/check-skill-binding/bad/commands/build.md +5 -0
- package/payload/lifecycle-kit/gate-tests/check-skill-binding/bad/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-skill-binding/bad/templates/build.md +7 -0
- package/payload/lifecycle-kit/gate-tests/check-skill-binding/good/args +1 -0
- package/payload/lifecycle-kit/gate-tests/check-skill-binding/good/commands/build.md +7 -0
- package/payload/lifecycle-kit/gate-tests/check-skill-binding/good/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-skill-binding/good/templates/build.md +7 -0
- package/payload/lifecycle-kit/gate-tests/check-skill-binding.test.sh +84 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-entry/bad/.workflow/WORKFLOW-STATE.txt +7 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-entry/bad/TASK-QUEUE.md +13 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-entry/bad/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-entry/good/.workflow/WORKFLOW-STATE.txt +7 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-entry/good/TASK-QUEUE.md +13 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-entry/good/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-entry.test.sh +251 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-evidence/bad/.workflow/WORKFLOW-STATE.txt +6 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-evidence/bad/TASK-QUEUE.md +13 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-evidence/bad/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-evidence/good/.workflow/WORKFLOW-STATE.txt +6 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-evidence/good/TASK-QUEUE.md +13 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-evidence/good/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-evidence.test.sh +115 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/args +1 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/align.md +2 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/build.md +2 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/scope.md +2 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/commands/validate.md +2 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/bad/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/args +1 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/align.md +2 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/build.md +2 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/close.md +2 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/scope.md +2 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/commands/validate.md +2 -0
- package/payload/lifecycle-kit/gate-tests/check-stage-skill-coverage/good/expect.txt +1 -0
- package/payload/lifecycle-kit/lib/stages.sh +179 -0
- package/payload/lifecycle-kit/smoke/install.sh +341 -0
- package/payload/lifecycle-kit/smoke/violation.sh +8 -0
- package/payload/lifecycle-kit/templates/lead.md +271 -0
- package/payload/lifecycle-kit/templates/lifecycle-config.sh +2 -0
- package/payload/lifecycle-kit/templates/skills/align.md +65 -0
- package/payload/lifecycle-kit/templates/skills/build.md +78 -0
- package/payload/lifecycle-kit/templates/skills/close.md +122 -0
- package/payload/lifecycle-kit/templates/skills/release-sweep.md +39 -0
- package/payload/lifecycle-kit/templates/skills/scope.md +112 -0
- package/payload/lifecycle-kit/templates/skills/spec.md +91 -0
- package/payload/lifecycle-kit/templates/skills/upgrade.md +41 -0
- package/payload/lifecycle-kit/templates/skills/validate.md +54 -0
- package/payload/queue-kit/README.md +62 -0
- package/payload/queue-kit/SPEC.md +366 -0
- package/payload/queue-kit/bin/lesson-sink.sh +28 -0
- package/payload/queue-kit/bin/queue-index.sh +131 -0
- package/payload/queue-kit/checks/check-queue-hygiene.sh +81 -0
- package/payload/queue-kit/checks/check-queue-prose-precondition.sh +63 -0
- package/payload/queue-kit/checks/check-queue-sections.sh +44 -0
- package/payload/queue-kit/checks/check-queue-slug-liveness.sh +63 -0
- package/payload/queue-kit/checks/check-queue-wrap.sh +56 -0
- package/payload/queue-kit/checks/check-tag-lead-line.sh +66 -0
- package/payload/queue-kit/checks/check-task-conservation.sh +50 -0
- package/payload/queue-kit/checks/check-task-names.sh +128 -0
- package/payload/queue-kit/gate-tests/check-queue-hygiene/bad/TASK-QUEUE.md +17 -0
- package/payload/queue-kit/gate-tests/check-queue-hygiene/bad/expect.txt +1 -0
- package/payload/queue-kit/gate-tests/check-queue-hygiene/good/TASK-QUEUE.md +25 -0
- package/payload/queue-kit/gate-tests/check-queue-hygiene/good/expect.txt +1 -0
- package/payload/queue-kit/gate-tests/check-queue-prose-precondition/bad/TASK-QUEUE.md +15 -0
- package/payload/queue-kit/gate-tests/check-queue-prose-precondition/bad/expect.txt +1 -0
- package/payload/queue-kit/gate-tests/check-queue-prose-precondition/good/TASK-QUEUE.md +25 -0
- package/payload/queue-kit/gate-tests/check-queue-prose-precondition/good/expect.txt +1 -0
- package/payload/queue-kit/gate-tests/check-queue-sections/bad/TASK-QUEUE.md +13 -0
- package/payload/queue-kit/gate-tests/check-queue-sections/bad/expect.txt +1 -0
- package/payload/queue-kit/gate-tests/check-queue-sections/good/TASK-QUEUE.md +15 -0
- package/payload/queue-kit/gate-tests/check-queue-sections/good/expect.txt +1 -0
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/TASK-QUEUE.md +17 -0
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/docs/page.md +4 -0
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/expect.txt +1 -0
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/bad/scripts/queue-config.sh +3 -0
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/TASK-QUEUE.md +19 -0
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/docs/page.md +5 -0
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/expect.txt +1 -0
- package/payload/queue-kit/gate-tests/check-queue-slug-liveness/good/scripts/queue-config.sh +3 -0
- package/payload/queue-kit/gate-tests/check-queue-wrap/bad/TASK-QUEUE.md +15 -0
- package/payload/queue-kit/gate-tests/check-queue-wrap/bad/expect.txt +1 -0
- package/payload/queue-kit/gate-tests/check-queue-wrap/good/TASK-QUEUE.md +25 -0
- package/payload/queue-kit/gate-tests/check-queue-wrap/good/expect.txt +1 -0
- package/payload/queue-kit/gate-tests/check-tag-lead-line/bad/TASK-QUEUE.md +22 -0
- package/payload/queue-kit/gate-tests/check-tag-lead-line/bad/expect.txt +1 -0
- package/payload/queue-kit/gate-tests/check-tag-lead-line/good/TASK-QUEUE.md +29 -0
- package/payload/queue-kit/gate-tests/check-tag-lead-line/good/expect.txt +1 -0
- package/payload/queue-kit/gate-tests/check-task-names/bad/TASK-QUEUE.md +18 -0
- package/payload/queue-kit/gate-tests/check-task-names/bad/expect.txt +1 -0
- package/payload/queue-kit/gate-tests/check-task-names/good/TASK-QUEUE.md +25 -0
- package/payload/queue-kit/gate-tests/check-task-names/good/expect.txt +1 -0
- package/payload/queue-kit/gate-tests/queue-index.test.sh +118 -0
- package/payload/queue-kit/lib/queue.sh +107 -0
- package/payload/queue-kit/smoke/install.sh +21 -0
- package/payload/queue-kit/smoke/violation.sh +8 -0
- package/payload/queue-kit/templates/TASK-QUEUE.md +43 -0
- package/payload/queue-kit/templates/queue-config.sh +2 -0
- package/payload/site-kit/README.md +61 -0
- package/payload/site-kit/SPEC.md +263 -0
- package/payload/site-kit/checks/check-docs-cname-parity.sh +80 -0
- package/payload/site-kit/checks/check-docs-render-fidelity.sh +167 -0
- package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/args +4 -0
- package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/expect.txt +1 -0
- package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/site-config.sh +7 -0
- package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/tree/CNAME +1 -0
- package/payload/site-kit/gate-tests/check-docs-cname-parity/bad/tree/README.md +5 -0
- package/payload/site-kit/gate-tests/check-docs-cname-parity/good/args +5 -0
- package/payload/site-kit/gate-tests/check-docs-cname-parity/good/expect.txt +1 -0
- package/payload/site-kit/gate-tests/check-docs-cname-parity/good/site-config.sh +7 -0
- package/payload/site-kit/gate-tests/check-docs-cname-parity/good/tree/CNAME +1 -0
- package/payload/site-kit/gate-tests/check-docs-cname-parity/good/tree/docs/posts/2026-01-01-legacy.md +4 -0
- package/payload/site-kit/gate-tests/check-docs-cname-parity/good/tree/index.md +4 -0
- package/payload/site-kit/gate-tests/check-docs-cname-parity/good/tree/pkg/gate-tests/fixture.md +5 -0
- package/payload/site-kit/gate-tests/check-docs-render-fidelity/bad/args +8 -0
- package/payload/site-kit/gate-tests/check-docs-render-fidelity/bad/expect.txt +1 -0
- package/payload/site-kit/gate-tests/check-docs-render-fidelity/bad/tree/docs/install.md +38 -0
- package/payload/site-kit/gate-tests/check-docs-render-fidelity/good/args +6 -0
- package/payload/site-kit/gate-tests/check-docs-render-fidelity/good/expect.txt +1 -0
- package/payload/site-kit/gate-tests/check-docs-render-fidelity/good/tree/docs/install.md +35 -0
- package/payload/site-kit/gate-tests/check-docs-render-fidelity-foreign.test.sh +87 -0
- package/payload/site-kit/gate-tests/check-docs-render-fidelity-span.test.sh +80 -0
- package/payload/site-kit/gate-tests/check-docs-render-fidelity-table.test.sh +90 -0
- package/payload/site-kit/lib/site.sh +29 -0
- package/payload/site-kit/smoke/install.sh +26 -0
- package/payload/site-kit/smoke/violation.sh +20 -0
- package/payload/site-kit/templates/site-health.yml +164 -0
- package/profiles.list +53 -0
|
@@ -0,0 +1,1264 @@
|
|
|
1
|
+
# canon-kit — spec discipline for agent-authored components
|
|
2
|
+
|
|
3
|
+
One canonical spec per component, deltas as short-lived amendment files, and
|
|
4
|
+
a star topology across the prose surfaces: every fact has exactly one owning
|
|
5
|
+
surface, and every other surface cites it — never restates it. The problem
|
|
6
|
+
the kit solves: when coding agents author the specs, design rationale gets
|
|
7
|
+
re-derived under build pressure unless it is captured up front, and a
|
|
8
|
+
parallel copy of any gated fact is an un-gateable second source that drifts
|
|
9
|
+
silently. The remedy is a lifecycle (amendments authored up front,
|
|
10
|
+
merged and deleted at build) and gates over the copy-shaped failure modes.
|
|
11
|
+
|
|
12
|
+
The kit carries the lifecycle, the checklists, and its gates; a consumer's
|
|
13
|
+
surface names, banned headings, and scan languages are config, with this
|
|
14
|
+
repo's layout as the defaults. Requires [gate-sdk](../gate-sdk/) (the gates
|
|
15
|
+
follow its four contracts and resolve through its registry); the queue
|
|
16
|
+
lifecycle gate reads the tag syntax [queue-kit](../queue-kit/) defines.
|
|
17
|
+
|
|
18
|
+
## The spec model
|
|
19
|
+
|
|
20
|
+
Every component has exactly one canonical spec file (default `SPEC.md`) —
|
|
21
|
+
complete, current, the single source of truth. A spec has three jobs, and
|
|
22
|
+
"copying the code into prose" is not one of them:
|
|
23
|
+
|
|
24
|
+
1. **Owns semantics** — invariants, ordering, error behavior; the prose no
|
|
25
|
+
other artifact carries.
|
|
26
|
+
2. **Names contracts** — every interface is named, and each name is tied to
|
|
27
|
+
the implementation by a gate; a named-but-ungated contract is the rot
|
|
28
|
+
vector.
|
|
29
|
+
3. **Never copies a structural definition** — reference the code, do not
|
|
30
|
+
copy it. Anything readable from the code (exact types, field layouts,
|
|
31
|
+
config values) is implementation, not spec content; an ungated verbatim
|
|
32
|
+
copy drifts silently the moment the code changes
|
|
33
|
+
(`check-spec-embedded-source`).
|
|
34
|
+
|
|
35
|
+
A **SPEC amendment** (default glob `SPEC-*.md`, in the owning component's
|
|
36
|
+
directory) is the delta artifact for a designed-but-unimplemented change:
|
|
37
|
+
it describes only what is added or changed, is named after the feature
|
|
38
|
+
(`SPEC-sqlite.md`, never `SPEC-PHASE3-SQLITE.md`), and is a transition
|
|
39
|
+
artifact — merged into the canonical spec and deleted when the work
|
|
40
|
+
completes; an amendment never outlives its implementation. The one
|
|
41
|
+
sanctioned copy exemption: an amendment may embed a wire-contract delta
|
|
42
|
+
(e.g. a fenced proto block) until merge, because it is the design home for
|
|
43
|
+
a contract that does not exist yet; the canonical spec cites the contract
|
|
44
|
+
file, never re-embeds it. A ruling with no owning component (governance,
|
|
45
|
+
workflow, gates) is a **root-level amendment**: same lifecycle, lives at
|
|
46
|
+
the repo root, merges into the consumer's rulebook instead of a component
|
|
47
|
+
spec.
|
|
48
|
+
|
|
49
|
+
## The amendment lifecycle
|
|
50
|
+
|
|
51
|
+
Spec-writing is an **authoring-stage** activity, not a build activity — build
|
|
52
|
+
sessions never author specs. The feature/debt litmus runs at filing in the
|
|
53
|
+
scoping stage's triage; the amendment is *authored* in whichever stage the
|
|
54
|
+
roster designates for it (scope by default, or a dedicated authoring stage where
|
|
55
|
+
the roster splits one out).
|
|
56
|
+
A feature task is therefore in exactly one of two states, marked with the
|
|
57
|
+
queue tags whose syntax queue-kit defines:
|
|
58
|
+
|
|
59
|
+
- **Design-pending** — no amendment yet; the entry sits in the deferred
|
|
60
|
+
section tagged `[needs-spec]`, excluded from selection. Every deferred
|
|
61
|
+
entry carries the tag: all deferred work is design-pending by definition.
|
|
62
|
+
- **Spec-ready** — the amendment exists; the entry sits in the feature
|
|
63
|
+
section tagged `[spec: <ref>]`, eligible for selection.
|
|
64
|
+
|
|
65
|
+
The **bidirectional rule**: every feature entry in the active queue carries
|
|
66
|
+
a `[spec:]` ref that resolves to a file on disk, and every amendment on
|
|
67
|
+
disk has a queue entry pointing at it. Writing the amendment *is* promoting
|
|
68
|
+
the deferred entry — without the pairing, design rationale and ruled-out
|
|
69
|
+
alternatives get re-derived under build pressure. Technical debt needs no
|
|
70
|
+
amendment (it fixes behavior to an existing spec); a debt task that needs a
|
|
71
|
+
design *ruling* is design work — it goes to the deferred section
|
|
72
|
+
`[needs-spec]` until scope rules on it. Enforced by
|
|
73
|
+
`check-amendment-queue`.
|
|
74
|
+
|
|
75
|
+
The feature/debt litmus is **new names**: a task that adds any name to a
|
|
76
|
+
governed surface — a script, a config knob, a file or directory convention,
|
|
77
|
+
a tag, a contract another component must honor — is a feature and needs the
|
|
78
|
+
amendment, however small the diff; debt converges behavior on names the
|
|
79
|
+
spec already carries. The tell for misfiling: a queue entry whose body
|
|
80
|
+
carries more than a few lines of design ruling is an amendment inlined
|
|
81
|
+
where this gate cannot see it — the entry format has no home for causal
|
|
82
|
+
completeness, and the rationale evaporates when the done section is
|
|
83
|
+
cleared. The gate cannot decide which section a task belongs in (that is
|
|
84
|
+
the semantic residue); it enforces the pairing once the section is chosen,
|
|
85
|
+
so the litmus runs at filing time, in the scope skill's triage.
|
|
86
|
+
|
|
87
|
+
### The causal-completeness check
|
|
88
|
+
|
|
89
|
+
Before an amendment is ready, every new state, event, and interface it
|
|
90
|
+
introduces passes four points:
|
|
91
|
+
|
|
92
|
+
1. **Producer named and reachable** — what code path, call, or timer
|
|
93
|
+
triggers it; a named producer whose enabling config no deployed
|
|
94
|
+
configuration actually sets is dead everywhere but unit tests.
|
|
95
|
+
2. **Consumer named** — what component receives it, by what mechanism
|
|
96
|
+
(which stream, which call, which poll).
|
|
97
|
+
3. **Existing integration sections updated** — any affected spec section
|
|
98
|
+
describing the prior flow is updated in the amendment itself.
|
|
99
|
+
4. **Every field has a named reader** — for each field on a new message,
|
|
100
|
+
name the consumer that reads it and the transition where it is read; a
|
|
101
|
+
field with no reader is removed, and a field read at one transition is
|
|
102
|
+
not populated at others.
|
|
103
|
+
|
|
104
|
+
A cross-component causal gap that surfaces during build is not a deferred
|
|
105
|
+
TODO: stop, resolve it that session, update the spec before resuming.
|
|
106
|
+
lifecycle-kit's scope/build skill templates carry these hooks; canon-kit
|
|
107
|
+
supplies the checklist they invoke and the gate behind the promotion rule.
|
|
108
|
+
|
|
109
|
+
### Merging an amendment (on task completion)
|
|
110
|
+
|
|
111
|
+
1. Read the canonical spec fully, then the amendment.
|
|
112
|
+
2. Integrate — do not append: each addition lands in its proper section,
|
|
113
|
+
and the merged spec reads as one coherent document a reader who never
|
|
114
|
+
saw the amendment can use alone. The merge separates by tier: design
|
|
115
|
+
rationale relocates into the spec's prose (its permanent home), and any
|
|
116
|
+
embedded wire-delta becomes a citation to the now-existing contract
|
|
117
|
+
file — the amendment's exemption is file-scoped, so once step 3 deletes
|
|
118
|
+
the file `check-spec-embedded-source` re-arms and a kept embed goes red.
|
|
119
|
+
3. Delete the amendment file; verify none remain for the component.
|
|
120
|
+
4. Move the queue entry to `## Done`, dropping its `[spec:]` tag — the
|
|
121
|
+
amendment it referenced is gone, and `check-amendment-queue` requires
|
|
122
|
+
every `[spec:]` ref to resolve to a file on disk.
|
|
123
|
+
5. Propagate removals (grep every spec for names the change retired), file
|
|
124
|
+
discovered gaps as debt tasks, and commit the merge with the work.
|
|
125
|
+
|
|
126
|
+
The shipped amendment template ends in a Definition-of-Done checklist that
|
|
127
|
+
includes causal completeness, merged-with-no-information-lost, the
|
|
128
|
+
file-deleted assertions, and gap filing.
|
|
129
|
+
|
|
130
|
+
## Content tiering — the star topology
|
|
131
|
+
|
|
132
|
+
Every governed prose surface owns exactly one content tier and *points to*
|
|
133
|
+
— never restates — a fact owned by another surface. Which surfaces exist
|
|
134
|
+
and what each owns is the consumer's tier contract (each consumer's is its
|
|
135
|
+
own instance); the kit's rules are the topology itself:
|
|
136
|
+
|
|
137
|
+
- **One owner per fact.** A parallel copy of a gated fact is the defect —
|
|
138
|
+
a second source no gate reads, drifting silently. The fix keeps each
|
|
139
|
+
surface's tier and replaces the foreign-tier slab with a pointer.
|
|
140
|
+
- **Definitions have one home.** A canonical bold-lead-in definition of a
|
|
141
|
+
glossary term belongs only to the glossary; another surface may *use*
|
|
142
|
+
the term, explain *why* it exists, or carry its local mechanism — never
|
|
143
|
+
the definition (`check-surface-duplication`, with per-site valves for a
|
|
144
|
+
surface that legitimately introduces a concept).
|
|
145
|
+
- **Quantitative literals are code-owned.** A count or enumerated set
|
|
146
|
+
transcribed into prose is a parallel copy; cite the owning source
|
|
147
|
+
instead (`check-manifest-count` bans a bare cardinal quantifying a
|
|
148
|
+
governed collection in a manifest — the collection is the count's owner).
|
|
149
|
+
A literal stays verbatim only when load-bearing, and then only
|
|
150
|
+
gate-coupled. A path's **version-control tracking status** is code-owned in
|
|
151
|
+
the same sense a count is — git owns it — so prose states the rule and
|
|
152
|
+
`check-tracking-claim` verifies it, rather than prose transcribing membership.
|
|
153
|
+
- **Comments cite, never restate.** The code surface is a tier too: a
|
|
154
|
+
full-line comment on a governed source is a machine or reason directive,
|
|
155
|
+
rides the contiguous run a directive opens, or is exempt — design
|
|
156
|
+
rationale lives in the owning SPEC section, not re-derived in a comment
|
|
157
|
+
block; the pointer names where the why lives and couples the code to it —
|
|
158
|
+
never relocating the why into the comment (`check-comment-tier`; the
|
|
159
|
+
FP-prone trailing-comment judgment stays a review tripwire).
|
|
160
|
+
- **Honest mechanizability.** Only the structural sub-rules gate (banned
|
|
161
|
+
headings, fence density, duplicate definitions, verbatim copies,
|
|
162
|
+
temporal-narration markers, restated collection totals); the core
|
|
163
|
+
judgment — is this sentence a definition or a narration, a why or a
|
|
164
|
+
mechanism — is FP-prone and stays a review tripwire, explicitly not a
|
|
165
|
+
blocking gate.
|
|
166
|
+
|
|
167
|
+
## Layout and configuration
|
|
168
|
+
|
|
169
|
+
The kit is vendored beside gate-sdk (conventionally at `canon-kit/`); its
|
|
170
|
+
gates are registered in the consumer's `gates.list` by name — each
|
|
171
|
+
where its surface exists (a consumer with no glossary does not register
|
|
172
|
+
`check-surface-duplication`) — and resolve through gate-sdk's multi-kit
|
|
173
|
+
path.
|
|
174
|
+
|
|
175
|
+
Brand tokens and generic vocabulary sit on opposite sides of a seam. Brand
|
|
176
|
+
tokens carry the kit's identity and move with the kit name: the kit dir
|
|
177
|
+
(`canon-kit/`), the `CANON_KIT_` env-knob prefix, the discovered config
|
|
178
|
+
filename (`canon-config.sh`, the `<kit>-config.sh` convention), and the
|
|
179
|
+
docs-site page dir (`docs/canon-kit/`). Generic vocabulary names the spec
|
|
180
|
+
*artifact* discipline rather than the brand and is fixed regardless of the
|
|
181
|
+
kit's name: the `SPEC.md` canonical-spec filename, the `SPEC-*.md` amendment
|
|
182
|
+
glob, the `spec:` and `contract:` source directives, the `[spec:]` and
|
|
183
|
+
`[needs-spec]` queue tags, the `check-spec-*` gate names, and the internal
|
|
184
|
+
`lib/spec.sh` loader (where "spec" names the discipline). The consumer gate
|
|
185
|
+
`check-kit-ref-liveness` (a check-skeleton copy in `scripts/` — the
|
|
186
|
+
dangling-reference hazard is a kit author's, so it is not templated into
|
|
187
|
+
gate-sdk) holds the brand-token side honest tree-wide: every slash- or
|
|
188
|
+
line-anchored `<name>-kit` / `gate-sdk` path segment must name a
|
|
189
|
+
`gate_kit_roots` dir, and every live-prefix kit knob must resolve to a tracked
|
|
190
|
+
kit knob (check-docs-cmd's resolver, reused so the non-uniform knob-prefix map
|
|
191
|
+
has one home). It valves the surfaces that legitimately name design-ahead or
|
|
192
|
+
frozen brands — `gate-tests/` fixture bodies, `docs/posts/*`, the generated
|
|
193
|
+
trajectory data, `SPEC-*.md` amendments, and the queue — so a rename cannot
|
|
194
|
+
leave a dangle without turning a gate red.
|
|
195
|
+
|
|
196
|
+
Config follows queue-kit's pattern: copy `templates/canon-config.sh` into
|
|
197
|
+
the gates dir as `canon-config.sh` (or point `CANON_KIT_CONFIG_FILE`
|
|
198
|
+
elsewhere) and override any knob; defaults fill what the consumer left
|
|
199
|
+
unset, and the loader exits 2 on a malformed config. Knobs:
|
|
200
|
+
|
|
201
|
+
- `CANON_KIT_SPEC_NAME` — canonical spec filename, default `SPEC.md`.
|
|
202
|
+
- `CANON_KIT_AMENDMENT_GLOB` — default `SPEC-*.md`.
|
|
203
|
+
- `CANON_KIT_QUEUE_FILE` — default `${GATE_SDK_QUEUE_FILE:-TASK-QUEUE.md}`.
|
|
204
|
+
- `CANON_KIT_FEATURE_SECTIONS` — array, default `("New Features")`: active
|
|
205
|
+
sections whose entries require `[spec:]`.
|
|
206
|
+
- `CANON_KIT_ACTIVE_SECTIONS` — array, default
|
|
207
|
+
`("New Features" "Technical Debt")`: sections where `[needs-spec]` is a
|
|
208
|
+
violation.
|
|
209
|
+
- `CANON_KIT_DEFERRED_SECTION` — default `Deferred`: the section whose
|
|
210
|
+
every entry requires `[needs-spec]`.
|
|
211
|
+
- `CANON_KIT_DOD_HEADING` — default `Definition of Done`;
|
|
212
|
+
`CANON_KIT_DOD_MODE` — `exactly-one` (the default) or `at-most-one`
|
|
213
|
+
(a reference-spec corpus like this repo's kits carries no DoD).
|
|
214
|
+
- `CANON_KIT_SCAN_KIT_ROOTS` — `0` (default) or `1`. At `0` the shared finders
|
|
215
|
+
skip vendored kit roots (`gate_kit_roots`): a kit's `SPEC.md`/`SPEC-*.md` is
|
|
216
|
+
a dependency's documentation, not governed content, so the `exactly-one`
|
|
217
|
+
default holds out of the box on a tree that merely vendored the kits beside
|
|
218
|
+
gate-sdk. Set `1` when the kit SPECs are the consumer's own first-party
|
|
219
|
+
content (this repo does, and keeps `at-most-one` for them).
|
|
220
|
+
- `CANON_KIT_BANNED_HEADINGS` — array, default
|
|
221
|
+
`("Directory Structure" "Public API" "Cargo.toml Dependencies")`;
|
|
222
|
+
`CANON_KIT_DERIVABLE_DENSITY` — default `60` (percent fenced);
|
|
223
|
+
`CANON_KIT_DERIVABLE_POINTER_REGEX` — the index-pointer marker that exempts
|
|
224
|
+
a shed section, default `pub-index|proto-index` (consumer index tooling).
|
|
225
|
+
- `CANON_KIT_EMBED_THRESHOLD` / `CANON_KIT_EMBED_MINLINES` — defaults `0.70`
|
|
226
|
+
/ `8`; `CANON_KIT_EMBED_LANGS` — the scanned fence-language → source
|
|
227
|
+
mapping, one `kind|fence-alias,…|file-glob,…` entry per language family,
|
|
228
|
+
default = the bundled list; `CANON_KIT_EMBED_ILLUSTRATIVE` — fences
|
|
229
|
+
illustrative-by-default, default `(json)`; `CANON_KIT_EMBED_WIRE_KIND` — the
|
|
230
|
+
one fence an amendment may embed as a not-yet-merged contract delta,
|
|
231
|
+
default `proto`.
|
|
232
|
+
- `CANON_KIT_GLOSSARY_FILE` — default `GLOSSARY.md`;
|
|
233
|
+
`CANON_KIT_DUP_SURFACES` — array of surfaces scanned for foreign
|
|
234
|
+
definitions, default `(VISION.md)` plus every component spec.
|
|
235
|
+
- `CANON_KIT_MANIFEST_FILES` — array of globs, default empty ⇒ derive the
|
|
236
|
+
manifest set (canonical specs, `README.md` at any depth, `CLAUDE.md`);
|
|
237
|
+
`CANON_KIT_PROSE_SURFACE_GLOBS` — array of candidate globs, default empty:
|
|
238
|
+
each matched file joins the manifest set **iff it is slot-free** (no
|
|
239
|
+
lifecycle-kit binding slot `*<name: …>*`, no `CONSUMER BINDING` header), so
|
|
240
|
+
slot-free kit-template markdown and agent definitions come under the manifest
|
|
241
|
+
doc gates while slot-bearing surfaces self-exclude — which surfaces a consumer
|
|
242
|
+
governs is their config, the discriminator is kit mechanism (§lib/spec.sh).
|
|
243
|
+
This repo sets `("*/templates/*.md" ".claude/agents/*.md")`.
|
|
244
|
+
`CANON_KIT_TEMPORAL_MARKERS` — the temporal-narration marker set scanned by
|
|
245
|
+
`check-manifest-temporal`, default a generic-English list (`previously`,
|
|
246
|
+
`formerly`, `renamed from`, …), matched case-insensitively;
|
|
247
|
+
`CANON_KIT_TEMPORAL_EXEMPT_SECTIONS` — array of heading names whose whole
|
|
248
|
+
section is exempt, default empty (this repo sets `Out of scope`).
|
|
249
|
+
- `CANON_KIT_MDREF_EXCLUDE` — array of globs, default empty: manifest-set docs
|
|
250
|
+
`check-md-refs` skips (a consumer's generated documentation whose links a
|
|
251
|
+
build tool owns).
|
|
252
|
+
- `CANON_KIT_COUNT_COLLECTIONS` — array of collection-noun plurals
|
|
253
|
+
`check-manifest-count` treats as growing governed sets, default
|
|
254
|
+
`("gates" "meta-gates" "checks" "kits" "stages" "rules" "KPIs")` (a consumer
|
|
255
|
+
appends its own governed plurals); `CANON_KIT_COUNT_WEDGE_WORDS` — how many
|
|
256
|
+
words may sit between the cardinal and the noun, default `2`;
|
|
257
|
+
`CANON_KIT_COUNT_ALLOWED_PHRASES` — exact-phrase allowlist for fixed named
|
|
258
|
+
sets a doc may cite inline, default empty (a consumer names its own fixed
|
|
259
|
+
sets, and only a phrase whose noun it governs needs the valve).
|
|
260
|
+
- `CANON_KIT_ENUM_SETS_CMD` — a consumer command emitting the governed sets
|
|
261
|
+
`check-prose-enum` holds, one `<set-name>`⇥`<member>` line per member,
|
|
262
|
+
default empty ⇒ clean skip (no declared sets). This repo sets
|
|
263
|
+
`bash scripts/enum-sets.sh`, which derives the queue tag sets from
|
|
264
|
+
queue-kit's own parser rather than restating them.
|
|
265
|
+
- `CANON_KIT_COMMENT_MACHINE` / `CANON_KIT_COMMENT_REASON` — arrays, default
|
|
266
|
+
empty: extra directive prefixes appended to the built-in kit-mechanism
|
|
267
|
+
roster (a consumer's product vocabulary). `CANON_KIT_COMMENT_SURFACE` —
|
|
268
|
+
array of globs, default empty ⇒ derive: shell sources under the root (kit
|
|
269
|
+
roots per `CANON_KIT_SCAN_KIT_ROOTS`, `templates/` pruned) plus the
|
|
270
|
+
`${GATE_SDK_WORKFLOW_DIR:-.workflow}/*.txt` state files.
|
|
271
|
+
`CANON_KIT_COMMENT_POSITIONAL` — the language construct roster for
|
|
272
|
+
positional rescue, default empty (the kit is language-agnostic; a Rust
|
|
273
|
+
consumer sets `.unwrap( .expect( unsafe #[allow(`).
|
|
274
|
+
`CANON_KIT_COMMENT_WHITELIST` — array of globs, default empty: the
|
|
275
|
+
consumer's not-yet-swept sources, its array tagged `# exception-list:`
|
|
276
|
+
with a per-entry `# until: <drain-task>`. `CANON_KIT_COMMENT_RUN_CAP` —
|
|
277
|
+
positive integer, default 3: total physical comment lines a directive
|
|
278
|
+
blesses (its own line plus continuations, blank `#` lines counted).
|
|
279
|
+
- `CANON_KIT_PROSE_TELL_GLOBS` — array of repo-root-relative globs, default
|
|
280
|
+
empty ⇒ nothing scanned, a clean pass: the reader-facing prose surfaces
|
|
281
|
+
`check-prose-tells` reads. Which surfaces carry authored prose is the
|
|
282
|
+
consumer's editorial posture, and per the provenance seam it never lands as a
|
|
283
|
+
kit literal. The threshold knobs, each read by `check-prose-tells` alone:
|
|
284
|
+
`CANON_KIT_PROSE_TELL_EMDASH_MAX` — em-dashes a paragraph may carry, default
|
|
285
|
+
`2`; `CANON_KIT_PROSE_TELL_CONTRAST_MAX` — "not X, it's Y" contrast turns a
|
|
286
|
+
section may carry, default `1`; `CANON_KIT_PROSE_TELL_RHYTHM_MIN_SENTENCES` —
|
|
287
|
+
sentences a paragraph needs before its rhythm is judged, default `4`;
|
|
288
|
+
`CANON_KIT_PROSE_TELL_RHYTHM_CV_MIN` — the word-count coefficient-of-variation
|
|
289
|
+
floor beneath which a paragraph reads as metronomic, default `0.25`;
|
|
290
|
+
`CANON_KIT_PROSE_TELL_TRICOLON_MAX` — "A, B, and C" triples a section may
|
|
291
|
+
carry, default `2`. `CANON_KIT_PROSE_TELL_PHRASES` — array of throat-clearing
|
|
292
|
+
phrases matched case-insensitively, default a bundled generic-English set
|
|
293
|
+
(`It's worth noting`, `That said`, …); `CANON_KIT_PROSE_TELL_ABBR_ALLOW` —
|
|
294
|
+
array of abbreviations exempt from the undefined-abbreviation tell, default a
|
|
295
|
+
bundled universal set (`API`, `CLI`, `URL`, …). A consumer extends either
|
|
296
|
+
array with its own vocabulary through the matching `_EXTRA` knob —
|
|
297
|
+
`CANON_KIT_PROSE_TELL_PHRASES_EXTRA` and
|
|
298
|
+
`CANON_KIT_PROSE_TELL_ABBR_ALLOW_EXTRA`, both default empty — which the lib
|
|
299
|
+
unions onto the base after the base defaults resolve: the effective set is
|
|
300
|
+
base plus extra. Extension therefore costs one token, never a restatement of
|
|
301
|
+
the bundled default that would silently diverge from it. Assigning a base
|
|
302
|
+
array keeps its replace semantics, and that is the narrowing valve: a consumer
|
|
303
|
+
wanting a bundled member *gone* replaces the base array. Generic English is
|
|
304
|
+
kit-shippable; a consumer's own vocabulary never becomes a kit literal (the
|
|
305
|
+
provenance seam).
|
|
306
|
+
|
|
307
|
+
Cross-kit note: the section knobs carry the same defaults as queue-kit's;
|
|
308
|
+
the knobs are independent (either kit runs without the other), so a
|
|
309
|
+
consumer renaming its sections sets both. Valve and marker spellings <!-- prose-enum-exempt: names the two amendment-lifecycle tags specifically; [blocked-by:] is a dependency tag outside that lifecycle, not a dropped task-tag member -->
|
|
310
|
+
(`[needs-spec]`, `[spec:]`, `vision-introduces` / `spec-introduces`,
|
|
311
|
+
`spec-embedded-source-exempt: <reason>`) are mechanism, not config.
|
|
312
|
+
|
|
313
|
+
## Per-component contracts
|
|
314
|
+
|
|
315
|
+
### lib/spec.sh
|
|
316
|
+
|
|
317
|
+
The sourced config loader plus shared adapters — values and adapters only,
|
|
318
|
+
never gate structure. It centralizes the surfaces and vocabularies the
|
|
319
|
+
spec-scanning gates share, so a rule enters once and every sibling matches the
|
|
320
|
+
same shapes:
|
|
321
|
+
|
|
322
|
+
- **Section grammar and queue resolution:** the section-regex builders the
|
|
323
|
+
queue-facing gates use (queue-kit's rule — both sides of a section boundary
|
|
324
|
+
must parse identically), and the one queue walk that emits a live slug for a
|
|
325
|
+
bold lead-in bullet in an active or deferred section and a done slug for a
|
|
326
|
+
bare-slug bullet outside them — the single grammar `check-todo-task-liveness`
|
|
327
|
+
and `check-deprecation-task` resolve a `task: <slug>` binding through (each
|
|
328
|
+
caller builds its own live/done map and fail-closes on the walk status).
|
|
329
|
+
- **Finders:** the canonical-spec / amendment finders the spec-scanning gates
|
|
330
|
+
share, and the manifest-set finder the narration-gate family shares —
|
|
331
|
+
canonical specs plus `README.md`/`CLAUDE.md`, amendments excluded — so its
|
|
332
|
+
members read one identical set. The finder then folds in each
|
|
333
|
+
`CANON_KIT_PROSE_SURFACE_GLOBS` candidate that is **slot-free**: it bears no
|
|
334
|
+
lifecycle-kit binding slot (`*<name: …>*`, slot-name `[a-z][a-z0-9-]*` — the
|
|
335
|
+
grammar lifecycle-kit/SPEC.md §templates/skills/ owns) and no
|
|
336
|
+
`CONSUMER BINDING` header. A slot-bearing candidate is silently excluded — a template still
|
|
337
|
+
awaiting binding is a placeholder, not finished prose, and its coverage stays
|
|
338
|
+
the shim/binding gates (§Layout and configuration states the knob). The
|
|
339
|
+
canonical-spec / amendment finders skip a
|
|
340
|
+
`templates/` skeleton (a copyable stub, not governed content — the same
|
|
341
|
+
rationale as the gate-tests prune) and, unless `CANON_KIT_SCAN_KIT_ROOTS=1`,
|
|
342
|
+
any vendored kit root under the scan root (a dependency's docs; an ancestor
|
|
343
|
+
kit root — the case when a kit's own fixture dir is the scan root — never
|
|
344
|
+
prunes).
|
|
345
|
+
- **The count adapter** the restated-total gates share, so a consumer's
|
|
346
|
+
`CANON_KIT_COUNT_COLLECTIONS` vocabulary enters once and every such gate
|
|
347
|
+
matches the same total shapes — including a total whose cardinal and noun
|
|
348
|
+
straddle a prose wrap, reported at the cardinal's physical line. The boundary
|
|
349
|
+
rule and the mechanical exemptions live in one shared fragment, so no sibling
|
|
350
|
+
drifts from another in what it counts as a total (§check-manifest-count).
|
|
351
|
+
- **The enum sets** arrive through the consumer's `CANON_KIT_ENUM_SETS_CMD`,
|
|
352
|
+
validated and fail-closing (exit 2) on a command error or an unparsable line
|
|
353
|
+
(§check-prose-enum).
|
|
354
|
+
- **The comment-surface adapters:** the comment gates read *different* surfaces.
|
|
355
|
+
`check-spec-pointer` scans the template-pruned surface — a template's `spec:`
|
|
356
|
+
line is an unresolvable-by-design placeholder (§check-spec-pointer);
|
|
357
|
+
`check-comment-tier` scans the with-templates surface — a copied-out
|
|
358
|
+
template's `spec:` pointer resolves against the vendored kit path (kit SPECs
|
|
359
|
+
travel with the vendor-whole install), so its comments are governed like any
|
|
360
|
+
source (§check-comment-tier). Which finder a gate uses is kit contract, not
|
|
361
|
+
consumer config — a consumer wanting the old blanket exemption shadows the
|
|
362
|
+
gate.
|
|
363
|
+
- **The default-statement grammar** both knob gates share, so the rule for
|
|
364
|
+
what reads as a stated default has one home. `sk_literal_at` recognizes the
|
|
365
|
+
value literal opening a window (a backticked non-knob string, a quoted string,
|
|
366
|
+
or a number) and `sk_default_literal` returns the literal the word "default"
|
|
367
|
+
binds; a caller-supplied `sk_is_knobname` keeps a bare knob name from reading
|
|
368
|
+
as a value. `check-knob-citation` reads it to reject a restated value in prose;
|
|
369
|
+
`check-knob-default-coupling` reads it to confirm the SPEC states the source's
|
|
370
|
+
literal (§check-knob-default-coupling).
|
|
371
|
+
|
|
372
|
+
### check-amendment-queue
|
|
373
|
+
|
|
374
|
+
Invariant: the bidirectional rule holds — (a) no feature-section entry
|
|
375
|
+
without `[spec:]`, no `[needs-spec]` anywhere in the active sections
|
|
376
|
+
(entries or prose; a prose mention masks the tag's absence), and no
|
|
377
|
+
`[spec:]`-tagged entry in an active non-feature section (a spec-ready
|
|
378
|
+
entry is misfiled there — it belongs in a feature section); (b) every
|
|
379
|
+
deferred entry carries `[needs-spec]`, and a deferred entry already
|
|
380
|
+
carrying `[spec:]` must be promoted; (c) every amendment on disk pairs
|
|
381
|
+
with a `[spec:]` queue entry and every `[spec:]` ref resolves to a file.
|
|
382
|
+
|
|
383
|
+
Calibration: a ref is a bare amendment basename (searched tree-wide) or a
|
|
384
|
+
repo-relative path (resolved directly — the generalization that lets a
|
|
385
|
+
consumer point a task at any design artifact, e.g. this repo's kit-SPEC
|
|
386
|
+
drafts). Sub-bullets and prose notes are outside the entry grammar;
|
|
387
|
+
`precommit` tier.
|
|
388
|
+
|
|
389
|
+
### check-spec-dod-singleton
|
|
390
|
+
|
|
391
|
+
Invariant: no canonical spec carries the configured Definition-of-Done
|
|
392
|
+
heading more than once (a duplicate checklist is the two-sources defect on
|
|
393
|
+
the completion contract); under `exactly-one` mode a spec with none is
|
|
394
|
+
also flagged.
|
|
395
|
+
|
|
396
|
+
Calibration: heading match is level-insensitive within `##`–`####`;
|
|
397
|
+
`at-most-one` exists because a reference-spec corpus legitimately has no
|
|
398
|
+
DoD. The good/bad pair covers the DoD count; `check-spec-dod-singleton.test.sh`
|
|
399
|
+
covers the finder's kit-root scoping — a DoD-less vendored kit `SPEC.md` is
|
|
400
|
+
pruned by default (so `exactly-one` holds on a vendored tree) and re-included
|
|
401
|
+
by `CANON_KIT_SCAN_KIT_ROOTS=1`. `align-only` tier.
|
|
402
|
+
|
|
403
|
+
### check-spec-derivable-section
|
|
404
|
+
|
|
405
|
+
Invariant: no canonical-spec section under a banned heading (the
|
|
406
|
+
configured code-derivable set) whose body exceeds the density budget in
|
|
407
|
+
fenced lines — such a section is a code dump that drifts; it sheds to a
|
|
408
|
+
one-line index pointer (which is exempt).
|
|
409
|
+
|
|
410
|
+
Calibration: density counts non-blank lines; the heading set and budget
|
|
411
|
+
are config because what is derivable depends on the consumer's index
|
|
412
|
+
tooling. `align-only` tier.
|
|
413
|
+
|
|
414
|
+
### check-spec-embedded-source
|
|
415
|
+
|
|
416
|
+
Invariant: no fenced block in a canonical spec verbatim-copies a tracked
|
|
417
|
+
source file above the overlap threshold — cite the path instead. Overlap
|
|
418
|
+
detection needs no author opt-in; the two valves are the amendment
|
|
419
|
+
wire-delta exemption — an amendment is a short-lived design-to-code bridge,
|
|
420
|
+
so a not-yet-cite-able wire contract legitimately embeds there until merge
|
|
421
|
+
promotes it to a file the canonical spec cites — and the per-site
|
|
422
|
+
`spec-embedded-source-exempt: <reason>` marker.
|
|
423
|
+
|
|
424
|
+
Calibration: blocks shorter than `CANON_KIT_EMBED_MINLINES` are ignored;
|
|
425
|
+
languages in `CANON_KIT_EMBED_ILLUSTRATIVE` are skipped by default; the
|
|
426
|
+
threshold is calibrated against real specs, not synthetic fixtures.
|
|
427
|
+
`precommit` tier.
|
|
428
|
+
|
|
429
|
+
### check-manifest-temporal
|
|
430
|
+
|
|
431
|
+
Invariant: no temporal-narration marker in governed manifest prose outside an
|
|
432
|
+
exempt site. A manifest states current behavior only — history is derivable
|
|
433
|
+
from git, and a `formerly…` line is standing context cost documenting the old
|
|
434
|
+
cost, taxing every session that reads it. This gate mechanizes the lexical
|
|
435
|
+
share of that judgment; context-kit's close-stage brevity pass keeps the
|
|
436
|
+
semantic residue (*is this sentence about the past?*); a by-eye
|
|
437
|
+
narration-marker KPI is superseded by this gate (drift-kit/SPEC.md
|
|
438
|
+
§Out of scope).
|
|
439
|
+
|
|
440
|
+
The scanned set is the shared `spec_manifest_files` finder (§lib/spec.sh):
|
|
441
|
+
canonical specs, `README.md` at any depth, and `CLAUDE.md`; amendments are
|
|
442
|
+
excluded by construction (a transition artifact describes change — that is its
|
|
443
|
+
nature). Markers are `CANON_KIT_TEMPORAL_MARKERS`, matched case-insensitively;
|
|
444
|
+
fenced code blocks are skipped and a marker inside an inline-code span is a
|
|
445
|
+
meta-reference, not narration — so a gate-output example or this section's own
|
|
446
|
+
vocabulary may name one. Three valves suppress a legitimately past line: a
|
|
447
|
+
per-site `manifest-temporal-exempt: <reason>` comment on the line or the one
|
|
448
|
+
above; `CANON_KIT_TEMPORAL_EXEMPT_SECTIONS` — heading names whose whole
|
|
449
|
+
section (subsections included) is exempt, this repo's config naming
|
|
450
|
+
`Out of scope` (a deliberate-absence ruling may narrate what the kit
|
|
451
|
+
excludes); and `CANON_KIT_TEMPORAL_EXEMPT_PATHS` — path
|
|
452
|
+
globs whose whole file is exempt, for an immutable dated-narrative surface a
|
|
453
|
+
heading name cannot address (this repo's config naming `docs/posts/*`, the
|
|
454
|
+
dated announcement posts, which take link and command resolution but not
|
|
455
|
+
narration governance). Producer: the generated pre-commit hook /
|
|
456
|
+
`run-gates.sh`; consumer: the committing operator via the output contract; each
|
|
457
|
+
marker hit is read at the single scan transition (file, line, marker in the
|
|
458
|
+
message), no persistent state. Fail-closed on an unreadable manifest.
|
|
459
|
+
|
|
460
|
+
Calibration: the marker set is tuned against this repo as the FP corpus — bare
|
|
461
|
+
`used to` is excluded (it collides with instrumental "used to build/filter").
|
|
462
|
+
At build every hit is dispositioned: reword (preferred — narration is standing
|
|
463
|
+
cost), section-exempt (provenance), or site-exempt with reason. `precommit`
|
|
464
|
+
tier.
|
|
465
|
+
|
|
466
|
+
### check-manifest-count
|
|
467
|
+
|
|
468
|
+
Invariant: no bare cardinal quantifying a governed collection noun
|
|
469
|
+
in manifest prose outside an exempt site. A pinned total for a *growing*
|
|
470
|
+
collection — `six gates`, `seven meta-gates` — is a second source no gate reads:
|
|
471
|
+
the count's owner is the collection itself (`gates.list`, a `checks/` dir, the
|
|
472
|
+
stages config), and a restated total drifts the moment the collection grows.
|
|
473
|
+
Ban, don't validate — a validating gate carries
|
|
474
|
+
the standing token cost context-kit's brevity machinery rejects plus FP-prone
|
|
475
|
+
entity mapping; a lexical tripwire eliminates the copy. The motivating find: this
|
|
476
|
+
repo landed one gate and left the same total in four disagreeing copies (across
|
|
477
|
+
two READMEs and a SPEC), caught only by close-stage review.
|
|
478
|
+
|
|
479
|
+
The scanned set is the shared manifest-set finder (§lib/spec.sh) —
|
|
480
|
+
canonical specs, `README.md`, `CLAUDE.md`; amendments excluded, fenced blocks
|
|
481
|
+
skipped, an inline-code cardinal a meta-reference (so this section may name its
|
|
482
|
+
own examples). Both the grammar and the matcher come from the shared count
|
|
483
|
+
adapter, and the prose walk is the shared manifest-prose driver (§lib/spec.sh),
|
|
484
|
+
so this gate, its `check-prose-enum` sibling, and its comment-tier cousin
|
|
485
|
+
read one vocabulary and one exemption behavior, and a total wrapped across a
|
|
486
|
+
prose break is caught and reported at its first physical line; a blank line, a
|
|
487
|
+
fence, and a `manifest-count-exempt:` site each end the paragraph — an exempted
|
|
488
|
+
line cannot join its neighbours into a total. The cardinal
|
|
489
|
+
grammar is digit sequences and the spelled
|
|
490
|
+
`two`…`twelve`, case-insensitive; `one` is deliberately outside it — singleton and
|
|
491
|
+
cardinality-rule idioms ("one owner per fact", "one iteration per kit") are
|
|
492
|
+
invariants, not totals. Collection nouns are `CANON_KIT_COUNT_COLLECTIONS`
|
|
493
|
+
(default the plurals the kits themselves grow: `gates`, `meta-gates`, `checks`,
|
|
494
|
+
`kits`, `stages`, `rules`, `KPIs`) — the one place consumer vocabulary enters,
|
|
495
|
+
and it enters as config.
|
|
496
|
+
|
|
497
|
+
Two match shapes carry the cardinal to the noun: the *quantifier* shape, which
|
|
498
|
+
allows up to `CANON_KIT_COUNT_WEDGE_WORDS` (default `2`) modifiers wedged between
|
|
499
|
+
cardinal and noun (so `nine generic rules` pins a total as surely as the
|
|
500
|
+
adjacent `six gates`, adjacency being the zero-wedge case), and the
|
|
501
|
+
*noun-then-range* shape (`rules 1-8`), which pins both endpoints of an ordered
|
|
502
|
+
collection and rots on every append. The exempt contexts an author writes into:
|
|
503
|
+
a threshold or comparator on the same line (a bound is a rule, not a total); the
|
|
504
|
+
`all but <cardinal>` partition idiom; a partitive marker (`of`, `out of`) on
|
|
505
|
+
either side of the match (in `three of the twelve gates` neither cardinal is a
|
|
506
|
+
restated total); `CANON_KIT_COUNT_ALLOWED_PHRASES`, an exact-phrase allowlist for
|
|
507
|
+
fixed named sets a doc legitimately enumerates (default empty — fixed-set naming
|
|
508
|
+
is consumer judgment, config not mechanism, biting only on a phrase whose noun
|
|
509
|
+
the consumer governs); and the per-site `manifest-count-exempt: <reason>` marker
|
|
510
|
+
on the line or the one above. The exact operator and phrase tokens each context
|
|
511
|
+
recognizes are the check's own regex, generic-English mechanism rather than
|
|
512
|
+
config.
|
|
513
|
+
Producer: the generated pre-commit hook / `run-gates.sh`; consumer: the
|
|
514
|
+
committing operator via the output contract; each hit read at the single scan
|
|
515
|
+
transition (file, line, matched span in the message), no persistent state.
|
|
516
|
+
Fail-closed on an unreadable manifest.
|
|
517
|
+
|
|
518
|
+
Calibration shares the sibling's FP corpus and procedure
|
|
519
|
+
(§check-manifest-temporal): the default noun list is tuned against this tree,
|
|
520
|
+
every hit dispositioned — reword to cite the owning collection (preferred),
|
|
521
|
+
extend `CANON_KIT_COUNT_ALLOWED_PHRASES` (a genuinely fixed set), or site-exempt
|
|
522
|
+
with reason. The good/bad pair covers every match shape and the mechanical
|
|
523
|
+
exemptions;
|
|
524
|
+
`check-manifest-count.test.sh` covers the config-driven paths (a consumer-governed
|
|
525
|
+
noun and the allowlist containment) the stock defaults cannot reach. `precommit`
|
|
526
|
+
tier.
|
|
527
|
+
|
|
528
|
+
### check-prose-enum
|
|
529
|
+
|
|
530
|
+
Invariant: within one manifest-prose paragraph, a delimited hand list naming two
|
|
531
|
+
or more members of one declared governed set must name every member of that set,
|
|
532
|
+
unless an exempt site holds; a member absent from the paragraph is reported as
|
|
533
|
+
omitted. This is the enumeration sibling of check-manifest-count's restated
|
|
534
|
+
totals and the prose analog of check-kit-enum's hand-list doctrine: the count
|
|
535
|
+
gate catches a bare cardinal over a growing collection, but a row that
|
|
536
|
+
*enumerates instead of counting* drifts just as silently when the set grows.
|
|
537
|
+
<!-- prose-enum-exempt: historical attested-drift citation — names the set as it stood when the drift occurred, deliberately not tracking growth -->
|
|
538
|
+
The attested drift: a README row's `blocked-by/needs-spec/spec` tag algebra went
|
|
539
|
+
incomplete when a sibling tag landed — same restatement, different surface form,
|
|
540
|
+
no scanner. Engagement mirrors check-kit-enum — two members are a list, a lone
|
|
541
|
+
member (or two scattered across a paragraph, not adjacent) is a mention, not a
|
|
542
|
+
list.
|
|
543
|
+
|
|
544
|
+
Set declarations are consumer config, never gate literals (the provenance seam):
|
|
545
|
+
`CANON_KIT_ENUM_SETS_CMD` (default empty — clean skip) names a consumer command
|
|
546
|
+
emitting one `<set-name>`⇥`<member>` line per member, loaded through
|
|
547
|
+
`spec_enum_sets` (§lib/spec.sh); a command that fails or a line that does not
|
|
548
|
+
parse is fail-closed (exit 2). A member matches word-bounded — bracketed
|
|
549
|
+
(`[spec:]`) or bare (`spec`), neither an alphanumeric nor a hyphen abutting, so a
|
|
550
|
+
stem never matches inside a longer tag — and the attested drift used bare stems.
|
|
551
|
+
|
|
552
|
+
The scanned set and the paragraph walk are the shared `spec_manifest_files`
|
|
553
|
+
finder and `spec_manifest_walk_awk` driver (§lib/spec.sh); this gate's
|
|
554
|
+
`sk_on_pflush` hook judges each flushed paragraph. Two or more members present
|
|
555
|
+
count as a *hand list* only when a run of them is chained by list separators
|
|
556
|
+
(comma, slash, brackets, whitespace, or `and`/`or`); members merely co-occurring
|
|
557
|
+
in one paragraph with prose between them stay mentions. Omitted members are set
|
|
558
|
+
members absent from the whole paragraph — the sibling that landed but never
|
|
559
|
+
joined the list. Exempt contexts follow the count gate's family shape,
|
|
560
|
+
mechanical markers first, per-site tag last: a subset marker in the window
|
|
561
|
+
(`e.g.`, `such as`, `among them` — the list declares itself partial), a
|
|
562
|
+
partitive marker on the match (`some of`, `one of`, `of the set` — a selection,
|
|
563
|
+
not an enumeration), and the per-site `prose-enum-exempt: <reason>` on the line
|
|
564
|
+
or the one above. The corrective names both legitimate fixes: cite the owning
|
|
565
|
+
set by name, or complete the enumeration — never trim to a silent subset.
|
|
566
|
+
|
|
567
|
+
Producer: the generated pre-commit hook / `run-gates.sh`, coupled to the
|
|
568
|
+
manifest set plus the consumer's config and kit sources (a set change re-fires
|
|
569
|
+
the gate over the docs). Consumer: the committing operator via the output
|
|
570
|
+
contract — file, line, set name, count, and the omitted members all read once at
|
|
571
|
+
the scan transition. `CANON_KIT_ENUM_SETS_CMD` is read at startup; both fields of
|
|
572
|
+
each emitted line are read at match time (set name in the report, member in the
|
|
573
|
+
matcher). This repo's consumer config is `scripts/enum-sets.sh`, which derives
|
|
574
|
+
the queue task-tag set and the Lessons-channel set from queue-kit's own
|
|
575
|
+
lead-line tag parser plus `QUEUE_KIT_LESSON_TAGS` — derived, not restated; the
|
|
576
|
+
two roles are separate sets because a paragraph naming one role's tags is not
|
|
577
|
+
enumerating the other. A set a consumer can only hand-list is that consumer's
|
|
578
|
+
own drift to own; the kit contract asks only for the emit grammar.
|
|
579
|
+
|
|
580
|
+
Calibration follows the count gate's procedure: tuned against this tree, every
|
|
581
|
+
hit dispositioned — cite the set, complete the list, or site-exempt with reason.
|
|
582
|
+
The good/bad pair covers a bare comma hand list dropping a member and the
|
|
583
|
+
marked-subset cases; `check-prose-enum.test.sh` covers the config-driven paths
|
|
584
|
+
(the empty-default skip, the fail-closed escapes, bracketed matching, multi-set
|
|
585
|
+
independence, the exempt escapes) the pair cannot reach. `precommit` tier.
|
|
586
|
+
|
|
587
|
+
### check-knob-citation
|
|
588
|
+
|
|
589
|
+
Invariant: no kit knob stated *with its value* in governed manifest prose
|
|
590
|
+
outside the owning kit's SPEC. This is the enforcement half of the
|
|
591
|
+
de-literalization rule (doctrine-kit/DOCTRINE.md §Methodology-maintenance
|
|
592
|
+
rules): a knob default copied into a README or a sibling SPEC is a second source
|
|
593
|
+
no gate reads, and it drifts the moment the owner changes. Where the count and
|
|
594
|
+
enum siblings ban a restated *total* and a restated *enumeration*, this bans a
|
|
595
|
+
restated *knob value*.
|
|
596
|
+
|
|
597
|
+
The knob-token vocabulary is derived, never listed — the provenance seam holds
|
|
598
|
+
(a kit literal carrying a private vocabulary would publish it). Each
|
|
599
|
+
`gate_kit_roots` member yields two SCREAMING_SNAKE prefix forms: the dir name
|
|
600
|
+
uppercased with hyphens mapped to underscores (`gate-sdk` → `GATE_SDK_`,
|
|
601
|
+
`delegation-kit` → `DELEGATION_KIT_`), and for a `-kit`-suffixed dir the
|
|
602
|
+
suffix-dropped short form too (`lifecycle-kit` → `LIFECYCLE_`), so a knob on
|
|
603
|
+
either the long or the short form is governed. Both forms derive mechanically,
|
|
604
|
+
so adding a kit widens the vocabulary with no edit here and the gate ships no
|
|
605
|
+
term list. A SCREAMING_SNAKE token is a candidate
|
|
606
|
+
only when it starts with a derived prefix; the short form widens the token
|
|
607
|
+
space, and the value-marker leg below is what holds the false-positive rate.
|
|
608
|
+
|
|
609
|
+
A candidate fires on the value-marker triad, every leg required: a
|
|
610
|
+
derived-prefix token; a same-line value marker; and a surface that is not the
|
|
611
|
+
token's owning SPEC (`<owning-kit>/` joined to `CANON_KIT_SPEC_NAME`). The
|
|
612
|
+
marker is one of two shapes — `=` appended directly to the token
|
|
613
|
+
(`<KIT>_<KNOB>=<value>`), or the word "default" bound within a short window to a
|
|
614
|
+
value literal (a backticked value, a quoted string, or a number). Bare knob
|
|
615
|
+
names stay legal everywhere: prose cites the name and points at the owning
|
|
616
|
+
roster, the fixed instance the gate must never flag; a bare number with no knob
|
|
617
|
+
token in reach never fires — a tripwire left to human judgment, not a gate rule.
|
|
618
|
+
Code and config are out of scope: code owns values, and only the prose manifest
|
|
619
|
+
is scanned.
|
|
620
|
+
|
|
621
|
+
Two calibrations hold the false-positive rate against this tree, the corpus the
|
|
622
|
+
leg is tuned on. A token named inside a `${…}` shell parameter expansion is a
|
|
623
|
+
name citation — another knob's default *expression*, a fallback source — never a
|
|
624
|
+
value statement of itself, so expansions are blanked before the token scan. And
|
|
625
|
+
the "default" leg binds: the word must be followed within a short window by a
|
|
626
|
+
literal that is not itself a backticked knob name, so a stated default like
|
|
627
|
+
``default `docs/CNAME` `` fires while a knob cited bare after the verb ("these
|
|
628
|
+
paths default through `<KIT>_<KNOB>`") does not.
|
|
629
|
+
|
|
630
|
+
The scanned set is the shared `spec_manifest_files` finder and the prose walk is
|
|
631
|
+
the shared `spec_manifest_walk_awk` driver (§lib/spec.sh); this gate supplies the
|
|
632
|
+
`sk_on_line` hook (the per-line triad) and leaves `sk_on_pflush` unused — the
|
|
633
|
+
marker is same-line, so no paragraph join is needed. Fences are skipped, and a
|
|
634
|
+
`knob-citation-exempt: <reason>` on the line or the one above is the per-site
|
|
635
|
+
valve for a genuine local restatement (a wiring example whose value is the
|
|
636
|
+
citing kit's own path). Producer: the generated pre-commit hook / `run-gates.sh`,
|
|
637
|
+
coupled to the manifest set and the kit SPECs; consumer: the committing operator
|
|
638
|
+
via the output contract — file, line, the knob token, and the owning SPEC the
|
|
639
|
+
value belongs in, each read once at the scan transition, no persistent state.
|
|
640
|
+
Fail-closed on the awk status.
|
|
641
|
+
|
|
642
|
+
Calibration follows the family procedure (§check-manifest-temporal): every hit
|
|
643
|
+
dispositioned — cite the knob by name and point at its SPEC roster (preferred),
|
|
644
|
+
or exempt a genuine local restatement with reason. The good/bad pair covers both
|
|
645
|
+
marker shapes, the short-derived prefix, the `${…}` name citation, the
|
|
646
|
+
default-as-verb non-hit, and the per-site valve; `check-knob-citation.test.sh`
|
|
647
|
+
covers the owning-SPEC exemption (a kit may state its own knob's value in its own
|
|
648
|
+
SPEC but not in its README) the fixture pair cannot reach. `precommit` tier.
|
|
649
|
+
|
|
650
|
+
This gate polices where a value is *placed* (prose may not restate it); its
|
|
651
|
+
sibling `check-knob-default-coupling` polices whether the value *agrees* between
|
|
652
|
+
the source fallback and the SPEC that owns it. The two share the
|
|
653
|
+
default-statement grammar (§lib/spec.sh) — one reads it to reject a value in
|
|
654
|
+
prose, the other to confirm the SPEC states the source's literal.
|
|
655
|
+
|
|
656
|
+
### check-knob-default-coupling
|
|
657
|
+
|
|
658
|
+
Invariant, for every literal kit-knob default in kit executable source: the
|
|
659
|
+
literal (1) agrees across every site that supplies it and (2) equals the default
|
|
660
|
+
the owning kit's SPEC states. Where `check-knob-citation` bars a knob value
|
|
661
|
+
copied into prose *outside* the owning SPEC, this closes the channel that gate
|
|
662
|
+
leaves open — the `:-` fallback (or guarded assignment) in the source that
|
|
663
|
+
actually supplies the default is coupled to the SPEC statement, so the two
|
|
664
|
+
cannot drift silently.
|
|
665
|
+
|
|
666
|
+
Two default idioms are scanned: a `${PREFIX_KNOB:-value}` fallback expansion, and
|
|
667
|
+
the guarded assignment that is the dominant form in the kits' `lib/*.sh` — a
|
|
668
|
+
`[[ -v PREFIX_KNOB ]] || PREFIX_KNOB=value` scalar or a
|
|
669
|
+
`declare -p PREFIX_KNOB &>/dev/null || PREFIX_KNOB=(…)` array. The knob prefix is
|
|
670
|
+
derived, never listed — one SCREAMING_SNAKE form per `gate_kit_roots` member
|
|
671
|
+
(the dir uppercased, hyphens to underscores), so the gate ships no term list and
|
|
672
|
+
the provenance seam holds; a token is a candidate only when it opens with a
|
|
673
|
+
derived prefix. The scanned surface is the kit source under those roots (the
|
|
674
|
+
roster the meta-gates walk, `templates/` and fixtures pruned); a knob's owning
|
|
675
|
+
SPEC is resolved by its prefix, not the citing file's kit, so a `canon-kit`
|
|
676
|
+
source citing a `GATE_SDK_` knob couples to gate-sdk's SPEC.
|
|
677
|
+
|
|
678
|
+
Assertion 1 (source self-agreement): every literal site for one knob carries the
|
|
679
|
+
same literal; two disagreeing is drift inside the source before any SPEC is
|
|
680
|
+
read, and it suppresses the knob's assertion-2 check (fix the source first).
|
|
681
|
+
Assertion 2 (SPEC agreement): the owning SPEC states that same literal as the
|
|
682
|
+
knob's default, read through the default-statement grammar `check-knob-citation`
|
|
683
|
+
shares (§lib/spec.sh). A default stated as the same `${…:-tail}` deferral the
|
|
684
|
+
source uses is reduced tail-to-tail before the compare, so a knob inheriting
|
|
685
|
+
another kit's default reads as agreement. A knob whose SPEC carries no default
|
|
686
|
+
statement at all reds — the SPEC owns knob defaults.
|
|
687
|
+
|
|
688
|
+
The coupling is literal-to-literal, and the calibration draws the boundary of
|
|
689
|
+
what carries a single literal to couple. Skipped-and-counted, never coupled: a
|
|
690
|
+
computed default (any expansion, substitution, or arithmetic in the value), an
|
|
691
|
+
array default (no single literal), an empty fallback (`${X:-}` is the `set -u`
|
|
692
|
+
presence-guard idiom, not a value — the real default lives at the else-branch or
|
|
693
|
+
guarded-assignment site the gate reaches there), and a default the SPEC states
|
|
694
|
+
*descriptively* rather than as a literal (a regex, a phrase set, a bundled list —
|
|
695
|
+
code owns the complex value and the SPEC describes it, the widest-true tier). The
|
|
696
|
+
honest limit: agreement is confirmed by the source literal appearing as the
|
|
697
|
+
SPEC's stated default, so a value the SPEC never pins to a literal cannot be
|
|
698
|
+
coupled — only a literal disagreement or a wholly undocumented default reds.
|
|
699
|
+
|
|
700
|
+
Producer: the generated pre-commit hook / `run-gates.sh`, coupled to kit source
|
|
701
|
+
and the kit SPECs; consumer: the committing operator via the output contract —
|
|
702
|
+
file, the knob, the source literal, and the owning SPEC, each read once at the
|
|
703
|
+
scan transition, no persistent state. Fail-closed on the awk status. The good/bad
|
|
704
|
+
pair covers self-agreement, the SPEC disagreement, and both idioms;
|
|
705
|
+
`check-knob-default-coupling.test.sh` covers the cross-kit owning SPEC, the
|
|
706
|
+
absent-default red, and the descriptive/array/empty/deferral skips the pair
|
|
707
|
+
cannot reach. `precommit` tier.
|
|
708
|
+
|
|
709
|
+
### check-surface-duplication
|
|
710
|
+
|
|
711
|
+
Invariant: no unvalved bold-lead-in definition of a glossary term on a
|
|
712
|
+
configured non-glossary surface — the canonical definition form belongs
|
|
713
|
+
only to the glossary; elsewhere it is a second definition that drifts.
|
|
714
|
+
Valves `vision-introduces:` / `spec-introduces:` (same line or the line
|
|
715
|
+
above) make a legitimate narrative or local introduction a reviewable
|
|
716
|
+
decision in the diff.
|
|
717
|
+
|
|
718
|
+
Calibration: a bold lead-in naming a component (a directory owning a
|
|
719
|
+
canonical spec) is never flagged — a component's definition lives in its
|
|
720
|
+
own spec, so there is nothing to restate; gate-test fixtures are excluded;
|
|
721
|
+
exits 2 when the glossary file is absent (register the gate only where the
|
|
722
|
+
topology exists). `align-only` tier.
|
|
723
|
+
|
|
724
|
+
### check-comment-tier
|
|
725
|
+
|
|
726
|
+
Invariant: every full-line comment on a governed source is one of — a
|
|
727
|
+
machine directive (a comment a tool parses: `graph:`, `shellcheck`,
|
|
728
|
+
`contract:`), a reason directive (a spec pointer, usage synopsis, or
|
|
729
|
+
positional justification: `spec:`, `usage:`, `exception-list:`,
|
|
730
|
+
`no-fixture:`, `assertion`, `permanent:`, `TODO(task:`,
|
|
731
|
+
`TODO(spec-ambiguity)`, which blesses a bounded window — its own line plus
|
|
732
|
+
continuation lines up to `CANON_KIT_COMMENT_RUN_CAP` total physical comment
|
|
733
|
+
lines, blank `#` lines counted; a directive mid-run opens a fresh window
|
|
734
|
+
from its own line, and every comment line beyond a window classifies on its
|
|
735
|
+
own), `comment-tier-exempt: <reason>`, or the
|
|
736
|
+
comment immediately above a positional construct from the language roster.
|
|
737
|
+
Anything else is flagged. Code is the WHAT, its SPEC the WHY — the seam the
|
|
738
|
+
align stage checks each side against; a comment that restates the code, or
|
|
739
|
+
paraphrases the SPEC section it cites, is deleted, not blessed. A `spec:`
|
|
740
|
+
directive earns its place by the coupling it makes — a bare pointer binding
|
|
741
|
+
this code site to the requirement that governs it, as `contract:` / `assertion`
|
|
742
|
+
/ `graph:` bind a site to a manifest contract, an enumerated assertion, or the
|
|
743
|
+
gate graph. The binding is the value: either side's drift breaks it visibly
|
|
744
|
+
(gate-checked both sides for `graph:` and `assertion`; for `spec:` /
|
|
745
|
+
`contract:` `check-spec-pointer` gate-checks the forward side — the target
|
|
746
|
+
resolves — leaving only the reverse, an uncovered requirement, a review
|
|
747
|
+
concern), which is why it blesses only its own one-line binding, never a
|
|
748
|
+
relocated block — restatement couples nothing, it just forks the why into a
|
|
749
|
+
second copy no gate reads. `comment-tier-exempt: <reason>` is the honest
|
|
750
|
+
directive for a genuinely-local fact below SPEC altitude that neither tier
|
|
751
|
+
owns.
|
|
752
|
+
|
|
753
|
+
One shape overrides the window: a full-line comment carrying a **restated
|
|
754
|
+
collection total** — the count grammar of §check-manifest-count, over the same
|
|
755
|
+
`CANON_KIT_COUNT_COLLECTIONS` vocabulary — is flagged even where a directive
|
|
756
|
+
blesses it, and positional rescue does not reach it either. A count is never
|
|
757
|
+
directive wording. A directive's blessing covers its own wording physically
|
|
758
|
+
wrapped, never a total pinned beside it, and such a total is exactly the second
|
|
759
|
+
source the manifest gate bans: `# rules 1-8` sat stale in this repo's own guard
|
|
760
|
+
while its ruleset grew past eight, invisible because no gate read comments for
|
|
761
|
+
counts. The fix is deleting the count or citing the owning collection; the sole
|
|
762
|
+
valve is `comment-tier-exempt: <reason>`, whose window suppresses the override
|
|
763
|
+
as it suppresses the tier rule. The override still catches a total hidden in a
|
|
764
|
+
directive's own wrapped wording — the wrap is exactly where one would escape a
|
|
765
|
+
line-at-a-time scan — and an exempt line cannot launder its neighbours into one.
|
|
766
|
+
The weighed alternative — a source-coupled
|
|
767
|
+
numeral scan with an allowlist — is rejected: legitimate numerals abound in
|
|
768
|
+
source (exit codes, indices, field positions) and the false-positive rate would
|
|
769
|
+
exceed the catch. Counts in *code* stay a review concern; counts in *prose*,
|
|
770
|
+
wherever the prose lives, are gated.
|
|
771
|
+
|
|
772
|
+
Calibration: the built-in roster is Checkwright's own kit-mechanism
|
|
773
|
+
directive names; `CANON_KIT_COMMENT_MACHINE` / `_REASON` append a consumer's
|
|
774
|
+
product vocabulary (the same split as `check-graph`'s vocab — the mechanism
|
|
775
|
+
ships, the rule content is config). The window cap is
|
|
776
|
+
`CANON_KIT_COMMENT_RUN_CAP` (default 3 — one wrapped sentence): a
|
|
777
|
+
within-window continuation is the directive's own wording physically
|
|
778
|
+
wrapped, blessed as such, while prose beyond the window is presumed
|
|
779
|
+
relocated restatement and deleted. `comment-tier-exempt:` is reserved for a
|
|
780
|
+
genuinely-local fact neither tier owns, and exempting a restatement rather
|
|
781
|
+
than deleting it is itself the defect — a long roster (a `usage:` option
|
|
782
|
+
list, a header) restructures into directive-anchored short paragraphs or
|
|
783
|
+
trims, never launders prose past the cap. The count-shape override reads the
|
|
784
|
+
shared count adapter (§lib/spec.sh) rather than a second grammar, so it
|
|
785
|
+
inherits that gate's carve-outs unchanged: a comparator bound or a `per`-phrase
|
|
786
|
+
in a directive is a rule and not a total, a partitive proportion exempts both
|
|
787
|
+
its cardinals, and a cardinal in inline code is a meta-reference — which is why
|
|
788
|
+
a directive may still say `at most three checks per run` or name a
|
|
789
|
+
`` `six gates` `` example. No knob is added: the noun vocabulary enters through
|
|
790
|
+
`CANON_KIT_COUNT_COLLECTIONS` and the wedge window through
|
|
791
|
+
`CANON_KIT_COUNT_WEDGE_WORDS`. The default surface is shell
|
|
792
|
+
(`#`) — `templates/` stubs included: a copied-out template's `spec:` line
|
|
793
|
+
resolves against the vendored kit path (kit SPECs travel with the
|
|
794
|
+
vendor-whole install), so its comments are directives like any source and
|
|
795
|
+
this gate governs them, where
|
|
796
|
+
`check-spec-pointer` exempts them as placeholders-by-design — with the
|
|
797
|
+
workflow directory's **tracked** members blessing only `contract:`/`see`,
|
|
798
|
+
whatever their extension (the capture tier is gitignored and headerless, so
|
|
799
|
+
tracking is the filter, not the suffix — gate-sdk/SPEC.md §The workflow
|
|
800
|
+
directory);
|
|
801
|
+
slash-comment parsing (`//`, `/* */`, doc-comments, heredoc skipping) ships
|
|
802
|
+
as mechanism and activates when a consumer widens `CANON_KIT_COMMENT_SURFACE`
|
|
803
|
+
to a language that needs it. Positional rescue is language-agnostic — its
|
|
804
|
+
construct roster (`CANON_KIT_COMMENT_POSITIONAL`) is consumer config, empty
|
|
805
|
+
by default so inert on the shell surface (a Rust consumer supplies the
|
|
806
|
+
`unwrap`/`allow`-class tokens; a consumer's language is not a kit
|
|
807
|
+
literal). Trailing inline comments are out of scope by construction — the
|
|
808
|
+
FP-prone half of the judgment stays a review tripwire. Not-yet-swept
|
|
809
|
+
sources ride `CANON_KIT_COMMENT_WHITELIST` (its array tagged
|
|
810
|
+
`# exception-list:`, each `# until:` a live drain task per
|
|
811
|
+
`check-gate-exemption-tasks`), draining kit by kit. `precommit` tier.
|
|
812
|
+
|
|
813
|
+
### check-spec-pointer
|
|
814
|
+
|
|
815
|
+
Invariant, two passes, forward direction only: every `spec:` / `contract:`
|
|
816
|
+
pointer **directive** on a governed source resolves, and every free-prose
|
|
817
|
+
`<path>.md §<heading>` **citation** on a governed manifest resolves. The
|
|
818
|
+
directive set is exactly what `check-comment-tier` blesses by shape: full-line
|
|
819
|
+
`spec:` / `contract:` comments on the governed sources, plus the `# contract:`
|
|
820
|
+
headers on the workflow directory's **tracked** members (gate-sdk/SPEC.md §The
|
|
821
|
+
workflow directory owns that tier; a version-marker payload resolves as no path
|
|
822
|
+
and rides `CANON_KIT_COMMENT_WHITELIST`). A directive's target grammar is
|
|
823
|
+
`<path> [§<heading>]`: `<path>` (repo-relative) must be a tracked file, and when
|
|
824
|
+
a `§<heading>` fragment is present the file must carry a matching markdown
|
|
825
|
+
heading; a pointer without `§` resolves file-only. Reddens on a missing or
|
|
826
|
+
untracked target file, on a named heading the target lacks, and — fail-closed —
|
|
827
|
+
on a directive that matched the pointer shape but carries no target path.
|
|
828
|
+
|
|
829
|
+
The prose-citation pass closes the gap where a citation woven into a sentence
|
|
830
|
+
(`context-kit/SPEC.md §The memory-off doctrine`) resolved neither file nor
|
|
831
|
+
heading while the structured directive and the markdown-link anchor were both
|
|
832
|
+
verdict-checked. It scans the manifest set (`spec_manifest_files`, the same
|
|
833
|
+
surface the manifest-narration gate family reads) over a blank-line-delimited
|
|
834
|
+
paragraph join so a heading that wraps a line reassembles, and resolves the
|
|
835
|
+
heading through the one shared `heading_present` helper — one heading-resolution
|
|
836
|
+
path, two callers. Free prose runs on past the heading with no delimiter, so
|
|
837
|
+
the citation pass matches a heading as a boundary-anchored **prefix** of the
|
|
838
|
+
fragment where the directive pass matches it whole. A cited path that is not a
|
|
839
|
+
tracked file is out of this pass's scope — path liveness stays with the gates
|
|
840
|
+
that own it (`check-md-refs`, `check-kit-ref-liveness`); ruling only on headings
|
|
841
|
+
of resolvable files is what holds the false-positive rate at the directive
|
|
842
|
+
pass's level.
|
|
843
|
+
|
|
844
|
+
`check-comment-tier` owns the directive's *shape*; this gate adds *resolution*
|
|
845
|
+
on top, the binding a `spec:` pointer makes being only as good as its liveness
|
|
846
|
+
— a renamed or deleted heading leaves every inbound pointer or citation
|
|
847
|
+
dangling, otherwise caught only on review. Heading match tolerates a trailing
|
|
848
|
+
`(qualifier)` on either side: a pointer narrowing a section to a labelled point
|
|
849
|
+
(`§check-graph (assertion G)` → the `check-graph` heading) or a heading carrying
|
|
850
|
+
a locator the pointer omits (`§The guard framework` → `## The guard framework
|
|
851
|
+
(lib/guard.sh)`). Two `§` carve-outs keep the false-positive floor and must not
|
|
852
|
+
be conflated: a directive's em-dash *prose tail* (`spec: <path> §<h> — <gloss>`)
|
|
853
|
+
strips at the `` — `` so a `§` in the gloss is not read as a heading, while a
|
|
854
|
+
free-prose citation *is* a heading marker — the citation pass fires on a
|
|
855
|
+
tracked `.md` path immediately followed by `§`, and a bare `§` with no tracked
|
|
856
|
+
path before it (the deliberate non-citation use) never fires. Fenced code
|
|
857
|
+
blocks are skipped in both passes — a quoted example is not a citation.
|
|
858
|
+
|
|
859
|
+
Calibration: forward direction only. The reverse — flagging a requirement with
|
|
860
|
+
no inbound pointer as uncovered code — needs a "what counts as a requirement"
|
|
861
|
+
notion that risks false positives against the cheap-and-FP-free bar, so it is
|
|
862
|
+
ruled out (a separate task with its own ruling if ever wanted; this gate
|
|
863
|
+
reserves no syntax for it). Configuration is shared with `check-comment-tier` —
|
|
864
|
+
the `spec_comment_whitelisted` adapter in `lib/spec.sh` and the same
|
|
865
|
+
`CANON_KIT_COMMENT_*` knobs, so no new config knob — but this gate scans
|
|
866
|
+
`spec_comment_surface`, which prunes `templates/` shell sources where
|
|
867
|
+
`check-comment-tier` keeps them. The split is by design, not a "SPECs don't
|
|
868
|
+
travel" claim: a template's `spec: <your SPEC> §check-<area>` line is a
|
|
869
|
+
placeholder the consumer fills in, unresolvable *by design* in the kit's own
|
|
870
|
+
tree — resolving it there would check the consumer's homework against a stub.
|
|
871
|
+
The tier gate still governs those template comments by *shape* (they must be
|
|
872
|
+
directives), so each gate draws the `templates/` line where its own semantics
|
|
873
|
+
put it. `precommit` tier.
|
|
874
|
+
|
|
875
|
+
Retention ruling: the standing doubt — forward-only checking plus the
|
|
876
|
+
basename↔§heading convention make the pointer largely redundant, its gloss a
|
|
877
|
+
restatement risk — is answered and the roster slot kept. The convention
|
|
878
|
+
derives a section's *name*, never its liveness: absent an inbound pointer,
|
|
879
|
+
renaming or deleting a SPEC heading reddens nothing, and the pointer is the
|
|
880
|
+
only mechanized code→prose coupling (the reverse direction stays a review
|
|
881
|
+
concern per the paragraph above). Sites away from a file's header bind
|
|
882
|
+
sections no naming convention can derive. Narrowing the directive to a bare
|
|
883
|
+
pointer buys nothing: the gloss is already capped at the one-line binding
|
|
884
|
+
(§check-comment-tier), and a gloss restating the cited section is deleted
|
|
885
|
+
under that doctrine, not re-gated here. Dropping the slot would also orphan
|
|
886
|
+
the citation coverage the convention carries — the reason a dedicated
|
|
887
|
+
script↔doc citation gate stays unbuilt.
|
|
888
|
+
|
|
889
|
+
### check-todo-task-liveness
|
|
890
|
+
|
|
891
|
+
Invariant: every `TODO(task: <slug>)` marker on a governed source resolves to a
|
|
892
|
+
live queue task. A `<slug>` naming an active or deferred task resolves; a slug
|
|
893
|
+
sitting in `Done` is **stale** (the work finished, the marker did not); a slug
|
|
894
|
+
absent from the queue is **unresolved** (a typo or an unfiled task). Stale and
|
|
895
|
+
unresolved both redden — a marker referencing nothing is a dangling forward
|
|
896
|
+
reference, the source-side twin of a `blocked-by` tag left pointing at a
|
|
897
|
+
completed task.
|
|
898
|
+
|
|
899
|
+
`check-comment-tier` owns the marker's *shape* — it blesses `TODO(task:` as a
|
|
900
|
+
reason directive — and this gate adds *resolution* on top, exactly as
|
|
901
|
+
`check-spec-pointer` adds resolution to the `spec:` shape the same tier gate
|
|
902
|
+
blesses. It closes the liveness gap those siblings already guard elsewhere:
|
|
903
|
+
`check-task-names` flags a `blocked-by` gone stale on a done slug and
|
|
904
|
+
`check-gate-exemption-tasks` resolves an exemption's `# until:` slug against the
|
|
905
|
+
live set, but a `TODO(task:)` bound to a cleared task passed forever because
|
|
906
|
+
nothing read the source side. The marker requires a resolvable slug after the
|
|
907
|
+
colon, so a tool carrying the bare roster literal (`check-comment-tier`'s own
|
|
908
|
+
directive name) never self-matches, and full-line versus trailing placement is
|
|
909
|
+
immaterial: resolution governs the referent, not the comment tier. Bare
|
|
910
|
+
`TODO`/`FIXME`/`HACK` markers are out of scope — trailing-comment scanning is a
|
|
911
|
+
separate ruling if the need attests.
|
|
912
|
+
|
|
913
|
+
Placement: the marker is a comment directive on the governed comment surface, so
|
|
914
|
+
it is canon-kit's, not queue-kit's (which disclaims source-file conventions in
|
|
915
|
+
its Out of scope). The gate scans `spec_comment_surface`, pruning `templates/`
|
|
916
|
+
as placeholders-by-design like `check-spec-pointer`, and reads the queue through
|
|
917
|
+
`CANON_KIT_QUEUE_FILE` with no new knob — the live/done split is the shared
|
|
918
|
+
`spec_queue_slugs` adapter (§lib/spec.sh), one queue walk reading a bare-slug
|
|
919
|
+
bullet outside the active and deferred sections as the queue's done shape. That
|
|
920
|
+
`task: <slug>` binding grammar — a `task:` key naming a slug that must resolve
|
|
921
|
+
to a live queue entry — is one grammar both liveness gates share:
|
|
922
|
+
`check-deprecation-task` is the twin, resolving the same binding on a
|
|
923
|
+
deprecation marker through the same adapter (§check-deprecation-task). Latent at landing: no such marker exists in
|
|
924
|
+
the tree yet — the gate ships before the first one, so a future `TODO(task:)`
|
|
925
|
+
cannot outlive its task silently. A queue-read failure is fail-closed (exit 2).
|
|
926
|
+
`precommit` tier.
|
|
927
|
+
|
|
928
|
+
### check-deprecation-task
|
|
929
|
+
|
|
930
|
+
Invariant: every deprecation marker on a governed source binds a `task: <slug>`
|
|
931
|
+
that resolves to a live queue task. The marker vocabulary is consumer config —
|
|
932
|
+
`CANON_KIT_DEPRECATION_MARKERS`, a roster of regexes (one per element) matched
|
|
933
|
+
against the governed comment surface. A language's marker spelling is never a
|
|
934
|
+
kit literal: the roster ships empty, so a repo that sets none is clean-skipped
|
|
935
|
+
(the `check-graph`/`graph-vocab` seam — the kit ships the resolution mechanism,
|
|
936
|
+
the consumer names its own `#[deprecated]`, `@deprecated`, or `@Deprecated`).
|
|
937
|
+
The scan itself stays consumer toolchain — a clippy/ESLint-class linter already
|
|
938
|
+
inventories deprecation markers; this gate adds the governance coupling no
|
|
939
|
+
linter ships: a deprecated surface that names no decommission task, or names a
|
|
940
|
+
done or absent one, has nothing tracking its removal.
|
|
941
|
+
|
|
942
|
+
A marker line carrying no `task: <slug>` is **unbound**; a bound slug sitting in
|
|
943
|
+
`Done` is **stale** (the decommission finished, the marker did not); a bound
|
|
944
|
+
slug absent from the queue is **unresolved**. All three redden — each finding
|
|
945
|
+
names the file, the line, the matched marker, and the offending slug. The
|
|
946
|
+
binding grammar and the queue-resolution pass are `check-todo-task-liveness`'s:
|
|
947
|
+
the same `task: <slug>` key over the same `spec_queue_slugs` adapter
|
|
948
|
+
(§check-todo-task-liveness, §lib/spec.sh), one grammar both liveness gates
|
|
949
|
+
share. The gate scans `spec_comment_surface` (templates pruned as
|
|
950
|
+
placeholders-by-design) and reads the queue through `CANON_KIT_QUEUE_FILE`, no
|
|
951
|
+
new knob beyond the roster. An unreadable queue or source is fail-closed
|
|
952
|
+
(exit 2); an empty roster is the clean skip, not an error.
|
|
953
|
+
|
|
954
|
+
This repo sets no roster, so the gate clean-skips here — the good/bad fixture
|
|
955
|
+
pair and `check-deprecation-task.test.sh` carry the resolved and reddened paths
|
|
956
|
+
under a fixture-local roster (the `check-manifest-count` config-path precedent).
|
|
957
|
+
The release-boundary disposition walk over the standing marker inventory
|
|
958
|
+
(decommission now, re-justify and carry the task forward, or un-deprecate) is
|
|
959
|
+
lifecycle-kit's `release-sweep` skill template, and the between-major backlog
|
|
960
|
+
trend over the same roster is drift-kit's `kpi-deprecated-surface` example
|
|
961
|
+
(lifecycle-kit SPEC §templates, drift-kit SPEC §Out of scope). `precommit` tier.
|
|
962
|
+
|
|
963
|
+
### check-tracking-claim
|
|
964
|
+
|
|
965
|
+
Invariant: every **tracking claim** on a governed manifest surface agrees with
|
|
966
|
+
git. A tracking claim is a fixed-vocabulary predicate bound to the backticked
|
|
967
|
+
repo-relative path token it follows:
|
|
968
|
+
|
|
969
|
+
| Predicate | Holds when |
|
|
970
|
+
| --- | --- |
|
|
971
|
+
| `is committed`, `is tracked` | the path has tracked members and no ignored ones |
|
|
972
|
+
| `is gitignored`, `is local-only` | the path has ignored members and no tracked ones |
|
|
973
|
+
| `is two-tier` | both classes are non-empty — the path holds tracked and ignored members |
|
|
974
|
+
|
|
975
|
+
It exists because the defect class it catches — an always-loaded surface
|
|
976
|
+
asserting a directory is committed while part of it is gitignored — is invisible
|
|
977
|
+
to every other gate the kit ships: `check-md-refs` resolves paths,
|
|
978
|
+
`check-spec-pointer` resolves headings, and neither reads what the sentence
|
|
979
|
+
*claims* about the path. Resolution: a path naming a directory expands to its
|
|
980
|
+
members (`git ls-files` for the tracked side, `git check-ignore --no-index` on
|
|
981
|
+
the path for the ignored side); a path naming a file is its own single member.
|
|
982
|
+
The ignored side is read from the rules, not the working tree, so a gitignored
|
|
983
|
+
runtime path with no file in a fresh checkout still resolves — a presence read
|
|
984
|
+
(`ls-files --others --ignored`, which lists only files that exist) made the same
|
|
985
|
+
claim verify locally and red in CI. `--no-index` is load-bearing for the mixed
|
|
986
|
+
predicate: plain `check-ignore` refuses to report a directory that has a tracked
|
|
987
|
+
member as ignored, and a two-tier directory always has one. The mixed predicate
|
|
988
|
+
is what lets an honestly-mixed directory have a true sentence at all — without
|
|
989
|
+
it, the always-loaded tier could only be given a false one. Its rule-based proof
|
|
990
|
+
reaches only a directory the rules match whole (a `dir/` pattern) that also
|
|
991
|
+
carries a tracked member; a directory whose ignored members are matched by file
|
|
992
|
+
patterns, the directory itself matching no rule, has no rule-based two-tier proof
|
|
993
|
+
and stays a prose description (the `runtime-dir-two-tier-detector` debt).
|
|
994
|
+
|
|
995
|
+
Reddens on a predicate whose verification fails, and — fail-closed — on a bound
|
|
996
|
+
path that exists in neither the index, the ignore rules, nor the working tree,
|
|
997
|
+
since an unresolvable path makes the claim unverifiable rather than true.
|
|
998
|
+
|
|
999
|
+
Surface: the manifest set (`spec_manifest_files`, the same surface the
|
|
1000
|
+
manifest-narration gate family reads). **No new knob**: the predicate vocabulary
|
|
1001
|
+
is kit-owned generic English, and which surfaces are governed is a knob that
|
|
1002
|
+
already exists. Fenced code blocks are skipped, matching `check-spec-pointer` —
|
|
1003
|
+
a quoted example is not a claim — and a predicate inside an inline code span is
|
|
1004
|
+
a meta-reference, not an assertion (`check-manifest-count`'s carve-out, same
|
|
1005
|
+
reason), which is what lets this section name its own vocabulary.
|
|
1006
|
+
|
|
1007
|
+
Calibration, stated as the gate's honest limit: **forward direction only, fixed
|
|
1008
|
+
vocabulary only, adjacency only.** The gate fires on the listed predicates and
|
|
1009
|
+
rules on nothing else; a claim phrased any other way ("the workflow directory
|
|
1010
|
+
ships in the repo") is out of scope and stays a review concern — the same
|
|
1011
|
+
forward-only bar `check-spec-pointer` holds, and for the same reason: widening to
|
|
1012
|
+
"any sentence asserting tracking" needs a notion of assertion that cannot hold
|
|
1013
|
+
the false-positive floor. **Adjacency is the binding**: only whitespace may sit
|
|
1014
|
+
between the path's closing backtick and the predicate, so a clause in between
|
|
1015
|
+
unbinds it (`` `core-files.list` `` *manifest exists in the worktree and* is
|
|
1016
|
+
tracked is correctly not a claim). That is deliberate under-detection, and it is
|
|
1017
|
+
what buys the false-positive floor: the fixture pair covers both directions.
|
|
1018
|
+
|
|
1019
|
+
The gate landed green over this repo — two claims (`.tmp/` and `.metric/`, both
|
|
1020
|
+
gitignored), each verified rule-based against the ignore rules; a third
|
|
1021
|
+
directory, `.workflow/`, is described in prose citing gate-sdk/SPEC.md §The
|
|
1022
|
+
workflow directory rather than as a bound claim, because its ignored members are
|
|
1023
|
+
file-pattern-matched and the directory itself matches no rule, so no rule-based
|
|
1024
|
+
two-tier proof exists for it (the `runtime-dir-two-tier-detector` debt). No
|
|
1025
|
+
backfill. That is the expected shape: it is a regression gate for a defect that already shipped on the
|
|
1026
|
+
always-loaded tier, not a discovery tool, and §When a gate earns its place in
|
|
1027
|
+
gate-sdk/SPEC.md governs that class. No per-site valve is taken: a claim that
|
|
1028
|
+
cannot be made true is a claim that must be reworded, and a valve would restore
|
|
1029
|
+
exactly the unverified-prose state the gate exists to end. Tier `precommit`; the
|
|
1030
|
+
`# graph:` manifest couples the manifest set and `.gitignore`.
|
|
1031
|
+
|
|
1032
|
+
### check-spec-fence-balance
|
|
1033
|
+
|
|
1034
|
+
Invariant: every governed markdown file carries an even count of code-fence
|
|
1035
|
+
delimiters (lines opening with ```` ``` ````). The fence-skipping parsers across
|
|
1036
|
+
the kits — `check-spec-embedded-source`, `check-tag-lead-line`, the queue
|
|
1037
|
+
scanners — all toggle a fence flag line by line; an odd count leaves the flag
|
|
1038
|
+
stuck and the rest of the file is read *inside* a phantom fence, so every later
|
|
1039
|
+
finding silently fails open. This gate turns that silent hole into a red. The
|
|
1040
|
+
surface is the manifest set (`spec_manifest_files`) plus the configured queue
|
|
1041
|
+
file (`CANON_KIT_QUEUE_FILE`) — two motivating parsers (`check-tag-lead-line`,
|
|
1042
|
+
`check-queue-wrap`) scan the queue, which the manifest set excludes — with no
|
|
1043
|
+
new knob. A grep error (not a no-match) is fail-closed (exit 2).
|
|
1044
|
+
|
|
1045
|
+
### check-md-refs
|
|
1046
|
+
|
|
1047
|
+
Invariant: every internal markdown link in the governed doc set resolves. A
|
|
1048
|
+
relative-path target (with the source file's directory as the base) must be a
|
|
1049
|
+
tracked file, or a directory holding tracked files; a `#anchor` — alone
|
|
1050
|
+
(same-file) or trailing a path — must match the GitHub heading slug of a
|
|
1051
|
+
heading in the target file. External URLs (`scheme://`, `mailto:`) are out of
|
|
1052
|
+
scope: the network is not a gate dependency. The doc set is the manifest set
|
|
1053
|
+
(kit READMEs and CLAUDE.md included) minus the `CANON_KIT_MDREF_EXCLUDE` globs
|
|
1054
|
+
(default empty, for a consumer's generated docs); the scan runs over tracked
|
|
1055
|
+
sources only, so an untracked local-only file (`BRIEF.local.md`) is a legitimate
|
|
1056
|
+
link *source* that is never scanned and, being git-ignored-and-present, a
|
|
1057
|
+
legitimate *target* that resolves without being tracked. A grep error is
|
|
1058
|
+
fail-closed (exit 2). The link extractor is purely syntactic — it matches the
|
|
1059
|
+
bracket-then-paren link shape (a `]` immediately followed by a parenthesized
|
|
1060
|
+
target) without stripping code spans, so a literal markdown link written in
|
|
1061
|
+
governed prose is scanned as a real link even inside inline backticks; to name
|
|
1062
|
+
such a link in prose without tripping the gate, separate the `]` and the `(`
|
|
1063
|
+
(a space, or a line break — the scan is per-line). The amendment `SPEC-*.md`
|
|
1064
|
+
files escape only by lying outside the scanned doc set, not by any code-span
|
|
1065
|
+
exemption. Links are this gate's charge; the sibling `check-docs-cmd` takes the
|
|
1066
|
+
invoked commands and env knobs written inside fences and backticks, over the
|
|
1067
|
+
same governed doc set (one shared set, no second knob).
|
|
1068
|
+
|
|
1069
|
+
**The self-repo blob-link pass.** An absolute link is normally out of scope —
|
|
1070
|
+
the network is not a gate dependency — with one exception: a link into this
|
|
1071
|
+
same repository's GitHub tree, which resolves against the working tree exactly
|
|
1072
|
+
as a relative link does. The repo identity is derived at gate runtime from
|
|
1073
|
+
`git remote get-url origin` through the shared `gate_self_repo_prefix` adapter
|
|
1074
|
+
(gate-sdk/SPEC.md §lib/gate.sh), so the resolver here and any reference-link
|
|
1075
|
+
*producer* draw one identity; the `git@host:owner/repo` and
|
|
1076
|
+
`https://host/owner/repo[.git]` remote forms normalize to one
|
|
1077
|
+
`https://host/owner/repo` identity, so the kit ships no repo name (the
|
|
1078
|
+
provenance seam holds) and CI's checkout and a local clone alike supply it. A
|
|
1079
|
+
link whose prefix is `<identity>/blob/<CANON_KIT_DOCS_BLOB_REF>/` (the ref
|
|
1080
|
+
default `master`) is a self-repo reference link: its `<path>` must be a
|
|
1081
|
+
git-tracked file, and a trailing `#anchor` must slug — under the same GitHub
|
|
1082
|
+
heading-slug rules the same-file anchors use — to a heading in that file. A
|
|
1083
|
+
repo with no `origin` skips the pass: a self-repo link cannot be identified, so
|
|
1084
|
+
it falls through to the external-URL skip. The ref is a knob rather than a
|
|
1085
|
+
literal because it is a policy choice, not a derived fact — the site is living
|
|
1086
|
+
documentation of the current tree, so a reference link pins to the default
|
|
1087
|
+
branch (this repo's `master`), and a tag-pinned reference copy would buy
|
|
1088
|
+
staleness, not stability.
|
|
1089
|
+
|
|
1090
|
+
### The reference-link grammar
|
|
1091
|
+
|
|
1092
|
+
A docs-site page cites two kinds of in-repo target, and the grammar splits on
|
|
1093
|
+
which. A *rendered-document* reference — a kit's `SPEC.md`, `README.md`, or
|
|
1094
|
+
`DOCTRINE.md` — cites the on-site mirror of that document *relatively* when the
|
|
1095
|
+
site publishes one: a generated, freshness-gated projection under `docs/<kit>/`
|
|
1096
|
+
that keeps reference reading on the served site. The mirror preserves the
|
|
1097
|
+
documents' cross-citation topology one-to-one, so the relative shape a page
|
|
1098
|
+
uses is the same shape the source tree uses. A *source* reference — a script, a
|
|
1099
|
+
gate body, config, a directory: files the site does not render — cites the tree
|
|
1100
|
+
with an absolute GitHub blob link
|
|
1101
|
+
`https://<host>/<owner>/<repo>/blob/<ref>/<path>[#anchor]`, anchored when it
|
|
1102
|
+
names a section, because a relative link into the unrendered surrounding tree
|
|
1103
|
+
would 404 on a site that serves `docs/` alone. Both are the downward-citation
|
|
1104
|
+
shape of the tiering topology, one on-site and one off. Resolution of the blob
|
|
1105
|
+
form belongs to `check-md-refs`' self-repo pass (identity derivation and the
|
|
1106
|
+
ref knob live there); `check-docs-link-convention` owns the shape of the
|
|
1107
|
+
relative links that stay inside `docs/`. The mirror is what a site opts into,
|
|
1108
|
+
not a precondition of the grammar: absent a published mirror, rendered-document
|
|
1109
|
+
references fall back to the same off-site blob form as source references.
|
|
1110
|
+
|
|
1111
|
+
### check-docs-link-convention
|
|
1112
|
+
|
|
1113
|
+
Invariant: every relative markdown link on a docs-site page obeys the
|
|
1114
|
+
downward-citation *shape* — the resolution of those links is `check-md-refs`'
|
|
1115
|
+
charge, and this gate owns shape alone. Absolute reference links (the off-site
|
|
1116
|
+
blob grammar above) are out of this gate's scope entirely: their resolution is
|
|
1117
|
+
`check-md-refs`' self-repo pass, and this gate turns only on the relative links
|
|
1118
|
+
that stay inside the tree. Each rule is scoped to the docs tree
|
|
1119
|
+
because the "kit page" it turns on (a `<root>/<kit>/index.md`) exists only
|
|
1120
|
+
there:
|
|
1121
|
+
|
|
1122
|
+
- **No directory-target link.** A relative link whose target names a directory
|
|
1123
|
+
(a trailing `/`, or a path that resolves to a tracked directory) must instead
|
|
1124
|
+
name the file — `kit/index.md`, never `kit/`. A bare directory link is
|
|
1125
|
+
ambiguous about what the page is citing and defeats anchor-level citation.
|
|
1126
|
+
- **Anchored kit back-links.** On a kit page (`<root>/<kit>/index.md`), a link
|
|
1127
|
+
back to that same kit's own `README.md` or `SPEC.md` must carry a `#section`
|
|
1128
|
+
anchor. A page cites downward into a *named* section, never at the whole spec —
|
|
1129
|
+
the anti-restatement doctrine expressed as a link shape.
|
|
1130
|
+
|
|
1131
|
+
The scanned tree is `CANON_KIT_LINK_ROOT` (default `docs`; the fixture pair
|
|
1132
|
+
overrides it with a positional arg pointing at a synthetic tree), walked for
|
|
1133
|
+
every `*.md`. The link extractor is the same syntactic bracket-then-paren match
|
|
1134
|
+
`check-md-refs` uses; `scheme://` and `mailto:` targets are out of scope, and a
|
|
1135
|
+
pure `#anchor` (no path) satisfies neither rule. Per-site valve: a
|
|
1136
|
+
`docs-link-exempt: <reason>` HTML comment on the link line or the one directly
|
|
1137
|
+
above suppresses that one finding — for the rare legitimate directory link a
|
|
1138
|
+
consumer's layout demands. A missing scan root is fail-closed (exit 2).
|
|
1139
|
+
|
|
1140
|
+
### check-docs-cmd
|
|
1141
|
+
|
|
1142
|
+
Invariant: every invoked repo-relative `.sh` path and every kit-prefixed env
|
|
1143
|
+
knob written inside a fence or inline backticks in the governed doc set resolves
|
|
1144
|
+
against the tree — the command/knob analog of `check-md-refs`, since a broken
|
|
1145
|
+
`bash <path>` line or a retired knob name drifts silently where a broken link
|
|
1146
|
+
would be caught. Two assertions:
|
|
1147
|
+
|
|
1148
|
+
- **(A) invoked command paths.** Inside a fenced block, a `.sh` path in
|
|
1149
|
+
*invocation* position — the first word of a `;`/`|`/`&&`-separated segment, or
|
|
1150
|
+
the first non-flag argument when that word is `bash`/`sh`/`source`/`.` — must
|
|
1151
|
+
resolve to a tracked file, tried doc-directory-relative first (a kit SPEC's
|
|
1152
|
+
own `bin/x.sh`) then repo-root-relative (a cross-kit `gate-sdk/bin/x.sh`).
|
|
1153
|
+
Only invocations are checked, so a path in argument position — a `cp
|
|
1154
|
+
templates/x.sh scripts/x.sh` install *destination*, which the consumer
|
|
1155
|
+
creates and this repo need not track — is never a finding. That is the
|
|
1156
|
+
deliberate calibration: the invariant's failure mode is a broken invocation,
|
|
1157
|
+
and scoping to the two named forms (a bare `<dir>/…/<name>.sh` and the
|
|
1158
|
+
`bash <path>` form) drops the hypothetical-install-target class by
|
|
1159
|
+
construction, with no whole-file exemption.
|
|
1160
|
+
- **(B) env knobs.** Any backticked or fenced ALL-CAPS name carrying a kit
|
|
1161
|
+
prefix (the roster is each `gate_kit_roots` member's basename uppercased,
|
|
1162
|
+
hyphens to underscores, trailing `_`: `gate-sdk` → `GATE_SDK_`) must occur in
|
|
1163
|
+
the kits' tracked *code* — their shell sources and config templates, never
|
|
1164
|
+
their own prose, so a knob name-dropped only in markdown cannot self-satisfy.
|
|
1165
|
+
The corpus is the union across all kits, not the prefix owner alone: a
|
|
1166
|
+
namespaced knob may be read by a dependent kit (`GATE_SDK_LIB` is gate-sdk's,
|
|
1167
|
+
resolved in delegation-kit and evidence-kit), and the prefix marks scope, not
|
|
1168
|
+
location. A family stem — a caps run ending `_` because a placeholder or glob
|
|
1169
|
+
follows it (`EVIDENCE_KIT_RUN_<suite>`, `CANON_KIT_COMMENT_*`) — resolves when
|
|
1170
|
+
any code name extends it. Names with no kit prefix are out of scope, so
|
|
1171
|
+
generic shell vars never false-positive.
|
|
1172
|
+
|
|
1173
|
+
The governed doc set is exactly `check-md-refs`' — the manifest set minus
|
|
1174
|
+
`CANON_KIT_MDREF_EXCLUDE` — shared, with no gate-specific knob. Prose outside
|
|
1175
|
+
fences and backticks is never scanned; a hypothetical example path is written
|
|
1176
|
+
unfenced, or its whole doc joins the per-file `CANON_KIT_MDREF_EXCLUDE` valve.
|
|
1177
|
+
The knob set is built by a repo-root-anchored `git grep`, so it holds when the
|
|
1178
|
+
fixture runner invokes from a case directory. Not a git repository, or a
|
|
1179
|
+
`git grep` that errors, is fail-closed (exit 2). The `# graph:` manifest couples
|
|
1180
|
+
the doc set to `scripts/*.sh` and every kit's shell sources (`kit:*.sh`), so a
|
|
1181
|
+
script rename or a knob retirement re-fires the gate over the docs.
|
|
1182
|
+
|
|
1183
|
+
### check-prose-tells
|
|
1184
|
+
|
|
1185
|
+
The mechanical subset of the AI-prose tells — the machine-detectable patterns
|
|
1186
|
+
that mark agent-authored reader-facing prose — over the consumer-configured
|
|
1187
|
+
markdown surfaces (`CANON_KIT_PROSE_TELL_GLOBS`; empty ⇒ nothing scanned, the
|
|
1188
|
+
correct unconfigured-consumer no-op). Judgment-dependent tells (voice, argument
|
|
1189
|
+
shape, hedging) are out of scope permanently: the gate never grows heuristics
|
|
1190
|
+
that would make it probabilistic; that read stays human.
|
|
1191
|
+
|
|
1192
|
+
It runs six mechanical assertions over each surface, every one threshold-gated:
|
|
1193
|
+
em-dash density (A), throat-clearing phrases (B), contrast cadence (C),
|
|
1194
|
+
undefined abbreviations (D), sentence-rhythm variance (E), and tricolon density
|
|
1195
|
+
(F). A paragraph is a blank-line-delimited block and a section is a `##`-headed
|
|
1196
|
+
span, except that each markdown list item (`-`/`*`/`+`/`N.`) is its own unit for
|
|
1197
|
+
every paragraph and section assertion — a definition list carrying one em-dash
|
|
1198
|
+
per item is well-formed markdown, not flowing prose, so its items are never
|
|
1199
|
+
lumped into one block (the same structural holdout the non-prose surfaces below
|
|
1200
|
+
earn). Because the tells measure authored prose, three non-prose surfaces are
|
|
1201
|
+
held out before any assertion runs: inline `` `code` `` spans, markdown table
|
|
1202
|
+
rows, and generated `<!-- name:begin -->`…`<!-- name:end -->` regions (each
|
|
1203
|
+
byte-gated elsewhere — a prose gate that forced edits to generated content
|
|
1204
|
+
would contradict its generation, the same reasoning that keeps `docs/posts/`
|
|
1205
|
+
out of the opt-in). Fenced code the shared walk driver already drops.
|
|
1206
|
+
|
|
1207
|
+
- **A. Em-dash density** — a paragraph carrying more than
|
|
1208
|
+
`CANON_KIT_PROSE_TELL_EMDASH_MAX` em-dashes.
|
|
1209
|
+
- **B. Throat-clearing phrases** — a case-insensitive match of any
|
|
1210
|
+
`CANON_KIT_PROSE_TELL_PHRASES` member, the base array merged with
|
|
1211
|
+
`CANON_KIT_PROSE_TELL_PHRASES_EXTRA` (§Layout and configuration).
|
|
1212
|
+
- **C. Contrast cadence** — the "not X — it's Y" shape (a `not …` clause
|
|
1213
|
+
resolved across an em-dash or `, but` into `it's`/`it is`) more than
|
|
1214
|
+
`CANON_KIT_PROSE_TELL_CONTRAST_MAX` times in a section.
|
|
1215
|
+
- **D. Undefined abbreviations** — an all-caps token of length ≥ 3 the file
|
|
1216
|
+
never expands (no parenthesized expansion at any occurrence) and absent from
|
|
1217
|
+
`CANON_KIT_PROSE_TELL_ABBR_ALLOW` merged with
|
|
1218
|
+
`CANON_KIT_PROSE_TELL_ABBR_ALLOW_EXTRA` (§Layout and configuration).
|
|
1219
|
+
- **E. Sentence-rhythm variance** — a paragraph of at least
|
|
1220
|
+
`CANON_KIT_PROSE_TELL_RHYTHM_MIN_SENTENCES` sentences whose sentence
|
|
1221
|
+
word-count coefficient of variation falls below
|
|
1222
|
+
`CANON_KIT_PROSE_TELL_RHYTHM_CV_MIN` (metronomic cadence).
|
|
1223
|
+
- **F. Tricolon density** — more than `CANON_KIT_PROSE_TELL_TRICOLON_MAX`
|
|
1224
|
+
`A, B, and C` constructions in a section.
|
|
1225
|
+
|
|
1226
|
+
Exact detection regexes are implementation, owned by the gate source; the
|
|
1227
|
+
`good/`+`bad/` fixture pair is the executable statement of each boundary
|
|
1228
|
+
(`bad/` trips every assertion, `good/` passes all and demonstrates the valve).
|
|
1229
|
+
Thresholds are the `CANON_KIT_PROSE_TELL_*` knobs (§Layout and configuration).
|
|
1230
|
+
|
|
1231
|
+
**Valve** — an HTML comment `<!-- prose-tell-exempt: <reason> -->` on the
|
|
1232
|
+
flagged line or directly above it suppresses the tell at that site; it rides the
|
|
1233
|
+
shared exempt-window (§lib/spec.sh — the line or the one above), and the reason
|
|
1234
|
+
is mandatory (the `comment-tier-exempt:` convention — a deliberate stylistic
|
|
1235
|
+
keep carries its cause in-line, a reasonless valve is red). The gate is a
|
|
1236
|
+
producer of nothing but a verdict: the committing session reads the red and
|
|
1237
|
+
either fixes the prose or lands a reasoned valve (oracle-first), the fixture
|
|
1238
|
+
pair feeds `run-gate-tests.sh`, and every `CANON_KIT_PROSE_TELL_*` field is read
|
|
1239
|
+
by `check-prose-tells` at scan time and no other component.
|
|
1240
|
+
|
|
1241
|
+
### templates/
|
|
1242
|
+
|
|
1243
|
+
`canon-config.sh` — the consumer config template documenting every knob.
|
|
1244
|
+
`SPEC-amendment.md` — the amendment skeleton: delta sections plus the
|
|
1245
|
+
Definition-of-Done checklist (causal completeness, no information lost on
|
|
1246
|
+
merge, amendment deleted, none remaining, gaps filed as debt).
|
|
1247
|
+
|
|
1248
|
+
## Out of scope
|
|
1249
|
+
|
|
1250
|
+
A consumer's tier contract — which surfaces exist and what each owns — is its
|
|
1251
|
+
own instance; canon-kit ships the topology rules, not the table. Glossary and
|
|
1252
|
+
vision structural gates (`check-glossary-tiering`,
|
|
1253
|
+
`check-glossary-entry-types`, `check-vision-tiering`,
|
|
1254
|
+
`check-retired-term-coupling`) encode one instance's surface roles, entry
|
|
1255
|
+
taxonomy, and ubiquitous-language couplings — rule content; their generic
|
|
1256
|
+
cross-surface axis ships here as `check-surface-duplication`.
|
|
1257
|
+
`check-comment-tier` splits: a consumer's *product* directive vocabulary
|
|
1258
|
+
(`glossary:`, `diagram:`, `domain-enum`, …) is rule content, supplied as
|
|
1259
|
+
`CANON_KIT_COMMENT_*` config, while the classifier, the kit-mechanism directive
|
|
1260
|
+
roster, and the surface/positional parsing machinery ship here — the comment
|
|
1261
|
+
surface is one of the enforced tiering surfaces. A `check-root-tiering` is a
|
|
1262
|
+
pure consumer-filename allowlist with no mechanism residue. Global-constant
|
|
1263
|
+
literal gates (the pagination-literal pattern) are per-constant rule content.
|
|
1264
|
+
Diagram/spec annotation couplings are unclaimed, a later kit's scope.
|