@cratis/pi 8.0.2 → 8.2.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/local-work-artifacts.instructions.md +4 -1
- 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 +16 -8
- package/package/corpus/hooks/scripts/cratis-cleanup-worktrees.sh +109 -6
- package/package/corpus/hooks/scripts/cratis-guard-shell-writes.sh +1 -1
- 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/local-work-artifacts.md +4 -1
- 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 +11 -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,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cratis-event-model-diagram
|
|
3
|
-
description: Use when drawing or updating a Mermaid eventmodeling diagram to match an already-decided Cratis model or code flow. Not for
|
|
3
|
+
description: Use when drawing or updating a Mermaid eventmodeling diagram to match an already-decided Cratis model or code flow. Not for designing slices and their behavior (use cratis-modeling-design-event-model).
|
|
4
4
|
license: MIT
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -14,10 +14,9 @@ chosen model, it does not choose one.
|
|
|
14
14
|
## Source authority
|
|
15
15
|
|
|
16
16
|
Diagrams use **Mermaid's native `eventmodeling` diagram type** (Mermaid v11.15
|
|
17
|
-
and later). The grammar is owned by Mermaid, and
|
|
17
|
+
and later). If the renderer does not recognize the diagram type, use a Mermaid renderer that supports it before changing the diagram. The grammar is owned by Mermaid, and
|
|
18
18
|
<https://mermaid.js.org/syntax/eventmodeling.html> is the authority whenever this
|
|
19
|
-
file and Mermaid disagree.
|
|
20
|
-
before relying on a construct.
|
|
19
|
+
file and Mermaid disagree.
|
|
21
20
|
|
|
22
21
|
## What an event model is
|
|
23
22
|
|
|
@@ -29,86 +28,7 @@ One file per module or feature, alongside the code, with the diagram in a fenced
|
|
|
29
28
|
`mermaid` block. A system-overview file at the source root shows only
|
|
30
29
|
cross-module flows.
|
|
31
30
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
**Frame prefix:** `tf` (timeframe — auto-connects to the previous frame) and
|
|
35
|
-
`rf` (resetframe — breaks the chain; start each independent flow with it). `rf`
|
|
36
|
-
*replaces* `tf`; `tf N rf Name` is invalid.
|
|
37
|
-
|
|
38
|
-
**Frame:** `<prefix> <number> <type> <EntityName>`. The number is unique;
|
|
39
|
-
declaration order does not matter because frames position by reference.
|
|
40
|
-
|
|
41
|
-
| Type | Swimlane | Represents |
|
|
42
|
-
| --- | --- | --- |
|
|
43
|
-
| `ui` | UI / Automation | the persona interacting — a persona name, never a screen name |
|
|
44
|
-
| `pcr` | UI / Automation | a reactor or automation processor |
|
|
45
|
-
| `cmd` | Command / Read Model | a command |
|
|
46
|
-
| `rmo` | Command / Read Model | a read model |
|
|
47
|
-
| `evt` | Events | an event type, using the exact self-describing type name |
|
|
48
|
-
|
|
49
|
-
**Multiple sources (`->>`).** A read model or fan-in reactor fed by several
|
|
50
|
-
frames references them by frame number:
|
|
51
|
-
|
|
52
|
-
```text
|
|
53
|
-
tf 10 rmo <ReadModelName> ->> 03 ->> 06 ->> 09
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
**Namespaces.** A `Module.` prefix creates a sub-swimlane. Use it for
|
|
57
|
-
cross-module entities and throughout the system overview.
|
|
58
|
-
|
|
59
|
-
**Comments.** `%% -- Section --`. A section header is a comment, never a frame.
|
|
60
|
-
|
|
61
|
-
## Behavior type to pattern
|
|
62
|
-
|
|
63
|
-
```text
|
|
64
|
-
%% -- State change: <CommandName> --------------------
|
|
65
|
-
rf 01 ui <Persona>
|
|
66
|
-
tf 02 cmd <CommandName>
|
|
67
|
-
tf 03 evt <EntityName><PastTenseVerb>
|
|
68
|
-
|
|
69
|
-
%% -- State view: <ReadModelName> (consumed by <Persona>) --
|
|
70
|
-
rf 04 rmo <ReadModelName> ->> 03
|
|
71
|
-
tf 05 ui <Persona>
|
|
72
|
-
|
|
73
|
-
%% -- Automation: <ReactorName> (reacts to our own event) --
|
|
74
|
-
rf 06 evt <EntityName><PastTenseVerb>
|
|
75
|
-
tf 07 pcr <ReactorName>
|
|
76
|
-
%% add the next two frames only when the automation invokes a command
|
|
77
|
-
tf 08 cmd <CommandName>
|
|
78
|
-
tf 09 evt <EntityName><PastTenseVerb>
|
|
79
|
-
|
|
80
|
-
%% -- Inbound translation: outside fact -> adapter -> local fact --
|
|
81
|
-
rf 10 evt <ExternalSource>.<FactName>
|
|
82
|
-
tf 11 pcr <AdapterName>
|
|
83
|
-
tf 12 evt <EntityName><PastTenseVerb>
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
- A state view's `rmo` references the event frames it projects from by number;
|
|
87
|
-
its consumer `ui` frame auto-chains after it. A passive read model has no
|
|
88
|
-
consumer UI — emit only the `rmo ... ->>` line with a `%% passive` comment.
|
|
89
|
-
- Translation crosses a vocabulary boundary. Inbound, draw the outside fact,
|
|
90
|
-
adapter and local fact. Outbound, draw the private fact, a `pcr` frame for
|
|
91
|
-
the publishing projection and the public contract (`evt`); publication does not prove delivery. A local
|
|
92
|
-
reaction that requests follow-up work is automation, not outbound translation.
|
|
93
|
-
- Several consumers of one read model: declare each consumer `ui` as its own
|
|
94
|
-
`rf` frame with an explicit `->>` back to the `rmo`.
|
|
95
|
-
|
|
96
|
-
## Connections read forward
|
|
97
|
-
|
|
98
|
-
A diagram reads left to right, so every connection goes to a later frame, never back to an
|
|
99
|
-
earlier one. In practice:
|
|
100
|
-
|
|
101
|
-
- Number frames in story order and put elements that belong together next to each other: a
|
|
102
|
-
persona and the command it issues, a command and the events it produces, an event and the
|
|
103
|
-
read model that projects it. A read model's `->>` sources are frames that come **before** it.
|
|
104
|
-
- When a later event must change what an earlier read model shows, do not draw an arrow back to
|
|
105
|
-
that read model. Draw a new `rmo` frame after the later event, sourced from the events that now
|
|
106
|
-
matter (it is the same read model carried to a later state), and give it its own consumer
|
|
107
|
-
`ui` frame if a person looks at it. The earlier frame stays as it was: it correctly showed
|
|
108
|
-
that earlier point in the story. The model itself is unchanged; its projection simply
|
|
109
|
-
consumes the later event.
|
|
110
|
-
- If the natural place for a frame is already taken, insert it just before or after rather than
|
|
111
|
-
wiring across the gap.
|
|
31
|
+
Use the [frame patterns](references/frame-patterns.md) for compact syntax, read-only or repeated consumers, automation, translations, and fan-in.
|
|
112
32
|
|
|
113
33
|
## The command rules table
|
|
114
34
|
|
|
@@ -121,20 +41,15 @@ language. Include commands that emit no event.
|
|
|
121
41
|
## Process
|
|
122
42
|
|
|
123
43
|
1. **Discover** the behaviors by scanning the module for the artifacts that
|
|
124
|
-
define them: command
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
the scope (or the repository is opted in to Screenplay), read the behaviors from
|
|
130
|
-
its slices (`StateChange`, `StateView`, `Automation`, `Translate`) and render
|
|
131
|
-
from the model; otherwise the code is the authority. Report code that
|
|
44
|
+
define them: command decisions, queries and their read models, local reactions or schedules,
|
|
45
|
+
and mappings between outside and local facts or private facts and public contracts. **Choose the accepted model when** it covers the scope: draw its `StateChange`,
|
|
46
|
+
`StateView`, `Automation` and `Translate` slices. Otherwise use the code for
|
|
47
|
+
a code-first repository. If the repository opted in to Screenplay and the model
|
|
48
|
+
is missing or unaccepted, settle that gap with the model owner before drawing. Report code that
|
|
132
49
|
disagrees with the model as drift, separately; do not add unmodeled behavior
|
|
133
50
|
to the diagram. Use the exact type names.
|
|
134
51
|
2. **Order** frames by domain causality — what must happen before what. Put state
|
|
135
|
-
views after the events they project from. Use `rf`
|
|
136
|
-
flows, never between sibling events of one flow, or the diagram becomes a
|
|
137
|
-
tall tower one event wide.
|
|
52
|
+
views after the events they project from. Use `rf` when breaking an inferred connection for an independent flow or explicit branch, not between consecutively produced events.
|
|
138
53
|
3. **Write** the diagram and the command-rules table.
|
|
139
54
|
4. **Verify** it renders without a syntax-error banner, then reconcile it against
|
|
140
55
|
the authority chosen in step 1 (the model's slices, or the code's markers):
|
|
@@ -148,33 +63,13 @@ language. Include commands that emit no event.
|
|
|
148
63
|
the diagram. When an accepted model is the authority, report code that disagrees with it through
|
|
149
64
|
the `cratis-screenplay-handoff-slice` skill (in `cratis/screenplay`) for hand-written changes, not in the diagram.
|
|
150
65
|
|
|
151
|
-
## Common mistakes
|
|
152
|
-
|
|
153
|
-
- **A command that emits several events** chains them with consecutive
|
|
154
|
-
`tf ... evt ...` frames. Do not fight the auto-chain with `rf`.
|
|
155
|
-
- **The same event emitted from several commands** gets its own `tf evt` frame at
|
|
156
|
-
each emit point. Do not merge them into one.
|
|
157
|
-
- **Several consumers of one read model** — the first auto-chains; each
|
|
158
|
-
additional consumer needs an explicit `rf <n> ui <Persona> ->> <rmo-number>`.
|
|
159
|
-
- **A screen name in the `ui` lane.** The `ui` lane is the persona.
|
|
160
|
-
- **A section header written as a frame.** Section headers are `%%` comments.
|
|
161
|
-
- **A cross-module flow updated in one place.** It needs three: the overview
|
|
162
|
-
diagram, the source module's outputs, and the target module's inputs.
|
|
163
|
-
|
|
164
66
|
## Verify
|
|
165
67
|
|
|
166
68
|
- The diagram renders with no syntax-error banner.
|
|
167
69
|
- Every behavior in the module appears, with the type its authority (the accepted `.play` slice, otherwise the code) gives it; drift is reported separately.
|
|
168
70
|
- Every event frame uses the exact event type name from the source.
|
|
169
71
|
- Independent flows start with `rf`; sibling events within a flow do not.
|
|
170
|
-
-
|
|
72
|
+
- A passive read model has no user interaction to draw; omit the consumer `ui` frame.
|
|
171
73
|
- The command-rules table covers every command, including those that emit
|
|
172
74
|
nothing.
|
|
173
75
|
- Cross-module flows are reflected in all three places.
|
|
174
|
-
|
|
175
|
-
## Route near misses
|
|
176
|
-
|
|
177
|
-
- An accepted model covers the scope (or the repository is opted in): it is the source for this
|
|
178
|
-
diagram; do not redraw from code and never change the model to match a
|
|
179
|
-
diagram. The diagram is a view of it.
|
|
180
|
-
- Deciding the model rather than drawing one: the `cratis-modeling-design-event-model` skill (installed by the `cratis/screenplay` profile). Use the same profile’s `cratis-screenplay-declare-slice` skill to declare the resulting slice.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Event-modeling frames and patterns
|
|
2
|
+
|
|
3
|
+
## Grammar cheat sheet
|
|
4
|
+
|
|
5
|
+
**Frame prefix:** `tf` (timeframe — infers a relation to the preceding frame) and
|
|
6
|
+
`rf` (resetframe — suppresses that inferred relation; start an independent flow or an explicit side branch with it). `rf`
|
|
7
|
+
*replaces* `tf`; `tf N rf Name` is invalid.
|
|
8
|
+
|
|
9
|
+
**Frame:** `<prefix> <number> <type> <EntityName>`. Use a unique number for each frame. Numbers label references; their numeric order does not sort the timeline. Declare frames in story order.
|
|
10
|
+
|
|
11
|
+
| Type | Swimlane | Represents |
|
|
12
|
+
| --- | --- | --- |
|
|
13
|
+
| `ui` | UI / Automation | the interaction surface, usually the screen or wireframe named by the model |
|
|
14
|
+
| `pcr` | UI / Automation | a reactor or automation processor |
|
|
15
|
+
| `cmd` | Command / Read Model | a command |
|
|
16
|
+
| `rmo` | Command / Read Model | a read model |
|
|
17
|
+
| `evt` | Events | an event type, using the exact self-describing type name |
|
|
18
|
+
|
|
19
|
+
**Multiple sources (`->>`).** A read model or fan-in reactor fed by several
|
|
20
|
+
frames references them by frame number:
|
|
21
|
+
|
|
22
|
+
```text
|
|
23
|
+
rf 10 rmo AuthorActivity ->> 03 ->> 06 ->> 09
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
**Namespaces.** Mermaid groups a namespace and entity type into a swimlane; use `Module.Entity` to identify cross-module entities. Use it throughout the system overview.
|
|
27
|
+
|
|
28
|
+
**Comments.** `%% -- Section --`. A section header is a comment, never a frame.
|
|
29
|
+
|
|
30
|
+
## Behavior type to pattern
|
|
31
|
+
|
|
32
|
+
```text
|
|
33
|
+
%% -- State change: <CommandName> --------------------
|
|
34
|
+
rf 01 ui <ScreenName>
|
|
35
|
+
tf 02 cmd <CommandName>
|
|
36
|
+
tf 03 evt <EntityName><PastTenseVerb>
|
|
37
|
+
|
|
38
|
+
%% -- State view: CartItems (shown in CartScreen and CheckoutScreen) --
|
|
39
|
+
rf 04 rmo CartItems ->> 03
|
|
40
|
+
tf 05 ui CartScreen
|
|
41
|
+
|
|
42
|
+
%% -- Automation: <ReactorName> (reacts to our own event) --
|
|
43
|
+
rf 06 evt <EntityName><PastTenseVerb>
|
|
44
|
+
tf 07 pcr <ReactorName>
|
|
45
|
+
%% add the next two frames only when the automation invokes a command
|
|
46
|
+
tf 08 cmd <CommandName>
|
|
47
|
+
tf 09 evt <EntityName><PastTenseVerb>
|
|
48
|
+
|
|
49
|
+
%% -- Inbound translation: outside fact -> adapter -> local fact --
|
|
50
|
+
rf 10 evt <ExternalSource>.<FactName>
|
|
51
|
+
tf 11 pcr <AdapterName>
|
|
52
|
+
tf 12 evt <EntityName><PastTenseVerb>
|
|
53
|
+
|
|
54
|
+
%% -- Reshow the same read model in an independent interaction --
|
|
55
|
+
rf 13 ui CheckoutScreen ->> 04
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
- A state view's `rmo` references the event frames it projects from by number.
|
|
59
|
+
Use `tf` for a first consumer immediately after the `rmo`; it auto-chains from
|
|
60
|
+
the read model. For a later independent consumer, use `rf` and point `->>`
|
|
61
|
+
at the `rmo` to avoid connecting to the immediately preceding frame. A passive
|
|
62
|
+
read model has no consumer UI: use only the `rmo ... ->>` line with a `%% passive` comment.
|
|
63
|
+
- Translation crosses a vocabulary boundary. Inbound, draw the outside fact,
|
|
64
|
+
adapter and local fact. Outbound, draw the private fact, a `pcr` frame for
|
|
65
|
+
the publishing projection and the public contract (`evt`); publication does not prove delivery. A local
|
|
66
|
+
reaction that requests follow-up work is automation, not outbound translation.
|
|
67
|
+
|
|
68
|
+
## Connections read forward
|
|
69
|
+
|
|
70
|
+
Write the causal flow left to right: the consuming frame cites its earlier sources with `->>`. This notation names a source frame, not a backwards business dependency. In practice:
|
|
71
|
+
|
|
72
|
+
- Number frames in story order and put elements that belong together next to each other: a
|
|
73
|
+
screen and the command it issues, a command and the events it produces, an event and the
|
|
74
|
+
read model that projects it. A read model's `->>` sources are frames that come **before** it.
|
|
75
|
+
- When a later event must change what an earlier read model shows, do not draw an arrow back to
|
|
76
|
+
that read model. Draw a new `rmo` frame after the later event, sourced from the events that now
|
|
77
|
+
matter (it is the same read model carried to a later state), and give it its own consumer
|
|
78
|
+
`ui` frame if a person looks at it. The earlier frame stays as it was: it correctly showed
|
|
79
|
+
that earlier point in the story. The model itself is unchanged; its projection simply
|
|
80
|
+
consumes the later event.
|
|
81
|
+
- If the natural place for a frame is already taken, insert it just before or after rather than
|
|
82
|
+
wiring across the gap.
|
|
83
|
+
|
|
84
|
+
## Common mistakes
|
|
85
|
+
|
|
86
|
+
- **A command that emits several events** chains them with consecutive
|
|
87
|
+
`tf ... evt ...` frames. Do not fight the auto-chain with `rf`.
|
|
88
|
+
- **The same event emitted from several commands** gets its own `tf evt` frame at
|
|
89
|
+
each emit point. Do not merge them into one.
|
|
90
|
+
- **A persona mistaken for a screen.** Give separate screens separate `ui` names; name the actor in the surrounding story.
|
|
91
|
+
- **A section header written as a frame.** Section headers are `%%` comments.
|
|
92
|
+
- **A cross-module flow updated in one place.** It needs three: the overview
|
|
93
|
+
diagram, the source module's outputs, and the target module's inputs.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cratis-fundamentals-concept-go
|
|
3
|
-
description: Use when a Go domain identity or scalar must be distinct from its primitive, or its UUID and JSON encoding needs definition. Not for
|
|
3
|
+
description: Use when a Go domain identity or scalar must be distinct from its primitive, or its UUID and JSON encoding needs definition. Not for naming a value in another SDK (use cratis-fundamentals-name-value).
|
|
4
4
|
license: MIT
|
|
5
5
|
compatibility: Go 1.26 or later.
|
|
6
6
|
---
|
|
@@ -10,21 +10,13 @@ compatibility: Go 1.26 or later.
|
|
|
10
10
|
|
|
11
11
|
# Typed domain values in Go
|
|
12
12
|
|
|
13
|
-
> **Experimental v0:** minor releases may break APIs; pin the module version you test against.
|
|
14
|
-
> Companion guidance: Chronicle.Go and Arc.Go.
|
|
15
|
-
|
|
16
13
|
Use a defined type for each domain value, not a type alias that remains
|
|
17
14
|
interchangeable with every UUID/string. Plain constructors are enough; adopting
|
|
18
15
|
concepts does not require a dependency-injection container.
|
|
19
16
|
|
|
20
|
-
## Package covered
|
|
21
|
-
|
|
22
|
-
Fundamentals.Go (`github.com/cratis/fundamentals.go`), package `concepts`. The root
|
|
23
|
-
module is standard-library-only and requires Go 1.26.
|
|
24
|
-
|
|
25
17
|
## Define and encode an identity
|
|
26
18
|
|
|
27
|
-
|
|
19
|
+
In an existing module using Go 1.26 or later, add the dependency with `go get github.com/cratis/fundamentals.go`.
|
|
28
20
|
This complete package defines an author identity and its codecs:
|
|
29
21
|
|
|
30
22
|
```go
|
|
@@ -94,13 +86,10 @@ accepted as scalar representations.
|
|
|
94
86
|
`ConceptValue`. Put domain rules in your constructor/validation boundary and test
|
|
95
87
|
them; do not assume implementing a marker validates input everywhere.
|
|
96
88
|
|
|
97
|
-
`ParseDotNetGUID`
|
|
98
|
-
does not change `ParseUUID` or text/JSON/SQL codecs. Limit untrusted input and use
|
|
99
|
-
it only when importing that compatibility contract, not for canonical admission.
|
|
89
|
+
**Choose `ParseDotNetGUID` when** importing an existing .NET text contract that permits forms beyond dashed UUIDs. It does not change `ParseUUID` or text/JSON/SQL codecs. Limit untrusted input and keep canonical admission on `ParseUUID`.
|
|
100
90
|
|
|
101
91
|
## Verify
|
|
102
92
|
|
|
103
|
-
- Compile and round-trip the named value against the
|
|
93
|
+
- Compile and round-trip the named value against the published module without local replacements.
|
|
104
94
|
- Verify canonical wire bytes, zero/null policy and failure-atomic decoders.
|
|
105
95
|
- Check domain invariants separately from scalar recognition.
|
|
106
|
-
- Chronicle.Go and Arc.Go each declare the Fundamentals.Go they require; this standalone example is not a demand to upgrade their dependencies.
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cratis-fundamentals-name-value
|
|
3
|
-
description: Use when naming a scalar domain value or distinguishing an entity identity from its primitive representation. Not for
|
|
3
|
+
description: Use when naming a scalar domain value or distinguishing an entity identity from its primitive representation. Not for deciding which entity owns history (use cratis-modeling-discover-timeline).
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Name and map a native value
|
|
7
7
|
|
|
8
8
|
Give each business identity its own name. Choose its owner before its representation: copy an issuer-owned key; generate only when your application owns creation.
|
|
9
9
|
|
|
10
|
-
- For an ASP.NET Core
|
|
11
|
-
- For a
|
|
12
|
-
- For
|
|
13
|
-
- For
|
|
14
|
-
- For
|
|
10
|
+
- For an ASP.NET Core `*.csproj`, read [C#](references/csharp.md).
|
|
11
|
+
- For a Node server with `package.json`, read [TypeScript](references/typescript.md).
|
|
12
|
+
- For Kotlin (`*.kt`), read [Kotlin](references/kotlin.md).
|
|
13
|
+
- For Java (`*.java`), read [Java](references/java.md).
|
|
14
|
+
- For Go (`go.mod`), read [Go](references/go.md).
|
|
15
15
|
|
|
16
|
-
For an Elixir command or event identity, read [Elixir](references/elixir.md).
|
|
16
|
+
For an Elixir command or event identity in a `mix.exs` project, read [Elixir](references/elixir.md).
|
|
17
17
|
|
|
18
|
-
For a Python caller, read [Python](references/python.md): no Arc application
|
|
18
|
+
For a Python caller, read [Python](references/python.md): there is no released Arc application SDK for Python, so keep the scalar wire contract and validate it at the owning service boundary.
|
|
19
19
|
|
|
20
20
|
Round-trip through the production wire and storage codecs. Stop if the scalar becomes a wrapper object, loses precision or can no longer hydrate the named value.
|
|
@@ -4,12 +4,12 @@ Give the scalar and the identity different types. An author name describes the a
|
|
|
4
4
|
|
|
5
5
|
1. Name the type after the business value, not its representation.
|
|
6
6
|
2. Declare an ordinary scalar as a record over `ConceptAs<T>`, including entity IDs that do not address event history. Use a structured record for a group of related fields, not a scalar concept with extra mutable properties.
|
|
7
|
-
3. Use `EventSourceId<T>` only for an identity that addresses Chronicle history. Give
|
|
8
|
-
4. Use `AuthorId` for `RegisterAuthor.Id` and `Author.Id`.
|
|
7
|
+
3. Use `EventSourceId<T>` only for an identity that addresses Chronicle history. Give a GUID-based identity a `New()` factory when this application owns its creation.
|
|
8
|
+
4. Use `AuthorId` for `RegisterAuthor.Id` and `Author.Id`. **Choose a primitive wire boundary when** the existing contract requires it: keep `Name` a `string` on `RegisterAuthor`, `AuthorRegistered` and `Author`, and use `AuthorName` in process; the direct append service (`cratis-chronicle-record-event` skill in `cratis/chronicle/client-dotnet`) unwraps `name.Value`. Check the destination with `ShouldHaveAppendedEvent<RegisterAuthor, AuthorRegistered>(id, e => e.Name == "Aster")` in a backend spec (`cratis-specifications-exercise-backend` skill in `cratis/application`).
|
|
9
9
|
|
|
10
10
|
## Declare the Library types
|
|
11
11
|
|
|
12
|
-
In the Library backend, reference `Cratis.Fundamentals` for `ConceptAs<T>` and `Cratis.Chronicle` for `EventSourceId<T>`.
|
|
12
|
+
In the Library backend, reference `Cratis.Fundamentals` for `ConceptAs<T>` and `Cratis.Chronicle` for `EventSourceId<T>`. Keep the declarations in separate files beside their owning feature:
|
|
13
13
|
|
|
14
14
|
```csharp
|
|
15
15
|
using Cratis.Concepts;
|
|
@@ -51,6 +51,6 @@ public record AuthorId(Guid Value) : EventSourceId<Guid>(Value)
|
|
|
51
51
|
Use `IGeneratable<T>` for context-free creation; use `IGeneratableInContext<T>` when the value depends on captured time or tenant. Do not read a new wall clock in the latter. Context-based UUIDv7 requires a context time. A sortable ID gives neither authorization nor a uniqueness constraint. Keep client-owned, natural and issuer-owned keys rather than replacing them with random ones. Test the factory directly and pin its named value separately in a pipeline scenario to prove wiring.
|
|
52
52
|
|
|
53
53
|
- `Guid.Empty` and numeric `0` still select real histories. For example, `EventSourceId<Guid> typed = Guid.Empty; EventSourceId history = typed;` does not produce `EventSourceId.Unspecified`. An actual empty string converts to `Unspecified`; reject it when a history is required. Use nullable values for absence and reserve a non-null concept sentinel only when the domain defines one. Spec zero-GUID, zero-number and empty-string inputs separately.
|
|
54
|
-
- Use `GenerateValue.Pattern(pattern
|
|
54
|
+
- Use `GenerateValue.Pattern(pattern)` for a patterned ID or supply a checksum when the contract calls for one. For date segments use `IGeneratableInContext<T>` and `GenerateValue.Pattern(pattern, context)`; dates come from UTC `context.Now`, never a new clock read. If checksummed, verify with `GenerateValue.HasValidChecksum(value, checksum)`. Check the UTC date at an offset crossing midnight. Assert `MissingGenerationTime` when the captured time is absent.
|
|
55
55
|
|
|
56
56
|
For GeoJSON reuse `Point`, `LineString` and `Polygon`; coordinates are longitude then latitude. Changing a persisted shape requires migration, not just renaming a CLR type.
|
|
@@ -8,4 +8,4 @@ defmodule Library.Authors.AuthorId do
|
|
|
8
8
|
end
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
Use the module as the type of the command schema's key field. Keep changeable names on the event, never in the immutable event source ID.
|
|
11
|
+
Use the module as the type of the Arc command schema's key field. In a command spec, submit a scalar UUID and verify that the append addresses that ID. If it does not, check the schema field type and the command's event-source lookup instead of placing the key in the payload. Keep changeable names on the event, never in the immutable event source ID.
|
|
@@ -8,4 +8,4 @@ type BookID string
|
|
|
8
8
|
|
|
9
9
|
Keep `BookID` on the command. When passing it to Chronicle's `EventForSource`, convert it explicitly with `chronicle.EventSourceID(c.BookID)` as in `cratis-arc-declare-command` (in `cratis/arc/go`).
|
|
10
10
|
|
|
11
|
-
Use the `cratis-fundamentals-concept-go` skill (installed by the `cratis/fundamentals/go` profile) when
|
|
11
|
+
Use the `cratis-fundamentals-concept-go` skill (installed by the `cratis/fundamentals/go` profile) when SDK concept recognition is required, for example for a UUID-backed identity. Do not add `ConceptValue` by itself: Arc rejects a concept declaration without the required text and JSON codecs when building the command pipeline.
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# Give a UUID a Java domain name
|
|
2
2
|
|
|
3
|
-
Use a Java record for an identity, not a plain UUID parameter on every operation.
|
|
3
|
+
Use a Java record for an identity, not a plain UUID parameter on every operation. In an Arc or Chronicle module, implement the Fundamentals interface both SDKs consume. The record accessor implements the interface:
|
|
4
4
|
|
|
5
5
|
```java
|
|
6
6
|
import io.cratis.fundamentals.concepts.ConceptAs;
|
|
7
7
|
import java.util.UUID;
|
|
8
8
|
|
|
9
|
-
public record AuthorId(UUID value) implements ConceptAs<UUID
|
|
10
|
-
@Override public UUID getValue() { return value; }
|
|
11
|
-
}
|
|
9
|
+
public record AuthorId(UUID value) implements ConceptAs<UUID> {}
|
|
12
10
|
```
|
|
13
11
|
|
|
14
|
-
|
|
12
|
+
**Choose Chronicle's `io.cratis.chronicle.concepts.EventSourceId` when** declaring the address of an event history: use a `String` record component named `value` and a non-personal identifier.
|
|
13
|
+
|
|
14
|
+
Round-trip the value through the host codec. Compare the restored record; the wire value must be a scalar. If it gains a nested `value` property, check the interface import and the mapper registration.
|
|
@@ -1,3 +1,16 @@
|
|
|
1
|
-
# Name a scalar
|
|
1
|
+
# Name a Kotlin scalar
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
In an Arc or Chronicle module, use the Fundamentals interface both SDKs consume. A type alias would leave the UUID interchangeable with other UUID values.
|
|
4
|
+
|
|
5
|
+
```kotlin
|
|
6
|
+
import io.cratis.fundamentals.concepts.ConceptAs
|
|
7
|
+
import java.util.UUID
|
|
8
|
+
|
|
9
|
+
data class AuthorId(private val id: UUID) : ConceptAs<UUID> {
|
|
10
|
+
override fun value(): UUID = id
|
|
11
|
+
}
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
**Choose Chronicle's `io.cratis.chronicle.concepts.EventSourceId` when** the type declares the address of an event history. It is string-backed: implement `value(): String` and keep personal identifiers out of it.
|
|
15
|
+
|
|
16
|
+
Round-trip the containing command or event with the SDK's configured codec. The wire value should be a scalar and the restored property an `AuthorId`. If it becomes an object, check the interface import and that the test uses the host's mapper rather than a bare mapper.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
# Python caller
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Python is a contract consumer here, not a released Arc application SDK. For a UUID-backed concept, send the scalar UUID string described by the owning service, not an object with a `value` field. Round-trip through that service and verify it returns the same identity; if it rejects the value, inspect the actual contract rather than importing another SDK's concept class.
|
|
@@ -4,7 +4,7 @@ Declare `class AuthorId extends ConceptAs<string> {}` with `ConceptAs` from `@cr
|
|
|
4
4
|
|
|
5
5
|
For GeoJSON use `Point`, `LineString` or `Polygon` with coordinates in longitude, latitude order. Migrate existing stored shapes explicitly before changing converters.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Choose typed inner hydration when the scalar itself has an SDK type
|
|
8
8
|
|
|
9
9
|
```typescript
|
|
10
10
|
import { ConceptAs, Guid, field } from '@cratis/fundamentals';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cratis-fundamentals-telemetry
|
|
3
|
-
description: Use when declaring generated Cratis .NET metrics and spans, diagnosing missing exports
|
|
3
|
+
description: Use when declaring generated Cratis .NET metrics and spans, or diagnosing missing exports. Not for reviewing service-wide observability and alerting (use cratis-observability).
|
|
4
4
|
license: MIT
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -13,7 +13,7 @@ Use this when a service needs measurements and spans, not business facts. Keep e
|
|
|
13
13
|
|
|
14
14
|
## 1. Declare instrumentation beside its owner
|
|
15
15
|
|
|
16
|
-
Reference `Cratis.Fundamentals` for runtime types and `Cratis.
|
|
16
|
+
Reference `Cratis.Fundamentals` for runtime types and `Cratis.Observability.SourceGenerators` for generation. Use a **static partial class in a namespace**, containing **static partial methods**. A partial instance class is not enough. Prefer extension declarations with short, unqualified attribute/type names, as below.
|
|
17
17
|
|
|
18
18
|
This declaration file is complete; it assumes the application's existing `ReportWorker` class in `MyApplication.Reports`:
|
|
19
19
|
|
|
@@ -21,8 +21,6 @@ This declaration file is complete; it assumes the application's existing `Report
|
|
|
21
21
|
// Copyright (c) Cratis. All rights reserved.
|
|
22
22
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
23
23
|
|
|
24
|
-
using System.Diagnostics;
|
|
25
|
-
using Cratis.Diagnostics;
|
|
26
24
|
using Cratis.Metrics;
|
|
27
25
|
using Cratis.Traces;
|
|
28
26
|
|
|
@@ -32,7 +30,7 @@ public static partial class ReportInstrumentation
|
|
|
32
30
|
{
|
|
33
31
|
[Counter<int>("reports.completed", "Completed reports")]
|
|
34
32
|
internal static partial void Completed(this IMeter<ReportWorker> meter,
|
|
35
|
-
|
|
33
|
+
string outcome);
|
|
36
34
|
|
|
37
35
|
[Gauge<int>("reports.pending", "Pending reports")]
|
|
38
36
|
internal static partial void Pending(this IMeter<ReportWorker> meter, int count);
|
|
@@ -40,10 +38,10 @@ public static partial class ReportInstrumentation
|
|
|
40
38
|
[Histogram<double>("reports.duration", "Report duration", "s")]
|
|
41
39
|
internal static partial void Duration(this IMeter<ReportWorker> meter, double seconds);
|
|
42
40
|
|
|
43
|
-
[Span("reports.build"
|
|
41
|
+
[Span("reports.build")]
|
|
44
42
|
internal static partial IActivityScope<ReportWorker> Build(
|
|
45
43
|
this IActivitySource<ReportWorker> source,
|
|
46
|
-
|
|
44
|
+
string format);
|
|
47
45
|
}
|
|
48
46
|
```
|
|
49
47
|
|
|
@@ -78,37 +76,22 @@ using MyApplication.Reports;
|
|
|
78
76
|
|
|
79
77
|
builder.AddCratisOpenTelemetry(options =>
|
|
80
78
|
{
|
|
81
|
-
options.ServiceName = "report-service";
|
|
82
79
|
options.ConfigureMetrics = metrics => metrics.AddMeter(typeof(ReportWorker).FullName!);
|
|
83
80
|
options.ConfigureTracing = tracing => tracing.AddSource(typeof(ReportWorker).FullName!);
|
|
84
81
|
});
|
|
85
82
|
```
|
|
86
83
|
|
|
87
|
-
`AddCratisOpenTelemetry` extends `IHostApplicationBuilder`.
|
|
84
|
+
`AddCratisOpenTelemetry` extends `IHostApplicationBuilder`. **Choose `WithCratis` when** the host already owns OpenTelemetry setup: use `services.AddOpenTelemetry().WithCratis(configuration, configure)` instead; `WithCratis` extends `OpenTelemetryBuilder`. Do not add both setups. If the application only wants subscription helpers, `AddCratisInstrumentation()` extends both `TracerProviderBuilder` and `MeterProviderBuilder`, not the service collection.
|
|
88
85
|
|
|
89
86
|
Shared setup adds Cratis sources/meters, ASP.NET Core and HTTP client instrumentation, runtime metrics, and scoped/formatted logs. Application callbacks run before DI is built.
|
|
90
87
|
|
|
91
88
|
## 3. Configure export, without baking endpoints or secrets into code
|
|
92
89
|
|
|
93
|
-
OTLP export
|
|
90
|
+
Run with a local listener by default. **Choose OTLP export when** a collector should receive the signals; use [OTLP configuration](references/otlp-export.md) to set the endpoint and verify the selected signals.
|
|
94
91
|
|
|
95
|
-
|
|
96
|
-
| --- | --- |
|
|
97
|
-
| `OTEL_SERVICE_NAME`, `OTEL_RESOURCE_ATTRIBUTES` | Resource values override application defaults |
|
|
98
|
-
| `OTEL_EXPORTER_OTLP_ENDPOINT` | Shared absolute HTTP/HTTPS endpoint |
|
|
99
|
-
| `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT`, `_METRICS_ENDPOINT`, `_LOGS_ENDPOINT` | Signal-specific endpoints override the shared endpoint |
|
|
100
|
-
| `OTEL_EXPORTER_OTLP_PROTOCOL` (or signal-specific equivalent) | `http/protobuf` selects HTTP; otherwise gRPC |
|
|
101
|
-
| `OTEL_TRACES_EXPORTER`, `OTEL_METRICS_EXPORTER`, `OTEL_LOGS_EXPORTER` | If supplied, must include `otlp` for that signal to export |
|
|
102
|
-
| `OTEL_SDK_DISABLED=true` | Disables providers |
|
|
103
|
-
| `OTEL_METRIC_EXPORT_INTERVAL`, `OTEL_METRIC_EXPORT_TIMEOUT` | Metric reader timing in milliseconds |
|
|
104
|
-
| `OTEL_TRACES_SAMPLER`, `OTEL_TRACES_SAMPLER_ARG` | Sampler and ratio configuration |
|
|
92
|
+
## Verify the emitted signals
|
|
105
93
|
|
|
106
|
-
For
|
|
107
|
-
|
|
108
|
-
## Upgrade and prove it
|
|
109
|
-
|
|
110
|
-
- Fundamentals stopped bringing the OpenTelemetry SDK transitively; add the explicit telemetry package when migrating a consumer that relied on that dependency.
|
|
111
|
-
- Regenerating after an upgrade from a Fundamentals older than 7.20.0 can rename exported Prometheus metrics: descriptions are HELP text, not units. Rebuild the consumer and update dashboards and alerts that used the old description-suffixed names.
|
|
94
|
+
- For Prometheus, descriptions are HELP text, not units. If rebuilding changes a published name, compare the actual export with dashboards and alerts before changing consumers.
|
|
112
95
|
- When changing a generated instrument, check consumers of the published name before renaming it. For the rename procedure, see `cratis-observability` (in `cratis/application`).
|
|
113
96
|
- Build with analyzers and warnings as errors. Inspect generated implementations for correct measurements/tags and scope disposal. Do not edit generated files.
|
|
114
|
-
- Exercise one code path with a listener or the configured collector: observe the counter increment, histogram unit/measurement and completed span. A build
|
|
97
|
+
- Exercise one code path with a listener or the configured collector: observe the counter increment, histogram unit/measurement and completed span. A build is not proof of export. Check namespace subscriptions, SDK disablement, sampler and endpoint independently before diagnosing the collector.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Configure OTLP export
|
|
2
|
+
|
|
3
|
+
OTLP export is **opt-in**: no configured endpoint means no OTLP exporter. Environment values take precedence over configuration keys. Relevant standard keys:
|
|
4
|
+
|
|
5
|
+
| Key | Effect |
|
|
6
|
+
| --- | --- |
|
|
7
|
+
| `OTEL_SERVICE_NAME`, `OTEL_RESOURCE_ATTRIBUTES` | Resource values override application defaults |
|
|
8
|
+
| `OTEL_EXPORTER_OTLP_ENDPOINT` | Shared absolute HTTP/HTTPS endpoint |
|
|
9
|
+
| `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT`, `_METRICS_ENDPOINT`, `_LOGS_ENDPOINT` | Signal-specific endpoints override the shared endpoint |
|
|
10
|
+
| `OTEL_EXPORTER_OTLP_PROTOCOL` (or signal-specific equivalent) | `http/protobuf` selects HTTP; otherwise gRPC |
|
|
11
|
+
| `OTEL_TRACES_EXPORTER`, `OTEL_METRICS_EXPORTER`, `OTEL_LOGS_EXPORTER` | If supplied, must include `otlp` for that signal to export |
|
|
12
|
+
| `OTEL_SDK_DISABLED=true` | Disables providers |
|
|
13
|
+
| `OTEL_METRIC_EXPORT_INTERVAL`, `OTEL_METRIC_EXPORT_TIMEOUT` | Metric reader timing in milliseconds |
|
|
14
|
+
| `OTEL_TRACES_SAMPLER`, `OTEL_TRACES_SAMPLER_ARG` | Sampler and ratio configuration |
|
|
15
|
+
|
|
16
|
+
For HTTP/protobuf, the shared endpoint gains `/v1/traces`, `/v1/metrics` or `/v1/logs`; signal-specific endpoints are used as supplied. An enabled invalid endpoint throws `InvalidOpenTelemetryEndpoint`. Treat exporter headers as secrets; obtain them through the approved environment/secret mechanism, never a snippet or committed configuration.
|