@cratis/pi 8.0.1 → 8.1.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/package/corpus/harnesses/copilot/instructions/ai-distribution.instructions.md +9 -102
- package/package/corpus/harnesses/copilot/instructions/authoring-skills.instructions.md +3 -5
- package/package/corpus/harnesses/copilot/instructions/browser.instructions.md +8 -49
- package/package/corpus/harnesses/copilot/instructions/code-health.instructions.md +1 -1
- package/package/corpus/harnesses/copilot/instructions/code-quality.csharp.instructions.md +3 -84
- package/package/corpus/harnesses/copilot/instructions/code-quality.instructions.md +6 -51
- package/package/corpus/harnesses/copilot/instructions/code-quality.typescript.instructions.md +4 -81
- package/package/corpus/harnesses/copilot/instructions/codescene.instructions.md +5 -54
- package/package/corpus/harnesses/copilot/instructions/components.instructions.md +1 -1
- package/package/corpus/harnesses/copilot/instructions/cratis-folder-is-configuration.instructions.md +5 -22
- package/package/corpus/harnesses/copilot/instructions/csharp.instructions.md +7 -315
- package/package/corpus/harnesses/copilot/instructions/dialogs.instructions.md +1 -1
- package/package/corpus/harnesses/copilot/instructions/discoverability.instructions.md +3 -25
- package/package/corpus/harnesses/copilot/instructions/documentation-structure-and-formatting.instructions.md +5 -151
- package/package/corpus/harnesses/copilot/instructions/documentation.instructions.md +5 -104
- package/package/corpus/harnesses/copilot/instructions/editing-cratis-docs.instructions.md +5 -63
- package/package/corpus/harnesses/copilot/instructions/efcore.instructions.md +8 -55
- package/package/corpus/harnesses/copilot/instructions/efcore.specs.instructions.md +3 -33
- package/package/corpus/harnesses/copilot/instructions/elixir.instructions.md +6 -79
- package/package/corpus/harnesses/copilot/instructions/exit-codes-and-wrappers.instructions.md +4 -27
- package/package/corpus/harnesses/copilot/instructions/framework-dotnet.instructions.md +4 -6
- package/package/corpus/harnesses/copilot/instructions/framework.instructions.md +0 -2
- package/package/corpus/harnesses/copilot/instructions/frontend-quality.instructions.md +0 -1
- package/package/corpus/harnesses/copilot/instructions/frontend-testing.instructions.md +1 -1
- package/package/corpus/harnesses/copilot/instructions/github-actions.instructions.md +7 -138
- package/package/corpus/harnesses/copilot/instructions/glossary.instructions.md +19 -19
- package/package/corpus/harnesses/copilot/instructions/go-engineering.instructions.md +1 -4
- package/package/corpus/harnesses/copilot/instructions/go.instructions.md +2 -7
- package/package/corpus/harnesses/copilot/instructions/guards-and-fuses.instructions.md +5 -6
- package/package/corpus/harnesses/copilot/instructions/java.instructions.md +7 -129
- package/package/corpus/harnesses/copilot/instructions/kotlin.instructions.md +8 -165
- package/package/corpus/harnesses/copilot/instructions/orleans.instructions.md +5 -98
- package/package/corpus/harnesses/copilot/instructions/profiles.instructions.md +9 -63
- package/package/corpus/harnesses/copilot/instructions/scripting.instructions.md +1 -1
- package/package/corpus/harnesses/copilot/instructions/specs.csharp.instructions.md +8 -148
- package/package/corpus/harnesses/copilot/instructions/specs.elixir.instructions.md +4 -37
- package/package/corpus/harnesses/copilot/instructions/specs.typescript.instructions.md +3 -1
- package/package/corpus/harnesses/copilot/instructions/storybook.instructions.md +7 -70
- package/package/corpus/harnesses/copilot/instructions/typescript.instructions.md +8 -98
- package/package/corpus/harnesses/copilot/instructions/writing-correct-examples.instructions.md +3 -47
- package/package/corpus/harnesses/copilot/instructions/writing-cratis-docs.instructions.md +3 -65
- package/package/corpus/hooks/README.md +4 -7
- package/package/corpus/hooks/scripts/quality-gates.json +3 -5
- package/package/corpus/rules/ai-distribution.md +9 -102
- package/package/corpus/rules/authoring-skills.md +3 -5
- package/package/corpus/rules/browser.md +8 -49
- package/package/corpus/rules/code-health-policy.txt +4 -24
- package/package/corpus/rules/code-health.md +1 -1
- package/package/corpus/rules/code-quality.csharp.md +3 -84
- package/package/corpus/rules/code-quality.md +6 -51
- package/package/corpus/rules/code-quality.typescript.md +4 -81
- package/package/corpus/rules/codescene.md +5 -54
- package/package/corpus/rules/components.md +1 -1
- package/package/corpus/rules/cratis-folder-is-configuration.md +5 -22
- package/package/corpus/rules/csharp.md +7 -315
- package/package/corpus/rules/dialogs.md +1 -1
- package/package/corpus/rules/discoverability.md +3 -25
- package/package/corpus/rules/documentation-structure-and-formatting.md +5 -151
- package/package/corpus/rules/documentation.md +5 -104
- package/package/corpus/rules/editing-cratis-docs.md +5 -63
- package/package/corpus/rules/efcore.md +8 -55
- package/package/corpus/rules/efcore.specs.md +3 -33
- package/package/corpus/rules/elixir.md +6 -79
- package/package/corpus/rules/exit-codes-and-wrappers.md +4 -27
- package/package/corpus/rules/framework-dotnet.md +4 -6
- package/package/corpus/rules/framework.md +0 -2
- package/package/corpus/rules/frontend-quality.md +0 -1
- package/package/corpus/rules/frontend-testing.md +1 -1
- package/package/corpus/rules/general.md +2 -2
- package/package/corpus/rules/github-actions.md +7 -138
- package/package/corpus/rules/glossary.md +19 -19
- package/package/corpus/rules/go-engineering.md +1 -4
- package/package/corpus/rules/go.md +2 -7
- package/package/corpus/rules/guards-and-fuses.md +5 -6
- package/package/corpus/rules/java.md +7 -129
- package/package/corpus/rules/kotlin.md +8 -165
- package/package/corpus/rules/orleans.md +5 -98
- package/package/corpus/rules/profiles.md +9 -63
- package/package/corpus/rules/scripting.md +1 -1
- package/package/corpus/rules/specs.csharp.md +8 -148
- package/package/corpus/rules/specs.elixir.md +4 -37
- package/package/corpus/rules/specs.typescript.md +3 -1
- package/package/corpus/rules/storybook.md +7 -70
- package/package/corpus/rules/typescript.md +8 -98
- package/package/corpus/rules/writing-correct-examples.md +3 -47
- package/package/corpus/rules/writing-cratis-docs.md +3 -65
- package/package/corpus/skills/cratis-application-growth/SKILL.md +7 -54
- package/package/corpus/skills/cratis-application-growth/references/move-and-untangle.md +49 -0
- package/package/corpus/skills/cratis-application-growth/references/rename-window.md +12 -14
- package/package/corpus/skills/cratis-application-growth/references/stages.md +2 -2
- package/package/corpus/skills/cratis-arc-authorize-request/SKILL.md +2 -2
- package/package/corpus/skills/cratis-arc-authorize-request/references/csharp.md +3 -3
- package/package/corpus/skills/cratis-arc-authorize-request/references/kotlin.md +2 -2
- package/package/corpus/skills/cratis-arc-code-analysis-typescript/SKILL.md +10 -43
- package/package/corpus/skills/cratis-arc-code-analysis-typescript/references/rule-fixes.md +40 -0
- package/package/corpus/skills/cratis-arc-connect-storage/SKILL.md +1 -1
- package/package/corpus/skills/cratis-arc-connect-storage/references/csharp.md +1 -1
- package/package/corpus/skills/cratis-arc-declare-command/references/csharp.md +4 -4
- package/package/corpus/skills/cratis-arc-declare-command/references/go.md +1 -1
- package/package/corpus/skills/cratis-arc-declare-command/references/kotlin.md +6 -7
- package/package/corpus/skills/cratis-arc-declare-operation/SKILL.md +2 -8
- package/package/corpus/skills/cratis-arc-declare-operation/references/csharp.md +1 -1
- package/package/corpus/skills/cratis-arc-diagnose-live-query/SKILL.md +1 -1
- package/package/corpus/skills/cratis-arc-diagnose-live-query/references/csharp.md +1 -1
- package/package/corpus/skills/cratis-arc-expose-mcp-operation/SKILL.md +6 -12
- package/package/corpus/skills/cratis-arc-expose-mcp-operation/references/custom-exposure-and-audit.md +4 -0
- package/package/corpus/skills/cratis-arc-expose-query/SKILL.md +2 -2
- package/package/corpus/skills/cratis-arc-expose-query/references/csharp.md +11 -4
- package/package/corpus/skills/cratis-arc-expose-query/references/typescript.md +1 -1
- package/package/corpus/skills/cratis-arc-generate-proxies/SKILL.md +2 -2
- package/package/corpus/skills/cratis-arc-generate-proxies/references/csharp.md +1 -1
- package/package/corpus/skills/cratis-arc-generate-proxies/references/go.md +19 -2
- package/package/corpus/skills/cratis-arc-generate-proxies/references/typescript.md +1 -1
- package/package/corpus/skills/cratis-arc-host-application/SKILL.md +1 -1
- package/package/corpus/skills/cratis-arc-host-application/references/csharp.md +1 -2
- package/package/corpus/skills/cratis-arc-host-application/references/elixir.md +2 -2
- package/package/corpus/skills/cratis-arc-host-application/references/go.md +5 -1
- package/package/corpus/skills/cratis-arc-host-application/references/java.md +1 -1
- package/package/corpus/skills/cratis-arc-host-application/references/kotlin.md +1 -1
- package/package/corpus/skills/cratis-arc-host-application/references/typescript.md +1 -1
- package/package/corpus/skills/cratis-arc-identity-and-tenancy-kotlin/SKILL.md +4 -7
- package/package/corpus/skills/cratis-arc-invoke-command/SKILL.md +1 -1
- package/package/corpus/skills/cratis-arc-invoke-command/references/csharp.md +4 -4
- package/package/corpus/skills/cratis-arc-invoke-command/references/typescript.md +1 -1
- package/package/corpus/skills/cratis-arc-isolate-tenant/SKILL.md +2 -2
- package/package/corpus/skills/cratis-arc-isolate-tenant/references/csharp.md +2 -2
- package/package/corpus/skills/cratis-arc-isolate-tenant/references/elixir.md +1 -1
- package/package/corpus/skills/cratis-arc-isolate-tenant/references/java.md +1 -1
- package/package/corpus/skills/cratis-arc-isolate-tenant/references/kotlin.md +1 -1
- package/package/corpus/skills/cratis-arc-isolate-tenant/references/typescript.md +4 -2
- package/package/corpus/skills/cratis-arc-migrate-relational-schema/SKILL.md +6 -6
- package/package/corpus/skills/cratis-arc-page-query/SKILL.md +3 -3
- package/package/corpus/skills/cratis-arc-page-query/references/csharp.md +10 -6
- package/package/corpus/skills/cratis-arc-page-query/references/elixir.md +2 -2
- package/package/corpus/skills/cratis-arc-page-query/references/java.md +1 -1
- package/package/corpus/skills/cratis-arc-page-query/references/kotlin.md +1 -1
- package/package/corpus/skills/cratis-arc-react-bind-slice/SKILL.md +2 -2
- package/package/corpus/skills/cratis-arc-react-bind-slice/references/csharp.md +1 -1
- package/package/corpus/skills/cratis-arc-react-bind-slice/references/kotlin.md +1 -1
- package/package/corpus/skills/cratis-arc-react-separate-view-model/SKILL.md +7 -3
- package/package/corpus/skills/cratis-arc-react-separate-view-model/references/react-routing-and-messaging.md +1 -1
- package/package/corpus/skills/cratis-arc-select-backend-sdk/SKILL.md +2 -2
- package/package/corpus/skills/cratis-arc-select-backend-sdk/references/elixir.md +2 -4
- package/package/corpus/skills/cratis-arc-select-backend-sdk/references/go.md +2 -2
- package/package/corpus/skills/cratis-arc-select-backend-sdk/references/java.md +1 -1
- package/package/corpus/skills/cratis-arc-select-backend-sdk/references/kotlin.md +2 -2
- package/package/corpus/skills/cratis-arc-select-backend-sdk/references/typescript.md +1 -3
- package/package/corpus/skills/cratis-arc-spring-data-kotlin/SKILL.md +13 -51
- package/package/corpus/skills/cratis-arc-spring-data-kotlin/references/read-model-naming.md +9 -1
- package/package/corpus/skills/cratis-arc-spring-data-kotlin/references/storage-boundaries.md +40 -0
- package/package/corpus/skills/cratis-arc-storage-typescript/SKILL.md +19 -64
- package/package/corpus/skills/cratis-arc-storage-typescript/references/drizzle.md +62 -0
- package/package/corpus/skills/cratis-arc-tenancy-typescript/SKILL.md +24 -55
- package/package/corpus/skills/cratis-arc-tenancy-typescript/references/tenant-selection.md +49 -0
- package/package/corpus/skills/cratis-arc-testing-kotlin/SKILL.md +13 -31
- package/package/corpus/skills/cratis-arc-testing-kotlin/references/jvm-scenario-variants.md +25 -0
- package/package/corpus/skills/cratis-arc-testing-typescript/SKILL.md +24 -62
- package/package/corpus/skills/cratis-arc-testing-typescript/references/hosts-and-runners.md +51 -0
- package/package/corpus/skills/cratis-arc-validate-command/SKILL.md +4 -4
- package/package/corpus/skills/cratis-arc-validate-command/references/csharp.md +10 -12
- package/package/corpus/skills/cratis-arc-validate-command/references/elixir.md +16 -3
- package/package/corpus/skills/cratis-arc-validate-command/references/go.md +19 -2
- package/package/corpus/skills/cratis-arc-validate-command/references/java.md +20 -7
- package/package/corpus/skills/cratis-arc-validate-command/references/kotlin.md +22 -2
- package/package/corpus/skills/cratis-arc-validate-command/references/python.md +8 -2
- package/package/corpus/skills/cratis-arc-validate-command/references/typescript.md +22 -2
- package/package/corpus/skills/cratis-arc-validation-kotlin/SKILL.md +22 -248
- package/package/corpus/skills/cratis-arc-validation-kotlin/references/feature-filters.md +55 -0
- package/package/corpus/skills/cratis-arc-validation-kotlin/references/model-validation.md +72 -0
- package/package/corpus/skills/cratis-arc-validation-kotlin/references/server-validators.md +86 -0
- package/package/corpus/skills/cratis-arc-validation-typescript/SKILL.md +27 -275
- package/package/corpus/skills/cratis-arc-validation-typescript/references/models-and-queries.md +63 -0
- package/package/corpus/skills/cratis-arc-validation-typescript/references/rules-and-checks.md +46 -0
- package/package/corpus/skills/cratis-arc-validation-typescript/references/server-decisions.md +114 -0
- package/package/corpus/skills/cratis-chronicle-cli-operations/SKILL.md +15 -255
- package/package/corpus/skills/cratis-chronicle-cli-operations/references/command-effects.md +13 -6
- package/package/corpus/skills/cratis-chronicle-cli-operations/references/inspection.md +75 -0
- package/package/corpus/skills/cratis-chronicle-cli-operations/references/project-tooling.md +78 -13
- package/package/corpus/skills/cratis-chronicle-cli-operations/references/recovery-and-comparison.md +16 -14
- package/package/corpus/skills/cratis-chronicle-connect-application/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-connect-application/references/csharp.md +10 -6
- package/package/corpus/skills/cratis-chronicle-connect-application/references/elixir.md +1 -1
- package/package/corpus/skills/cratis-chronicle-constrain-append/SKILL.md +2 -2
- package/package/corpus/skills/cratis-chronicle-constrain-append/references/csharp.md +8 -8
- package/package/corpus/skills/cratis-chronicle-deploy-kernel/SKILL.md +10 -8
- package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/storage.md +8 -4
- package/package/corpus/skills/cratis-chronicle-evolve-event/SKILL.md +4 -4
- package/package/corpus/skills/cratis-chronicle-evolve-event/references/csharp.md +2 -2
- package/package/corpus/skills/cratis-chronicle-evolve-event/references/deployed-readers.md +21 -8
- package/package/corpus/skills/cratis-chronicle-evolve-event/references/elixir.md +1 -1
- package/package/corpus/skills/cratis-chronicle-inspect-observer/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-inspect-observer/references/csharp.md +5 -7
- package/package/corpus/skills/cratis-chronicle-inspect-observer/references/elixir.md +3 -3
- package/package/corpus/skills/cratis-chronicle-mcp-inspection/SKILL.md +10 -80
- package/package/corpus/skills/cratis-chronicle-mcp-inspection/references/blocked-tools.md +2 -2
- package/package/corpus/skills/cratis-chronicle-mcp-inspection/references/deployment.md +9 -24
- package/package/corpus/skills/cratis-chronicle-mcp-inspection/references/observational-tools.md +10 -0
- package/package/corpus/skills/cratis-chronicle-project-view/SKILL.md +2 -2
- package/package/corpus/skills/cratis-chronicle-project-view/references/csharp.md +7 -6
- package/package/corpus/skills/cratis-chronicle-project-view/references/elixir.md +2 -2
- package/package/corpus/skills/cratis-chronicle-project-view/references/go.md +6 -0
- package/package/corpus/skills/cratis-chronicle-project-view/references/java.md +6 -0
- package/package/corpus/skills/cratis-chronicle-project-view/references/kotlin.md +6 -0
- package/package/corpus/skills/cratis-chronicle-project-view/references/typescript.md +11 -5
- package/package/corpus/skills/cratis-chronicle-protect-decision/SKILL.md +2 -2
- package/package/corpus/skills/cratis-chronicle-protect-decision/references/csharp.md +4 -4
- package/package/corpus/skills/cratis-chronicle-protect-decision/references/elixir.md +2 -2
- package/package/corpus/skills/cratis-chronicle-protect-decision/references/go.md +3 -1
- package/package/corpus/skills/cratis-chronicle-protect-personal-data/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-protect-personal-data/references/csharp.md +1 -1
- package/package/corpus/skills/cratis-chronicle-publish-contract/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-publish-contract/references/csharp.md +51 -40
- package/package/corpus/skills/cratis-chronicle-publish-contract/references/elixir.md +1 -1
- package/package/corpus/skills/cratis-chronicle-react-to-fact/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-react-to-fact/references/{occurrences.md → csharp-occurrences.md} +2 -2
- package/package/corpus/skills/cratis-chronicle-react-to-fact/references/csharp.md +5 -6
- package/package/corpus/skills/cratis-chronicle-react-to-fact/references/go.md +1 -1
- package/package/corpus/skills/cratis-chronicle-react-to-fact/references/java.md +1 -1
- package/package/corpus/skills/cratis-chronicle-react-to-fact/references/kotlin.md +1 -1
- package/package/corpus/skills/cratis-chronicle-record-event/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-record-event/references/csharp.md +21 -19
- package/package/corpus/skills/cratis-chronicle-record-event/references/elixir.md +3 -3
- package/package/corpus/skills/cratis-chronicle-record-event/references/go.md +1 -1
- package/package/corpus/skills/cratis-chronicle-record-event/references/java.md +3 -4
- package/package/corpus/skills/cratis-chronicle-record-event/references/kotlin.md +3 -4
- package/package/corpus/skills/cratis-chronicle-record-event/references/typescript.md +2 -2
- package/package/corpus/skills/cratis-chronicle-reduce-state/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-reduce-state/references/csharp.md +7 -2
- package/package/corpus/skills/cratis-chronicle-reduce-state/references/typescript.md +1 -1
- package/package/corpus/skills/cratis-chronicle-select-client/SKILL.md +4 -4
- package/package/corpus/skills/cratis-chronicle-select-client/references/csharp.md +3 -3
- package/package/corpus/skills/cratis-chronicle-select-client/references/elixir.md +2 -6
- package/package/corpus/skills/cratis-chronicle-select-client/references/go.md +2 -2
- package/package/corpus/skills/cratis-chronicle-select-client/references/java.md +1 -1
- package/package/corpus/skills/cratis-chronicle-select-client/references/kotlin.md +1 -5
- package/package/corpus/skills/cratis-chronicle-select-client/references/python.md +3 -3
- package/package/corpus/skills/cratis-chronicle-select-client/references/typescript.md +2 -2
- package/package/corpus/skills/cratis-chronicle-web-workbench/SKILL.md +12 -201
- package/package/corpus/skills/cratis-chronicle-web-workbench/references/hosting.md +67 -0
- package/package/corpus/skills/cratis-chronicle-web-workbench/references/operations.md +88 -0
- package/package/corpus/skills/cratis-ci-pipeline-performance/SKILL.md +8 -4
- package/package/corpus/skills/cratis-ci-pipeline-performance/references/build-once-and-shard.md +13 -11
- package/package/corpus/skills/cratis-ci-pipeline-performance/references/caching.md +2 -2
- package/package/corpus/skills/cratis-ci-pipeline-performance/references/flaky-and-hung-jobs.md +6 -4
- package/package/corpus/skills/cratis-ci-pipeline-performance/references/required-checks-and-path-filters.md +20 -61
- package/package/corpus/skills/cratis-ci-pipeline-performance/references/security-and-pinning.md +1 -1
- package/package/corpus/skills/cratis-cli-terminal-workbench/SKILL.md +15 -26
- package/package/corpus/skills/cratis-code-review/SKILL.md +7 -6
- package/package/corpus/skills/cratis-commits-and-pull-requests/SKILL.md +1 -1
- package/package/corpus/skills/cratis-commits-and-pull-requests/references/pr-description.md +1 -1
- package/package/corpus/skills/cratis-components-accessibility/SKILL.md +14 -206
- package/package/corpus/skills/cratis-components-accessibility/references/control-labels.md +29 -0
- package/package/corpus/skills/cratis-components-accessibility/references/focus-and-announcements.md +8 -0
- package/package/corpus/skills/cratis-components-build-canvas/SKILL.md +7 -7
- package/package/corpus/skills/cratis-components-build-canvas/references/pixi-items.md +1 -1
- package/package/corpus/skills/cratis-components-choose-control/SKILL.md +7 -8
- package/package/corpus/skills/cratis-components-choose-control/references/collections.md +2 -2
- package/package/corpus/skills/cratis-components-choose-control/references/inputs.md +1 -1
- package/package/corpus/skills/cratis-components-compose-toolbar/SKILL.md +22 -27
- package/package/corpus/skills/cratis-components-compose-toolbar/references/contributed-tools.md +5 -0
- package/package/corpus/skills/cratis-components-coordinate-feedback/SKILL.md +19 -25
- package/package/corpus/skills/cratis-components-display-list/SKILL.md +26 -19
- package/package/corpus/skills/cratis-components-display-list/references/server-query.md +3 -3
- package/package/corpus/skills/cratis-components-edit-schema-data/SKILL.md +15 -12
- package/package/corpus/skills/cratis-components-edit-schema-data/references/controlled-editor.md +3 -3
- package/package/corpus/skills/cratis-components-explore-data/SKILL.md +7 -7
- package/package/corpus/skills/cratis-components-host-chat/SKILL.md +7 -7
- package/package/corpus/skills/cratis-components-submit-form/SKILL.md +9 -15
- package/package/corpus/skills/cratis-components-submit-form/references/confirmation.md +5 -5
- package/package/corpus/skills/cratis-components-submit-form/references/wizard.md +3 -3
- package/package/corpus/skills/cratis-components-theme-application/SKILL.md +7 -51
- package/package/corpus/skills/cratis-components-theme-application/references/palette.md +49 -0
- package/package/corpus/skills/cratis-components-theme-application/references/renderer-adapters.md +4 -2
- package/package/corpus/skills/cratis-content-length/SKILL.md +34 -46
- package/package/corpus/skills/cratis-content-length/references/length-evidence.md +26 -127
- package/package/corpus/skills/cratis-developer-marketing/SKILL.md +15 -27
- package/package/corpus/skills/cratis-developer-marketing/references/measurement.md +3 -19
- package/package/corpus/skills/cratis-developer-marketing/references/playbook-evidence.md +29 -224
- package/package/corpus/skills/cratis-discoverability/SKILL.md +11 -4
- package/package/corpus/skills/cratis-discoverability/references/package-metadata.md +2 -2
- package/package/corpus/skills/cratis-documentation-writing/SKILL.md +4 -3
- package/package/corpus/skills/cratis-engineering-ci-gates/SKILL.md +13 -129
- package/package/corpus/skills/cratis-engineering-ci-gates/references/gate-operation.md +132 -0
- package/package/corpus/skills/cratis-engineering-consolidation-guard/SKILL.md +11 -100
- package/package/corpus/skills/cratis-engineering-consolidation-guard/references/ci-required-check.md +55 -40
- package/package/corpus/skills/cratis-engineering-consolidation-guard/references/source-verification.md +68 -0
- package/package/corpus/skills/cratis-engineering-consolidation-guard/references/verification-details.md +38 -0
- package/package/corpus/skills/cratis-engineering-csharp-conventions/SKILL.md +14 -65
- package/package/corpus/skills/cratis-engineering-csharp-conventions/references/exceptions-logging-and-di.md +40 -174
- package/package/corpus/skills/cratis-engineering-decision-record/SKILL.md +8 -52
- package/package/corpus/skills/cratis-engineering-decision-record/references/decision-pitfalls.md +29 -0
- package/package/corpus/skills/cratis-engineering-decision-record/references/decision-scope.md +20 -0
- package/package/corpus/skills/cratis-engineering-decision-record/references/record-format.md +3 -4
- package/package/corpus/skills/cratis-engineering-docs-authoring/SKILL.md +7 -12
- package/package/corpus/skills/cratis-engineering-docs-authoring/references/site-format.md +5 -4
- package/package/corpus/skills/cratis-engineering-effect-boundaries/SKILL.md +6 -40
- package/package/corpus/skills/cratis-engineering-effect-boundaries/references/failure-archetypes.md +18 -151
- package/package/corpus/skills/cratis-engineering-inherited-work/SKILL.md +5 -21
- package/package/corpus/skills/cratis-engineering-inherited-work/references/continue-inherited-work.md +19 -0
- package/package/corpus/skills/cratis-engineering-issue-design-note/SKILL.md +3 -66
- package/package/corpus/skills/cratis-engineering-issue-design-note/references/design-note-format.md +68 -0
- package/package/corpus/skills/cratis-engineering-issue-hygiene/SKILL.md +2 -84
- package/package/corpus/skills/cratis-engineering-issue-hygiene/references/issue-disposition.md +87 -0
- package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/SKILL.md +15 -263
- package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/dependency-map.md +3 -3
- package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/docker-images.md +28 -6
- package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/dotnet-nuget.md +18 -14
- package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/helper-runbook.md +231 -0
- package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/other-environments.md +2 -3
- package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/worked-examples.md +62 -77
- package/package/corpus/skills/cratis-engineering-post-mortem/SKILL.md +6 -39
- package/package/corpus/skills/cratis-engineering-post-mortem/references/proportionate-follow-up.md +36 -0
- package/package/corpus/skills/cratis-engineering-regression-cluster/SKILL.md +4 -4
- package/package/corpus/skills/cratis-engineering-release-trains/SKILL.md +8 -134
- package/package/corpus/skills/cratis-engineering-release-trains/references/candidate-assembly.md +139 -0
- package/package/corpus/skills/cratis-engineering-review-rounds/SKILL.md +3 -100
- package/package/corpus/skills/cratis-engineering-review-rounds/references/round-handoffs.md +109 -0
- package/package/corpus/skills/cratis-environments-and-secrets/SKILL.md +1 -5
- package/package/corpus/skills/cratis-environments-and-secrets/references/environment-file.md +1 -3
- package/package/corpus/skills/cratis-event-model-diagram/SKILL.md +11 -116
- package/package/corpus/skills/cratis-event-model-diagram/references/frame-patterns.md +93 -0
- package/package/corpus/skills/cratis-fundamentals-concept-go/SKILL.md +4 -15
- package/package/corpus/skills/cratis-fundamentals-name-value/SKILL.md +8 -8
- package/package/corpus/skills/cratis-fundamentals-name-value/references/csharp.md +4 -4
- package/package/corpus/skills/cratis-fundamentals-name-value/references/elixir.md +1 -1
- package/package/corpus/skills/cratis-fundamentals-name-value/references/go.md +1 -1
- package/package/corpus/skills/cratis-fundamentals-name-value/references/java.md +5 -5
- package/package/corpus/skills/cratis-fundamentals-name-value/references/kotlin.md +15 -2
- package/package/corpus/skills/cratis-fundamentals-name-value/references/python.md +1 -1
- package/package/corpus/skills/cratis-fundamentals-name-value/references/typescript.md +1 -1
- package/package/corpus/skills/cratis-fundamentals-telemetry/SKILL.md +10 -27
- package/package/corpus/skills/cratis-fundamentals-telemetry/references/otlp-export.md +16 -0
- package/package/corpus/skills/cratis-fundamentals-type-discovery/SKILL.md +26 -188
- package/package/corpus/skills/cratis-fundamentals-type-discovery/references/diagnostics.md +14 -0
- package/package/corpus/skills/cratis-governed-release-methodology/SKILL.md +7 -5
- package/package/corpus/skills/cratis-lens-browser-extension/SKILL.md +23 -157
- package/package/corpus/skills/cratis-lens-browser-extension/references/troubleshooting.md +139 -0
- package/package/corpus/skills/cratis-llm-friendly-documentation/SKILL.md +7 -5
- package/package/corpus/skills/cratis-modeling-design-event-model/SKILL.md +2 -4
- package/package/corpus/skills/cratis-modeling-design-event-model/references/model-first.md +7 -0
- package/package/corpus/skills/cratis-modeling-discover-timeline/SKILL.md +2 -2
- package/package/corpus/skills/cratis-modeling-discover-timeline/references/group-and-document-intake.md +1 -1
- package/package/corpus/skills/cratis-modeling-review-event-model/SKILL.md +2 -2
- package/package/corpus/skills/cratis-modeling-review-event-model/references/implementation-findings.md +2 -2
- package/package/corpus/skills/cratis-modeling-trace-existing-behavior/SKILL.md +5 -23
- package/package/corpus/skills/cratis-modeling-trace-existing-behavior/references/compare-evidence.md +20 -0
- package/package/corpus/skills/cratis-modeling-trace-existing-behavior/references/recovery-inputs.md +3 -3
- package/package/corpus/skills/cratis-multi-service-local-orchestration/SKILL.md +8 -63
- package/package/corpus/skills/cratis-multi-service-local-orchestration/references/aspire.md +52 -0
- package/package/corpus/skills/cratis-observability/SKILL.md +1 -1
- package/package/corpus/skills/cratis-observability/references/arc-and-chronicle-signals.md +9 -23
- package/package/corpus/skills/cratis-observability/references/chronicle-kernel-export.md +3 -14
- package/package/corpus/skills/cratis-observability/references/csharp.md +4 -6
- package/package/corpus/skills/cratis-observability/references/elixir.md +1 -1
- package/package/corpus/skills/cratis-observability/references/troubleshooting.md +4 -5
- package/package/corpus/skills/cratis-onboarding-runtime/SKILL.md +1 -4
- package/package/corpus/skills/cratis-onboarding-runtime/references/default-offering.md +0 -3
- package/package/corpus/skills/cratis-onboarding-runtime/references/sign-up-review.md +0 -4
- package/package/corpus/skills/cratis-orchestration-lanes/SKILL.md +7 -49
- package/package/corpus/skills/cratis-orchestration-lanes/references/escalation.md +22 -0
- package/package/corpus/skills/cratis-orchestration-lanes/references/inbox-and-handover.md +4 -4
- package/package/corpus/skills/cratis-orchestration-lanes/references/placeholders.md +1 -1
- package/package/corpus/skills/cratis-orchestration-lanes/references/roles.md +12 -0
- package/package/corpus/skills/cratis-orchestration-lanes/references/roll-call.md +12 -0
- package/package/corpus/skills/cratis-orchestration-lanes/references/worktrees.md +10 -0
- package/package/corpus/skills/cratis-orchestration-merge-gates/SKILL.md +14 -13
- package/package/corpus/skills/cratis-orchestration-merge-gates/references/merge-queue.md +51 -26
- package/package/corpus/skills/cratis-orchestration-merge-gates/references/unattended-guards.md +8 -14
- package/package/corpus/skills/cratis-orleans-jobs/SKILL.md +9 -65
- package/package/corpus/skills/cratis-orleans-jobs/references/activation-callbacks.md +5 -0
- package/package/corpus/skills/cratis-orleans-jobs/references/lifecycle-and-placement.md +11 -7
- package/package/corpus/skills/cratis-orleans-jobs/references/state-machines.md +1 -1
- package/package/corpus/skills/cratis-orleans-jobs/references/step-planning.md +27 -0
- package/package/corpus/skills/cratis-orleans-jobs/references/storage-and-options.md +35 -0
- package/package/corpus/skills/cratis-performance-review/SKILL.md +6 -76
- package/package/corpus/skills/cratis-performance-review/references/review-checklist.md +79 -0
- package/package/corpus/skills/cratis-platform-configure-environment/SKILL.md +19 -16
- package/package/corpus/skills/cratis-platform-contribute-change/SKILL.md +2 -2
- package/package/corpus/skills/cratis-platform-deliver-slice/SKILL.md +5 -5
- package/package/corpus/skills/cratis-platform-deliver-slice/references/coordinate-slices.md +1 -1
- package/package/corpus/skills/cratis-platform-diagnose-slice/SKILL.md +2 -3
- package/package/corpus/skills/cratis-platform-prepare-release-pr/SKILL.md +2 -2
- package/package/corpus/skills/cratis-platform-start-application/SKILL.md +10 -8
- package/package/corpus/skills/cratis-platform-start-application/references/csharp.md +6 -6
- package/package/corpus/skills/cratis-platform-start-application/references/java.md +4 -4
- package/package/corpus/skills/cratis-platform-start-application/references/kotlin.md +4 -4
- package/package/corpus/skills/cratis-platform-verify-service-handoff/SKILL.md +3 -3
- package/package/corpus/skills/cratis-release-notes/SKILL.md +9 -133
- package/package/corpus/skills/cratis-release-notes/references/channel-guidance.md +59 -0
- package/package/corpus/skills/cratis-release-notes/references/publish-repair.md +64 -0
- package/package/corpus/skills/cratis-rtk/SKILL.md +12 -18
- package/package/corpus/skills/cratis-screenplay-accept-model/SKILL.md +3 -3
- package/package/corpus/skills/cratis-screenplay-accept-model/references/capability-consumption.md +1 -1
- package/package/corpus/skills/cratis-screenplay-accept-model/references/coverage-obligations.md +1 -1
- package/package/corpus/skills/cratis-screenplay-authentication-and-onboarding/SKILL.md +25 -59
- package/package/corpus/skills/cratis-screenplay-authentication-and-onboarding/references/onboarding-directives.md +11 -10
- package/package/corpus/skills/cratis-screenplay-author-extension/SKILL.md +9 -6
- package/package/corpus/skills/cratis-screenplay-author-extension/references/consume.md +3 -3
- package/package/corpus/skills/cratis-screenplay-author-extension/references/stage-candidate.md +8 -0
- package/package/corpus/skills/cratis-screenplay-availability/SKILL.md +20 -167
- package/package/corpus/skills/cratis-screenplay-availability/references/complete-example.md +23 -47
- package/package/corpus/skills/cratis-screenplay-availability/references/review-checks.md +9 -10
- package/package/corpus/skills/cratis-screenplay-availability/references/runtime-ownership.md +26 -23
- package/package/corpus/skills/cratis-screenplay-declare-slice/SKILL.md +6 -14
- package/package/corpus/skills/cratis-screenplay-declare-slice/references/projection-replay.md +2 -2
- package/package/corpus/skills/cratis-screenplay-declare-slice/references/read-identity.md +1 -1
- package/package/corpus/skills/cratis-screenplay-edit-workspace/SKILL.md +7 -9
- package/package/corpus/skills/cratis-screenplay-edit-workspace/references/model-notes.md +1 -1
- package/package/corpus/skills/cratis-screenplay-handoff-slice/SKILL.md +10 -14
- package/package/corpus/skills/cratis-screenplay-model-automation/SKILL.md +1 -1
- package/package/corpus/skills/cratis-screenplay-model-automation/references/reaction-boundaries.md +1 -1
- package/package/corpus/skills/cratis-screenplay-model-interaction/SKILL.md +6 -31
- package/package/corpus/skills/cratis-screenplay-model-interaction/references/shell-and-data.md +22 -0
- package/package/corpus/skills/cratis-screenplay-model-translation/SKILL.md +5 -5
- package/package/corpus/skills/cratis-screenplay-onboard-workspace/SKILL.md +5 -5
- package/package/corpus/skills/cratis-screenplay-onboard-workspace/references/version-migration.md +4 -4
- package/package/corpus/skills/cratis-screenplay-recover-intent/SKILL.md +2 -2
- package/package/corpus/skills/cratis-screenplay-recover-intent/references/csharp.md +2 -2
- package/package/corpus/skills/cratis-screenplay-recover-intent/references/ground-truth-benchmark.md +1 -1
- package/package/corpus/skills/cratis-screenplay-specify-outcome/SKILL.md +4 -75
- package/package/corpus/skills/cratis-screenplay-specify-outcome/references/host-body-execution.md +0 -2
- package/package/corpus/skills/cratis-screenplay-specify-outcome/references/observable-result.md +85 -1
- package/package/corpus/skills/cratis-screenplay-specify-outcome/references/query-rejections.md +1 -1
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +15 -133
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/boundaries.md +5 -5
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/chronicle-boundaries.md +4 -12
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/consistency-and-concurrency.md +28 -57
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/evolution-example.md +4 -5
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/evolution.md +13 -20
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/multi-service-models.md +1 -1
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/neighbouring-skills.md +1 -1
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/read-model-keys.md +3 -5
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/stream-id-rules.md +2 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/stream-patterns.md +5 -5
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/streams-example.md +82 -71
- package/package/corpus/skills/cratis-security-review/SKILL.md +4 -73
- package/package/corpus/skills/cratis-security-review/references/arc-boundaries.md +24 -13
- package/package/corpus/skills/cratis-security-review/references/review-checklist.md +74 -0
- package/package/corpus/skills/cratis-session-handoff/SKILL.md +7 -32
- package/package/corpus/skills/cratis-session-handoff/references/handoff-template.md +2 -2
- package/package/corpus/skills/cratis-session-handoff/references/session-hygiene.md +20 -0
- package/package/corpus/skills/cratis-showrunner-herald/SKILL.md +9 -17
- package/package/corpus/skills/cratis-showrunner-herald/references/options.md +2 -2
- package/package/corpus/skills/cratis-showrunner-herald/references/templates-and-images.md +16 -10
- package/package/corpus/skills/cratis-social-feed-post/SKILL.md +9 -162
- package/package/corpus/skills/cratis-social-feed-post/references/asset-and-formatting.md +37 -0
- package/package/corpus/skills/cratis-social-feed-post/references/editorial-checks.md +40 -0
- package/package/corpus/skills/cratis-social-feed-post/references/engagement-evidence.md +39 -150
- package/package/corpus/skills/cratis-social-feed-post/references/linkedin-media.md +24 -0
- package/package/corpus/skills/cratis-social-feed-post/references/other-channels.md +23 -0
- package/package/corpus/skills/cratis-specifications-exercise-backend/SKILL.md +5 -5
- package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-command-results.md +2 -2
- package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-query-scenario.md +13 -5
- package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp.md +7 -4
- package/package/corpus/skills/cratis-specifications-exercise-backend/references/elixir.md +1 -1
- package/package/corpus/skills/cratis-specifications-exercise-backend/references/go.md +20 -4
- package/package/corpus/skills/cratis-specifications-exercise-backend/references/typescript.md +1 -1
- package/package/corpus/skills/cratis-specifications-isolate-behavior/SKILL.md +2 -2
- package/package/corpus/skills/cratis-specifications-observe-ui/SKILL.md +5 -5
- package/package/corpus/skills/cratis-specifications-test-application-ui/SKILL.md +2 -2
- package/package/corpus/skills/cratis-specifications-test-application-ui/references/typescript-command-results.md +2 -2
- package/package/corpus/skills/cratis-specifications-test-typescript-behavior/SKILL.md +2 -2
- package/package/corpus/skills/cratis-stage-render-slice/SKILL.md +10 -9
- package/package/corpus/skills/cratis-stage-run-sandbox/SKILL.md +3 -3
- package/package/corpus/skills/cratis-stage-run-sandbox/references/semantic-spec-runner.md +7 -6
- package/package/corpus/skills/cratis-studio-mcp-safety-guidance/SKILL.md +4 -6
- package/package/corpus/skills/cratis-technical-examples/SKILL.md +10 -106
- package/package/corpus/skills/cratis-technical-examples/references/csharp-package-checks.md +1 -1
- package/package/corpus/skills/cratis-technical-examples/references/source-and-format.md +42 -0
- package/package/corpus/skills/cratis-technical-examples/references/typescript-package-checks.md +2 -2
- package/package/corpus/skills/cratis-technical-examples/references/verification-scope.md +37 -0
- package/package/corpus/skills/cratis-ux-review/SKILL.md +8 -40
- package/package/corpus/skills/cratis-ux-review/references/capture-contract.md +24 -0
- package/package/corpus/skills/cratis-ux-review/references/checklist.md +1 -1
- package/package/corpus/skills/cratis-ux-review/references/report-template.md +2 -1
- package/package/corpus/skills/cratis-writing-voice-and-cadence/SKILL.md +19 -132
- package/package/corpus/skills/cratis-writing-voice-and-cadence/references/ai-tells.md +24 -97
- package/package/corpus/skills/cratis-writing-voice-and-cadence/references/author-and-batch.md +23 -0
- package/package/corpus/skills/cratis-writing-voice-and-cadence/references/documentation-evidence.md +25 -0
- package/package/corpus/skills/cratis-writing-voice-and-cadence/references/interpretation.md +17 -0
- package/package/corpus/skills/cratis-writing-voice-and-cadence/references/stock-constructions.md +23 -0
- package/package/corpus/skills/cratis-writing-voice-and-cadence/references/voice-guidance.md +8 -29
- package/package.json +1 -1
- /package/package/corpus/skills/cratis-chronicle-protect-decision/references/{standalone.md → csharp-standalone.md} +0 -0
- /package/package/corpus/skills/cratis-engineering-post-mortem/references/{examples/silent-backup-failure.md → silent-backup-failure.md} +0 -0
- /package/package/corpus/skills/cratis-engineering-post-mortem/references/{examples/unintended-release-regression.md → unintended-release-regression.md} +0 -0
package/package/corpus/skills/cratis-screenplay-specify-outcome/references/query-rejections.md
CHANGED
|
@@ -13,7 +13,7 @@ specification FindingNoInvoiceForAValidNumber
|
|
|
13
13
|
then no result
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
A query validation case
|
|
16
|
+
A query validation case has one query and one `then error`, no other action or expectation. Do not combine it with `then no result`, result rows or denial. An empty but accepted lookup must not satisfy a validation case.
|
|
17
17
|
|
|
18
18
|
For a policy-protected query, use a valid argument and an explicit caller lacking the required authority. Assert `then denied`, which matches authorization, not validation. For example, when the policy requires `Reviewer`:
|
|
19
19
|
|
|
@@ -1,145 +1,27 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cratis-screenplay-streams-and-consistency
|
|
3
|
-
description: Use when deciding Screenplay stream
|
|
3
|
+
description: Use when deciding what a Screenplay stream represents, which rules must hold under concurrent writes, or how a persisted event can change. Not for declaring a slice (use cratis-screenplay-declare-slice).
|
|
4
4
|
license: MIT
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
#
|
|
7
|
+
# Choose an identity and protect its decisions
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
later; then express that in `.play` truthfully. The model must say which invariants it protects,
|
|
11
|
-
which it only records, and what a retry, a race or a replay does. Grammar lives in the construct
|
|
12
|
-
skills; this skill owns the decisions. The `.play` model is the source of truth: a rule that
|
|
13
|
-
lives only in code, or only in a description, is a finding, not a solution.
|
|
9
|
+
Default to one business identity per stream. Keep related IDs in the payload only when a consumer needs them. For example, an enrollment stream answers “Is this member enrolled in this course?” A seat-limit change belongs to the course, even when both facts refer to it.
|
|
14
10
|
|
|
15
|
-
**
|
|
11
|
+
1. **List the writers.** Inspect every command, reaction and capture that writes the history. Give each identifier an identity sentence and each event a reason to belong. Use [stream patterns](references/stream-patterns.md) for the membership table, split criteria, fact granularity and lifecycle. For unresolved decisions, use the [interview](references/interview-batch.md); ask one missing question at a time. Record an unattended assumption as `ASSUMED` in model `documentation` and the ignored `STATE.md`.
|
|
12
|
+
2. **Place each rule at its authoritative decision point.** Fill the [invariant table](references/consistency-and-concurrency.md). Use validation for rules on inputs alone, a named constraint covering all writers for uniqueness, and `reads <View>` under root `command reads protected` for an admitted state-dependent rule. Never substitute caller assertions or unguarded view reads. If protection is unavailable, keep the rule visible as intent, mark it **NOT enforced** in the slice description, record the missing guarantee, race and intended mechanism in slice `documentation`, and assign an owner in `STATE.md`. Never weaken authorization, `pii` or `secret` to pass a tool.
|
|
13
|
+
3. **Specify a race, a retry and a duplicate for each rule.** For a lost reply, reuse the operation identity chosen before the first attempt. A `generated identifier` is fresh per accepted operation, not deduplication. Use `unique event` only for a genuinely once-only fact; use a value constraint for a claim across sources. See the [worked enrollment model](references/streams-example.md) for a competing claim, release and an explicitly unprotected rule. Use the [review questions](references/review-questions.md) to challenge the outcome.
|
|
14
|
+
4. **Separate identity from storage and views.** Use [Chronicle boundaries](references/chronicle-boundaries.md) for routing, tenancy, privacy and target guarantees, [stream ID rules](references/stream-id-rules.md) for typed route sources and [view keys](references/read-model-keys.md) when a view needs its own key. Keep `pii` and `secret` off identities; use surrogate IDs and protected payload. A narrowed caller-supplied concurrency scope and a strategy-issued scope behave differently on their first append; use the first-append check in the invariant reference rather than assuming either succeeded.
|
|
16
15
|
|
|
17
|
-
##
|
|
16
|
+
## Choose another path when the contract already exists
|
|
18
17
|
|
|
19
|
-
- Use
|
|
20
|
-
|
|
21
|
-
- Not for projection syntax, reactions or captures; see Route near misses. For outcome specifications, use [cratis-screenplay-specify-outcome](../cratis-screenplay-specify-outcome/SKILL.md).
|
|
22
|
-
- When an accepted model covers the change, change the model first; never weaken authorization, `pii` or rules to compile.
|
|
23
|
-
|
|
24
|
-
## Interview phase
|
|
25
|
-
Read [interview prompts](references/interview-batch.md) when identity, competition,
|
|
26
|
-
retry, ownership, growth or stored-event history is unsettled. Ask only missing
|
|
27
|
-
questions, one at a time; ownership options are in [references/boundaries.md](references/boundaries.md).
|
|
28
|
-
Unattended work takes the conservative option and marks it `ASSUMED` in model
|
|
29
|
-
`documentation` and the model’s `STATE.md` in the ignored scratch folder.
|
|
30
|
-
|
|
31
|
-
## Procedure
|
|
32
|
-
1. **Establish identity and membership.** For every `concept XId` used as an `identifier`, write
|
|
33
|
-
one sentence: "one business identity per stream: one stream per <business thing>; it answers
|
|
34
|
-
<question>". Run the event-by-event check in [references/stream-patterns.md](references/stream-patterns.md): inspect every
|
|
35
|
-
producer and destination that can write its history (commands, reactions, captures), say why
|
|
36
|
-
each event belongs, and decide retain, split, view instead, or unresolved, by lifecycle and
|
|
37
|
-
invariant consequences, not names or length. For Chronicle keep event-source identity,
|
|
38
|
-
namespace, process-stream routing and concurrency scope apart
|
|
39
|
-
([references/chronicle-boundaries.md](references/chronicle-boundaries.md)). Declared `eventsource`/`stream`/`streamId` and
|
|
40
|
-
command/specification routes bind and reference-execute as ESM v8.
|
|
41
|
-
The CLI’s bundled compiler must admit the model before Stage checks route support; keep the routing
|
|
42
|
-
contract when target admission requires gap-fill. A `generated identifier` (ESM v7; Stage renders supported UUID/String strategies and v15 freshness; unsupported types/results still refuse -028/-038)
|
|
43
|
-
is generated fresh on each acceptance. It gives no retry or deduplication guarantee; when
|
|
44
|
-
retries must find the same stream, let the caller supply the identifier before the first attempt.
|
|
45
|
-
2. **Account for every invariant.** One row per rule in the table from
|
|
46
|
-
`references/consistency-and-concurrency.md`: rule, authoritative inputs, all paths that can
|
|
47
|
-
affect it, intended atomic decision point, exact construct, status (`enforced` / `recorded` /
|
|
48
|
-
`eventual by choice`). Placement:
|
|
49
|
-
- only the command's own inputs: concept `validate`, command `validate`/`require`;
|
|
50
|
-
- supported uniqueness and exclusion/release rules: a named `constraint` (`unique ... on`,
|
|
51
|
-
`unique event`, `released by`); list every event that sets the claimed value;
|
|
52
|
-
- an eligible state-dependent command rule: use `command reads protected` with
|
|
53
|
-
`reads <View>` and `require`; check renderer admission separately. For a legacy or refused
|
|
54
|
-
rule, write the `reads` and `require` as stated intent (PLAY0268/0271 at binding are
|
|
55
|
-
expected in design mode) and
|
|
56
|
-
mark it **NOT enforced in the model today** in the slice `description` with the named target,
|
|
57
|
-
and record requirement, missing guarantee and race consequence in the slice `documentation`. Add a `STATE.md` row
|
|
58
|
-
with an owner. A general "some rules are unsupported" note is not enough.
|
|
59
|
-
- Forbidden: a caller-supplied copy of state in `require`, a boolean attestation input
|
|
60
|
-
(`confirmsX == true`) standing in for a rule, and rules hidden in `handler` or
|
|
61
|
-
implementation-hint prose. An unguarded materialized read is unsafe for a protected
|
|
62
|
-
decision; that is not "read models never drive decisions". See
|
|
63
|
-
the `cratis-chronicle-protect-decision` skill (in `cratis/chronicle`).
|
|
64
|
-
3. **Play the races and retries.** For each enforced or recorded rule write the concurrent case
|
|
65
|
-
(two commands at once), the retry case (same request again after a lost reply) and the
|
|
66
|
-
duplicate case (same intent, new id). State the outcome and which construct produces it.
|
|
67
|
-
Check the **retry identity**: the identifier is chosen before the first attempt and reused on
|
|
68
|
-
retry, or the retry creates a second stream.
|
|
69
|
-
4. **Set granularity.** One decision usually records one event; several facts are fine when each
|
|
70
|
-
is a fact the business recognises. Different meanings get different events, not a flag with
|
|
71
|
-
nullable siblings. Event properties are required by default (CHR0012, PLAY0350): an optional
|
|
72
|
-
detail is a separate event, and any deviation is justified in the event's `documentation`. One data
|
|
73
|
-
subject per event; never personal data, a secret, or a `pii`/`secret` concept as
|
|
74
|
-
identifier or subject (CHR0034, CHR0052, PLAY0515/0592). Use a surrogate identity
|
|
75
|
-
and protected payload. A stream identity and an event's data subject may differ:
|
|
76
|
-
where admitted, trailing event-property `subject` records that lineage but is report-only
|
|
77
|
-
(PLAY0270), not runtime propagation or generated C# `[Subject]`. Without a
|
|
78
|
-
supplied subject, the runtime defaults to the event source. For stored personal data, use the `cratis-chronicle-protect-personal-data` skill (in `cratis/chronicle`).
|
|
79
|
-
5. **Plan evolution.** Read [event evolution](references/evolution.md) before editing stored
|
|
80
|
-
contracts, for change classification, compatibility scenarios and enum-number safety.
|
|
81
|
-
After release-baseline admission, revisions need `newGeneration`. The owning session handles identity-affecting edits using [cratis-screenplay-edit-workspace](../cratis-screenplay-edit-workspace/SKILL.md).
|
|
82
|
-
6. **Test ownership and interfaces** with `references/boundaries.md`: ownership interview,
|
|
83
|
-
interface and processor inventory, one real interaction walked across each boundary, coupling
|
|
84
|
-
check. Keep team, module, stream and deployment boundaries distinct; inbound facts via
|
|
85
|
-
Translate; unresolved decisions stay visible.
|
|
86
|
-
Read [references/multi-service-models.md](references/multi-service-models.md) when the system spans several services, each with its own event store and model folder.
|
|
87
|
-
7. **Record and gate.** Durable rationale in feature and slice `documentation`; open consistency
|
|
88
|
-
decisions and capability gaps in `STATE.md`. Then the gate below.
|
|
89
|
-
|
|
90
|
-
## Rules
|
|
91
|
-
|
|
92
|
-
- Check compiler binding and renderer admission separately. For protected reads, retain the absence and conflict specs and verify that the chosen target preserves protection. See [consistency and concurrency](references/consistency-and-concurrency.md) for admitted shapes and refusals.
|
|
93
|
-
- `pii` and `secret` concept markers bind and require at least ESM v13. The compiler rejects compliance on identifiers or enums, and rejects an explicit `subject` on events carrying PII or a subject-scoped secret (PLAY0268). Never remove compliance to pass a tool.
|
|
94
|
-
- For stream identities, check [stream ID rules](references/stream-id-rules.md). For generation or stored-name changes, check [event evolution](references/evolution.md) before applying an identity-aware edit. Do not remove stored payload in place.
|
|
95
|
-
- Verify contention against the application's store provider. A declared constraint and a passing sequential specification do not establish that competing writes are resolved by the runtime.
|
|
96
|
-
|
|
97
|
-
**Modeling defaults** (deviate with a recorded reason)
|
|
98
|
-
- One business identity per stream; cross-stream references are payload properties.
|
|
99
|
-
- A read model's key is not a stream identity. Read [references/read-model-keys.md](references/read-model-keys.md)
|
|
100
|
-
when choosing one id, flat composite key parts (v27) or a composite-typed key.
|
|
101
|
-
- Copy the source id into the payload only when a consumer needs it as a value.
|
|
102
|
-
- Give each invariant an authoritative atomic decision point and inspect every path that could
|
|
103
|
-
violate it. A constraint violation rejects that command's whole append set; a reaction cascade
|
|
104
|
-
is not one transaction. For rollback and reaction batching (not redelivery deduplication), use [cratis-screenplay-model-automation](../cratis-screenplay-model-automation/SKILL.md).
|
|
105
|
-
- Match duplicate protection to scope. A property constraint lets a source re-claim its own
|
|
106
|
-
value; use `unique event` for a fact that is genuinely once-only in its lifecycle, without
|
|
107
|
-
blocking legitimate repeated operations just to make retries safe.
|
|
108
|
-
- No calculated events: a value recomputed as source data changes is a read model; a figure
|
|
109
|
-
the business recorded at a point in time (a quoted price) is a fact. Keep an unanswered
|
|
110
|
-
choice as an open question in `STATE.md`; write a decided rejection as `then error`
|
|
111
|
-
(`references/stream-patterns.md`, Core rules that bear on stream design).
|
|
112
|
-
- Prefer short business lifecycles (a new stream per period, case or attempt) over an eternal
|
|
113
|
-
stream, when the business has natural ends.
|
|
114
|
-
- Compatible change is a new generation; changed meaning is a new event. Corrections are new
|
|
115
|
-
facts, never an edit of history. Redaction and crypto-erasure are compliance operations.
|
|
116
|
-
- Team and system often align, but not by law: decide modules on ownership, language and change
|
|
117
|
-
cadence, and record where they differ.
|
|
118
|
-
|
|
119
|
-
**Review questions** (findings only with a domain consequence): read [references/review-questions.md](references/review-questions.md) for the stream, race, optional-property, boundary and eventual-consistency questions (decision tree and red flags for collection- or log-shaped streams are in `references/stream-patterns.md`).
|
|
120
|
-
|
|
121
|
-
Availability is not a consistency boundary. Events, projections and reactions run whether or not a slice is available (a reaction is never gated), so a gate never needs a replay; `provide` values are read per request and are no part of a command's decision reads. See `cratis-screenplay-availability`.
|
|
122
|
-
|
|
123
|
-
## Gate
|
|
124
|
-
Do not report done until all hold; otherwise report what is open:
|
|
125
|
-
- Every identifier has its identity sentence, the event-membership table and a justified decision.
|
|
126
|
-
- Every rule has an invariant-table row with an exact construct or limitation reference.
|
|
127
|
-
- Every `recorded` rule has its NOT-enforced marker in the slice `description`, and its requirement,
|
|
128
|
-
missing guarantee, race consequence and intended enforcement owner in the slice `documentation` and `STATE.md`.
|
|
129
|
-
- Every changed event has compatibility scenarios; identity changes were made by the identity owner.
|
|
130
|
-
- Every changed boundary has a named owner (or `ASSUMED`), callers, processors and contracts.
|
|
131
|
-
- Report the compiler result (warnings as errors), executable diagnostics, binding, reference specifications, and delivery (admission, publication, build and tests) separately, naming the tool/version or why a check did not run.
|
|
18
|
+
- **Choose event evolution when stored facts already exist.** Use [event evolution](references/evolution.md) and the [worked example](references/evolution-example.md) to distinguish a compatible generation, an identity-aware rename and a new meaning. A correction is a new fact, not an edit of history. Have the identity owner perform changes through [edit workspace](../cratis-screenplay-edit-workspace/SKILL.md). After baseline admission, use `newGeneration` for compatible payload changes. Verify that deployed readers and writers handle the same stored identity; a reference test does not prove replay compatibility.
|
|
19
|
+
- **Choose a boundary review when ownership or a cross-service contract is changing.** Use the [ownership and interface inventory](references/boundaries.md) and walk one interaction across each boundary. Keep modules, teams, streams and deployments distinct. For separately deployed services, use [one model per service](references/multi-service-models.md). An availability gate is not a consistency boundary; use `cratis-screenplay-availability` for audience rules.
|
|
132
20
|
|
|
133
21
|
## Verify
|
|
134
|
-
- Compile with the CLI-bundled compiler, with warnings treated as errors. Read any refusal
|
|
135
|
-
before editing. Report the tool and version and say what was not run. Parsing and binding
|
|
136
|
-
do not execute specifications; sequential specifications do not prove race safety.
|
|
137
|
-
- Value uniqueness: a competing-claim spec (another source, `when <Command>`, earlier fact as
|
|
138
|
-
`given`); once-only facts: the same source repeating; release and reclaim when declared. Pin the
|
|
139
|
-
fixed message with `then error`. Report target-side concurrency evidence separately.
|
|
140
|
-
- Retry answers cover a lost acknowledgement, reuse of the operation identity, conflicting
|
|
141
|
-
payloads and duplicate intent under a new identity, where applicable.
|
|
142
|
-
- Use the [streams example](references/streams-example.md) for stream membership, constraints or a recorded rule, and the [evolution example](references/evolution-example.md) for generations, renames or changed event meaning. Validate the streams example in source mode and the evolution example in executable mode.
|
|
143
22
|
|
|
144
|
-
|
|
145
|
-
|
|
23
|
+
- Each identifier has a membership decision; each invariant names every writer and the enforcement or gap. Document changed contracts and their owners (or `ASSUMED`).
|
|
24
|
+
- Run `screenplay model --warnaserror` and `screenplay test model` from the application directory for executable models. Check the enrollment example in source mode and the evolution example in executable mode. For a recorded gap, report the expected binding refusal; do not turn it into a passing rule.
|
|
25
|
+
- Report parsing, binding, reference specifications, target admission and running tests separately. Test concurrent writes with the target store. Neither sequential model specifications nor Stage rendering proves runtime race safety, rollback across reactions, or replay compatibility.
|
|
26
|
+
|
|
27
|
+
Use [neighboring skills](references/neighbouring-skills.md) when the work is grammar, modeling automation, review or delivery rather than identity and consistency.
|
package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/boundaries.md
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
Read when splitting, merging or connecting modules. For grammar use [cratis-screenplay-model-automation](../../cratis-screenplay-model-automation/SKILL.md) for reactions and [cratis-screenplay-model-translation](../../cratis-screenplay-model-translation/SKILL.md) for translations.
|
|
18
18
|
|
|
19
19
|
## Establish the boundary, not an organizational formula
|
|
20
|
-
A `module` groups business
|
|
20
|
+
A `module` groups business behavior; it does not automatically define a team, deployment, event
|
|
21
21
|
source or transaction. Evidence: differences in language, decision authority, lifecycle, change
|
|
22
22
|
cadence and consistency needs (tariffs change weekly, member records yearly). One team may own
|
|
23
23
|
several modules; a module may be shared during a transition; record which of team and system the
|
|
@@ -79,7 +79,7 @@ For each affected boundary, identify:
|
|
|
79
79
|
|
|
80
80
|
Use declaration addresses, not copies of payloads. Per slice, also record the events it consumes
|
|
81
81
|
and which slice produces them, for orientation, not as a build order. A command or reaction may
|
|
82
|
-
consult another slice's view (`reads`; eligible commands opt into
|
|
82
|
+
consult another slice's view (`reads`; eligible commands opt into protected reads,
|
|
83
83
|
trigger reads cannot; see `consistency-and-concurrency.md` section 3 for target gaps); a slice calls another slice's command only through `invokes`.
|
|
84
84
|
|
|
85
85
|
### Responsibility matrix and ownership timeline
|
|
@@ -118,7 +118,7 @@ Walk one real interaction across each affected boundary:
|
|
|
118
118
|
1. the producer and the published fact or interface;
|
|
119
119
|
2. the receiving boundary and any translation into its language;
|
|
120
120
|
3. the receiver's decision, command or effect, and the destination identity;
|
|
121
|
-
4. success, rejection or failure, correlation and retry
|
|
121
|
+
4. success, rejection or failure, correlation and retry behavior;
|
|
122
122
|
5. what happens when the receiver is late, unavailable or sees the input again.
|
|
123
123
|
|
|
124
124
|
A reaction may produce events directly without an invented command; an email or payment stays an
|
|
@@ -158,7 +158,7 @@ integration support.
|
|
|
158
158
|
internal step.
|
|
159
159
|
- Treat a public event like a published API: evolution follows `evolution.md` with the
|
|
160
160
|
consumers named, and breaking changes become new events.
|
|
161
|
-
- Events are private by default. Mark a public contract with `public event X
|
|
161
|
+
- Events are private by default. Mark a public contract with `public event X`; declare a foreign public event's shape locally with `event X from "store"`.
|
|
162
162
|
A command never produces a public event (PLAY0607/0613); crossing the boundary is a `Translate`
|
|
163
163
|
slice with an explicit direction. Use [cratis-screenplay-model-translation](../../cratis-screenplay-model-translation/SKILL.md) to declare it. Nothing checks
|
|
164
164
|
that the foreign shape matches the other store, so name consumers in the event’s `documentation`
|
|
@@ -168,7 +168,7 @@ integration support.
|
|
|
168
168
|
| Situation | Construct |
|
|
169
169
|
|---|---|
|
|
170
170
|
| another module in the same application | reference the event by name (cross-module resolution works within one application) |
|
|
171
|
-
| another bounded context’s contract | `event X from "store"` (shape declared locally
|
|
171
|
+
| another bounded context’s contract | `event X from "store"` (shape declared locally); an unquoted `import Context.Event` or `import Q.X from "store"` has no local shape and stays PLAY0268 |
|
|
172
172
|
| my own files | quoted `import "glob"` |
|
|
173
173
|
| outside data entering | `Translate` slice: `capture`, or a translator `reaction` over an imported event |
|
|
174
174
|
| our fact another context needs | a public summary event; the other side translates it into its own language |
|
|
@@ -6,14 +6,8 @@ target facts; the `.play` model declares only part of them, and binding is not t
|
|
|
6
6
|
## Target facts
|
|
7
7
|
|
|
8
8
|
Chronicle has CHR0012 (nullable event properties) and CHR0034 (PII on an event-source id).
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Composite unique constraints can collide when a component contains the separator.
|
|
12
|
-
Stage-rendered apps pin Arc and Chronicle releases that support `[ProtectedDecision]`.
|
|
13
|
-
The APIs are available to hand-authored commands; the pin alone does not protect a read
|
|
14
|
-
(see `consistency-and-concurrency.md` section 3).
|
|
15
|
-
Re-check these limits before relying on a constraint in a new release.
|
|
16
|
-
A concurrency scope's first append is unchecked by default; see
|
|
9
|
+
Chronicle checks claims during append. If the post-commit index update fails and the index becomes pending, governed appends are refused until catch-up; the original append is not rolled back. Check the [constraint and protected-read boundaries](consistency-and-concurrency.md#2-where-a-rule-can-be-enforced) before relying on either.
|
|
10
|
+
A strategy-issued scope skips the first-append check by default; explicit narrowed scopes behave differently. See
|
|
17
11
|
[First append into a scope](consistency-and-concurrency.md#first-append-into-a-scope).
|
|
18
12
|
|
|
19
13
|
## Identity, routing and claims
|
|
@@ -25,8 +19,7 @@ tenants.
|
|
|
25
19
|
|
|
26
20
|
A value constraint protects a claim across sources within its configured scope; an event-type
|
|
27
21
|
constraint protects one occurrence per source. List every event that claims, changes or
|
|
28
|
-
releases the value, including correction and import paths. Post-commit index maintenance is not
|
|
29
|
-
atomic durability; composite separators can collide.
|
|
22
|
+
releases the value, including correction and import paths. Post-commit index maintenance is not crash-atomic.
|
|
30
23
|
|
|
31
24
|
## State used for decisions
|
|
32
25
|
Materialized views may lag. A passive read folds events on demand but does not protect the
|
|
@@ -42,8 +35,7 @@ A namespace scopes event positions, claims, observer progress and encryption key
|
|
|
42
35
|
whether uniqueness and completion are per tenant or genuinely cross-tenant.
|
|
43
36
|
|
|
44
37
|
Decide the data subject before the event/view shape: one person per event or
|
|
45
|
-
read-model instance, not necessarily the stream's identity.
|
|
46
|
-
`subject` is report-only lineage, not runtime propagation or C# `[Subject]`. An explicit
|
|
38
|
+
read-model instance, not necessarily the stream's identity. Trailing event `subject` is report-only lineage (PLAY0270), not runtime propagation or C# `[Subject]`. Without an explicit runtime subject, Chronicle defaults to the event source. For implementation, use `cratis-chronicle-protect-personal-data` (in `cratis/chronicle`). An explicit
|
|
47
39
|
`subject` prevents binding an event carrying PII or a subject-scoped secret. Read-model
|
|
48
40
|
marks remain unsupported. Use bare `pii` for personal
|
|
49
41
|
values and `secret` for operational secrets on concepts, never on identities or
|
|
@@ -28,9 +28,9 @@ See [stream-id rules](stream-id-rules.md) for literal and rename constraints.
|
|
|
28
28
|
| # | Rule (business words) | Data it needs | Decided atomically where | Screenplay construct | Status | Race / retry outcome |
|
|
29
29
|
|---|---|---|---|---|---|---|
|
|
30
30
|
| 1 | an email belongs to one member | email on `MemberRegistered` | append-time constraint, whole sequence | `constraint UniqueMemberEmail` | enforced | second registrant rejected with the fixed message |
|
|
31
|
-
| 2 | one active
|
|
32
|
-
| 3 | an
|
|
33
|
-
| 4 |
|
|
31
|
+
| 2 | one active enrollment per member and course | courseId + memberId | append-time constraint | composite `unique … released by` | enforced | racing enrollments: one rejected |
|
|
32
|
+
| 3 | an enrollment is recorded once | enrollment stream history | append-time constraint | `unique event MemberEnrolled` | enforced | append rejected either way; the target tells a true retry (same operation key, same payload: return the original outcome) from a conflicting request on the same stream (different payload: reject) |
|
|
33
|
+
| 4 | enrollments never exceed capacity | count over enrollment streams + course capacity | **not in the model** | `reads CourseAvailability` + `require … message "The course is full"` as stated intent; slice `description` + `STATE.md` | recorded (NOT enforced) | concurrent enrollments can overbook; the enrollment-to-course fan-in cannot be guarded, so the target decides a redesign (§3 options a/b) |
|
|
34
34
|
|
|
35
35
|
Status describes how the model treats the requirement:
|
|
36
36
|
- `enforced`: a supported construct the model declares covers the rule and every write path
|
|
@@ -41,9 +41,7 @@ Status describes how the model treats the requirement:
|
|
|
41
41
|
compensating fact and the consequence that remains possible.
|
|
42
42
|
|
|
43
43
|
`enforced` is a declaration, not a runtime test result. Chronicle checks a constraint at append
|
|
44
|
-
and updates the index after commit.
|
|
45
|
-
separator. Name the target's storage provider when you rely on a constraint, record runtime
|
|
46
|
-
evidence separately, and never claim atomic index-and-append durability.
|
|
44
|
+
and updates the index after commit. A pending index refuses governed appends with `ConstraintIndexUnavailable` without writing that attempt's events. Use caller-controlled backoff and retry the unchanged append with the same idempotency keys, if supplied. A suggested delay, when present, can inform backoff; don't require one. Do not retry a uniqueness or concurrency violation as if it were index downtime. On a separator-based claim index, distinct tuples can collide when a component contains the separator. Verify the target’s claim encoding and storage provider, including a separator-containing case when relevant. Index and append storage are not crash-atomic.
|
|
47
45
|
Per row, cite the exact construct or description address
|
|
48
46
|
and the scenario names; on extracted models keep the legacy evidence locator and separate an
|
|
49
47
|
observed legacy check from verified atomic protection.
|
|
@@ -55,7 +53,7 @@ observed legacy check from verified atomic protection.
|
|
|
55
53
|
| several command properties / constants | `require` | runs after property rules, before production |
|
|
56
54
|
| a value across all sources | `unique <prop> on <Event>` | value owned by one source; same source may re-claim |
|
|
57
55
|
| a fact at most once per source; mutually exclusive facts | `unique event` (+ `released by`) | covers simple lifecycle transitions |
|
|
58
|
-
| state-dependent rule (balance, capacity, "only if approved") | eligible `reads` + `require` under `command reads protected`
|
|
56
|
+
| state-dependent rule (balance, capacity, "only if approved") | eligible `reads` + `require` under `command reads protected` | required absence rejects; matching intervening facts conflict. Payload-key fan-in, joins, reducers and other refused shapes remain target gaps |
|
|
59
57
|
| a view (read model) | unguarded materialized reads are not protection | legacy command and trigger reads remain unprotected; semantic Host/executor evidence is not generated-app protection |
|
|
60
58
|
|
|
61
59
|
## 3. Record each state-dependent rule that the model cannot enforce
|
|
@@ -73,7 +71,7 @@ Semantic Host/executor support has separate severity and outside-append limits.
|
|
|
73
71
|
fan-in such as the course-capacity example remains refused; the preamble is not a
|
|
74
72
|
blanket admission of arbitrary projections.
|
|
75
73
|
|
|
76
|
-
For
|
|
74
|
+
For a model without opt-in or a refused shape, write stated intent and mark it unenforced.
|
|
77
75
|
- `reads <View> as x by …` plus `require <expr over x> message "…"` on the command (the
|
|
78
76
|
`StateChange` slice in `streams-example.md`). Binding reports PLAY0271 / PLAY0268; that is
|
|
79
77
|
expected in design mode, so keep the lines. Do not remove them to pass a tool.
|
|
@@ -93,38 +91,21 @@ For legacy models without opt-in or refused shapes, write stated intent and mark
|
|
|
93
91
|
|
|
94
92
|
Options to discuss with the domain expert (decide, do not assume):
|
|
95
93
|
a. **one stream is the boundary**: put the decision on the stream that owns the state (often a
|
|
96
|
-
different identity choice) and enforce it in the target with a concurrency scope
|
|
97
|
-
[first-append check](#first-append-into-a-scope) (a scope on an empty
|
|
98
|
-
source or partition is not checked by default);
|
|
94
|
+
different identity choice) and enforce it in the target with a concurrency scope with an explicit [first-append expectation](#first-append-into-a-scope);
|
|
99
95
|
b. **reservation by identity**: if the scarce things can be named (seat 1..N, slot at 09:00),
|
|
100
96
|
give each its own identity and use uniqueness, after checking it expresses the invariant;
|
|
101
97
|
c. **accept and compensate**: allow the over-commit, detect it in a view or automation and
|
|
102
|
-
record a compensating fact (`
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
read
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
unfiltered reducer without constructor dependencies. Filtered reducers, reducers with dependencies,
|
|
114
|
-
joins, children, nested sources and **event-property routing** (fan-in from many streams by a payload reference) are refused, and a concurrency scope
|
|
115
|
-
on the referenced source does not see appends made on other sources. A rule over such a view, for
|
|
116
|
-
example a course capacity computed from enrolment streams, needs option a or b: write the
|
|
117
|
-
deciding fact on the source that owns the state, or give each scarce item its own identity (see [Chronicle boundaries](chronicle-boundaries.md)).
|
|
118
|
-
|
|
119
|
-
**Availability in Stage-rendered applications.** The Stage scaffold pins Arc and Chronicle client/kernel
|
|
120
|
-
releases (not the latest). `[ProtectedDecision]` and `DecisionRead<T>` /
|
|
121
|
-
`IDecisionReads` exist in that package set.
|
|
122
|
-
The scaffold pin alone does not protect a read. For a hand-authored `[ProtectedDecision]`,
|
|
123
|
-
use an admitted projection/key shape and enroll the read in the active unit of work.
|
|
124
|
-
For refused shapes choose option a/b (state on its owning stream or one identity per scarce
|
|
125
|
-
item), or agreed compensation c. Keep the rule **NOT enforced in the model today** with its
|
|
126
|
-
race consequence. Never infer protection from `.play` `reads` + `require` alone, weaken the rule to render,
|
|
127
|
-
or edit managed dependency files. A rendered scaffold pins its own Arc and Chronicle releases and does not move with newer ones.
|
|
98
|
+
record a compensating fact (`EnrollmentWaitlisted`); only when the business agrees.
|
|
99
|
+
|
|
100
|
+
**Default Arc realization:** Take a plain read-model parameter in `Handle()` under read protection `On` (the default in projects referencing `Cratis.Arc.Chronicle`). Use a validator constructor parameter if the check belongs in validation. Let Arc infer an unambiguous key; use `[LookUpBy(nameof(Property))]` when you need to select a specific command property. Chronicle folds the state from the event log and guards it through commit. If relevant facts change after the read, Arc reports a concurrency violation. A materialized or passive read without a guard does not protect the decision; plain parameters are unguarded under `Off` and `Measure`.
|
|
101
|
+
|
|
102
|
+
Supported shapes include a projection keyed directly by the event-source ID, a declared per-stream model bound to the command's route, and an unfiltered reducer with no constructor dependencies other than `ILogger<T>` (self-reducing models are exempt from that constructor restriction). For per-stream models, every writer must use the declared route.
|
|
103
|
+
|
|
104
|
+
**Choose an explicit decision read only when** supported parameters can't express an otherwise guardable key or stream ID. Take command-aware `IDecisionReads` or `DecisionRead<T>` in `Handle()`; justify the `ARCCHR0040` suppression and link to the tracking feature in code. Keep an existing advanced `[ProtectedDecision]` only where its individual opt-in is needed outside `On`. For a hand-authored Chronicle append outside Arc, pass the detached decision read as `guardedBy`, or enroll the read in the unit of work that commits the append.
|
|
105
|
+
|
|
106
|
+
A read with joins, children, nested sources or **event-property routing** (fan-in from many streams by a payload reference) cannot be made safe by changing how it is injected. A guard on the referenced source does not see appends on the contributing sources. For those shapes and other refusals, choose state on its owning stream (a), reservation by identity (b), or business-approved compensation (c). Record the rule as **NOT enforced in the model today** and state the race consequence (see [Chronicle boundaries](chronicle-boundaries.md)).
|
|
107
|
+
|
|
108
|
+
**Stage-rendered applications:** Keep the scaffold-managed dependencies and check that Stage admits the modeled read. Arc's support for a hand-authored read does not prove the renderer can lower the same shape. Never infer protection from `.play` `reads` + `require` alone or weaken the rule to render.
|
|
128
109
|
|
|
129
110
|
## 4. Concurrency scenarios
|
|
130
111
|
For each enforced or recorded rule write three short scenarios:
|
|
@@ -135,7 +116,7 @@ For each enforced or recorded rule write three short scenarios:
|
|
|
135
116
|
atomic index-and-append guarantee.
|
|
136
117
|
When a command's protected read changed and its uniqueness constraint is violated in the same
|
|
137
118
|
commit, the observable refusal is the constraint refusal, not the concurrency conflict: assert
|
|
138
|
-
the constraint's message in the `then` expectation.
|
|
119
|
+
the constraint's message in the `then` expectation. For a value claim, seed it on another source; for a once-only event, repeat the attempt on its own source. If a claim can be released, also assert it can be reclaimed. Keep required-absence and decide/commit conflict cases for protected reads.
|
|
139
120
|
- **retry** (same request and operation identity, after a lost reply) -> must not record a
|
|
140
121
|
second occurrence, without blocking a different legitimate operation. A once-only fact uses
|
|
141
122
|
`unique event`; a repeatable operation needs an operation identity and target-side
|
|
@@ -152,7 +133,7 @@ See "First append into a scope" in SKILL.md.
|
|
|
152
133
|
| Guarantee | Meaning | Screenplay evidence |
|
|
153
134
|
|---|---|---|
|
|
154
135
|
| once-only event occurrence | the fact exists at most once per source (or value) | `unique event` / `unique … on` + violation spec |
|
|
155
|
-
| idempotent command handling | repeating a request yields the same outcome to the caller | target
|
|
136
|
+
| idempotent command handling | repeating a request yields the same outcome to the caller | target behavior; the model shows a rejection, the target maps "already has the event" to success where intended |
|
|
156
137
|
| exactly-once external effect | the outside world sees the effect once (email, payment) | cannot be shown by the model |
|
|
157
138
|
|
|
158
139
|
## 6. Lost acknowledgements
|
|
@@ -164,7 +145,7 @@ The append may commit while the reply is lost. The caller retries. Decide per co
|
|
|
164
145
|
rejection the caller must see; never report it as success;
|
|
165
146
|
- **new identifier** -> duplicate unless a business-key constraint exists.
|
|
166
147
|
The model shows only the rejection; payload comparison and outcome replay are target
|
|
167
|
-
|
|
148
|
+
behavior. Write the answer in the slice `documentation`.
|
|
168
149
|
|
|
169
150
|
## 7. Ordering
|
|
170
151
|
- Within one source, facts are in append order. Across sources, do not assume an order
|
|
@@ -198,7 +179,7 @@ behaviour. Write the answer in the slice `documentation`.
|
|
|
198
179
|
|
|
199
180
|
## 10. Specification limits
|
|
200
181
|
- A spec can show a source re-claiming its own value, a `unique event` violation and a collision
|
|
201
|
-
between two different sources: `for` on `given` events
|
|
182
|
+
between two different sources: `for` on `given` events establishes a claim on one source
|
|
202
183
|
and attempts the same value on another (see [the worked example](streams-example.md)). It is
|
|
203
184
|
a sequential history, not a race proof. Count a specification result only from a reference
|
|
204
185
|
run or rendered tests; see [cratis-screenplay-specify-outcome](../../cratis-screenplay-specify-outcome/SKILL.md).
|
|
@@ -213,19 +194,9 @@ behaviour. Write the answer in the slice `documentation`.
|
|
|
213
194
|
|
|
214
195
|
## First append into a scope
|
|
215
196
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
needs it:
|
|
223
|
-
- enable the check, application-wide with `ConcurrencyOptions.CheckFirstAppendIntoAScope`
|
|
224
|
-
(default `false`) or per append with `ConcurrencyScopeBuilder.ExpectingNoMatchingEvent()`,
|
|
225
|
-
and handle the `ConcurrencyViolation` it can now raise; or
|
|
226
|
-
- use a unique event constraint, which the kernel enforces for every writer whether or not the
|
|
227
|
-
append declared a scope (the model's `unique event`).
|
|
228
|
-
Require target evidence that the check ran: a concurrent first-append scenario against a real
|
|
229
|
-
Chronicle, asserting one append wins, one is rejected, and `IAppendResult.ConcurrencyCheckPerformed`
|
|
230
|
-
is `true` (a skipped check and a passing one look identical otherwise; a current client against
|
|
231
|
-
an older kernel always reads `false`). Treat the default as unchecked until target evidence shows otherwise. Check the versions actually used: Stage pins the Arc and Chronicle releases and the CLI bundle follows the installed `cratis --version`. The APIs are available for gap-fill, not as automatically rendered enforcement.
|
|
197
|
+
Capture the scope's tail before reading the state used for the decision. For opening a new source or partition, use `ConcurrencyScopeBuilder.ExpectingNoMatchingEvent()` on that append, or a `unique event` constraint when the fact must be once-only for every writer.
|
|
198
|
+
|
|
199
|
+
- **Caller-supplied, narrowed scope:** an unavailable tail means no matching event may exist. An empty or wildcard-only scope does not check anything unless you explicitly request an empty-log expectation.
|
|
200
|
+
- **Strategy-issued scope:** the default optimistic strategy skips the first check. Choose `ConcurrencyOptions.CheckFirstAppendIntoAScope` when every scope resolved by that strategy must check the first append.
|
|
201
|
+
|
|
202
|
+
Prove the chosen protection against Chronicle with concurrent first appends: one commits and the other is rejected. For a concurrency scope, require `IAppendResult.ConcurrencyCheckPerformed`; an unchecked append may also succeed. These choices do not follow automatically from a rendered model.
|
|
@@ -2,21 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
A complete design-mode model showing the three evolution routes from `evolution.md`: a new
|
|
4
4
|
generation (compatible change), an identity-aware rename that keeps the authored stored-name
|
|
5
|
-
intent as an `id` pin, and a changed meaning that becomes a new event.
|
|
6
|
-
alone select ESM v4; the differing event pin selects v16.
|
|
5
|
+
intent as an `id` pin, and a changed meaning that becomes a new event.
|
|
7
6
|
Binding `storedName` does not prove rendered stored-history compatibility; verify that the chosen renderer preserves it.
|
|
8
7
|
See [event evolution](evolution.md) for the deployment boundary.
|
|
9
8
|
|
|
10
9
|
```screenplay
|
|
11
|
-
// cratis-screenplay-streams-and-consistency: event evolution, complete
|
|
10
|
+
// cratis-screenplay-streams-and-consistency: event evolution, complete model example.
|
|
12
11
|
// - MembershipRenewed: a compatible change (new property with a defined default for old facts),
|
|
13
12
|
// declared as generation 2 in full beside generation 1, in the same slice.
|
|
14
13
|
// - MembershipPaused: the persisted event formerly stored as "MembershipSuspended"; renamed
|
|
15
|
-
// through the identity-aware path, which carries the old storedName
|
|
14
|
+
// through the identity-aware path, which carries the old storedName.
|
|
16
15
|
// - MembershipEnded vs MembershipTerminatedForBreach: a change of meaning is a NEW event, not
|
|
17
16
|
// a generation.
|
|
18
17
|
// Screenplay does not express migrations/upcasters; the
|
|
19
|
-
// target must convert generation 1 facts and
|
|
18
|
+
// target must convert generation 1 facts and preserve the stored name.
|
|
20
19
|
|
|
21
20
|
concept MembershipId : Uuid
|
|
22
21
|
|
package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/evolution.md
CHANGED
|
@@ -41,7 +41,7 @@ compatibility scenarios below first; the identity owner then applies the change
|
|
|
41
41
|
| add a property with no sensible old value | the old fact lacks information | usually a **new event** for the new situation, or a separate fact recording the extra information | review with the expert |
|
|
42
42
|
| remove a property | yes, if no reader needs it | new generation without it; every reference fails with PLAY0273 until removed | contract evolution, check readers |
|
|
43
43
|
| change meaning (same name, different business fact) | **no** | **new event** with its own name; old event stays for history | identity: add, not rename |
|
|
44
|
-
| rename (same meaning) | yes | identity-aware rename by the identity owner; `id "OldName"` carries the old stored name
|
|
44
|
+
| rename (same meaning) | yes | identity-aware rename by the identity owner; `id "OldName"` carries the old stored name; the target must admit it explicitly | identity-affecting |
|
|
45
45
|
| split one event into two / merge two | depends | new events from now on; never rewrite history; projections read both old and new | identity-affecting |
|
|
46
46
|
| rename a constraint | n/a | starts an empty index: values claimed before are unprotected. Ask first | identity-affecting |
|
|
47
47
|
|
|
@@ -49,26 +49,23 @@ compatibility scenarios below first; the identity owner then applies the change
|
|
|
49
49
|
|
|
50
50
|
A rename that keeps the same business fact and must read old stored events pins
|
|
51
51
|
its old stored name: `event NewName` with `id "OldName"`. Screenplay
|
|
52
|
-
carries a differing pin as `storedName` on the current event contract
|
|
53
|
-
ESM v16. All generations share that effective stored name (pin, otherwise name);
|
|
52
|
+
carries a differing pin as `storedName` on the current event contract. All generations share that effective stored name (pin, otherwise name);
|
|
54
53
|
it does not replace or rehash the catalog's portable `EventContractId`.
|
|
55
54
|
|
|
56
55
|
Pins must be event-name identifiers: ASCII letter or underscore first, then word
|
|
57
56
|
characters, nonempty and without surrounding whitespace. Invalid pins, different
|
|
58
57
|
effective names across generations and duplicate stored names across the application
|
|
59
58
|
refuse binding with **PLAY0472**. An equal-name pin is a no-op: no `storedName`, no
|
|
60
|
-
|
|
61
|
-
retain earlier versions, bytes and revisions. MCP's
|
|
62
|
-
compatibility `eventPinWarnings` array is empty.
|
|
59
|
+
change to the executable model. Remove equal-name pins (PLAY0471).
|
|
63
60
|
|
|
64
|
-
Consumers must
|
|
61
|
+
Consumers must preserve `storedName` or refuse the model.
|
|
65
62
|
Check the rendered event type against the stored name. Do not promise storage compatibility or remove the pin to make rendering pass.
|
|
66
63
|
A passing reference specification is not a stored-history test: reference facts
|
|
67
|
-
still use contract/display names. If
|
|
64
|
+
still use contract/display names. If a previous deployment stored events under
|
|
68
65
|
the new name, switching the stored type needs a reviewed baseline correction or
|
|
69
66
|
data migration, not a silent re-render.
|
|
70
67
|
|
|
71
|
-
|
|
68
|
+
Sources and streams can also pin their stored names. Stream `All` remains reserved.
|
|
72
69
|
|
|
73
70
|
A test for "generation or new event": a new version must be convertible from the old one
|
|
74
71
|
without inventing facts. If it is not, it is a different event.
|
|
@@ -83,9 +80,7 @@ when those positions match storage. Never renumber or reuse a published member's
|
|
|
83
80
|
number. Removing a member still needs replay and mixed-reader compatibility decisions.
|
|
84
81
|
|
|
85
82
|
Numbered members may have sparse or negative unique int32 values, all or none per
|
|
86
|
-
enum.
|
|
87
|
-
Positional pins retain older executable bytes/version. A renderer that admits v12 renders
|
|
88
|
-
explicit member numbers; keep the pins.
|
|
83
|
+
enum. Keep the pins and check that the rendered enum preserves them.
|
|
89
84
|
Short-lived input/view-only enums may remain positional. Use opt-in
|
|
90
85
|
`--check enum-pinning` (PLAY0671) to find unnumbered enums used by event properties.
|
|
91
86
|
|
|
@@ -106,13 +101,13 @@ For each changed event, answer in the slice `documentation` or `STATE.md`:
|
|
|
106
101
|
writes the migration and test replay of old-generation facts; disposable greenfield data
|
|
107
102
|
needs none.
|
|
108
103
|
6. **Specifications**: `given` facts use the current shape only (a historical shape is
|
|
109
|
-
PLAY0449). Old-shape
|
|
104
|
+
PLAY0449). Old-shape behavior is checked in the target, not in `.play` specs.
|
|
110
105
|
|
|
111
106
|
## Identity rules
|
|
112
107
|
- Generations of one event live in one slice; a same-named event in another slice is a
|
|
113
108
|
different contract, not a generation (and ambiguous to the binder).
|
|
114
109
|
- Leave `id` absent on new events; a pin equal to the event's current name is information
|
|
115
|
-
PLAY0471
|
|
110
|
+
PLAY0471. Without a release baseline, renames pin by default;
|
|
116
111
|
"never persisted" requires storage evidence. With a baseline, an unadmitted event gets
|
|
117
112
|
no new pin; any admitted revision requires retaining its stored name and refuses
|
|
118
113
|
`eventNeverPersisted`. Inspect `eventRename.mutability` / `pinAdded` before apply.
|
|
@@ -121,7 +116,7 @@ For each changed event, answer in the slice `documentation` or `STATE.md`:
|
|
|
121
116
|
|
|
122
117
|
## Identity owner
|
|
123
118
|
The owning session, or an agent explicitly assigned the rename, applies identity changes with [cratis-screenplay-edit-workspace](../../cratis-screenplay-edit-workspace/SKILL.md). A subagent without MCP returns the catalog-changing request to the owner; never leave a requested change silently unapplied.
|
|
124
|
-
-
|
|
119
|
+
- Stage refuses evolved events and their dependent scope with `STAGE-ESM-026`; its runtime also refuses evolved events. Those events are gap-fill. Use the `cratis-chronicle-evolve-event` skill (in `cratis/chronicle`) for hand-written migrations.
|
|
125
120
|
|
|
126
121
|
Complete compiled example: `evolution-example.md` (generation, rename pin, meaning change).
|
|
127
122
|
|
|
@@ -132,13 +127,11 @@ An event property cannot declare `identifier` (PLAY0019). If PLAY0469 flags a du
|
|
|
132
127
|
- Generations are declared in full, numbered 1..N without gaps, in the same slice
|
|
133
128
|
(PLAY0446-0448). Referencing a removed property is PLAY0273; a `given` needing a previous-generation
|
|
134
129
|
shape is PLAY0449. An `id` pin equal to the event's current name is PLAY0471 (information).
|
|
135
|
-
Differing pins carry `storedName
|
|
130
|
+
Differing pins carry `storedName`;
|
|
136
131
|
equal-name pins are no-ops. Pins are event-name identifiers, shared by all
|
|
137
|
-
generations and unique application-wide (PLAY0472). Consumers must
|
|
138
|
-
a renderer that stops before v16 does not. See [stored event names](#stored-event-names).
|
|
132
|
+
generations and unique application-wide (PLAY0472). Consumers must preserve `storedName`. See [stored event names](#stored-event-names).
|
|
139
133
|
|
|
140
134
|
## Enum member numbers
|
|
141
135
|
|
|
142
136
|
Pin persisted/public enum member numbers before reordering or removing
|
|
143
|
-
members; never renumber or reuse a published number.
|
|
144
|
-
executable bytes; non-positional pins need ESM v12 consumer admission.
|
|
137
|
+
members; never renumber or reuse a published number. Verify the rendered numbers before deployment.
|
|
@@ -161,7 +161,7 @@ origins into one capture per origin (`PLAY0687`). Chronicle realizes one capture
|
|
|
161
161
|
then the same for `Billing`. `--name` is the application identity and becomes the
|
|
162
162
|
Chronicle event-store name and the MongoDB database name, so it must equal every
|
|
163
163
|
consumer's `from "…"` origin.
|
|
164
|
-
- Stage
|
|
164
|
+
- Stage renders bounded inbound source-event captures and outbound
|
|
165
165
|
public-event projections; unsupported foreign/public/Translate uses retain
|
|
166
166
|
STAGE-ESM-032/033/024. Use the `cratis-stage-render-slice` skill (in `cratis/stage`) to render admitted modules with `--scope` and identify refused scope. For a refused integration, gap-fill against the model using the `cratis-chronicle-publish-contract` skill (in `cratis/chronicle`).
|
|
167
167
|
A semantic Host's seeded foreign facts/local public appends are not proof of
|
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
|
|
4
4
|
# Read-model keys: one id, flat parts or a composite-typed key
|
|
5
5
|
|
|
6
|
-
Multiple `key` marks use ESM v27.
|
|
7
|
-
|
|
8
6
|
A read model's key says which instance a lookup or projection reaches. It is not a stream
|
|
9
7
|
identity and not an atomic decision point: choose it after the streams, and keep invariants
|
|
10
8
|
in constraints and commands.
|
|
@@ -13,9 +11,9 @@ in constraints and commands.
|
|
|
13
11
|
|
|
14
12
|
| Business shape | Key | Why |
|
|
15
13
|
| --- | --- | --- |
|
|
16
|
-
| The view is one entity's state | One natural `key` property (default) |
|
|
17
|
-
| Independent coordinates identify the view (resource and period, plant and field), read by filtering on some parts or by all parts | Several flat `key` properties
|
|
18
|
-
| One value object already identifies the entity everywhere (it is also a command or event value) | One `key` property whose type is a composite `type` |
|
|
14
|
+
| The view is one entity's state | One natural `key` property (default) | The event source usually supplies it. For a Stage-rendered protected read, name the key `id`. |
|
|
15
|
+
| Independent coordinates identify the view (resource and period, plant and field), read by filtering on some parts or by all parts | Several flat `key` properties | Each part keeps its name and type; a list narrows by any part with equality filters |
|
|
16
|
+
| One value object already identifies the entity everywhere (it is also a command or event value) | One `key` property whose type is a composite `type` | Projections use a typed `key TypeName` block |
|
|
19
17
|
|
|
20
18
|
A read model has exactly one of the two composite shapes: mixing flat parts with a
|
|
21
19
|
composite-typed key is PLAY0660, though one application may hold read models of both.
|