@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
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cratis-screenplay-author-extension
|
|
3
3
|
description: Use when a maintainer needs to create a reusable Screenplay extension package with an ability contract and backend. Not for consuming an existing provider in a translation slice (use cratis-screenplay-model-translation).
|
|
4
|
-
compatibility: Requires the Cratis CLI,
|
|
4
|
+
compatibility: Requires the Cratis CLI, Bash and the SDK for the selected backend.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Build and check a backend ability
|
|
8
8
|
|
|
9
|
-
Use a package when several applications need the same integration contract.
|
|
9
|
+
Use a package when several applications need the same integration contract. Package the greeting capability, not the business policy that decides when to greet. Choose `--kind package --component react` instead of `--backend csharp` when shipping only React components in npm.
|
|
10
10
|
|
|
11
11
|
1. From the parent of a new package directory, scaffold the C# backend (.NET 10 SDK for this template):
|
|
12
12
|
|
|
13
13
|
```sh
|
|
14
|
-
cratis extension new -n LibraryGreeting --
|
|
14
|
+
cratis extension new -n LibraryGreeting --backend csharp --no-prompts
|
|
15
15
|
cd LibraryGreeting
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
2. Read `contract.play` first. The
|
|
18
|
+
2. Read `contract.play` first. The scaffold declares `setting greeting public` and `ability Greet safe`, with `name String` input and a returned `message String`. Never put credentials in the public greeting setting. Stage rejects packages whose `requires stage` excludes the target, and the scaffold can declare such a range. Before building, follow [the Stage candidate procedure](references/stage-candidate.md) to correct the requirement for the test host without claiming untested compatibility.
|
|
19
19
|
3. Keep `src/backend-csharp/LibraryGreeting/Program.cs` and the contract in agreement. The sample registers `Greet` with `EffectClass.Safe`; `Greeter.Greet` takes the resolved greeting and JSON input. For `{"name":"Aster"}` and no setting it returns the message `Hello, Aster!`. A blank name yields `NotSent` because no effect occurred. Don't reuse that outcome for a side effect whose completion is unknown. Change the contract, registration, handler and specifications together when replacing this sample.
|
|
20
20
|
4. From the package root, run the generated specifications, build the backend and lay out the files exactly as they ship. Treat `backend/` and `dist/extension/` as build outputs: packaging replaces `dist/extension/`, so keep hand-edited files in source.
|
|
21
21
|
|
|
@@ -23,7 +23,10 @@ Use a package when several applications need the same integration contract. Keep
|
|
|
23
23
|
bash scripts/test.sh
|
|
24
24
|
bash scripts/build.sh
|
|
25
25
|
bash scripts/package.sh
|
|
26
|
-
cratis extension verify dist/extension -o json
|
|
27
26
|
```
|
|
28
27
|
|
|
29
|
-
|
|
28
|
+
The package should contain `contract.play` (with its manifest), declared assets and the backend assembly. For inspection without a running backend, choose `cratis extension verify dist/extension`; this is not readiness proof.
|
|
29
|
+
5. Start a dedicated test backend with `STAGE_EXTENSION_LISTEN=127.0.0.1:50051 dotnet dist/extension/backend/LibraryGreeting.dll`. Run `cratis extension verify dist/extension --strict --backend http://127.0.0.1:50051` and require all applicable checks to pass. `EXTV020` means the declared backend is missing: compare its path and filename with the packaged assembly. Never point verification at a backend attached to Stage: the `Describe` call replaces its host session. A skipped handshake (`EXTV070`) fails strict verification. Stop the test backend. The handshake does not invoke abilities or prove Stage package admission. Packaging and verification do not publish anything.
|
|
30
|
+
6. Use [the Stage candidate procedure](references/stage-candidate.md) to pin the rebuilt package in a test model and prove admission and invocation before using it.
|
|
31
|
+
|
|
32
|
+
When adding a released package to a model, [consume it from a reviewed lock](references/consume.md).
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# Consume an extension package
|
|
2
2
|
|
|
3
|
-
Declare the system
|
|
3
|
+
Declare the system using the approved package name. Omit the version selector to resolve the latest release when first locking it.
|
|
4
4
|
|
|
5
5
|
```play
|
|
6
6
|
system Payments
|
|
7
|
-
extension "cratis/stripe"
|
|
7
|
+
extension "cratis/stripe"
|
|
8
8
|
```
|
|
9
9
|
|
|
10
|
-
From the model workspace, run `cratis extension restore` to resolve a newly added reference and populate the digest-keyed cache. Review `screenplay.lock` (including the artifact digest and contract hash) and commit it with the reference. The compiler consumes the restored contract for that lock, not
|
|
10
|
+
From the model workspace, run `cratis extension restore` to resolve a newly added reference and populate the digest-keyed cache. Review `screenplay.lock` (including the artifact digest and contract hash) and commit it with the reference. The compiler consumes the restored contract for that lock, not a fresh release lookup; a resolved contract alone does not prove a compatible backend loaded.
|
|
11
11
|
|
|
12
12
|
Use `cratis extension restore --locked` in CI; it never writes the lock. To prepare for offline restore, run `cratis extension vendor ./vendor` on a trusted setup, then `cratis extension restore --locked --source ./vendor` on the offline setup. The vendor folder contains the pinned packages and signatures; the cache is the local restored store, not the reviewable lock.
|
|
13
13
|
|
package/package/corpus/skills/cratis-screenplay-author-extension/references/stage-candidate.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Adapt and prove a Stage package candidate
|
|
2
|
+
|
|
3
|
+
Use an isolated Stage Host with the same release and backend execution configuration as the intended deployment. A local folder check or a separately connected backend can diagnose problems, but neither tests admission and activation of the locked package.
|
|
4
|
+
|
|
5
|
+
1. If the scaffold's `requires stage` excludes that host, replace it in source `contract.play` with an exact requirement for the host release under test: `requires stage "<major.minor.patch>"`, substituting the actual release number. Treat this as a test candidate, not a compatibility claim. Build against the current `Cratis.Stage.Extensions` SDK and fix build or registration mismatches there; do not downgrade the host or remove the manifest check. Rerun the specifications, build, packaging, and strict handshake steps from the skill. Check the requirement in the packaged `contract.play`, not just the source.
|
|
6
|
+
2. Have the authorized publisher put that rebuilt candidate under a new extension release identifier in an approved test OCI registry and sign its digest. Use a test model whose `LibraryGreeting` system references that package. Run `cratis extension restore` for a new reference. If the reference is already locked, make sure any declared version range admits the candidate. Run `cratis extension update LibraryGreeting --dry-run`, review the contract changes and any incompatible uses, then run it without `--dry-run` only when the candidate is intended and the uses are compatible. Check that `screenplay.lock` names the rebuilt digest, contract hash, and expected publisher. Do not edit hashes by hand or disable trust checks to get it to load.
|
|
7
|
+
3. Start Stage Host on the test model with `Stage:Extensions:HostPort` enabled. For container execution, make a separate runnable ASP.NET Core runtime image from the same `dist/extension/backend` output, with `dotnet LibraryGreeting.dll` as its entry point. Pin that image by digest in `Stage:Extensions:Execution:Containers:LibraryGreeting:Image` and give it a reachable private `Stage:Extensions:AdvertisedHostEndpoint` for host services. The scaffold's scratch OCI artifact is for distribution, not execution. If the deployment uses an approved shared runtime instead, configure `Stage:Extensions:Execution:Hosts:dotnet` and its sharing policy. Do not substitute a manually connected backend. Confirm package admission from the reviewed lock. If it reports `RequirementsNotMet`, compare the host release with the locked artifact's manifest.
|
|
8
|
+
4. In an in-process Stage Host integration test, call the host's real `IAbilityInvocations.Invoke` with `AbilityInvocation` for `LibraryGreeting` and `Greet`, input `{"name":"Aster"}`, and a `ScreenInteraction` origin with a fixed test address and a fresh causation ID. Do not expose this probe as an application endpoint. Leave `greeting` unset. Require admission and, with a timeout, find the record by the admitted identity through `IAbilityInvocations.List()`. Require `Settled`, outcome `returned`, output `message: "Hello, Aster!"`, and the reviewed `PackageDigest`. If the package is refused or invocation fails, keep the candidate out of use; don't widen `requires stage` based on the handshake.
|
|
@@ -1,192 +1,45 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cratis-screenplay-availability
|
|
3
|
-
description: Use when a Screenplay
|
|
3
|
+
description: Use when a Screenplay part is offered only to certain tenants, users or system callers, or when a gate or attached body needs request-scoped context. Not for deciding who is authorized to act (use cratis-screenplay-model-interaction).
|
|
4
4
|
license: MIT
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
#
|
|
7
|
+
# Model availability and request-scoped context
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
## Pick the right mechanism
|
|
12
|
-
|
|
13
|
-
| Question | Use |
|
|
14
|
-
| --- | --- |
|
|
15
|
-
| Is this part there at all for this tenant, user or system (a package, a rollout, an incident switch)? | `audience`, `availability`, `available` |
|
|
16
|
-
| May this caller do it, given who they are and what they can prove? | `policy` and `authorize`; use [cratis-screenplay-model-interaction](../cratis-screenplay-model-interaction/SKILL.md) |
|
|
17
|
-
| Is this input acceptable? | `rule` and validation on the command |
|
|
18
|
-
| Does a gate or code need a value that is not in the request (the vessel viewed, the project worked in)? | `provide` and `$context.<name>` |
|
|
19
|
-
| Which tenant-level commercial module is bought? | Box Office module entitlements; outside the model |
|
|
20
|
-
|
|
21
|
-
Availability is decided **before** `authorize`. A part that is not available is refused as
|
|
22
|
-
`NotAvailable`, which a client can tell apart from not allowed, so it can hide an entry or
|
|
23
|
-
explain the package. Do not model a package, rollout or kill switch as a policy, and do not
|
|
24
|
-
model a role check as an audience.
|
|
25
|
-
|
|
26
|
-
## The forms
|
|
9
|
+
Use `available for` where a package or rollout first changes what the application offers. Put the gate at the highest level where it applies to everything below it; membership is granted at runtime.
|
|
27
10
|
|
|
28
11
|
```screenplay excerpt
|
|
29
12
|
audience Plus
|
|
30
|
-
description "Customers on the Plus
|
|
31
|
-
|
|
32
|
-
audience Preview
|
|
33
|
-
description "Tenants taking part in the preview"
|
|
34
|
-
|
|
35
|
-
availability DataQuality
|
|
36
|
-
description "Sold with Plus, once the vessel has reported"
|
|
37
|
-
for Plus
|
|
38
|
-
when $context.vessel.hasReported == true
|
|
13
|
+
description "Customers on the Plus package"
|
|
39
14
|
|
|
40
15
|
module Fleet
|
|
41
|
-
feature
|
|
42
|
-
available
|
|
43
|
-
|
|
44
|
-
slice StateView QualityScores
|
|
45
|
-
available for Plus or Preview
|
|
16
|
+
feature Vessels
|
|
17
|
+
available for Plus
|
|
46
18
|
```
|
|
47
19
|
|
|
48
|
-
|
|
49
|
-
never says who is in it; membership is granted at runtime, so nothing ships as an accidental entitlement.
|
|
50
|
-
- `availability <Name>` is a reusable rule. Its `for`, `when` and `with` lines must all hold;
|
|
51
|
-
`with` builds on another availability. A `with` cycle is PLAY1137.
|
|
52
|
-
- `available for <audiences>`, `available when <condition>`, `available with <Availability>`.
|
|
53
|
-
`for` and `with` combine names with `and`, `or`, `not` and parentheses (see [`not`](#not-and-the-closing-pattern)). A `when` is one condition with its own
|
|
54
|
-
`and`/`or`. One line holds one form; to mix forms, name them in an `availability` and use `with`.
|
|
55
|
-
Several `available` lines on one construct all have to hold.
|
|
56
|
-
- A gate is allowed on a module, feature, slice, command, query, screen, and on a screen `action` or `data`
|
|
57
|
-
element (see [screen elements](#screen-elements)). Gates AND down the
|
|
58
|
-
path from module to construct. Gate at the highest level that is true for everything beneath it.
|
|
59
|
-
- The runtime context carries `$context.audiences`, the union of the tenant's, user's and
|
|
60
|
-
system caller's audiences. Withdrawing a grant removes it from its own level only.
|
|
61
|
-
|
|
62
|
-
## `not` and the closing pattern
|
|
63
|
-
|
|
64
|
-
`not` is an audience term: `available for Plus and not Incident` and `available for not Incident`, also on the
|
|
65
|
-
`for` line of an `availability` block. `not` binds tighter than `and`, then `or`, and applies to **one audience name**.
|
|
66
|
-
|
|
67
|
-
- It is three-valued. `not` of an unknown audience is unknown, so the part stays closed (**unknown never opens a gate**).
|
|
68
|
-
A part is closed for a *granted* audience: grant an `Incident` audience to close it, withdraw the grant to reopen it.
|
|
69
|
-
Do not list every other audience to simulate a negation.
|
|
70
|
-
- `PLAY1171` (error): `not` on a group (`not (Plus)`), on another `not`, on nothing, or on an availability in
|
|
71
|
-
`available with` (`with not Open`).
|
|
72
|
-
- `PLAY1139` skips any gate that contains `not`, as it skips `when`: it depends on grants the model cannot see.
|
|
73
|
-
- A negated audience is ESM v58 (`"negated": true` on the audience requirement). A model without `not` keeps its earlier version.
|
|
74
|
-
|
|
75
|
-
## Screen elements
|
|
76
|
-
|
|
77
|
-
An element bound to a command or a query is offered only when the part is available and the caller is authorized.
|
|
78
|
-
That is **derived**; write nothing for it. The path is suspension first, then the module, feature, slice and construct
|
|
79
|
-
gates, then `authorize`.
|
|
80
|
-
|
|
81
|
-
- `available for | when | with` is allowed under a screen `action` (plain, not guarded) and a screen `data` directive,
|
|
82
|
-
one form per line. Elements with nothing bound (section, table, summary, component) take no gate.
|
|
83
|
-
- **An element gate can only narrow.** It is added to the derived path. `PLAY1172` (warning) reports a gate that can be on
|
|
84
|
-
while the bound part is not; narrow or remove it.
|
|
85
|
-
- Availability of an element is asked with the data the screen shows (for example the one vessel), not only the tenant and user.
|
|
86
|
-
- An element gate is ESM v59 (`"available"` on a screen `data` entry and `action`, written only when present).
|
|
87
|
-
- The reference evaluator reports everything available unless `SemanticScreenAvailability.Evaluate` is given a
|
|
88
|
-
`SemanticAvailabilityState` (audiences and suspended parts). A result carries a `Cause`: `NotAuthorized`,
|
|
89
|
-
`NotAvailable` or `Suspended`. `when` conditions stay undecided there. Specifications still run with everything available.
|
|
20
|
+
Keep authorization separate: `policy` and `authorize` decide who may act; a command rule validates input. Availability is checked before authorization. A closed offer is `NotAvailable`, not an authorization denial. Never put role checks into availability or package checks into authorization. See [model interaction](../cratis-screenplay-model-interaction/SKILL.md) for policies.
|
|
90
21
|
|
|
91
|
-
##
|
|
22
|
+
## Choose a gate
|
|
92
23
|
|
|
93
|
-
|
|
94
|
-
|
|
24
|
+
- For an offer, use `available for Plus`. Combine audience names with `and`, `or` and parentheses. To close an offer only for callers with a granted audience, use `available for Plus and not Incident`; `not` applies to a single audience name and binds before `and` and `or`. Unknown never opens a gate, even under `not`.
|
|
25
|
+
- When the offer depends on a request value, use `available when $context.region == "Nordics"`. A condition has its own `and` and `or`.
|
|
26
|
+
- To reuse gates, put `for`, `when` and `with` lines under an `availability <Name>` and use `available with <Name>`. The lines all have to hold. `with` can combine named availabilities with `and`, `or` and parentheses; do not negate one or introduce a cycle.
|
|
95
27
|
|
|
96
|
-
|
|
97
|
-
- It is checked **first**, before gates (so before audiences and context values resolve) and before `authorize`.
|
|
98
|
-
A suspension at any level wins over every grant (deny wins); suspending a module or feature suspends what is beneath it.
|
|
99
|
-
- Levels are tenant, user and system; the newest decision per level and path wins, so a later resume ends an earlier
|
|
100
|
-
suspension at the same level only.
|
|
101
|
-
- **Two pairs of verbs, kept apart:** audiences are **granted and withdrawn**; parts are **suspended and resumed**.
|
|
102
|
-
The events are `PartSuspended` and `PartResumed`. Never name one `TenantSuspended`; that belongs to another product.
|
|
28
|
+
Gates can live on modules, features, slices, commands, queries, and screens. Several `available` lines on a construct and all gates above it have to hold. A bound screen action or data element inherits the command or query's availability and authorization; write an element gate only to narrow it. For the supported elements, evaluation reasons, target limits and operator suspension, read [runtime ownership](references/runtime-ownership.md).
|
|
103
29
|
|
|
104
|
-
##
|
|
30
|
+
## Provide context at the level that knows its input
|
|
105
31
|
|
|
106
|
-
|
|
107
|
-
undecided result leaves the part unavailable. An undeclared audience or availability is a warning
|
|
108
|
-
(PLAY1135, PLAY1136), not an error, and the gate stays closed.
|
|
109
|
-
- **Failure is not denial.** A lookup that errors fails the request as a retryable error; it is never
|
|
110
|
-
reported as `NotAvailable`.
|
|
111
|
-
- **Specifications always run with everything available.** They verify behavior, not entitlement. There is
|
|
112
|
-
no `given availability` form; do not invent one, and do not write a specification to prove a gate.
|
|
113
|
-
- **Events and observers are unaffected.** A reaction that produces into an unavailable slice is fine and
|
|
114
|
-
projections keep running, so switching a part on needs no replay. A reaction is never gated and runs with
|
|
115
|
-
the tenant's and system's audiences, never a user's.
|
|
116
|
-
- **Persona `audience` lines are authoring only.** `audience Plus` under a `persona` tells the board, Studio
|
|
117
|
-
and docs which audiences the persona is in. It changes nothing at runtime and is not in the executable model.
|
|
118
|
-
- **Suspension is not a gate.** It is runtime state, never in the model and never in a specification.
|
|
119
|
-
- **Cross-slice warning (PLAY1139).** A screen action, form or reaction that `invokes` a command whose audiences
|
|
120
|
-
can be off while the invoker's are on can be refused as not available. Align the audiences, or accept and say
|
|
121
|
-
why. `when` conditions are opaque and skipped, never guessed.
|
|
122
|
-
|
|
123
|
-
## Three things called audience
|
|
124
|
-
|
|
125
|
-
| Name | Is |
|
|
126
|
-
| --- | --- |
|
|
127
|
-
| Screenplay `audience` | Who a part of the application is available to; membership granted at runtime |
|
|
128
|
-
| Chronicle routing audience | An event-routing label in event options; never an event field of the model |
|
|
129
|
-
| Token `aud` claim | Who a token is for; read as `$context.identity.claims.aud` |
|
|
130
|
-
|
|
131
|
-
They are unrelated. Never use `aud` to decide availability by name-matching an audience.
|
|
132
|
-
A gate needing both an audience and a Box Office entitlement reads a host value
|
|
133
|
-
(`provide entitlements from host`) in `available when`.
|
|
134
|
-
|
|
135
|
-
## Provided context values
|
|
136
|
-
|
|
137
|
-
`provide <name> <Type>[ optional] from <source>` adds `$context.<name>` for everything beneath the level it
|
|
138
|
-
is written at: application, module, feature (features nest) or slice.
|
|
32
|
+
Declare `provide <name> <Type> from <source>` at application, module, feature or slice level. Use a literal or expression, a value supplied by `host`, or a keyed snapshot query (not observable) returning the declared type. Put a request-keyed query source at the slice: `$context.command.<key>` is command input, `$context.arguments.<key>` is query input. Use the nearest scope that knows which input it has.
|
|
139
33
|
|
|
140
34
|
```screenplay excerpt
|
|
141
|
-
|
|
142
|
-
provide
|
|
143
|
-
|
|
144
|
-
feature DataQuality
|
|
145
|
-
slice StateView Vessels
|
|
146
|
-
provide vessel Vessel optional from query VesselByKey by $context.arguments.vesselId
|
|
35
|
+
slice StateView Vessels
|
|
36
|
+
provide vessel Vessel optional from query VesselByKey by $context.arguments.vesselId
|
|
147
37
|
```
|
|
148
38
|
|
|
149
|
-
-
|
|
150
|
-
result type equals the provided type), `host`, a literal, an expression over other `$context` values,
|
|
151
|
-
or a `file`/inline code body under the line (not both with `from`).
|
|
152
|
-
- **Levels:** the nearest declaration of a name wins and must keep the type (PLAY1125). The same name twice at one level
|
|
153
|
-
is PLAY1123. Resolved once per request, lazily.
|
|
154
|
-
- **Reserved names:** `tenant`, `identity`, `causedBy`, `causation`, `occurred`, `audiences`, `command`, `arguments`
|
|
155
|
-
cannot be provided (PLAY1124).
|
|
156
|
-
- **State the key per job at the slice.** A slice states `$context.command.<key>` for a command and
|
|
157
|
-
`$context.arguments.<key>` for a query. A feature-level provider cannot do both; override at the slice.
|
|
158
|
-
- **Required versus optional.** Without `optional` the value is required: when absent, the request is refused with a
|
|
159
|
-
clear reason. With `optional`, code sees `null` and a gate reading it denies.
|
|
160
|
-
- **Absence versus failure.** Absence (no key, no row, host did not supply) is unknown, not an error. Failure (store down,
|
|
161
|
-
body throws, timeout) fails the request as a retryable error, never a denial.
|
|
162
|
-
- Code reads `context.Values.<Name>` or `ValuesAs<T>()` on `CommandContext`, `QueryContext`, `RuleContext`,
|
|
163
|
-
`PolicyContext` and `ProvideContext`.
|
|
164
|
-
- `host`, inline code and `file` sources are opaque: the reference evaluator reports a gate that reads one as
|
|
165
|
-
unsupported, never allowed or denied. A `provide` from `file <path>` or an inline `csharp` block is admitted from ESM v57
|
|
166
|
-
as an opaque implementation attachment (role `ProvideValue`); older models refuse it with PLAY0268. The evaluator never
|
|
167
|
-
runs it and treats every gate as available, so specifications run unchanged but cannot assert allowed or denied outcomes
|
|
168
|
-
that depend on a code `provide`; the host decides at run time.
|
|
169
|
-
- **Identity stays out of rules by default.** `RuleContext` sees `CausedBy`, not `Identity`; roles and claims belong in a
|
|
170
|
-
`policy`. A `provide` derived from `$context.identity` makes that value readable in a rule, so write it
|
|
171
|
-
only deliberately and say why.
|
|
172
|
-
|
|
173
|
-
## A complete model
|
|
174
|
-
|
|
175
|
-
Read [complete example](references/complete-example.md) for a model that compiles with gates, an availability, a persona audience and a provided value.
|
|
176
|
-
|
|
177
|
-
## Who owns what
|
|
178
|
-
|
|
179
|
-
Read [runtime ownership](references/runtime-ownership.md) when a request asks where a gate is enforced, how
|
|
180
|
-
audiences are granted, how parts are suspended, or whether application code can check one. The engine lives in Arc (`Cratis.Arc.Availability`).
|
|
181
|
-
|
|
182
|
-
## Review checks
|
|
39
|
+
A nearer declaration can override the source, keeping the type. Built-in context names cannot be provided. Values resolve lazily, once per request. If a value is required, absence refuses the request; use `optional` when absence is expected. An optional absence is `null` in code and unknown to a gate; a lookup error fails the request, not the offer.
|
|
183
40
|
|
|
184
|
-
Read [
|
|
41
|
+
Read the [complete example](references/complete-example.md) when combining a shared availability with a provided value. See [runtime ownership](references/runtime-ownership.md) if a gate reads a host value, code or file, or if the renderer rejects it.
|
|
185
42
|
|
|
186
|
-
##
|
|
43
|
+
## Check the model and target separately
|
|
187
44
|
|
|
188
|
-
|
|
189
|
-
PLAY1130-1141 are `audience`, `availability` and `available` (shape, duplicates, undeclared, cycle, unprovided value,
|
|
190
|
-
cross-slice invocation, gate tokens and parentheses). PLAY1171 is a misplaced `not`; PLAY1172 is an element gate broader than the bound part.
|
|
191
|
-
Fix by changing the model: declare the audience, name the availability, provide the value or correct the key; never remove a
|
|
192
|
-
gate to silence a warning.
|
|
45
|
+
Compile the model root and resolve the findings described in [review checks](references/review-checks.md). Screenplay specifications run with everything available; they cannot prove a grant, refusal, or suspension. On the selected host, check the same operation with and without the audience, with an unresolved value and with a failed lookup when relevant. Check the server response as well as the UI. An operator suspension is runtime state; the model declares nothing for it. Projections and reactions keep running.
|
|
@@ -1,78 +1,54 @@
|
|
|
1
1
|
<!-- Copyright (c) Cratis. All rights reserved. -->
|
|
2
2
|
<!-- Licensed under the MIT license. See LICENSE file in the project root for full license information. -->
|
|
3
3
|
|
|
4
|
-
#
|
|
4
|
+
# Combine an availability with a provided value
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
`audience` line is authoring metadata. The `provide` at application level is read by the
|
|
8
|
-
availability's `when` and by the command's gate; the slice-level query reads
|
|
9
|
-
`$context.arguments`, which only a query has.
|
|
6
|
+
This feature is offered on Plus in the configured region. The module's literal provider supplies a value to both kinds of request without needing a command input or query argument. A persona's `audience` line helps readers understand the intended audience; it does not grant membership.
|
|
10
7
|
|
|
11
8
|
```screenplay
|
|
12
9
|
audience Plus
|
|
13
|
-
description "Customers on the Plus
|
|
14
|
-
|
|
15
|
-
audience Preview
|
|
16
|
-
description "Tenants taking part in the preview"
|
|
10
|
+
description "Customers on the Plus package"
|
|
17
11
|
|
|
18
12
|
availability DataQuality
|
|
19
|
-
description "
|
|
13
|
+
description "Vessel reporting on Plus in the Nordics"
|
|
20
14
|
for Plus
|
|
21
|
-
when $context.
|
|
22
|
-
|
|
23
|
-
availability Everything
|
|
24
|
-
description "Anything sold or being previewed"
|
|
25
|
-
for Plus or Preview
|
|
15
|
+
when $context.region == "Nordics"
|
|
26
16
|
|
|
27
17
|
persona FleetManager
|
|
28
18
|
audience Plus
|
|
29
19
|
|
|
30
|
-
provide vessel Vessel optional from query VesselByKey by $context.arguments.vesselId
|
|
31
|
-
|
|
32
20
|
module Fleet
|
|
33
|
-
|
|
21
|
+
provide region String from "Nordics"
|
|
34
22
|
|
|
35
|
-
feature
|
|
23
|
+
feature Vessels
|
|
36
24
|
available with DataQuality
|
|
37
25
|
|
|
38
|
-
slice StateChange
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
event VesselReported
|
|
42
|
-
note String
|
|
43
|
-
|
|
44
|
-
command ReportVessel
|
|
45
|
-
available when $context.vessel.hasReported == true
|
|
26
|
+
slice StateChange RegisterVessel
|
|
27
|
+
command RegisterVessel
|
|
46
28
|
vesselId Uuid identifier
|
|
47
|
-
|
|
48
|
-
produces
|
|
29
|
+
name String
|
|
30
|
+
produces VesselRegistered
|
|
49
31
|
for vesselId
|
|
50
|
-
|
|
32
|
+
name = name
|
|
51
33
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
34
|
+
event VesselRegistered
|
|
35
|
+
name String
|
|
36
|
+
|
|
37
|
+
screen RegisterScreen
|
|
38
|
+
action RegisterVessel for screen
|
|
55
39
|
|
|
56
40
|
slice StateView Vessels
|
|
57
41
|
query VesselByKey => Vessel optional
|
|
58
|
-
available for Plus
|
|
59
42
|
by vesselId Uuid
|
|
60
43
|
|
|
61
44
|
readmodel Vessel
|
|
62
|
-
vesselId Uuid
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
event VesselRegistered
|
|
66
|
-
vesselId Uuid
|
|
45
|
+
vesselId Uuid key
|
|
46
|
+
name String
|
|
67
47
|
|
|
68
48
|
projection Vessels => Vessel
|
|
69
|
-
from VesselRegistered
|
|
70
|
-
vesselId =
|
|
71
|
-
|
|
72
|
-
screen VesselScreen
|
|
73
|
-
available for Preview
|
|
49
|
+
from VesselRegistered
|
|
50
|
+
vesselId = $eventSourceId
|
|
51
|
+
name = name
|
|
74
52
|
```
|
|
75
53
|
|
|
76
|
-
|
|
77
|
-
`$context.arguments.vesselId` does not exist for a command, so state a slice-level override with
|
|
78
|
-
`$context.command.<key>` when a command needs the value.
|
|
54
|
+
When a condition needs a per-record value instead of a literal, source it from an independent keyed snapshot query at the consuming slice. Do not use the gated query itself to resolve the context it needs to evaluate its own gate. Use `$context.command.<key>` for a command and `$context.arguments.<key>` for a query.
|
|
@@ -9,19 +9,16 @@ with the construct address and the change to ask for; do not edit the model in a
|
|
|
9
9
|
## Gates
|
|
10
10
|
|
|
11
11
|
1. **A gate no persona can satisfy.** For each `available for` (through `with`, `and` and `or`), find a persona whose
|
|
12
|
-
authoring `audience` lines satisfy it. If none can, the
|
|
13
|
-
missing from personas, mistyped, or the gate is wrong. Personas are authoring only, so this is a model-quality
|
|
12
|
+
authoring `audience` lines satisfy it. If none can, check whether the model is missing persona membership, has a misspelling, or gating differs from the intended offer. Personas are authoring only, so this is a model-quality
|
|
14
13
|
check, not a runtime one.
|
|
15
|
-
2. **Unreferenced audiences.** An `audience` that no `available for`, `availability` `for` or persona names
|
|
14
|
+
2. **Unreferenced audiences.** An `audience` that no `available for`, `availability` `for` or persona names has no model consumer.
|
|
16
15
|
Ask whether it is a leftover or a missing gate.
|
|
17
|
-
3. **Undeclared names.** PLAY1135 and PLAY1136
|
|
18
|
-
is permanently closed. Treat as a defect, not noise.
|
|
16
|
+
3. **Undeclared names.** `PLAY1135` and `PLAY1136` warn about undeclared audiences and named availabilities. An unresolved branch cannot satisfy the condition on its own. Fix the declaration or its reference.
|
|
19
17
|
4. **Gate on the wrong level.** A gate repeated on every slice of a feature belongs on the feature. A gate that
|
|
20
|
-
hides something a sibling still `invokes` triggers the cross-slice warning (PLAY1139); check it is intended.
|
|
18
|
+
hides something a sibling still `invokes` triggers the cross-slice warning (PLAY1139); check it is intended. The static check skips `when` and gates containing `not`.
|
|
21
19
|
5. **Availability used as authorization, or the reverse.** A role, claim or ownership test in `available when`, or a
|
|
22
20
|
package or rollout in a `policy`, is in the wrong mechanism.
|
|
23
|
-
6. **Specifications.** None may depend on a gate; specifications always run with everything available.
|
|
24
|
-
specification written to prove a closed gate is invalid.
|
|
21
|
+
6. **Specifications.** None may depend on a gate; specifications always run with everything available. Use a host check to prove a gate stays closed.
|
|
25
22
|
7. **Audience name confusion.** No gate reads `$context.identity.claims.aud` as if it were an audience, and no event
|
|
26
23
|
carries Chronicle's routing audience as a field.
|
|
27
24
|
8. **Entitlements.** A package already enforced by Box Office modules is not also modeled as an audience unless
|
|
@@ -31,6 +28,8 @@ with the construct address and the change to ask for; do not edit the model in a
|
|
|
31
28
|
10. **Screen element gates.** A gate on a screen `action` or `data` only narrows the derived path of the bound part; PLAY1172 means it
|
|
32
29
|
is broader. Elements with nothing bound take no gate. Nothing models suspension (no audience, flag or command for it).
|
|
33
30
|
|
|
31
|
+
A cycle through `with` reports `PLAY1137`; break it rather than weakening a gate.
|
|
32
|
+
|
|
34
33
|
## Provided values
|
|
35
34
|
|
|
36
35
|
1. **A `provide` whose key cannot be resolved for a command.** `$context.arguments.<key>` is the query's input and
|
|
@@ -40,12 +39,12 @@ with the construct address and the change to ask for; do not edit the model in a
|
|
|
40
39
|
2. **A rule reading identity-derived values.** `RuleContext` has no `Identity`. A `provide` derived from
|
|
41
40
|
`$context.identity` or `$context.causedBy` that a rule reads smuggles roles or claims into validation. Ask for it
|
|
42
41
|
to move to a `policy`, or for the reason to be stated.
|
|
43
|
-
3. **Reserved or overriding names.** A
|
|
42
|
+
3. **Reserved or overriding names.** A duplicate at one level is `PLAY1123`; a type-changing override is `PLAY1125`. Built-ins `tenant`, `identity`, `causedBy`, `causation`, `occurred`, `audiences`, `command` and `arguments` are reserved (`PLAY1124`). Check that providers do not read each other in a cycle (`PLAY1129`).
|
|
44
43
|
4. **Source quality.** A `query` source must be keyed, snapshot and not observable; opaque `host`, code and `file`
|
|
45
44
|
sources mean the reference evaluator cannot decide a gate that reads them.
|
|
46
45
|
5. **Required versus optional.** Optional means "can be absent and the gate denies"; required means "absence refuses
|
|
47
46
|
the request". Check each value matches the intent for its readers.
|
|
48
|
-
6. **Executable claims.** A `file` or inline-code `provide`
|
|
47
|
+
6. **Executable claims.** A `file` or inline-code `provide` is an opaque attachment the reference evaluator never runs; do not claim a specification proved allowed or denied through it.
|
|
49
48
|
7. **Unprovided reads.** An `available when` reading a value nothing provides at that place (PLAY1138) stays closed.
|
|
50
49
|
|
|
51
50
|
## Verdict wording
|
package/package/corpus/skills/cratis-screenplay-availability/references/runtime-ownership.md
CHANGED
|
@@ -1,26 +1,29 @@
|
|
|
1
1
|
<!-- Copyright (c) Cratis. All rights reserved. -->
|
|
2
2
|
<!-- Licensed under the MIT license. See LICENSE file in the project root for full license information. -->
|
|
3
3
|
|
|
4
|
-
#
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
4
|
+
# Availability at runtime
|
|
5
|
+
|
|
6
|
+
## Server enforcement and runtime grants
|
|
7
|
+
|
|
8
|
+
Stage renders the model's gates and registers Showrunner GuestList as an audience source. Arc enforces the gates before authorization. For a handwritten Arc host, use `WithAvailability` and supply the real audience source. The engine is also available through `AddAvailability` outside ASP.NET. It resolves context values lazily, once per request; a lookup failure is an error, never a denial.
|
|
9
|
+
|
|
10
|
+
The caller's `$context.audiences` is the union of tenant, user and system grants. Grant or withdraw at the level that owns the decision; withdrawing one grant does not remove grants at other levels. A reaction runs with tenant and system audiences, never the user's. Its invoked command can still be refused. Persona `audience` lines are authoring metadata, not grants. Chronicle routing audiences and token `aud` claims are unrelated. Keep Box Office module entitlements separate; when a condition really needs an entitlement as input, provide a typed host value such as `provide entitlementActive Bool from host`.
|
|
11
|
+
|
|
12
|
+
## Screen elements
|
|
13
|
+
|
|
14
|
+
A screen route or element marker is a presentation check, not a security boundary. Keep the server-side availability and authorization on the command or query too. The rendered Stage application hides an unavailable element, can show a suspended placeholder, and can show an unauthorized action disabled with a reason. A bound element's own gate is checked with the screen's values and can only narrow the derived offer. Put it under a plain `action` or `data` directive; an element with nothing bound takes no gate. `PLAY1172` reports an element gate broader than the bound part. Stage refuses different gates on placements of the same artifact on one screen (`STAGE-ESM-079`).
|
|
15
|
+
|
|
16
|
+
The semantic screen report accepts `SemanticAvailabilityState` in `SemanticScreenAvailability.Evaluate` to consider supplied audiences and suspensions. It carries causes such as `NotAvailable`, `Suspended` and `NotAuthorized`; `when` conditions it cannot evaluate remain undecided. Without availability state, it does not decide availability gates. This is separate from model specifications, which run with every gate open.
|
|
17
|
+
|
|
18
|
+
Choose the rendered application to test screen gates: the live Stage Host publishes marker keys but does not register those gates end to end. Keep any screen-only gating out of the server security decision.
|
|
19
|
+
|
|
20
|
+
## Suspend or resume a part
|
|
21
|
+
|
|
22
|
+
An operator suspends or resumes a module, feature, slice or part for a tenant, user or the system. The events are `PartSuspended` and `PartResumed`. A suspension is checked before availability gates (and their provided values) and authorization. A parent suspension covers descendants; the latest decision at the same level and path wins, but a resume at one level cannot override a suspension at another. The server's `Suspended` reason is distinct from `NotAvailable`. Do not add an audience, flag or application command to model suspension.
|
|
23
|
+
|
|
24
|
+
## Provided values and target limits
|
|
25
|
+
|
|
26
|
+
- A `query` source has the form `query <Query> by <expression>, ...`; use a keyed snapshot query with the same result type. Check target limitations before relying on it. For Stage, use exactly one `$context` path for a primitive `Uuid` or `String` key. The render must include the slice declaring both the query and its read model. Stage rejects filters, composite keys, a performer, authorization or narrowing (`STAGE-ESM-075`). Choose an independently safe snapshot source; Stage rejects a protected query rather than bypassing its authorization. Arc gates the read model as a whole, so Stage refuses different gates on queries of the same read model (`STAGE-ESM-078`).
|
|
27
|
+
- When data must come from the host, supply the value behind `from host`. When it must come from code, attach `file <path>` or an inline code block instead of a `from` expression; the body receives `ProvideContext`. Stage verifies and compile-checks C# attachments. For a `from host` source in a rendered application, supply `IHostContextValues` from `Customizations/Program.cs`; the generated host starts with an empty provider. Host, file and inline sources are opaque to the reference evaluator: do not claim a model run proved their runtime decision.
|
|
28
|
+
- Attached command, query, rule, policy and provider bodies read `context.Values.<Name>` or `context.ValuesAs<T>()`. `ProvideContext.Values` holds the already-resolved dependencies that the provider reads. `RuleContext` has `CausedBy`, not `Identity`; do not route roles or claims through a provider to turn validation into authorization.
|
|
29
|
+
- Stage's gate renderer accepts comparisons against text, numbers and booleans, not comparisons between two context values (`STAGE-ESM-077`). Screenplay does not admit `contains` or `starts with` in availability conditions.
|
|
@@ -6,10 +6,7 @@ compatibility: Requires the Screenplay CLI.
|
|
|
6
6
|
|
|
7
7
|
# Declare the command, event and list in the model
|
|
8
8
|
|
|
9
|
-
Start with an [application workspace](../cratis-screenplay-onboard-workspace/SKILL.md) and an agreed command or query outcome. Choose the
|
|
10
|
-
|
|
11
|
-
- **State change** (`StateChange`): a command decides which facts to record.
|
|
12
|
-
- **State view** (`StateView`): a query presents a read model derived from facts.
|
|
9
|
+
Start with an [application workspace](../cratis-screenplay-onboard-workspace/SKILL.md) and an agreed command or query outcome. Use `StateChange` for a command that decides which facts to record. Choose `StateView` when the outcome is a query over a derived read model.
|
|
13
10
|
|
|
14
11
|
For system-initiated work, use [automation](../cratis-screenplay-model-automation/SKILL.md); for a crossing between vocabularies, use [translation](../cratis-screenplay-model-translation/SKILL.md).
|
|
15
12
|
|
|
@@ -18,8 +15,8 @@ Put `StateChange` and `StateView` slices under the intended `module` and `featur
|
|
|
18
15
|
Check how the model is loaded before adding a file. Folder input includes every `.play` below it, including scratch models. A root **file** includes only itself and files reached by quoted imports. A quoted pattern is relative to the importing file; placing the import inside a module or feature assigns its contents to that container. An unquoted import names an external contract, not a file. A slice visible in a folder compile but absent from the actual root-file build may simply be unreachable.
|
|
19
16
|
|
|
20
17
|
1. Declare `concept AuthorId : Uuid`. Mark the command's `id` with `identifier`.
|
|
21
|
-
2.
|
|
22
|
-
3. Give the read model a key. Default to the event source for a view of one history. Choose an explicit business key on each relevant `from` handler, using `from <Event> key <property>`, when the view uses a different key. Use a projection
|
|
18
|
+
2. For a separately declared event, map each needed value and use `for` to address the event to its owner. Choose `produces event <Name>` to declare a new event inline with typed mappings; in that form, the command’s `identifier` is the default destination.
|
|
19
|
+
3. Give the read model a key. Default to the event source for a view of one history. Choose an explicit business key on each relevant `from` handler, using `from <Event> key <property>`, when the view uses a different key. Use a projection to map facts to displayed fields. Choose a reducer only when computing the next state needs logic the projection cannot express.
|
|
23
20
|
4. Bind the list query to the collection. Run an example for a known ID and check the returned row.
|
|
24
21
|
|
|
25
22
|
## Example: register an author and list the name
|
|
@@ -64,9 +61,9 @@ module Library
|
|
|
64
61
|
|
|
65
62
|
From the Library directory run `screenplay model` to compile the folder. Expect `PLAY0533` for a command with no invocation yet; the [Add author screen](../cratis-screenplay-model-interaction/SKILL.md) supplies the registration action. Add the [registration and refusal examples](../cratis-screenplay-specify-outcome/SKILL.md), then run `screenplay test model --format json`.
|
|
66
63
|
|
|
67
|
-
##
|
|
64
|
+
## Remove a selected row when removal is an agreed outcome
|
|
68
65
|
|
|
69
|
-
|
|
66
|
+
Add this sibling slice under `feature Authors` after binding the Authors screen:
|
|
70
67
|
|
|
71
68
|
```play
|
|
72
69
|
slice StateChange RemoveAuthor
|
|
@@ -84,18 +81,13 @@ Under `projection AuthorProjection => Author`, add this clause at the same inden
|
|
|
84
81
|
remove with AuthorRemoved
|
|
85
82
|
```
|
|
86
83
|
|
|
87
|
-
Under `screen Authors`, add the action alongside `data` and `toolbar`.
|
|
84
|
+
Under `screen Authors`, add the action alongside `data` and `toolbar`. The selected row’s `id` binds to the compatible command input named `id`. `AuthorRemoved` uses that same event source to delete the row. Choose an explicit binding such as `with id from item.authorId` when the row uses a different field name and you need to identify the intended field.
|
|
88
85
|
|
|
89
86
|
```play
|
|
90
87
|
action RemoveAuthor for item
|
|
91
88
|
label "Remove author"
|
|
92
|
-
with id from item.id
|
|
93
89
|
```
|
|
94
90
|
|
|
95
|
-
## When it goes off the usual path
|
|
96
|
-
|
|
97
|
-
- **The source key differs from a payload ID:** use `$eventSourceId` if the row identifies that history. Use the payload ID only if it identifies the row by design. Don't duplicate the source ID in the payload just to display it.
|
|
98
|
-
|
|
99
91
|
For optional values write the type followed by `optional`. The `?` spelling diagnostic `PLAY0479` is informational, so a warnings-as-errors pass alone will not detect it. Do not bulk-rewrite `query Q => observable?`; there `observable` is the result type name, not a live-query marker.
|
|
100
92
|
|
|
101
93
|
Use `description` to record meaning. Put the reasoning behind a tradeoff in `documentation` on an eligible declaration such as the slice, command or read model, not on a query or individual reaction trigger. Neither text enforces a rule. A waiting view may consume a later slice's completion fact: board position describes the story, not runtime ownership or a ban on feedback.
|
package/package/corpus/skills/cratis-screenplay-declare-slice/references/projection-replay.md
CHANGED
|
@@ -22,9 +22,9 @@ A passing final snapshot alone can hide a spurious intermediate row. Assert the
|
|
|
22
22
|
For a dictionary on an application-code read model, put the dynamic key at the end of the target. For example, use `slot` on both events so the second fact removes the entry the first one wrote:
|
|
23
23
|
|
|
24
24
|
```play
|
|
25
|
-
from SlotAssigned
|
|
25
|
+
from SlotAssigned
|
|
26
26
|
slots.$eventContent.slot = series
|
|
27
|
-
from SlotDropped
|
|
27
|
+
from SlotDropped
|
|
28
28
|
remove slots.$eventContent.slot
|
|
29
29
|
```
|
|
30
30
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Start with two rows that would collide under the suspected key. For a monthly total, use two resources in the same month **and** the same resource in a different month. The answer should identify exactly one pair. Do not fix a collision by concatenating strings in the query.
|
|
4
4
|
|
|
5
|
-
1. Mark the identifying top-level read-model properties `key`. Explicit keys take precedence over inferred identity. Without them, single-instance query
|
|
5
|
+
1. Mark the identifying top-level read-model properties `key`. Explicit keys take precedence over inferred identity. Without them, an unambiguous single-instance query can supply the key; an eligible collection query can fall back to one conventional property ending in `Id`. A collection filter is not a reliable declaration of row identity. Use `$eventSourceId` if the row identifies that history; use a payload ID only if that is the row identity by design. Do not duplicate the source ID just to display it. Make the intent explicit if adding a query might change inference.
|
|
6
6
|
2. Several scalar keys form **one** identity with named parts. For `ResourceMonth`, compare both `resourceId` and `period`, not argument order. For an optional single result, declare every part in the query's `by` block as `name Type`; for a command read, map each as `name = source`. A list may filter on fewer parts because it need not identify one row.
|
|
7
7
|
3. Supply every key part in `given readmodel` and `then readmodel`. Require all parts on expected collection rows. Otherwise a passing comparison may answer a different question from the one the owner asked.
|
|
8
8
|
4. Match each event to the same instance in the projection. The `key` on the model describes the lookup; it does not route incoming facts. For several separate key properties, use an untyped key block with every named part on each root `from` and `remove with`. A typed composite property is a different shape.
|