@cratis/pi 8.4.1 → 8.6.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 +2 -1
- package/package/corpus/harnesses/copilot/instructions/exit-codes-and-wrappers.instructions.md +1 -1
- package/package/corpus/harnesses/copilot/instructions/glossary.instructions.md +5 -3
- package/package/corpus/harnesses/copilot/instructions/react.instructions.md +3 -1
- package/package/corpus/harnesses/copilot/instructions/reactors.instructions.md +3 -1
- package/package/corpus/harnesses/copilot/instructions/scripting.instructions.md +2 -1
- package/package/corpus/harnesses/copilot/instructions/specs.csharp.instructions.md +6 -3
- package/package/corpus/harnesses/copilot/instructions/vertical-slices.instructions.md +5 -2
- package/package/corpus/hooks/scripts/cratis-guard-secrets.sh +131 -9
- package/package/corpus/rules/ai-distribution.md +2 -1
- package/package/corpus/rules/exit-codes-and-wrappers.md +1 -1
- package/package/corpus/rules/glossary.md +5 -3
- package/package/corpus/rules/react.md +3 -1
- package/package/corpus/rules/reactors.md +3 -1
- package/package/corpus/rules/scripting.md +2 -1
- package/package/corpus/rules/specs.csharp.md +6 -3
- package/package/corpus/rules/vertical-slices.md +5 -2
- package/package/corpus/skills/cratis-application-growth/SKILL.md +1 -2
- package/package/corpus/skills/cratis-application-growth/references/csharp.md +1 -3
- package/package/corpus/skills/cratis-application-growth/references/move-and-untangle.md +1 -2
- package/package/corpus/skills/cratis-application-growth/references/rename-window.md +1 -3
- package/package/corpus/skills/cratis-application-growth/references/service-and-delivery.md +3 -2
- package/package/corpus/skills/cratis-application-growth/references/stages.md +2 -2
- package/package/corpus/skills/cratis-arc-authorize-request/SKILL.md +3 -3
- package/package/corpus/skills/cratis-arc-authorize-request/references/authproxy.md +47 -3
- package/package/corpus/skills/cratis-arc-authorize-request/references/csharp-query-security.md +18 -3
- package/package/corpus/skills/cratis-arc-authorize-request/references/csharp.md +12 -3
- package/package/corpus/skills/cratis-arc-authorize-request/references/typescript.md +2 -0
- package/package/corpus/skills/cratis-arc-connect-storage/references/csharp.md +1 -0
- package/package/corpus/skills/cratis-arc-connect-storage/references/elixir.md +9 -2
- package/package/corpus/skills/cratis-arc-declare-command/SKILL.md +2 -0
- package/package/corpus/skills/cratis-arc-declare-command/references/csharp-chronicle.md +47 -8
- package/package/corpus/skills/cratis-arc-declare-command/references/csharp-controller.md +3 -1
- package/package/corpus/skills/cratis-arc-declare-command/references/csharp-history.md +6 -3
- package/package/corpus/skills/cratis-arc-declare-command/references/csharp.md +38 -11
- package/package/corpus/skills/cratis-arc-declare-command/references/go.md +1 -1
- package/package/corpus/skills/cratis-arc-declare-operation/references/csharp-abilities.md +2 -2
- package/package/corpus/skills/cratis-arc-declare-operation/references/csharp-recovery.md +6 -4
- package/package/corpus/skills/cratis-arc-declare-operation/references/csharp.md +2 -2
- 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 +29 -7
- package/package/corpus/skills/cratis-arc-diagnose-live-query/references/java.md +1 -1
- package/package/corpus/skills/cratis-arc-diagnose-live-query/references/kotlin.md +1 -1
- package/package/corpus/skills/cratis-arc-expose-mcp-operation/references/csharp-diagnose-tool-call.md +9 -7
- package/package/corpus/skills/cratis-arc-expose-mcp-operation/references/csharp.md +52 -1
- package/package/corpus/skills/cratis-arc-expose-query/SKILL.md +4 -2
- package/package/corpus/skills/cratis-arc-expose-query/references/csharp.md +36 -10
- package/package/corpus/skills/cratis-arc-expose-query/references/go.md +2 -2
- package/package/corpus/skills/cratis-arc-expose-query/references/typescript.md +6 -3
- package/package/corpus/skills/cratis-arc-generate-proxies/SKILL.md +1 -0
- package/package/corpus/skills/cratis-arc-generate-proxies/references/csharp.md +55 -6
- package/package/corpus/skills/cratis-arc-generate-proxies/references/typescript.md +9 -0
- package/package/corpus/skills/cratis-arc-host-application/SKILL.md +1 -1
- package/package/corpus/skills/cratis-arc-host-application/references/csharp-configuration.md +54 -0
- package/package/corpus/skills/cratis-arc-host-application/references/csharp-deployment.md +98 -0
- package/package/corpus/skills/cratis-arc-host-application/references/csharp-http.md +9 -1
- package/package/corpus/skills/cratis-arc-host-application/references/csharp-identity.md +87 -4
- package/package/corpus/skills/cratis-arc-host-application/references/csharp.md +9 -0
- package/package/corpus/skills/cratis-arc-invoke-command/references/csharp-extensions.md +4 -0
- package/package/corpus/skills/cratis-arc-invoke-command/references/csharp.md +2 -1
- package/package/corpus/skills/cratis-arc-isolate-tenant/SKILL.md +19 -2
- package/package/corpus/skills/cratis-arc-isolate-tenant/references/csharp.md +4 -2
- package/package/corpus/skills/cratis-arc-page-query/references/csharp.md +2 -0
- package/package/corpus/skills/cratis-arc-react-bind-slice/SKILL.md +33 -36
- package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-commands.md +18 -3
- package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-host.md +94 -19
- package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-identity.md +29 -5
- package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-instant-feedback.md +81 -0
- package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-localization.md +80 -0
- package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-navigation.md +103 -0
- package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-queries.md +41 -2
- package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-structure.md +117 -0
- package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript.md +8 -4
- package/package/corpus/skills/cratis-arc-react-separate-view-model/SKILL.md +3 -3
- package/package/corpus/skills/cratis-arc-react-separate-view-model/references/typescript.md +27 -6
- package/package/corpus/skills/cratis-arc-testing-typescript/references/typescript.md +2 -2
- package/package/corpus/skills/cratis-arc-validate-command/references/csharp-rules.md +23 -2
- package/package/corpus/skills/cratis-arc-validate-command/references/csharp.md +28 -2
- package/package/corpus/skills/cratis-arc-validation-typescript/SKILL.md +1 -0
- package/package/corpus/skills/cratis-authproxy-configure/SKILL.md +136 -0
- package/package/corpus/skills/cratis-authproxy-configure/references/admission.md +125 -0
- package/package/corpus/skills/cratis-authproxy-configure/references/aspire.md +154 -0
- package/package/corpus/skills/cratis-authproxy-configure/references/operations.md +122 -0
- package/package/corpus/skills/cratis-authproxy-configure/references/services-and-routing.md +114 -0
- package/package/corpus/skills/cratis-authproxy-configure/references/sessions-and-logout.md +126 -0
- package/package/corpus/skills/cratis-authproxy-configure/references/sign-in-providers.md +116 -0
- package/package/corpus/skills/cratis-authproxy-configure/references/tenant-resolution.md +135 -0
- package/package/corpus/skills/cratis-choreography-run-workflow/SKILL.md +117 -0
- package/package/corpus/skills/cratis-choreography-run-workflow/references/csharp-chronicle.md +164 -0
- package/package/corpus/skills/cratis-choreography-run-workflow/references/csharp.md +354 -0
- package/package/corpus/skills/cratis-chronicle-cli-operations/SKILL.md +6 -6
- package/package/corpus/skills/cratis-chronicle-cli-operations/references/inspection.md +11 -3
- package/package/corpus/skills/cratis-chronicle-cli-operations/references/project-tooling.md +50 -0
- package/package/corpus/skills/cratis-chronicle-cli-operations/references/recovery-and-comparison.md +17 -3
- package/package/corpus/skills/cratis-chronicle-cli-operations/references/setup-and-target.md +8 -2
- package/package/corpus/skills/cratis-chronicle-connect-application/references/csharp-services.md +13 -2
- package/package/corpus/skills/cratis-chronicle-connect-application/references/csharp.md +12 -0
- package/package/corpus/skills/cratis-chronicle-connect-application/references/kotlin.md +2 -0
- package/package/corpus/skills/cratis-chronicle-connect-application/references/python.md +2 -2
- package/package/corpus/skills/cratis-chronicle-connect-application/references/typescript.md +10 -1
- package/package/corpus/skills/cratis-chronicle-constrain-append/SKILL.md +9 -2
- package/package/corpus/skills/cratis-chronicle-constrain-append/references/csharp.md +35 -3
- package/package/corpus/skills/cratis-chronicle-constrain-append/references/go.md +1 -1
- package/package/corpus/skills/cratis-chronicle-constrain-append/references/operations.md +70 -0
- package/package/corpus/skills/cratis-chronicle-deploy-kernel/SKILL.md +6 -3
- package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/configuration.md +113 -16
- package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/container-and-kubernetes.md +293 -0
- package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/kernel-options.md +16 -9
- package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/network-and-tls.md +60 -7
- package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/storage.md +124 -2
- package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/upgrade-and-recovery.md +36 -1
- package/package/corpus/skills/cratis-chronicle-evolve-event/SKILL.md +12 -0
- package/package/corpus/skills/cratis-chronicle-evolve-event/references/csharp.md +2 -2
- package/package/corpus/skills/cratis-chronicle-inspect-observer/SKILL.md +15 -5
- package/package/corpus/skills/cratis-chronicle-inspect-observer/references/csharp.md +9 -8
- package/package/corpus/skills/cratis-chronicle-inspect-observer/references/go.md +2 -2
- package/package/corpus/skills/cratis-chronicle-mcp-inspection/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-mcp-inspection/references/deployment.md +1 -1
- package/package/corpus/skills/cratis-chronicle-project-view/SKILL.md +2 -2
- package/package/corpus/skills/cratis-chronicle-project-view/references/csharp-fluent.md +15 -4
- package/package/corpus/skills/cratis-chronicle-project-view/references/csharp-model-bound.md +4 -1
- package/package/corpus/skills/cratis-chronicle-project-view/references/csharp-reading.md +5 -2
- package/package/corpus/skills/cratis-chronicle-project-view/references/csharp.md +23 -0
- package/package/corpus/skills/cratis-chronicle-project-view/references/elixir.md +1 -0
- package/package/corpus/skills/cratis-chronicle-project-view/references/go.md +2 -1
- package/package/corpus/skills/cratis-chronicle-project-view/references/java.md +3 -1
- package/package/corpus/skills/cratis-chronicle-project-view/references/kotlin.md +4 -3
- package/package/corpus/skills/cratis-chronicle-project-view/references/typescript.md +3 -1
- package/package/corpus/skills/cratis-chronicle-protect-decision/SKILL.md +3 -1
- package/package/corpus/skills/cratis-chronicle-protect-decision/references/csharp-scopes.md +41 -4
- package/package/corpus/skills/cratis-chronicle-protect-decision/references/csharp.md +22 -4
- package/package/corpus/skills/cratis-chronicle-protect-decision/references/elixir.md +7 -0
- package/package/corpus/skills/cratis-chronicle-protect-decision/references/go.md +9 -1
- package/package/corpus/skills/cratis-chronicle-protect-decision/references/java.md +8 -0
- package/package/corpus/skills/cratis-chronicle-protect-decision/references/kotlin.md +9 -0
- package/package/corpus/skills/cratis-chronicle-protect-decision/references/typescript.md +7 -0
- 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 +28 -3
- package/package/corpus/skills/cratis-chronicle-publish-contract/SKILL.md +7 -6
- package/package/corpus/skills/cratis-chronicle-publish-contract/references/csharp.md +41 -0
- package/package/corpus/skills/cratis-chronicle-publish-contract/references/elixir-integrations.md +3 -3
- package/package/corpus/skills/cratis-chronicle-publish-contract/references/webhook-signature-wire-format.md +82 -0
- package/package/corpus/skills/cratis-chronicle-react-to-fact/SKILL.md +19 -1
- package/package/corpus/skills/cratis-chronicle-react-to-fact/references/csharp-outputs.md +3 -1
- package/package/corpus/skills/cratis-chronicle-react-to-fact/references/csharp-pages.md +1 -1
- package/package/corpus/skills/cratis-chronicle-react-to-fact/references/csharp.md +37 -4
- package/package/corpus/skills/cratis-chronicle-react-to-fact/references/elixir.md +11 -0
- package/package/corpus/skills/cratis-chronicle-react-to-fact/references/java.md +2 -1
- package/package/corpus/skills/cratis-chronicle-react-to-fact/references/kotlin.md +1 -0
- package/package/corpus/skills/cratis-chronicle-record-event/SKILL.md +3 -3
- package/package/corpus/skills/cratis-chronicle-record-event/references/csharp-coordination.md +31 -2
- package/package/corpus/skills/cratis-chronicle-record-event/references/csharp-history.md +21 -4
- package/package/corpus/skills/cratis-chronicle-record-event/references/csharp.md +20 -2
- package/package/corpus/skills/cratis-chronicle-record-event/references/go.md +1 -1
- package/package/corpus/skills/cratis-chronicle-record-event/references/java.md +1 -1
- package/package/corpus/skills/cratis-chronicle-record-event/references/kotlin.md +3 -0
- package/package/corpus/skills/cratis-chronicle-reduce-state/SKILL.md +2 -1
- package/package/corpus/skills/cratis-chronicle-reduce-state/references/csharp.md +3 -1
- package/package/corpus/skills/cratis-chronicle-reduce-state/references/java.md +10 -1
- package/package/corpus/skills/cratis-chronicle-reduce-state/references/kotlin.md +10 -1
- package/package/corpus/skills/cratis-chronicle-reduce-state/references/typescript.md +27 -5
- package/package/corpus/skills/cratis-chronicle-select-client/SKILL.md +18 -0
- package/package/corpus/skills/cratis-chronicle-select-client/references/elixir.md +21 -1
- package/package/corpus/skills/cratis-chronicle-select-client/references/go.md +13 -0
- package/package/corpus/skills/cratis-chronicle-select-client/references/java.md +15 -0
- package/package/corpus/skills/cratis-chronicle-select-client/references/kotlin.md +15 -0
- package/package/corpus/skills/cratis-chronicle-select-client/references/typescript.md +16 -0
- package/package/corpus/skills/cratis-chronicle-web-workbench/SKILL.md +1 -1
- package/package/corpus/skills/cratis-ci-pipeline-performance/SKILL.md +4 -3
- package/package/corpus/skills/cratis-ci-pipeline-performance/references/publish-pipelines.md +19 -4
- package/package/corpus/skills/cratis-code-review/SKILL.md +6 -2
- package/package/corpus/skills/cratis-code-review/references/csharp-diagnostics.md +28 -2
- package/package/corpus/skills/cratis-code-review/references/csharp.md +4 -4
- package/package/corpus/skills/cratis-commits-and-pull-requests/SKILL.md +6 -38
- package/package/corpus/skills/cratis-commits-and-pull-requests/references/pr-description.md +2 -0
- package/package/corpus/skills/cratis-commits-and-pull-requests/references/pr-labels-and-release.md +5 -4
- package/package/corpus/skills/cratis-commits-and-pull-requests/references/workflow-inputs.md +39 -0
- package/package/corpus/skills/cratis-components-accessibility/SKILL.md +6 -8
- package/package/corpus/skills/cratis-components-accessibility/references/typescript.md +32 -14
- package/package/corpus/skills/cratis-components-build-canvas/SKILL.md +4 -3
- package/package/corpus/skills/cratis-components-build-canvas/references/typescript-props.md +1 -1
- package/package/corpus/skills/cratis-components-build-canvas/references/typescript.md +4 -2
- package/package/corpus/skills/cratis-components-choose-control/SKILL.md +13 -7
- package/package/corpus/skills/cratis-components-choose-control/references/from-primereact.md +116 -0
- package/package/corpus/skills/cratis-components-choose-control/references/menu.md +90 -0
- package/package/corpus/skills/cratis-components-choose-control/references/typescript-composition.md +48 -0
- package/package/corpus/skills/cratis-components-choose-control/references/typescript.md +2 -2
- package/package/corpus/skills/cratis-components-compose-toolbar/SKILL.md +2 -1
- package/package/corpus/skills/cratis-components-compose-toolbar/references/floating-toolbar.md +146 -0
- package/package/corpus/skills/cratis-components-diagnose-screen/SKILL.md +102 -0
- package/package/corpus/skills/cratis-components-display-list/SKILL.md +10 -10
- package/package/corpus/skills/cratis-components-display-list/references/typescript-custom-panel.md +74 -0
- package/package/corpus/skills/cratis-components-display-list/references/typescript-datatables.md +2 -7
- package/package/corpus/skills/cratis-components-display-list/references/typescript.md +3 -2
- package/package/corpus/skills/cratis-components-submit-form/SKILL.md +6 -6
- package/package/corpus/skills/cratis-components-submit-form/references/typescript-commanddialog.md +21 -1
- package/package/corpus/skills/cratis-components-submit-form/references/typescript-commandform.md +72 -2
- package/package/corpus/skills/cratis-components-submit-form/references/typescript.md +7 -5
- package/package/corpus/skills/cratis-components-theme-application/SKILL.md +17 -15
- package/package/corpus/skills/cratis-components-theme-application/references/localization.md +166 -0
- package/package/corpus/skills/cratis-components-theme-application/references/typescript.md +18 -14
- package/package/corpus/skills/cratis-components-theme-application/references/upgrade-from-previous-major.md +141 -0
- package/package/corpus/skills/cratis-engineering-csharp-conventions/SKILL.md +2 -0
- package/package/corpus/skills/cratis-engineering-csharp-conventions/references/csharp-domain-philosophy.md +31 -3
- package/package/corpus/skills/cratis-engineering-csharp-conventions/references/csharp-fundamentals-helpers.md +119 -0
- package/package/corpus/skills/cratis-engineering-csharp-conventions/references/csharp.md +4 -0
- package/package/corpus/skills/cratis-fundamentals-concept/references/csharp-serialization.md +72 -1
- package/package/corpus/skills/cratis-fundamentals-concept/references/csharp.md +9 -0
- package/package/corpus/skills/cratis-fundamentals-concept/references/go.md +2 -1
- package/package/corpus/skills/cratis-fundamentals-concept/references/java-json.md +3 -2
- package/package/corpus/skills/cratis-fundamentals-concept/references/kotlin-json.md +3 -2
- package/package/corpus/skills/cratis-fundamentals-concept/references/typescript-serialization.md +41 -2
- package/package/corpus/skills/cratis-fundamentals-name-value/SKILL.md +8 -7
- package/package/corpus/skills/cratis-fundamentals-name-value/references/csharp.md +2 -1
- package/package/corpus/skills/cratis-fundamentals-type-discovery/SKILL.md +3 -3
- package/package/corpus/skills/cratis-fundamentals-type-discovery/references/csharp-diagnostics.md +8 -0
- package/package/corpus/skills/cratis-fundamentals-type-discovery/references/csharp.md +2 -2
- package/package/corpus/skills/cratis-fundamentals-type-discovery/references/go-dependency-injection.md +3 -0
- package/package/corpus/skills/cratis-modeling-design-event-model/SKILL.md +6 -4
- package/package/corpus/skills/cratis-modeling-design-event-model/references/command-inventory.md +7 -1
- package/package/corpus/skills/cratis-modeling-design-event-model/references/model-first.md +13 -1
- package/package/corpus/skills/cratis-modeling-design-event-model/references/review-one-slice.md +6 -0
- package/package/corpus/skills/cratis-multi-service-local-orchestration/SKILL.md +6 -6
- package/package/corpus/skills/cratis-multi-service-local-orchestration/references/csharp-aspire.md +116 -28
- package/package/corpus/skills/cratis-multi-service-local-orchestration/references/docker-compose.md +2 -2
- package/package/corpus/skills/cratis-observability/references/chronicle-kernel-export.md +46 -0
- package/package/corpus/skills/cratis-orleans-jobs/SKILL.md +4 -2
- package/package/corpus/skills/cratis-platform-build-application/SKILL.md +8 -0
- package/package/corpus/skills/cratis-platform-build-application/references/cratis-identity.md +71 -0
- package/package/corpus/skills/cratis-platform-build-application/references/studio-repository.md +96 -0
- package/package/corpus/skills/cratis-platform-deliver-slice/SKILL.md +14 -8
- package/package/corpus/skills/cratis-platform-deliver-slice/references/csharp.md +167 -3
- package/package/corpus/skills/cratis-platform-deliver-slice/references/eventual-consistency.md +150 -0
- package/package/corpus/skills/cratis-platform-deliver-slice/references/typescript.md +14 -1
- package/package/corpus/skills/cratis-platform-diagnose-slice/SKILL.md +1 -1
- package/package/corpus/skills/cratis-platform-prepare-release-pr/SKILL.md +8 -8
- package/package/corpus/skills/cratis-platform-prepare-release-pr/references/product-release-checks.md +16 -2
- package/package/corpus/skills/cratis-platform-start-application/SKILL.md +21 -0
- package/package/corpus/skills/cratis-platform-start-application/references/csharp.md +77 -3
- package/package/corpus/skills/cratis-platform-upgrade-application/SKILL.md +118 -0
- package/package/corpus/skills/cratis-platform-upgrade-application/references/csharp.md +117 -0
- package/package/corpus/skills/cratis-platform-upgrade-application/references/java.md +53 -0
- package/package/corpus/skills/cratis-platform-upgrade-application/references/kotlin.md +53 -0
- package/package/corpus/skills/cratis-platform-upgrade-application/references/typescript.md +71 -0
- package/package/corpus/skills/cratis-release-notes/SKILL.md +1 -1
- package/package/corpus/skills/cratis-release-notes/references/publish-repair.md +6 -3
- package/package/corpus/skills/cratis-screenplay-accept-model/references/csharp.md +34 -3
- package/package/corpus/skills/cratis-screenplay-accept-model/references/read-the-evidence.md +84 -3
- package/package/corpus/skills/cratis-screenplay-declare-slice/SKILL.md +7 -11
- package/package/corpus/skills/cratis-screenplay-declare-slice/references/commands.md +8 -4
- package/package/corpus/skills/cratis-screenplay-declare-slice/references/projections.md +2 -0
- package/package/corpus/skills/cratis-screenplay-declare-slice/references/structure-and-imports.md +29 -1
- package/package/corpus/skills/cratis-screenplay-edit-workspace/SKILL.md +2 -1
- package/package/corpus/skills/cratis-screenplay-edit-workspace/references/mcp-tools.md +1 -1
- package/package/corpus/skills/cratis-screenplay-handoff-slice/references/csharp.md +13 -1
- package/package/corpus/skills/cratis-screenplay-model-translation/SKILL.md +1 -1
- package/package/corpus/skills/cratis-screenplay-model-translation/references/boundary-diagnostics.md +1 -1
- package/package/corpus/skills/cratis-screenplay-onboard-workspace/SKILL.md +30 -51
- package/package/corpus/skills/cratis-screenplay-onboard-workspace/references/cli.md +19 -2
- package/package/corpus/skills/cratis-screenplay-onboard-workspace/references/smallest-model.md +87 -0
- package/package/corpus/skills/cratis-screenplay-onboard-workspace/references/studio.md +5 -0
- package/package/corpus/skills/cratis-screenplay-onboard-workspace/references/typescript.md +13 -0
- package/package/corpus/skills/cratis-screenplay-onboard-workspace/references/workspace-mcp.md +5 -0
- package/package/corpus/skills/cratis-screenplay-specify-outcome/SKILL.md +8 -12
- package/package/corpus/skills/cratis-screenplay-specify-outcome/references/running-mcp.md +12 -0
- package/package/corpus/skills/cratis-screenplay-specify-outcome/references/scenarios.md +2 -2
- package/package/corpus/skills/cratis-specifications-exercise-backend/SKILL.md +2 -0
- package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-colocated.md +101 -0
- package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-command-results.md +4 -2
- package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-decision-reads.md +1 -0
- package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-events.md +7 -0
- package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-integration.md +7 -4
- package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-reactors.md +18 -5
- package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-read-models.md +4 -2
- package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp.md +35 -2
- package/package/corpus/skills/cratis-specifications-exercise-backend/references/elixir.md +2 -0
- package/package/corpus/skills/cratis-specifications-exercise-backend/references/typescript.md +4 -2
- package/package/corpus/skills/cratis-specifications-isolate-behavior/SKILL.md +1 -1
- package/package/corpus/skills/cratis-specifications-isolate-behavior/references/csharp-running.md +10 -3
- package/package/corpus/skills/cratis-specifications-test-application-ui/references/typescript.md +22 -4
- package/package/corpus/skills/cratis-specifications-test-typescript-behavior/SKILL.md +2 -1
- package/package/corpus/skills/cratis-specifications-test-typescript-behavior/references/typescript.md +40 -0
- package/package/corpus/skills/cratis-stage-render-slice/SKILL.md +6 -0
- package/package/corpus/skills/cratis-stage-render-slice/references/semantic-conformance.md +64 -0
- package/package/profile-catalog.json +15 -0
- package/package.json +1 -1
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Upgrade `@cratis/*` packages in a frontend or a Node backend
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- Ranges and the lockfile
|
|
6
|
+
- Raise the packages
|
|
7
|
+
- Peer dependencies
|
|
8
|
+
- Crossing a Components major
|
|
9
|
+
- Node backend and Chronicle client
|
|
10
|
+
- Verify
|
|
11
|
+
|
|
12
|
+
Names and paths in examples are illustrative.
|
|
13
|
+
|
|
14
|
+
## Ranges and the lockfile
|
|
15
|
+
|
|
16
|
+
A scaffold writes caret ranges for every `@cratis/*` package. A caret range admits every later release of the same major, so an install without a lockfile can pick up a newer release than the one you tested, independently of the versions the backend is pinned to.
|
|
17
|
+
|
|
18
|
+
- Commit the lockfile. It is the pin.
|
|
19
|
+
- In CI and in image builds, install from the lockfile and fail when it does not match the manifest (`yarn install --immutable`, `pnpm install --frozen-lockfile`, `npm ci`).
|
|
20
|
+
- Raise versions only in a deliberate upgrade change that contains manifest and lockfile together.
|
|
21
|
+
|
|
22
|
+
## Raise the packages
|
|
23
|
+
|
|
24
|
+
Packages form groups that share one release number. Raise a whole group or none of it:
|
|
25
|
+
|
|
26
|
+
| Group | Packages |
|
|
27
|
+
| --- | --- |
|
|
28
|
+
| Arc frontend | `@cratis/arc`, `@cratis/arc.react`, `@cratis/arc.react.mvvm`, `@cratis/arc.vite`, `@cratis/eslint-plugin-arc` |
|
|
29
|
+
| Components | `@cratis/components`, every installed renderer adapter (`@cratis/components.primereact`, `@cratis/components.primereact10`, `@cratis/components.mui`, `@cratis/components.designsystemet`), `@cratis/components.conformance`, `@cratis/eslint-plugin-components` |
|
|
30
|
+
| Fundamentals | `@cratis/fundamentals`, `@cratis/eslint-config` |
|
|
31
|
+
| Arc for Node (backend) | `@cratis/platform`, `@cratis/arc.core`, the host adapter (`@cratis/arc.express`, `@cratis/arc.fastify`, `@cratis/arc.hono`), storage (`@cratis/arc.mongodb`, `@cratis/arc.drizzle`), `@cratis/arc.chronicle`, `@cratis/arc.testing`, `@cratis/arc.proxygenerator`, `@cratis/eslint-plugin-arc-core` |
|
|
32
|
+
|
|
33
|
+
The package name does not tell the group: the Arc frontend packages and the Arc for Node packages both start with `@cratis/arc`, yet they are two products with unrelated release numbers. Never align one with the other.
|
|
34
|
+
|
|
35
|
+
1. When Components crosses a major, do its pre-upgrade step first ("Crossing a Components major").
|
|
36
|
+
2. Raise the Arc frontend group. With a .NET backend, use the release of the backend's Arc packages: Arc publishes its NuGet packages and these npm packages under the same number, and the generated proxies are written by the backend's release.
|
|
37
|
+
3. Raise Fundamentals and Components, choosing releases whose peer ranges accept the Arc release (next section).
|
|
38
|
+
4. Install, and read every warning.
|
|
39
|
+
5. Run the backend's proxy generation. A .NET build generates only when the project sets a proxy output path and generation is not switched off; a Gradle build generates only when proxy generation is enabled and an output directory is configured; a Node backend runs its generation script explicitly.
|
|
40
|
+
6. When Components crossed a major, apply its changes for the new major ("Crossing a Components major"). Then type-check, lint and build the frontend.
|
|
41
|
+
7. Commit manifest and lockfile together.
|
|
42
|
+
|
|
43
|
+
## Peer dependencies
|
|
44
|
+
|
|
45
|
+
`@cratis/components` declares as peer dependencies the range of `@cratis/arc` and `@cratis/arc.react` it works with, a `@cratis/fundamentals` range, and the React major it requires. The Arc React package accepts a wider React range than Components does, so Components decides the React major. Each renderer adapter and the conformance package declare a peer on exactly the `@cratis/components` version they were released with: they move with it, to the same version, in the same change.
|
|
46
|
+
|
|
47
|
+
A peer warning at install means two groups are out of step; it is not noise. Read the `peerDependencies` of the Components version you install and select releases that every range accepts. The ranges have an upper bound as well: the newest Arc can be above what the Components release accepts, and then the fix is a newer Components or an older Arc, not a higher number everywhere. Never silence the warning with an override or a resolution: that hides an untested combination.
|
|
48
|
+
|
|
49
|
+
## Crossing a Components major
|
|
50
|
+
|
|
51
|
+
A Components major is not a version bump: imports, provider setup, styling selectors and some callbacks can change. Follow Components' migration guide, and use its migrator instead of editing every usage by hand. When the guide documents a direct path across more than one major, follow that path; do not adopt the major in between.
|
|
52
|
+
|
|
53
|
+
- The migrator is a separate command-line package. Launch it with the package manager's one-off runner, bounded to the version range the migration guide gives; never add it to the application's dependencies and never run `latest`.
|
|
54
|
+
- Each command is safe to run again. Resolve every diagnostic and every marker it leaves in the code before continuing.
|
|
55
|
+
- Some commands run before the package is raised and some after. Coming from the major directly before the target, the import migration runs first, on the old release: apply it, pass lint, type check, specs and build on the old release, and save that state (source, manifest and lockfile) before raising anything. The remaining commands produce source for the new major and run after the bump.
|
|
56
|
+
- The migrator refuses an installed version outside the majors it supports. On the direct path from an older major, no command runs on the old release: make the preparatory import changes by hand, and run every command, the import migration included, only after the new major is installed.
|
|
57
|
+
- After the bump, update the provider setup and the stylesheet imports and make the source changes the guide lists before expecting the frontend to build. A failing build between the bump and those changes is expected, not a defect.
|
|
58
|
+
|
|
59
|
+
Order, commands and what changes by hand: `cratis-components-theme-application`, `references/upgrade-from-previous-major.md`.
|
|
60
|
+
|
|
61
|
+
## Node backend and Chronicle client
|
|
62
|
+
|
|
63
|
+
- Raise the Arc for Node group as one release. `@cratis/platform` brings Arc for Node and the Chronicle client `@cratis/chronicle`; it requests the client as a caret range, so the lockfile decides which client release runs.
|
|
64
|
+
- `@cratis/chronicle` has its own version line: its number says nothing about the kernel it fits, and no table pairs client releases with kernels. Client and kernel compare contracts at connect, and an incompatible pair fails the connection. Test the locked client release against the kernel version each environment runs before deploying.
|
|
65
|
+
- Arc's upgrade notes describe the C# host. For a Node backend, establish the behaviour from `cratis-arc-host-application`, `references/typescript.md`; never copy a .NET setting.
|
|
66
|
+
|
|
67
|
+
## Verify
|
|
68
|
+
|
|
69
|
+
- A clean install from the lockfile produces no peer warning.
|
|
70
|
+
- Type check, lint and production build pass against freshly generated proxies.
|
|
71
|
+
- The application's smoke check passes in the browser: one command, and the screen that shows its result.
|
|
@@ -104,7 +104,7 @@ These are `cratis/release-action` inputs and outputs, not a promise that a repos
|
|
|
104
104
|
| `release-notes` input | Body and closure references for an explicit-version action release. Supply verified notes for the whole release range. In a PR-derived batch the descriptions supply the notes instead |
|
|
105
105
|
| `version` input | An explicit version overrides label selection; a prerelease suffix creates a GitHub prerelease. With no version, the action works from PRs. On dispatch with batching enabled, empty or `0.0.0` releases the pending batch; without batching the placeholder forces no release |
|
|
106
106
|
| `close-resolved-issues` input | Set to `false` to disable automatic closure; propose verified closures separately |
|
|
107
|
-
| `release-window` input | Positive minutes hold a batch from its oldest pending merge; use with a schedule and one concurrency group shared by all release triggers |
|
|
107
|
+
| `release-window` input | Positive minutes hold a batch from its oldest pending merge; use with a schedule and one concurrency group shared by all release triggers, keeping `queue: max` |
|
|
108
108
|
| `hotfix-labels` input | Bypass the window for the pending batch unless a major is pending. Only the hotfix's own merge run fails (`error`); later runs leave the range pending (`batched`) |
|
|
109
109
|
| `major-labels` input | Names labels that select a major bump; use for the repository's major-release intent |
|
|
110
110
|
| `minor-labels` input | Names labels that select a minor bump; use for the repository's minor-release intent |
|
|
@@ -42,12 +42,15 @@ Exit 0 means the tag contains the change: recover that version, not a new one. E
|
|
|
42
42
|
| Nothing published, action `reason` is `no-label` or `error` | Read the decision log even if the workflow is green. Check for missing or conflicting intent labels, a version decision failure, or a multi-PR batch with no collected change section. Correct the offending labels or notes. A push-triggered action can re-read PR metadata on rerun; a `pull_request` rerun replays the old event's metadata. Use an explicit-version dispatch only if the workflow supports it, with the verified notes for its full target range. If no safe trigger exists, propose recovery to the maintainer instead of improvising a release. |
|
|
43
43
|
| Release creation fails with a 403 because the target's workflow files differ from the default branch | Rerunning the old target does not fix workflow drift. If an authorized dispatch can target the current default branch, verify its commit, range, notes and gates first. For another 403, diagnose permissions or credentials instead. |
|
|
44
44
|
| The release step reports that a tag belongs to another commit | Verify the tag owner and whether the intended change already shipped. Do not move or delete the tag. If the version was calculated, retry only after confirming the decision will use the new base. A fixed-version rerun reuses the colliding version; choose a new version only if an unreleased range genuinely needs releasing. |
|
|
45
|
-
| Release exists but publishing failed | Inspect which artifacts are missing. A full rerun may report `already-released` and skip jobs gated on `should-publish`; some workflows deliberately recover the same tag. Retry failed jobs if they reuse the verified version, or use the workflow's same-tag recovery route. Confirm the artifact jobs ran and the artifacts exist. |
|
|
45
|
+
| Release exists but publishing failed | Inspect which artifacts are missing. A full rerun may report `already-released` and skip jobs gated on `should-publish`; some workflows deliberately recover the same tag. Retry failed jobs if they reuse the verified version, or use the workflow's same-tag recovery route. For Components, follow only the Components path below, whether packing or publication failed. Confirm the artifact jobs ran and the artifacts exist. |
|
|
46
|
+
| Merges landed close together; one release was tagged but its artifacts never published, or a merge's Publish run was cancelled before it started | Read the Publish `concurrency` block and how each run chooses what to release. With `cancel-in-progress: true`, a newer run in the same group cancels the release in flight, possibly after it tagged but before it finished publishing. Without `queue: max`, a newer run replaces the pending run in the same group. That loses a release only in a workflow that releases one merge per run. Some workflows aggregate on purpose: Studio keeps one pending slot, and its next successful release covers everything merged since the previous release. A compatibility hold or deferred checks can postpone that release, and its notes omit `no-release`, Dependabot and net-reverted pull requests, which still ship. There, keep the aggregation and confirm coverage with the ancestry check above against a later shipped tag, not by reading its notes. For a per-merge workflow, fix it: one group for every release trigger, `queue: max`, and `cancel-in-progress` omitted or `false` (GitHub rejects `true` with `queue: max`); see `cratis-ci-pipeline-performance` (in `cratis/engineering/core`). In either case, do not cut a new release for a change a later shipped release already contains. That later release does not repair an earlier tagged version whose artifacts never published: recover that version with the rows above. |
|
|
46
47
|
|
|
47
|
-
|
|
48
|
+
Paths that differ from a generic manual release:
|
|
48
49
|
|
|
49
50
|
- **Chronicle.Go:** Publish is push-only. On an indexing failure, rerun the failed jobs; the workflow can also recover `already-released` by selecting the same stable tag for that commit, verifying its target, and retrying module indexing. Verify the public Go proxy download before calling it recovered.
|
|
50
|
-
- **Components:**
|
|
51
|
+
- **Components:** If the release exists but packing or npm publication failed, use **Re-run failed jobs** on the original run. It reruns the failed job and the jobs that depend on it, at the original commit and version. When packing succeeded, do this while its release artifact is still available: the publish job reuses those tarballs and skips a version already on the registry with matching integrity. Do not re-run all jobs or dispatch: either can rebuild the tarballs. If integrity differs or the artifact has expired, stop and investigate; never repack to get past the check.
|
|
52
|
+
- **Components mainline dispatch:** On `main`, use dispatch to recover an automatic release that never created its release, such as the 403 case above. When packing already succeeded, re-run failed jobs instead, as above. It bypasses the release action and is accepted only from `main`. Supply an exact stable version (`major.minor.patch`, no `v` prefix or prerelease suffix) greater than the highest existing stable `vX.Y.Z` tag (prerelease tags do not count); the only exception is a same-commit retry of that latest tag. So an older major is refused, and so is an unused version below the highest stable tag, even if its own run never released. If a later release superseded the lost one, check what that release delivered before choosing a route; do not pick a new version just to recover. The placeholder `0.0.0` is a no-op. Start from the original merged pull request's verified notes, then reconcile them with the entire range at the commit the dispatch actually targets. The dispatch path verifies tag ownership and allows a same-commit retry of the latest tag without rewriting its release notes; that retry repacks, so it is never a fallback once packing succeeded. It never closes issues. Verify the npm jobs and published packages; follow up on any open issues separately.
|
|
53
|
+
- **Components 3:** Maintenance releases are normal dispatches, not recovery: dispatch the Publish workflow on `support/3.x` with a new exact 3.x version. It publishes under the `v3-lts` dist-tag and pushes a plain tag without creating a GitHub release, so there is no release body to write or repair.
|
|
51
54
|
|
|
52
55
|
An explicit-version release **through the action** uses `release-notes` for both the body and closure authorization. Pass the verified body, not the workflow's default filler, and verify any closures after publishing.
|
|
53
56
|
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
- Project the agent allowlist
|
|
10
10
|
- Check generated values against their rules
|
|
11
11
|
- Run one specification
|
|
12
|
+
- Honour the declared gate (edge case)
|
|
12
13
|
|
|
13
14
|
Use these in-process APIs only when a .NET tool or test must compute acceptance evidence itself. The Screenplay CLI remains the default; it runs the same comparison, baseline check and manifest export. Use `Cratis.Screenplay`; scoped validation also requires `Cratis.Screenplay.Mcp`. Names in the examples are illustrative.
|
|
14
15
|
|
|
@@ -63,12 +64,14 @@ return 0;
|
|
|
63
64
|
|
|
64
65
|
`ModelComparison.Compare(before, after)` (namespace `Cratis.Screenplay.Comparison`) returns the same `ModelDifference` that `screenplay diff --format json` prints. Build each side with `ComparedModel`:
|
|
65
66
|
|
|
66
|
-
- `ComparedModel.WithIdentities(workspace)` —
|
|
67
|
-
- `ComparedModel.WithoutIdentities(workspace)` —
|
|
67
|
+
- `ComparedModel.WithIdentities(workspace)` — declares the workspace's identity catalog authoritative for matching.
|
|
68
|
+
- `ComparedModel.WithoutIdentities(workspace)` — matches by address rather than semantic ID, without changing the workspace.
|
|
68
69
|
- `ComparedModel.FromSources(applicationName, sources)` — compile in-memory sources keyed by file path; always address matching.
|
|
69
70
|
- `ComparedModel.FromWorkspaceExport(json)` — a workspace export, with its identities.
|
|
70
71
|
|
|
71
|
-
Two
|
|
72
|
+
Identity matching applies only when both inputs declare persisted identities and belong to the same application. Two such inputs from different applications throw `IncompatibleModelIdentities`. If at least one input does not declare persisted identities, comparison matches by address, even across applications. A renamed or moved declaration is then not recognized as the same declaration: it usually reads as a removal plus an addition, and if another declaration now holds its old address, the two are compared as one. Under identity matching, a declaration that keeps the same semantic ID is recognized as the same declaration, so a rename or move is not reported as a removal plus an addition; a rename combined with a move to another document can still produce separate `DeclarationChangeKind.Renamed` and `DeclarationChangeKind.Moved` entries. Declarations without an assigned ID are compared only by exact kind and authoring address; groups that cannot be compared that way are reported as coverage gaps.
|
|
73
|
+
|
|
74
|
+
To compare an authored model with one generated from code, build the authored side with `WithIdentities` and the generated side with `WithoutIdentities` or `FromSources`. A generated workspace's automatically allocated catalog does not make its identities authoritative, so this comparison matches by address.
|
|
72
75
|
|
|
73
76
|
```csharp
|
|
74
77
|
using Cratis.Screenplay.Comparison;
|
|
@@ -120,3 +123,31 @@ Three neighbouring checks in `Cratis.Screenplay.Semantics` answer different ques
|
|
|
120
123
|
## Run one specification
|
|
121
124
|
|
|
122
125
|
`new SemanticSpecificationRunner().Run(compilation, specificationId)` (namespace `Cratis.Screenplay.Semantics.Execution`) runs one specification in the reference evaluator against a bound `SemanticCompilation` (a workspace's `Compilation.Value`) and returns `Passed`, `Execution` and `Failures`. It does not select, count or classify `unsupported` scenarios or plan issues; gate acceptance on `screenplay test --format json`.
|
|
126
|
+
|
|
127
|
+
## Honour the declared gate (edge case)
|
|
128
|
+
|
|
129
|
+
The default is the CLI: a host takes its source evidence from the unscoped text run of `screenplay <root>` and its exit code, and runs `screenplay <root> --format json` when it needs the resolved `gate`, the `refusal` and the source diagnostics as data. The JSON run leaves out the screen visual file check, so it does not replace the text run as source evidence. Neither run accepts the revision; the owner does. Use the gate API in `Cratis.Screenplay.Validation` only when a .NET host runs its own checks in process and must apply `screenplay.json` with the same root search and precedence as the CLIs. Never re-implement either.
|
|
130
|
+
|
|
131
|
+
```csharp
|
|
132
|
+
using Cratis.Screenplay.Validation;
|
|
133
|
+
|
|
134
|
+
var root = ValidationGateRoot.Resolve(target);
|
|
135
|
+
var read = noGateFile
|
|
136
|
+
? new ValidationGateReadResult(root, Path.Combine(root, "screenplay.json"), null, null)
|
|
137
|
+
: ScreenplayValidationGate.Read(root);
|
|
138
|
+
var resolution = ValidationGateResolver.Resolve(read, commandLine, noGateFile);
|
|
139
|
+
if (resolution.Failure is { } failure)
|
|
140
|
+
{
|
|
141
|
+
Console.Error.WriteLine($"{failure.Path}({failure.Line},{failure.Column}): {failure.Kind}: {failure.Reason}");
|
|
142
|
+
return invalidInput;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
var gate = resolution.Gate!;
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
- `ValidationGateRoot.Resolve(target)` takes a model folder or a file and returns the gate root; with no `screenplay.json` or `.screenplay/` to find, it returns the starting folder.
|
|
149
|
+
- `ScreenplayValidationGate.Read(root)` only reads. An absent file gives a null `Declaration` and a null `Failure`; a refused file gives a `Failure` whose `Kind` is `ValidationGateFailureKind.Invalid` or `Unreadable`. Treat a failure as invalid input with the host's own exit code, never as an absent file.
|
|
150
|
+
- `commandLine` is a `DeclaredValidationGate` holding only what the user passed explicitly: `Checks`, `WarningsAsErrors`, `Scope` and `OpenQuestions` are all nullable, and null means omitted. An omitted flag must stay null, not `false`, or it overrides a file's `warningsAsErrors: true`.
|
|
151
|
+
- Validate each check selection with `CompletenessChecks.TryParse` (namespace `Cratis.Screenplay.Completeness`) before resolving; an unrecognized selection makes `Resolve` throw `InvalidValidationGateSelection`.
|
|
152
|
+
- When bypassing the file, do not read it: build a `ValidationGateReadResult` with the root, the file path, a null declaration and a null failure, then resolve with `noGateFile: true`. That is how both CLIs ignore the file, including a refused one.
|
|
153
|
+
- The `EffectiveValidationGate` has `ModelRoot`, `GateFilePath`, and `Checks`, `WarningsAsErrors`, `Scope` and `OpenQuestions`, each with a `Value` and a `Source` (`CommandLine`, `File` or `Default`). `Checks.Value` holds expanded check names. The gate only states what to check: the host still runs the checks and decides the exit code.
|
package/package/corpus/skills/cratis-screenplay-accept-model/references/read-the-evidence.md
CHANGED
|
@@ -1,16 +1,97 @@
|
|
|
1
1
|
# Read the acceptance evidence
|
|
2
2
|
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- Declared gate
|
|
6
|
+
- Source gate report
|
|
7
|
+
- Specification report
|
|
8
|
+
- Diff
|
|
9
|
+
- Release baseline
|
|
10
|
+
- Target admission
|
|
11
|
+
|
|
3
12
|
How to read each report the default path produces. Each one proves only what it says.
|
|
4
13
|
|
|
5
14
|
## Declared gate
|
|
6
15
|
|
|
7
16
|
A `screenplay.json` at the model root declares the default gate for both CLIs:
|
|
8
17
|
|
|
18
|
+
```json
|
|
19
|
+
{
|
|
20
|
+
"validation": {
|
|
21
|
+
"checks": ["field-origins", "query-keys", "navigation"],
|
|
22
|
+
"warningsAsErrors": true,
|
|
23
|
+
"openQuestions": "fail"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
- A `$schema` member is optional and left out here; point it at the published Screenplay v1 gate schema (`screenplay-v1.schema.json`, linked from the Screenplay tool documentation) so editors validate the file while it is written. The tools apply the same strict shape whether or not it is present.
|
|
29
|
+
- Every `validation` member is optional. A missing file or member keeps the default: no opt-in completeness checks, warnings do not fail, no scope, open questions not evaluated. The checks that are on by default, such as `PLAY0533`, still run.
|
|
30
|
+
|
|
9
31
|
- `validation.checks` — completeness check names, codes or `all` (one item each; comma-separated items are invalid). `all` grows as the tool adds checks; an explicit list pins membership.
|
|
10
32
|
- `validation.warningsAsErrors` — `true` makes warnings fail. Omitting the flag on the command line does not turn it off.
|
|
11
33
|
- `validation.scope` — default reported scope.
|
|
12
34
|
- `validation.openQuestions` — `report` or `fail`.
|
|
13
|
-
- Precedence: each explicit option replaces only its own setting, and any `--check` replaces the file's list.
|
|
35
|
+
- Precedence: each explicit option replaces only its own setting, and any `--check` replaces the file's list.
|
|
36
|
+
- Refusal: malformed JSON, a duplicate member, an unknown member or check name, or a wrong type is an invalid file; a directory, symbolic link or unreadable file at that path is an unreadable one. Either refuses the run (`screenplay` exits `2`, `cratis screenplay validate` exits `1`), names the path, line and column, and is never treated as missing. `--no-gate-file` is the only bypass.
|
|
37
|
+
- People author this file; no tool writes it.
|
|
38
|
+
|
|
39
|
+
Which file applies: the gate root is the nearest folder, at or above the target folder (for a file target, its parent), that holds `screenplay.json` or a `.screenplay/` folder. The search includes the first folder that holds `.git` and never goes above it. If nothing matches, the starting folder is the root and the defaults apply. A model nested inside another model therefore keeps its own gate, and never inherits the outer one. Imports do not affect the search, and finding a gate does not change which files are compiled. `--print-gate` shows the root and file path that were chosen.
|
|
40
|
+
|
|
41
|
+
## Source gate report
|
|
42
|
+
|
|
43
|
+
The two CLIs resolve the same gate settings but do not always reach the same verdict, and they report differently. Read each with its own contract. The unscoped text run of `screenplay <root>` stays the default source evidence: the JSON forms below are for hosts that need structured output, not a replacement for it. Neither is acceptance; the owner decides.
|
|
44
|
+
|
|
45
|
+
### `screenplay <root> --format json`
|
|
46
|
+
|
|
47
|
+
Standard output holds exactly one JSON document:
|
|
48
|
+
|
|
49
|
+
- `gate` — the effective gate: `modelRoot`, `gateFilePath`, and `checks`, `warningsAsErrors`, `scope` and `openQuestions`, each with `value` and `source` (`commandLine`, `file` or `default`). `checks.value` lists the expanded check names, so `all` appears as its members. `gateFilePath` is where the file would be, also when none exists; `source` tells whether a file supplied a value.
|
|
50
|
+
- `diagnostics` — the reported diagnostics.
|
|
51
|
+
- `openQuestions` — the open-question outcome, `null` when open questions were not evaluated.
|
|
52
|
+
- `refusal` — `null` when the requested gate completed; set when it did not. A refused gate file gives `gate: null` and a refusal with `kind` (`invalid` or `unreadable`), `path`, `line`, `column` and `reason`. Any other refusal (invalid arguments, a missing path, an unknown scope, unreadable model notes) has only `kind` and `reason`.
|
|
53
|
+
- `exitCode` — the same value as the process exit code.
|
|
54
|
+
- `filesCompiled` — the number of documents compiled. `0` gives no source-validation evidence, even with `exitCode` `0`: either the folder holds no `.play` file, or the run was refused, possibly after compiling. Other parts of the gate, such as open questions, can still have been evaluated.
|
|
55
|
+
|
|
56
|
+
Branch on `exitCode` and `refusal` first. A refusal means the requested gate did not complete; it does not say whether compilation ran. An unknown scope is refused after compiling and its results are discarded (`diagnostics` empty, `filesCompiled` reported as `0`), while unreadable model notes give a refusal next to the completed source diagnostics. So with a refusal, never read `diagnostics`, empty or not, as the gate result. `--print-gate` always prints text and never this document, even with `--format json`.
|
|
57
|
+
|
|
58
|
+
This document is not interchangeable with the text run. The unscoped text run also checks the visual files that screens reference and reports them as diagnostics; the JSON run leaves that check out. A model can therefore pass `--format json` under `--warnaserror` while the unscoped text run fails. A scoped text run reports only the diagnostics selected for the scope, and that selection does not include the visual file findings. So take the source evidence from the unscoped text run, and use the JSON document to read the gate, the refusal and the source diagnostics. Neither run accepts the revision; that stays the owner's decision.
|
|
59
|
+
|
|
60
|
+
### `cratis screenplay validate <root> -o json`
|
|
61
|
+
|
|
62
|
+
Check the exit code first. Standard output holds a summary only in some runs: a plain source failure (exit `5` with no declared gate, checks, scope, open questions or target) writes to standard error only, and an input refused before validation starts (a refused `screenplay.json`, a missing path, an unknown scope) never writes one. Unreadable model notes are different: validation has already run, so the run can exit `1` and still write a summary with `valid` `false`. So tolerate empty standard output, and never read a summary without its exit code. When there is a summary, it reports counts, not the diagnostics themselves; the diagnostics stay on standard error. Optional summary members with no value are left out, not written as `null`. The `gate` object is the exception: `scope.value` and `openQuestions.value` are written as `null` when unset.
|
|
63
|
+
|
|
64
|
+
- `valid` — whether validation passed.
|
|
65
|
+
- `errors` and `warnings` — counts of the reported diagnostics.
|
|
66
|
+
- `checks` — the selected completeness check names.
|
|
67
|
+
- `completenessStatus` — `ran`, `skipped` or `not requested`, about the opt-in checks only. `not requested` means no opt-in check was selected; the checks that are on by default (such as `PLAY0533`) still run once the source compiles without errors. `skipped` means checks were selected but source errors stopped them from running; `completenessNote` then says why and is otherwise absent. A `skipped` run with no completeness findings proves nothing about completeness: fix the errors and run again.
|
|
68
|
+
- `gate` — the same effective gate object as above. With `--print-gate`, `-o json` prints only this object.
|
|
69
|
+
- `openQuestions` — the open-question outcome; absent when open questions were not evaluated.
|
|
70
|
+
|
|
71
|
+
With persisted identities (`.screenplay/identities.json`), a folder target is opened as that workspace: validation compiles the documents the workspace admits, `--executable` binds with its application and document identities, and identity state that cannot be opened refuses with exit `1`. A single `.play` file target is compiled and bound without the catalog beside it, so its source and binding result says nothing about the persisted identities. Open-question evaluation is the exception: when the gate selects a mode, it reads the model notes and can load the persisted identities even for a file target. Validate the model root.
|
|
72
|
+
|
|
73
|
+
### Exit codes of the two source gates
|
|
74
|
+
|
|
75
|
+
The two tools use different codes for the same condition. Never read one tool's exit code with the other tool's table.
|
|
76
|
+
|
|
77
|
+
| Condition | `screenplay` | `cratis screenplay validate` |
|
|
78
|
+
| --- | --- | --- |
|
|
79
|
+
| Clean | `0` | `0` |
|
|
80
|
+
| Errors, promoted warnings, or open questions in `fail` mode | `1` | `5` |
|
|
81
|
+
| With `--executable`: the model does not bind, or the target reports error diagnostics | not checked by this command | `5` |
|
|
82
|
+
| Unknown `--check` name | `2` | `5` |
|
|
83
|
+
| Unknown option | `2` | `5` |
|
|
84
|
+
| Invalid `--open-questions` value | `2` | `5` |
|
|
85
|
+
| Refused `screenplay.json` | `2` | `1` |
|
|
86
|
+
| Missing path, not a `.play` file, or unknown or ambiguous scope | `2` | `1` |
|
|
87
|
+
| Unreadable model notes while open questions are evaluated | `2` | `1`, or `5` when validation already failed |
|
|
88
|
+
| No `.play` file in the folder | text, no scope: `0` with a notice. `--format json`: `0` with `filesCompiled` `0` and no notice. Neither is evidence. A scope or an open-question mode can still refuse or fail the run | `1` |
|
|
89
|
+
| `--executable` when `screenplay.json` declares a `scope` | does not apply | `1` |
|
|
90
|
+
| `--executable` together with `--scope` on the command line | does not apply | `-1` (usage error; a POSIX shell shows `255`) |
|
|
91
|
+
| Option without its value | `2` | `-1` (usage error; a POSIX shell shows `255`) |
|
|
92
|
+
| Unexpected failure | not defined | `10` |
|
|
93
|
+
|
|
94
|
+
So `1` means "the model has defects" from `screenplay` and "the input was refused" from `cratis screenplay validate`. `--print-gate` exits `0` from both when the gate resolves, even if the model is broken.
|
|
14
95
|
|
|
15
96
|
## Specification report
|
|
16
97
|
|
|
@@ -25,9 +106,9 @@ A `screenplay.json` at the model root declares the default gate for both CLIs:
|
|
|
25
106
|
|
|
26
107
|
## Diff
|
|
27
108
|
|
|
28
|
-
`screenplay diff --format json` has `before` and `after` (path
|
|
109
|
+
`screenplay diff --format json` has `before` and `after` (`path`, `sourceRevision`, `persistedIdentities` — whether that input supplied a persisted identity catalog, not whether it was used for matching — and `modelRevision`, `null` when that side has no compiled model) and `difference`:
|
|
29
110
|
|
|
30
|
-
- `matching`: `identity` when both folders
|
|
111
|
+
- `matching`: `identity` when both inputs are folders holding persisted identities for the same application; a declaration that keeps its semantic ID is then recognized as the same declaration rather than a removal plus an addition, though a rename combined with a move to another document can still produce separate `renamed` and `moved` entries. `address` when either input lacks persisted identities, even if the other has them and even across applications; a `.play` file input never has them. A renamed or moved declaration is then not recognized as the same declaration: it usually reads as a removal plus an addition, and if another declaration now holds its old address, the two are compared as one. Two identity folders from different applications do not compare (exit `2`). Confirm continuity with the owner before calling a removal and addition a rename.
|
|
31
112
|
- `complete` and `hasSemanticChange`: `true` means a known change exists. `false` is possible only for a complete comparison. `null` means coverage is incomplete. Address matching is always incomplete, even for identical sources, so read the change lists instead of trusting the verdict.
|
|
32
113
|
- `beforeExecutable` and `afterExecutable`: whether each side binds. With address matching, if either side does not bind, both sides compare by authoring declaration keys only, without property-level matching, and `sections` reports the gap. Identity matching is not reduced this way.
|
|
33
114
|
- `declarations`: added, removed, renamed and moved declarations.
|
|
@@ -89,7 +89,7 @@ module Parking
|
|
|
89
89
|
- `identifier` names the event source; `for id` appends there. `generated` lets the system create it; `returns id` hands it back.
|
|
90
90
|
- `produces` maps every required event property; nothing is copied by name. A projection does copy same-named properties, so only `id` needs a line.
|
|
91
91
|
- The store holds one active permit per plate across event sources until revoked; a read-then-decide check would race.
|
|
92
|
-
- The list query is `observable` because read
|
|
92
|
+
- The list query is `observable` because the screen's own commands change it and the read model follows the append; a one-off lookup such as `PermitById` or a report stays a snapshot. After-write behavior: `cratis-platform-deliver-slice`, `references/eventual-consistency.md`.
|
|
93
93
|
|
|
94
94
|
## How it behaves at runtime
|
|
95
95
|
|
|
@@ -151,7 +151,7 @@ Read [commands](references/commands.md) when writing properties, reads, validati
|
|
|
151
151
|
- Rule operators: `not empty`, `min`, `max`, comparisons (`==`, `!=`, `>`, `>=`, `<`, `<=`), `length ==`, `decimals <=`, `all >`/`all >=`, text tests (`[not] contains`, `starts with`, `ends with`), `matches email|"<regex>"`; `rule <Name>` with a body for what only code can state (a bare one is authoring-only), or a `file` or fenced block under a command's `validate`. Types, clock operands and operator precedence: see commands.
|
|
152
152
|
- `authorize <policy expression>`: who may call; enclosing module and feature gates also apply.
|
|
153
153
|
- `produces <Event>` with `for <property>`, `tag <value>` and `<property> = <source>` lines: records a fact. Default.
|
|
154
|
-
- `produces when <condition>` with the
|
|
154
|
+
- `produces when <condition>` with the event name and its block beneath: only when the condition holds; each evaluated independently. The condition uses command properties, literals, enum members and clock operands, never read paths.
|
|
155
155
|
- `produces event <Name>` with `<name> <Type> = <source>`: single-producer inline event. Allows a rename-only `id`; extract for `generation` or `public`.
|
|
156
156
|
- `produces operation <Name>`: declared external work (automation).
|
|
157
157
|
- `returns <property>` or a `returns` block of `<name> = <source>`: the response.
|
|
@@ -184,7 +184,6 @@ Read [projections](references/projections.md) when building a view from events (
|
|
|
184
184
|
|
|
185
185
|
- `readmodel <Name>` with properties; `key` marks identity, several `key`s a composite key.
|
|
186
186
|
- `passive`: replayed for command decisions only, never stored or queried.
|
|
187
|
-
- `sink <Name>` on a read model or graph: stores it in that sink (exact declared spelling).
|
|
188
187
|
- `projection <Name> => <ReadModel>`: the default view builder.
|
|
189
188
|
- `from <Event>[, <Event>]` with mapping lines: creates or updates the selected instance.
|
|
190
189
|
- `key <expr>` on a `from`, or a `key` block of `<part> = <expr>`: select by payload value or composite key. `key literal "<text>"`: one summary instance for every event.
|
|
@@ -206,14 +205,10 @@ Read [projections](references/projections.md) when building a view from events (
|
|
|
206
205
|
Read [reducers, graphs and sinks](references/reducers-graphs-sinks.md) when a projection cannot express the view or the question is about paths.
|
|
207
206
|
|
|
208
207
|
- `reducer <Name> => <ReadModel>` with `on <Event>` rules, each with a body, and an optional `from <Source>[.<Stream>]` filter: code over previous state and event; keyed by event source id.
|
|
209
|
-
- `graph <Name
|
|
210
|
-
- `
|
|
211
|
-
- `
|
|
212
|
-
- `
|
|
213
|
-
- `detach` on node `remove with`: delete incident edges; otherwise they may dangle.
|
|
214
|
-
- `query … graph <Graph>`: path `match`, `optional match`, equality `where`, and mapped `return`.
|
|
215
|
-
- `collect` in a graph query `return`: child rows via one hop from a single root-node match; no optional match or nested collect.
|
|
216
|
-
- `sink <Name> for readmodels|graphs`: declare storage; select it with `sink <Name>` on a view or graph.
|
|
208
|
+
- `graph <Name>` with `node` types (one required scalar `key` each) and `edge <Name> source <Node> target <Node> [identified by <property>]`: a relationship view.
|
|
209
|
+
- `projection <Name> => graph <Graph>`: node handlers by `key`, edge handlers by `source`/`target`; add `detach` to node removal or edges dangle.
|
|
210
|
+
- `query … graph <Graph>`: `match`, `optional match`, equality `where`, mapped `return` and one-hop `collect`.
|
|
211
|
+
- `sink <Name> for readmodels|graphs`: declare storage; select it with `sink <Name>` (exact declared spelling) on a read model or graph.
|
|
217
212
|
|
|
218
213
|
### Queries
|
|
219
214
|
|
|
@@ -255,6 +250,7 @@ The rest of the language (reactions, systems, workflows, captures, screens, spec
|
|
|
255
250
|
- Events are past-tense facts with one purpose each.
|
|
256
251
|
- Mappings copy values; accumulate with `add`/`subtract` in the projection or compute in a `handler`.
|
|
257
252
|
- Rules and policies cannot refer to a `generated` property; it does not exist yet.
|
|
253
|
+
- Property names start with an ASCII `a`–`z` or `_`, after any `@` escape (`quantity Int`, `updatedAt DateTime`) in commands, events, types and read models. An uppercase-leading line is not a property and fails to compile (`PLAY0016` outside commands).
|
|
258
254
|
- A key on one `from` does not carry over to another; remove with the same key rule that created the row.
|
|
259
255
|
- One projection or reducer per read model (`PLAY0191`).
|
|
260
256
|
|
|
@@ -63,7 +63,7 @@ command IssuePermit
|
|
|
63
63
|
| `reads Account as source by sourceId` | Aliased read. Every read of the same view needs an alias once there are two. |
|
|
64
64
|
| `reads ResourceMonth as totals` followed by an indented `by` block of `part = source` lines | Composite key: every key part mapped once from a required scalar command property. |
|
|
65
65
|
|
|
66
|
-
Refer to the state as `<alias>.<property>` or, for an unaliased read, `<ReadModel>.<property>`, in `require` conditions and in production mappings.
|
|
66
|
+
Refer to the state as `<alias>.<property>` or, for an unaliased read, `<ReadModel>.<property>`, in `require` conditions and in production mappings. A `produces when` condition cannot use it; it tests only command properties, literals, enum members and clock operands.
|
|
67
67
|
|
|
68
68
|
Declare the application-root `command reads protected` preamble whenever a command decides from a read. With it, the decision is guarded against the view changing between the read and the append, a missing instance rejects with `<ReadModel> does not exist.`, and read paths may feed event mappings. Without it, a read-fed decision is authoring intent only and executable binding refuses it.
|
|
69
69
|
|
|
@@ -76,8 +76,8 @@ validate
|
|
|
76
76
|
plate not empty message "A plate is required"
|
|
77
77
|
fee >= 0 message "A fee cannot be negative"
|
|
78
78
|
kind != visitor severity warning message "Visitor permits need approval"
|
|
79
|
-
require
|
|
80
|
-
message "An extension
|
|
79
|
+
require fee >= Permit.fee
|
|
80
|
+
message "An extension cannot cost less than the current permit"
|
|
81
81
|
```
|
|
82
82
|
|
|
83
83
|
Property rule: `<property path> <operator> [severity <level>] [message "<text>" | message $strings.<key>]`.
|
|
@@ -114,7 +114,11 @@ One condition grammar serves `require`, `produces when`, policy `require` and re
|
|
|
114
114
|
|
|
115
115
|
- Comparisons: `==`, `!=`, `>`, `>=`, `<`, `<=`, `contains`, `starts with`.
|
|
116
116
|
- Combine with `and`, `or` and parentheses; `and` binds tighter than `or`.
|
|
117
|
-
- Operands:
|
|
117
|
+
- Operands: properties, literals, enum members and clock operands. A read path (`<alias>.<property>`) is admitted in two places only:
|
|
118
|
+
- A command `require` under `command reads protected`, on either side of a comparison of numbers, text, enum members or booleans, or of `==`/`!=` between required scalar Uuid values (two concepts must be the same concept; a bare `Uuid` matches any Uuid concept). A `Date` or `DateTime` read path is refused, also against a clock operand; compare dates through command properties.
|
|
119
|
+
- A policy `require` through the policy's own `reads`, on the left only, compared with a constant or an enum member. `$identity.id` is admitted only on the right of `==` or `!=`, against a required text property that is not an enum.
|
|
120
|
+
|
|
121
|
+
A read path in `produces when` or a reaction `where` does not bind. `$env.<Name>` is also accepted, but a condition that uses it is authoring intent only and is refused at executable binding.
|
|
118
122
|
|
|
119
123
|
| Clock operand | Type | Notes |
|
|
120
124
|
| --- | --- | --- |
|
|
@@ -65,6 +65,8 @@ Compiling does not report a read-model field that neither automatic mapping nor
|
|
|
65
65
|
- A key on one `from` does not carry over to another. Every handler for an event from a different source needs its own `key`.
|
|
66
66
|
- `from EventA key idA, EventB key idB, EventC` shares one mapping block between events that name the identity differently.
|
|
67
67
|
- The read model's `key` properties describe lookups. They do not route events; align each `from` key with them.
|
|
68
|
+
- A projection level uses each event type once. `from` (including comma-separated events), `remove with`, `remove via join` and `clear with` share one set, so a second reference to the same event is error PLAY0801, whether its key differs or matches. All joins at the level share a second, separate set, so an event may appear once in that first set and once in a join. The check compares event names exactly as written (case-sensitive); it does not resolve qualified names or generations. Each `children`, `nested` and variant block starts fresh, and separate projections are independent.
|
|
69
|
+
- Put all mappings for one event into its single `from` block at that projection level. Different events that change the same row may share one comma-separated `from` when their mappings match; otherwise give each its own `from`. A `from` routes its event to one row through its key, so a second `from` for the same event to reach another row is PLAY0801. A `join` updates every matching existing row, and `remove via join` removes matching children from every parent. Needing a second row does not make a second business fact. Emit a separate event only when a second domain fact actually occurs, produced by the command or reaction where it happens; never invent an event only to feed a read model, and a second key does not make a second fact.
|
|
68
70
|
|
|
69
71
|
For each event, write down its event source, its payload and the row it should change before writing the handler. Test two rows that would collide under the wrong key.
|
|
70
72
|
|
package/package/corpus/skills/cratis-screenplay-declare-slice/references/structure-and-imports.md
CHANGED
|
@@ -38,7 +38,7 @@ time zone "Europe/Oslo"
|
|
|
38
38
|
| `module <Name>` | Features, free screens, templates, forms, examples | Sets the first address segment. Accepts `description`, `documentation`, `purpose`, `provide`, `available`, `authorize`, `depends on`. |
|
|
39
39
|
| `feature <Name>` | Slices, nested features, free screens, examples | Features nest to any depth; each level adds an address segment. Same members as a module. |
|
|
40
40
|
| `slice <Type> <Name>` | The declarations of one unit of behavior | `<Type>` is `StateChange`, `StateView`, `Automation` or `Translate`. |
|
|
41
|
-
| `depends on <Module[.Feature]>` | — | Authoring metadata, one target per line. Naming itself, an ancestor or a
|
|
41
|
+
| `depends on <Module[.Feature]>` | — | Authoring metadata, one target per line. Naming itself, an ancestor, a descendant or a target that does not resolve warns (`PLAY0554`); a target that matches more than one container warns `PLAY0198`. See Declared dependencies below. |
|
|
42
42
|
| `shows event <Path>` / `shows readmodel <Path>` | — | Slice member. Draws a linked copy of another slice's event or read model on this slice of the board. Presentation only. |
|
|
43
43
|
|
|
44
44
|
Write slices in story order, one whole slice after another, never grouped by kind: the slice that records a fact comes before the slices that project it, react to it or read a view built from it. The compiler reads the model as a timeline (modules in order, a feature's own slices before its sub-features) and reports a consumer placed before its producer as `PLAY0516` (information). Move the slice, or keep the order when the story really runs that way and say why. `PLAY0517` marks a group whose members depend on each other, which no reordering fixes; check whether the group is one slice split in two.
|
|
@@ -47,6 +47,24 @@ An address is `Module.Feature[.SubFeature].Slice.Declaration`. Addresses, not fi
|
|
|
47
47
|
|
|
48
48
|
`concept`, `type`, `policy`, `audience`, `availability`, `purpose`, `persona`, `sink`, `eventsource`, `system`, `secret`, `trigger`, `statemachine`, `workflow`, `seed`, design and layout declarations belong to the application root, not to a slice. A `type` inside a slice is an unknown construct (`PLAY0029`).
|
|
49
49
|
|
|
50
|
+
### Declared dependencies
|
|
51
|
+
|
|
52
|
+
`depends on` is optional metadata that records intended coupling. It does not control execution or ordering, and it does not change the executable model, its revisions or its identities. It is still source text, so editing it changes the MCP source revision like any other edit.
|
|
53
|
+
|
|
54
|
+
- **Resolution.** A bare name searches the declaring container's siblings, then each ancestor's siblings, then root modules, and the nearest match wins: a nearer feature with the same name hides a module. A bare name never finds a feature inside another module. A dotted name matches any container whose address ends with it, so write enough segments to name one container: `<Module>.<Feature>`, and more nesting segments when that is still ambiguous (`PLAY0198`). A full address gets no priority over a longer address that ends with it: if `Billing.Invoices` is both a feature's full address and the end of `Sales.Billing.Invoices`, no dotted spelling names the shorter one alone; only a bare `Invoices` written in another feature of `Billing` reaches it. Otherwise rename a container.
|
|
55
|
+
- **Coverage.** The check runs only for a module or feature that declares at least one dependency. That container's own list must then cover every counted reference leaving it, including references from its descendant features:
|
|
56
|
+
- event triggers;
|
|
57
|
+
- read-model reads;
|
|
58
|
+
- events used by projections, reducers, unique constraints and concurrency event lists;
|
|
59
|
+
- commands invoked by reactions, screen actions and forms;
|
|
60
|
+
- queries a screen shows or a form populates from, and screens it navigates to.
|
|
61
|
+
|
|
62
|
+
Only references written inside slices are counted; forms declared directly on a module are not. References to events owned by an imported bounded context are never counted, whichever construct uses them.
|
|
63
|
+
|
|
64
|
+
The `shows event` and `shows readmodel` slice placements are presentation and are not counted. Neither are specifications. References into the container itself or an ancestor's own slices are ignored. A module target covers all its features. Uncovered references whose producer is unambiguous are grouped by producer module, and each group gives one `PLAY0552` at the container header; a reference whose producer is ambiguous stays provisional and does not warn.
|
|
65
|
+
- **Lists are independent.** A parent's list never satisfies a child's list, and a child's never satisfies the parent's. Complete the child's list, or remove it to stop the child's own check. That stops only the child's check: the parent is checked only if it declares its own dependencies (its check already counts the child's references), and every other container with a list is still checked.
|
|
66
|
+
- Removing every `depends on` line from a container stops its check, and also drops the record of intended coupling. Prefer correcting the list.
|
|
67
|
+
|
|
50
68
|
## Imports and how a model is loaded
|
|
51
69
|
|
|
52
70
|
- **Folder input** compiles every `.play` file below the folder, including scratch files.
|
|
@@ -122,6 +140,16 @@ metadata empty
|
|
|
122
140
|
|
|
123
141
|
A block whose first line is `item` is a list; otherwise it is an object. `none` is an empty list and `empty` is an object without members.
|
|
124
142
|
|
|
143
|
+
A header without an inline value must open an indented block or end in `none` or `empty`. A bare header with nothing under it is an error, not an empty value: `PLAY0291` where a structured value is expected, such as a member inside a block, and the surrounding construct's own error elsewhere (`PLAY0044` for a bare line under `produces`).
|
|
144
|
+
|
|
145
|
+
An empty list, an object without members and `null` are three different values; write the one the target type accepts.
|
|
146
|
+
|
|
147
|
+
| Line | Value |
|
|
148
|
+
| --- | --- |
|
|
149
|
+
| `tags none` | An empty list. |
|
|
150
|
+
| `metadata empty` | An object without members. |
|
|
151
|
+
| `note = null` | Explicitly assigns `null`; does not omit the member. |
|
|
152
|
+
|
|
125
153
|
## Seed data and named examples
|
|
126
154
|
|
|
127
155
|
`seed` at the application root lists starting facts grouped by event source. It is operational metadata, not behavior in the executable model. Stage replay-checks each group before appending anything, warns and omits the entire group on refusal, and skips a source that already has events.
|
|
@@ -84,7 +84,8 @@ Each proposal result has a one-paragraph `summary` for reporting. Check the deta
|
|
|
84
84
|
- `orphanedNotes` lists notes whose anchor disappears. A null value with unreadable notes means unknown, not none.
|
|
85
85
|
- `view: "semantic-diff"` shows model-level changes. Read `view: "release-baseline"` when event contracts change and `view: "notes"` for notes proposals.
|
|
86
86
|
- Tool reports: `property.generations`, `moveReport`, `eventRename.mutability` and `eventRename.pinAdded`.
|
|
87
|
-
- `run-specifications` with `proposalId` runs the candidate
|
|
87
|
+
- `run-specifications` with `proposalId` runs the specifications against the retained candidate. If the candidate does not bind, the tool result has `isError: true`, `outcome: "unbound"`, the candidate's `executableDiagnostics` and `executed: 0`.
|
|
88
|
+
- Optional: if `tools/list` includes `visualize-model`, call it with `proposalId` to show the candidate on the board.
|
|
88
89
|
|
|
89
90
|
A valid proposal can still change the wrong thing, so check every changed reference.
|
|
90
91
|
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
## Shared arguments and values
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
`tools/list` returns 47 tools, or 48 when it also includes `visualize-model`. That tool is listed only when both conditions hold: the server was built with the board, and the client advertises the MCP Apps extension (`io.modelcontextprotocol/ui`) in its `initialize` capabilities, including `text/html;profile=mcp-app` if it supplies `mimeTypes`. Otherwise `tools/list` omits it, and calling it returns JSON-RPC error `-32602` (`Unknown tool 'visualize-model'.`) instead of a tool result. Claude Code does not advertise the extension, and changing its server registration does not add it. Names, kinds and enumeration values are case-sensitive. Only `apply` and `recover-workspace` write; every other tool is read-only or keeps an in-memory proposal.
|
|
17
17
|
|
|
18
18
|
| Argument | Shape and values |
|
|
19
19
|
| --- | --- |
|
|
@@ -10,9 +10,10 @@
|
|
|
10
10
|
- Capability manifest
|
|
11
11
|
- Read ESM documents strictly
|
|
12
12
|
- Read newer minor versions while preserving unknowns
|
|
13
|
+
- Evaluate command date comparisons in your own host
|
|
13
14
|
- Direct Stage planning
|
|
14
15
|
|
|
15
|
-
Use
|
|
16
|
+
Use the in-process export APIs only when a .NET tool or test must build handoff artifacts itself; the `screenplay` CLI stays the default for export. The export APIs are in `Cratis.Screenplay`. Names in the examples are illustrative.
|
|
16
17
|
|
|
17
18
|
## Open the model
|
|
18
19
|
|
|
@@ -100,6 +101,17 @@ The whole document is refused for:
|
|
|
100
101
|
|
|
101
102
|
Breaches refuse; nothing is truncated to pass. Admission grants no trust, execution or rendering authority. Check the target's own admission separately, and report any degradation or refusal.
|
|
102
103
|
|
|
104
|
+
## Evaluate command date comparisons in your own host
|
|
105
|
+
|
|
106
|
+
When your host executes Screenplay commands itself, reuse the reference evaluator's date behaviour from `Cratis.Screenplay.Semantics`. Do not compare date text or copy the logic. These helpers have no clock. `SemanticConditionEvaluator.Evaluate` throws `InvalidSemanticContract` when it reaches a comparison that uses `today`, `now` or `date of` (`and` and `or` can short-circuit past one), and `SemanticDateComparisons.Check` cannot resolve a validation rule's clock operand. Execute any command that declares a `calendar`, or uses `today`, `now` or `date of` anywhere, with `SemanticEvaluator` (namespace `Cratis.Screenplay.Semantics.Execution`) instead. This includes a property-only `date of` reduction such as `date of occurred == dueDate`, and a branch that might be skipped.
|
|
107
|
+
|
|
108
|
+
1. Authorize the caller first, so an unauthorized caller never sees a property-specific error. Then, before command validation rules and conditions run, call `SemanticDateComparisons.CheckInputs(application, command, inputs)`. It checks participating `DateTime` properties in declaration order and returns `null` or an `Error` `SemanticValidationFailure` (namespace `Cratis.Screenplay.Semantics.Execution`) for the first property whose text value is not an accepted instant. It checks only the first supplied entry for each property, so a valid entry can hide an invalid duplicate; keep your duplicate-input validation. That covers a missing offset or `Z`, an invalid calendar value such as `2026-02-30T00:00Z`, and any other unaccepted spelling. Absent and non-text values are not checked, so keep your general input type validation. The message is `DateTime command property '<name>' requires an explicit offset or Z.` Reject on that failure even if a condition would short-circuit. Check the original text before a deserializer can attach a local offset; never assume UTC.
|
|
109
|
+
2. Call `SemanticDateComparisons.Participants(application, command)` once and reuse the map as `dateTypes`.
|
|
110
|
+
3. Check each command validation rule with `SemanticDateComparisons.Check(rule, value, dateTypes.GetValueOrDefault(rule.Property))`. Date comparison rules compare chronologically; other rules fall back to the ordinary value-rule check.
|
|
111
|
+
4. Evaluate `require` and `produces when` conditions with `SemanticConditionEvaluator.Evaluate(condition, values, dateTypes)`. That form is only for conditions without read operands. If the command declares protected reads, resolve every one of them after authorization and successful property validation and before any requirement runs, even when no requirement references it. Reject missing required state with `Validation` and `<ReadModel> does not exist.`, and keep decide/commit conflict protection. Passing the values as the fourth argument, `reads`, keyed by read name and then by view property ID, only supplies operand values; without it, reaching a read operand fails. Read operands are admitted only in non-date comparisons; neither side of a date comparison can be a read path. Without the `dateTypes` map, text equality is ordinal and ordering non-numeric operands throws `InvalidSemanticContract`.
|
|
112
|
+
|
|
113
|
+
`Date` compares calendar dates without a time zone. `DateTime` compares UTC instants at tick precision, so different offsets for the same instant are equal. Chronological equality applies only to command comparisons. Specification expectations and read-model keys stay ordinal, and constraints keep their own equality rules (a unique constraint can ignore casing). These APIs do not authorize a caller or execute the command.
|
|
114
|
+
|
|
103
115
|
## Direct Stage planning
|
|
104
116
|
|
|
105
117
|
Use this only when embedding Stage. Keep the accepted full `ExecutableSemanticModel` and its capability-admitted `SemanticExecutionPlan` together; the revision must match. `SemanticExecutionPlan.Compile(model)` reports `Success`, `Plan` and `Issues`; the scoped overload can take selected slice identities without pruning the ESM. Do not treat strict ESM admission as target capability admission.
|
|
@@ -116,7 +116,7 @@ module Rentals
|
|
|
116
116
|
|
|
117
117
|
Check it:
|
|
118
118
|
|
|
119
|
-
1. `screenplay <model-folder> --warnaserror`
|
|
119
|
+
1. `screenplay <model-folder> --warnaserror` with no scope in effect: pass no `--scope`, and confirm with `--print-gate` that the validation gate sets no scope (or pass `--no-gate-file` to bypass the gate deliberately). Only then is it a whole-application check; require exit 0.
|
|
120
120
|
2. `screenplay test <model-folder>` runs every specification in the in-memory reference evaluator; require exit 0 with every specification executed and none unsupported. `--format json` gives a machine-readable report; `--filter <specification-address>` runs one.
|
|
121
121
|
|
|
122
122
|
In an MCP session, use the Screenplay server's read-only `run-specifications` instead of step 2; see Review, compare and apply in `cratis-screenplay-edit-workspace`. Non-event `source` blocks are metadata (`PLAY0270`); specifications supply records without contacting a provider.
|
package/package/corpus/skills/cratis-screenplay-model-translation/references/boundary-diagnostics.md
CHANGED
|
@@ -19,7 +19,7 @@ The compiler checks public/private usage across the whole assembled model. The e
|
|
|
19
19
|
| `PLAY0619` | `source events` appears outside an explicitly inbound translation. | Move the capture to an inbound slice. |
|
|
20
20
|
| `PLAY0620` | A `source events` block is empty, has a line that is not `from <Event>`, an invalid name or a repeated event. | Fix the block. |
|
|
21
21
|
| `PLAY0687` | One `source events` capture reads events from several origins. | Split it into one capture per origin. |
|
|
22
|
-
| `PLAY0694` (warning) |
|
|
22
|
+
| `PLAY0694` (warning) | An unrouted reaction (no `from`) in a directionless Translate slice has a named trigger, and the trigger and a capture append in that slice resolve to the same event declaration or public import. It can fire even when the model has other errors. | The warning does not by itself fail compilation. With `--warnaserror`, the check fails if `PLAY0694` is in the reported diagnostic set; a `--scope` option or a scope inherited from the validation gate can exclude it. Keep the capture; move the reaction to an Automation slice with its own specifications. There is no automatic split. Adding `direction inbound` alone does not fix a reaction to a captured local fact: explicit inbound rejects that input with `PLAY0616`. |
|
|
23
23
|
| `PLAY0700` | A `source events` key is not a required property of every `from` event, or is a `$` context key. | Choose a required key every source event carries. |
|
|
24
24
|
| `PLAY0701` | `given capture` or `when capture` names an events capture. | Use `given <Event>` / `when append <Event>`; a repair exists when the capture has one `from` event. |
|
|
25
25
|
| `PLAY0809` | `is event source` on a capture that is not `source events`, or on a composite key. | Remove the marker or use a single-property key. |
|