@cratis/pi 8.0.2 → 8.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package/corpus/harnesses/copilot/instructions/ai-distribution.instructions.md +9 -102
- package/package/corpus/harnesses/copilot/instructions/authoring-skills.instructions.md +3 -5
- package/package/corpus/harnesses/copilot/instructions/browser.instructions.md +8 -49
- package/package/corpus/harnesses/copilot/instructions/code-health.instructions.md +1 -1
- package/package/corpus/harnesses/copilot/instructions/code-quality.csharp.instructions.md +3 -84
- package/package/corpus/harnesses/copilot/instructions/code-quality.instructions.md +6 -51
- package/package/corpus/harnesses/copilot/instructions/code-quality.typescript.instructions.md +4 -81
- package/package/corpus/harnesses/copilot/instructions/codescene.instructions.md +5 -54
- package/package/corpus/harnesses/copilot/instructions/components.instructions.md +1 -1
- package/package/corpus/harnesses/copilot/instructions/cratis-folder-is-configuration.instructions.md +5 -22
- package/package/corpus/harnesses/copilot/instructions/csharp.instructions.md +7 -315
- package/package/corpus/harnesses/copilot/instructions/dialogs.instructions.md +1 -1
- package/package/corpus/harnesses/copilot/instructions/discoverability.instructions.md +3 -25
- package/package/corpus/harnesses/copilot/instructions/documentation-structure-and-formatting.instructions.md +5 -151
- package/package/corpus/harnesses/copilot/instructions/documentation.instructions.md +5 -104
- package/package/corpus/harnesses/copilot/instructions/editing-cratis-docs.instructions.md +5 -63
- package/package/corpus/harnesses/copilot/instructions/efcore.instructions.md +8 -55
- package/package/corpus/harnesses/copilot/instructions/efcore.specs.instructions.md +3 -33
- package/package/corpus/harnesses/copilot/instructions/elixir.instructions.md +6 -79
- package/package/corpus/harnesses/copilot/instructions/exit-codes-and-wrappers.instructions.md +4 -27
- package/package/corpus/harnesses/copilot/instructions/framework-dotnet.instructions.md +4 -6
- package/package/corpus/harnesses/copilot/instructions/framework.instructions.md +0 -2
- package/package/corpus/harnesses/copilot/instructions/frontend-quality.instructions.md +0 -1
- package/package/corpus/harnesses/copilot/instructions/frontend-testing.instructions.md +1 -1
- package/package/corpus/harnesses/copilot/instructions/github-actions.instructions.md +7 -138
- package/package/corpus/harnesses/copilot/instructions/glossary.instructions.md +19 -19
- package/package/corpus/harnesses/copilot/instructions/go-engineering.instructions.md +1 -4
- package/package/corpus/harnesses/copilot/instructions/go.instructions.md +2 -7
- package/package/corpus/harnesses/copilot/instructions/guards-and-fuses.instructions.md +5 -6
- package/package/corpus/harnesses/copilot/instructions/java.instructions.md +7 -129
- package/package/corpus/harnesses/copilot/instructions/kotlin.instructions.md +8 -165
- package/package/corpus/harnesses/copilot/instructions/orleans.instructions.md +5 -98
- package/package/corpus/harnesses/copilot/instructions/profiles.instructions.md +9 -63
- package/package/corpus/harnesses/copilot/instructions/scripting.instructions.md +1 -1
- package/package/corpus/harnesses/copilot/instructions/specs.csharp.instructions.md +8 -148
- package/package/corpus/harnesses/copilot/instructions/specs.elixir.instructions.md +4 -37
- package/package/corpus/harnesses/copilot/instructions/specs.typescript.instructions.md +3 -1
- package/package/corpus/harnesses/copilot/instructions/storybook.instructions.md +7 -70
- package/package/corpus/harnesses/copilot/instructions/typescript.instructions.md +8 -98
- package/package/corpus/harnesses/copilot/instructions/writing-correct-examples.instructions.md +3 -47
- package/package/corpus/harnesses/copilot/instructions/writing-cratis-docs.instructions.md +3 -65
- package/package/corpus/hooks/README.md +4 -7
- package/package/corpus/hooks/scripts/quality-gates.json +3 -5
- package/package/corpus/rules/ai-distribution.md +9 -102
- package/package/corpus/rules/authoring-skills.md +3 -5
- package/package/corpus/rules/browser.md +8 -49
- package/package/corpus/rules/code-health-policy.txt +4 -24
- package/package/corpus/rules/code-health.md +1 -1
- package/package/corpus/rules/code-quality.csharp.md +3 -84
- package/package/corpus/rules/code-quality.md +6 -51
- package/package/corpus/rules/code-quality.typescript.md +4 -81
- package/package/corpus/rules/codescene.md +5 -54
- package/package/corpus/rules/components.md +1 -1
- package/package/corpus/rules/cratis-folder-is-configuration.md +5 -22
- package/package/corpus/rules/csharp.md +7 -315
- package/package/corpus/rules/dialogs.md +1 -1
- package/package/corpus/rules/discoverability.md +3 -25
- package/package/corpus/rules/documentation-structure-and-formatting.md +5 -151
- package/package/corpus/rules/documentation.md +5 -104
- package/package/corpus/rules/editing-cratis-docs.md +5 -63
- package/package/corpus/rules/efcore.md +8 -55
- package/package/corpus/rules/efcore.specs.md +3 -33
- package/package/corpus/rules/elixir.md +6 -79
- package/package/corpus/rules/exit-codes-and-wrappers.md +4 -27
- package/package/corpus/rules/framework-dotnet.md +4 -6
- package/package/corpus/rules/framework.md +0 -2
- package/package/corpus/rules/frontend-quality.md +0 -1
- package/package/corpus/rules/frontend-testing.md +1 -1
- package/package/corpus/rules/general.md +2 -2
- package/package/corpus/rules/github-actions.md +7 -138
- package/package/corpus/rules/glossary.md +19 -19
- package/package/corpus/rules/go-engineering.md +1 -4
- package/package/corpus/rules/go.md +2 -7
- package/package/corpus/rules/guards-and-fuses.md +5 -6
- package/package/corpus/rules/java.md +7 -129
- package/package/corpus/rules/kotlin.md +8 -165
- package/package/corpus/rules/orleans.md +5 -98
- package/package/corpus/rules/profiles.md +9 -63
- package/package/corpus/rules/scripting.md +1 -1
- package/package/corpus/rules/specs.csharp.md +8 -148
- package/package/corpus/rules/specs.elixir.md +4 -37
- package/package/corpus/rules/specs.typescript.md +3 -1
- package/package/corpus/rules/storybook.md +7 -70
- package/package/corpus/rules/typescript.md +8 -98
- package/package/corpus/rules/writing-correct-examples.md +3 -47
- package/package/corpus/rules/writing-cratis-docs.md +3 -65
- package/package/corpus/skills/cratis-application-growth/SKILL.md +7 -54
- package/package/corpus/skills/cratis-application-growth/references/move-and-untangle.md +49 -0
- package/package/corpus/skills/cratis-application-growth/references/rename-window.md +12 -14
- package/package/corpus/skills/cratis-application-growth/references/stages.md +2 -2
- package/package/corpus/skills/cratis-arc-authorize-request/SKILL.md +2 -2
- package/package/corpus/skills/cratis-arc-authorize-request/references/csharp.md +3 -3
- package/package/corpus/skills/cratis-arc-authorize-request/references/kotlin.md +2 -2
- package/package/corpus/skills/cratis-arc-code-analysis-typescript/SKILL.md +10 -43
- package/package/corpus/skills/cratis-arc-code-analysis-typescript/references/rule-fixes.md +40 -0
- package/package/corpus/skills/cratis-arc-connect-storage/SKILL.md +1 -1
- package/package/corpus/skills/cratis-arc-connect-storage/references/csharp.md +1 -1
- package/package/corpus/skills/cratis-arc-declare-command/references/csharp.md +4 -4
- package/package/corpus/skills/cratis-arc-declare-command/references/go.md +1 -1
- package/package/corpus/skills/cratis-arc-declare-command/references/kotlin.md +6 -7
- package/package/corpus/skills/cratis-arc-declare-operation/SKILL.md +2 -8
- package/package/corpus/skills/cratis-arc-declare-operation/references/csharp.md +1 -1
- package/package/corpus/skills/cratis-arc-diagnose-live-query/SKILL.md +1 -1
- package/package/corpus/skills/cratis-arc-diagnose-live-query/references/csharp.md +1 -1
- package/package/corpus/skills/cratis-arc-expose-mcp-operation/SKILL.md +6 -12
- package/package/corpus/skills/cratis-arc-expose-mcp-operation/references/custom-exposure-and-audit.md +4 -0
- package/package/corpus/skills/cratis-arc-expose-query/SKILL.md +2 -2
- package/package/corpus/skills/cratis-arc-expose-query/references/csharp.md +11 -4
- package/package/corpus/skills/cratis-arc-expose-query/references/typescript.md +1 -1
- package/package/corpus/skills/cratis-arc-generate-proxies/SKILL.md +2 -2
- package/package/corpus/skills/cratis-arc-generate-proxies/references/csharp.md +1 -1
- package/package/corpus/skills/cratis-arc-generate-proxies/references/go.md +19 -2
- package/package/corpus/skills/cratis-arc-generate-proxies/references/typescript.md +1 -1
- package/package/corpus/skills/cratis-arc-host-application/SKILL.md +1 -1
- package/package/corpus/skills/cratis-arc-host-application/references/csharp.md +1 -2
- package/package/corpus/skills/cratis-arc-host-application/references/elixir.md +2 -2
- package/package/corpus/skills/cratis-arc-host-application/references/go.md +5 -1
- package/package/corpus/skills/cratis-arc-host-application/references/java.md +1 -1
- package/package/corpus/skills/cratis-arc-host-application/references/kotlin.md +1 -1
- package/package/corpus/skills/cratis-arc-host-application/references/typescript.md +1 -1
- package/package/corpus/skills/cratis-arc-identity-and-tenancy-kotlin/SKILL.md +4 -7
- package/package/corpus/skills/cratis-arc-invoke-command/SKILL.md +1 -1
- package/package/corpus/skills/cratis-arc-invoke-command/references/csharp.md +4 -4
- package/package/corpus/skills/cratis-arc-invoke-command/references/typescript.md +1 -1
- package/package/corpus/skills/cratis-arc-isolate-tenant/SKILL.md +2 -2
- package/package/corpus/skills/cratis-arc-isolate-tenant/references/csharp.md +2 -2
- package/package/corpus/skills/cratis-arc-isolate-tenant/references/elixir.md +1 -1
- package/package/corpus/skills/cratis-arc-isolate-tenant/references/java.md +1 -1
- package/package/corpus/skills/cratis-arc-isolate-tenant/references/kotlin.md +1 -1
- package/package/corpus/skills/cratis-arc-isolate-tenant/references/typescript.md +4 -2
- package/package/corpus/skills/cratis-arc-migrate-relational-schema/SKILL.md +6 -6
- package/package/corpus/skills/cratis-arc-page-query/SKILL.md +3 -3
- package/package/corpus/skills/cratis-arc-page-query/references/csharp.md +10 -6
- package/package/corpus/skills/cratis-arc-page-query/references/elixir.md +2 -2
- package/package/corpus/skills/cratis-arc-page-query/references/java.md +1 -1
- package/package/corpus/skills/cratis-arc-page-query/references/kotlin.md +1 -1
- package/package/corpus/skills/cratis-arc-react-bind-slice/SKILL.md +2 -2
- package/package/corpus/skills/cratis-arc-react-bind-slice/references/csharp.md +1 -1
- package/package/corpus/skills/cratis-arc-react-bind-slice/references/kotlin.md +1 -1
- package/package/corpus/skills/cratis-arc-react-separate-view-model/SKILL.md +7 -3
- package/package/corpus/skills/cratis-arc-react-separate-view-model/references/react-routing-and-messaging.md +1 -1
- package/package/corpus/skills/cratis-arc-select-backend-sdk/SKILL.md +2 -2
- package/package/corpus/skills/cratis-arc-select-backend-sdk/references/elixir.md +2 -4
- package/package/corpus/skills/cratis-arc-select-backend-sdk/references/go.md +2 -2
- package/package/corpus/skills/cratis-arc-select-backend-sdk/references/java.md +1 -1
- package/package/corpus/skills/cratis-arc-select-backend-sdk/references/kotlin.md +2 -2
- package/package/corpus/skills/cratis-arc-select-backend-sdk/references/typescript.md +1 -3
- package/package/corpus/skills/cratis-arc-spring-data-kotlin/SKILL.md +13 -51
- package/package/corpus/skills/cratis-arc-spring-data-kotlin/references/read-model-naming.md +9 -1
- package/package/corpus/skills/cratis-arc-spring-data-kotlin/references/storage-boundaries.md +40 -0
- package/package/corpus/skills/cratis-arc-storage-typescript/SKILL.md +19 -64
- package/package/corpus/skills/cratis-arc-storage-typescript/references/drizzle.md +62 -0
- package/package/corpus/skills/cratis-arc-tenancy-typescript/SKILL.md +24 -55
- package/package/corpus/skills/cratis-arc-tenancy-typescript/references/tenant-selection.md +49 -0
- package/package/corpus/skills/cratis-arc-testing-kotlin/SKILL.md +13 -31
- package/package/corpus/skills/cratis-arc-testing-kotlin/references/jvm-scenario-variants.md +25 -0
- package/package/corpus/skills/cratis-arc-testing-typescript/SKILL.md +24 -62
- package/package/corpus/skills/cratis-arc-testing-typescript/references/hosts-and-runners.md +51 -0
- package/package/corpus/skills/cratis-arc-validate-command/SKILL.md +4 -4
- package/package/corpus/skills/cratis-arc-validate-command/references/csharp.md +10 -12
- package/package/corpus/skills/cratis-arc-validate-command/references/elixir.md +16 -3
- package/package/corpus/skills/cratis-arc-validate-command/references/go.md +19 -2
- package/package/corpus/skills/cratis-arc-validate-command/references/java.md +20 -7
- package/package/corpus/skills/cratis-arc-validate-command/references/kotlin.md +22 -2
- package/package/corpus/skills/cratis-arc-validate-command/references/python.md +8 -2
- package/package/corpus/skills/cratis-arc-validate-command/references/typescript.md +22 -2
- package/package/corpus/skills/cratis-arc-validation-kotlin/SKILL.md +22 -248
- package/package/corpus/skills/cratis-arc-validation-kotlin/references/feature-filters.md +55 -0
- package/package/corpus/skills/cratis-arc-validation-kotlin/references/model-validation.md +72 -0
- package/package/corpus/skills/cratis-arc-validation-kotlin/references/server-validators.md +86 -0
- package/package/corpus/skills/cratis-arc-validation-typescript/SKILL.md +27 -275
- package/package/corpus/skills/cratis-arc-validation-typescript/references/models-and-queries.md +63 -0
- package/package/corpus/skills/cratis-arc-validation-typescript/references/rules-and-checks.md +46 -0
- package/package/corpus/skills/cratis-arc-validation-typescript/references/server-decisions.md +114 -0
- package/package/corpus/skills/cratis-chronicle-cli-operations/SKILL.md +15 -255
- package/package/corpus/skills/cratis-chronicle-cli-operations/references/command-effects.md +13 -6
- package/package/corpus/skills/cratis-chronicle-cli-operations/references/inspection.md +75 -0
- package/package/corpus/skills/cratis-chronicle-cli-operations/references/project-tooling.md +78 -13
- package/package/corpus/skills/cratis-chronicle-cli-operations/references/recovery-and-comparison.md +16 -14
- package/package/corpus/skills/cratis-chronicle-connect-application/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-connect-application/references/csharp.md +10 -6
- package/package/corpus/skills/cratis-chronicle-connect-application/references/elixir.md +1 -1
- package/package/corpus/skills/cratis-chronicle-constrain-append/SKILL.md +2 -2
- package/package/corpus/skills/cratis-chronicle-constrain-append/references/csharp.md +8 -8
- package/package/corpus/skills/cratis-chronicle-deploy-kernel/SKILL.md +10 -8
- package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/storage.md +8 -4
- package/package/corpus/skills/cratis-chronicle-evolve-event/SKILL.md +4 -4
- package/package/corpus/skills/cratis-chronicle-evolve-event/references/csharp.md +2 -2
- package/package/corpus/skills/cratis-chronicle-evolve-event/references/deployed-readers.md +21 -8
- package/package/corpus/skills/cratis-chronicle-evolve-event/references/elixir.md +1 -1
- package/package/corpus/skills/cratis-chronicle-inspect-observer/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-inspect-observer/references/csharp.md +5 -7
- package/package/corpus/skills/cratis-chronicle-inspect-observer/references/elixir.md +3 -3
- package/package/corpus/skills/cratis-chronicle-mcp-inspection/SKILL.md +10 -80
- package/package/corpus/skills/cratis-chronicle-mcp-inspection/references/blocked-tools.md +2 -2
- package/package/corpus/skills/cratis-chronicle-mcp-inspection/references/deployment.md +9 -24
- package/package/corpus/skills/cratis-chronicle-mcp-inspection/references/observational-tools.md +10 -0
- package/package/corpus/skills/cratis-chronicle-project-view/SKILL.md +2 -2
- package/package/corpus/skills/cratis-chronicle-project-view/references/csharp.md +7 -6
- package/package/corpus/skills/cratis-chronicle-project-view/references/elixir.md +2 -2
- package/package/corpus/skills/cratis-chronicle-project-view/references/go.md +6 -0
- package/package/corpus/skills/cratis-chronicle-project-view/references/java.md +6 -0
- package/package/corpus/skills/cratis-chronicle-project-view/references/kotlin.md +6 -0
- package/package/corpus/skills/cratis-chronicle-project-view/references/typescript.md +11 -5
- package/package/corpus/skills/cratis-chronicle-protect-decision/SKILL.md +2 -2
- package/package/corpus/skills/cratis-chronicle-protect-decision/references/csharp.md +4 -4
- package/package/corpus/skills/cratis-chronicle-protect-decision/references/elixir.md +2 -2
- package/package/corpus/skills/cratis-chronicle-protect-decision/references/go.md +3 -1
- package/package/corpus/skills/cratis-chronicle-protect-personal-data/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-protect-personal-data/references/csharp.md +1 -1
- package/package/corpus/skills/cratis-chronicle-publish-contract/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-publish-contract/references/csharp.md +51 -40
- package/package/corpus/skills/cratis-chronicle-publish-contract/references/elixir.md +1 -1
- package/package/corpus/skills/cratis-chronicle-react-to-fact/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-react-to-fact/references/{occurrences.md → csharp-occurrences.md} +2 -2
- package/package/corpus/skills/cratis-chronicle-react-to-fact/references/csharp.md +5 -6
- package/package/corpus/skills/cratis-chronicle-react-to-fact/references/go.md +1 -1
- package/package/corpus/skills/cratis-chronicle-react-to-fact/references/java.md +1 -1
- package/package/corpus/skills/cratis-chronicle-react-to-fact/references/kotlin.md +1 -1
- package/package/corpus/skills/cratis-chronicle-record-event/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-record-event/references/csharp.md +21 -19
- package/package/corpus/skills/cratis-chronicle-record-event/references/elixir.md +3 -3
- package/package/corpus/skills/cratis-chronicle-record-event/references/go.md +1 -1
- package/package/corpus/skills/cratis-chronicle-record-event/references/java.md +3 -4
- package/package/corpus/skills/cratis-chronicle-record-event/references/kotlin.md +3 -4
- package/package/corpus/skills/cratis-chronicle-record-event/references/typescript.md +2 -2
- package/package/corpus/skills/cratis-chronicle-reduce-state/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-reduce-state/references/csharp.md +7 -2
- package/package/corpus/skills/cratis-chronicle-reduce-state/references/typescript.md +1 -1
- package/package/corpus/skills/cratis-chronicle-select-client/SKILL.md +4 -4
- package/package/corpus/skills/cratis-chronicle-select-client/references/csharp.md +3 -3
- package/package/corpus/skills/cratis-chronicle-select-client/references/elixir.md +2 -6
- package/package/corpus/skills/cratis-chronicle-select-client/references/go.md +2 -2
- package/package/corpus/skills/cratis-chronicle-select-client/references/java.md +1 -1
- package/package/corpus/skills/cratis-chronicle-select-client/references/kotlin.md +1 -5
- package/package/corpus/skills/cratis-chronicle-select-client/references/python.md +3 -3
- package/package/corpus/skills/cratis-chronicle-select-client/references/typescript.md +2 -2
- package/package/corpus/skills/cratis-chronicle-web-workbench/SKILL.md +12 -201
- package/package/corpus/skills/cratis-chronicle-web-workbench/references/hosting.md +67 -0
- package/package/corpus/skills/cratis-chronicle-web-workbench/references/operations.md +88 -0
- package/package/corpus/skills/cratis-ci-pipeline-performance/SKILL.md +8 -4
- package/package/corpus/skills/cratis-ci-pipeline-performance/references/build-once-and-shard.md +13 -11
- package/package/corpus/skills/cratis-ci-pipeline-performance/references/caching.md +2 -2
- package/package/corpus/skills/cratis-ci-pipeline-performance/references/flaky-and-hung-jobs.md +6 -4
- package/package/corpus/skills/cratis-ci-pipeline-performance/references/required-checks-and-path-filters.md +20 -61
- package/package/corpus/skills/cratis-ci-pipeline-performance/references/security-and-pinning.md +1 -1
- package/package/corpus/skills/cratis-cli-terminal-workbench/SKILL.md +15 -26
- package/package/corpus/skills/cratis-code-review/SKILL.md +7 -6
- package/package/corpus/skills/cratis-commits-and-pull-requests/SKILL.md +1 -1
- package/package/corpus/skills/cratis-commits-and-pull-requests/references/pr-description.md +1 -1
- package/package/corpus/skills/cratis-components-accessibility/SKILL.md +14 -206
- package/package/corpus/skills/cratis-components-accessibility/references/control-labels.md +29 -0
- package/package/corpus/skills/cratis-components-accessibility/references/focus-and-announcements.md +8 -0
- package/package/corpus/skills/cratis-components-build-canvas/SKILL.md +7 -7
- package/package/corpus/skills/cratis-components-build-canvas/references/pixi-items.md +1 -1
- package/package/corpus/skills/cratis-components-choose-control/SKILL.md +7 -8
- package/package/corpus/skills/cratis-components-choose-control/references/collections.md +2 -2
- package/package/corpus/skills/cratis-components-choose-control/references/inputs.md +1 -1
- package/package/corpus/skills/cratis-components-compose-toolbar/SKILL.md +22 -27
- package/package/corpus/skills/cratis-components-compose-toolbar/references/contributed-tools.md +5 -0
- package/package/corpus/skills/cratis-components-coordinate-feedback/SKILL.md +19 -25
- package/package/corpus/skills/cratis-components-display-list/SKILL.md +26 -19
- package/package/corpus/skills/cratis-components-display-list/references/server-query.md +3 -3
- package/package/corpus/skills/cratis-components-edit-schema-data/SKILL.md +15 -12
- package/package/corpus/skills/cratis-components-edit-schema-data/references/controlled-editor.md +3 -3
- package/package/corpus/skills/cratis-components-explore-data/SKILL.md +7 -7
- package/package/corpus/skills/cratis-components-host-chat/SKILL.md +7 -7
- package/package/corpus/skills/cratis-components-submit-form/SKILL.md +9 -15
- package/package/corpus/skills/cratis-components-submit-form/references/confirmation.md +5 -5
- package/package/corpus/skills/cratis-components-submit-form/references/wizard.md +3 -3
- package/package/corpus/skills/cratis-components-theme-application/SKILL.md +7 -51
- package/package/corpus/skills/cratis-components-theme-application/references/palette.md +49 -0
- package/package/corpus/skills/cratis-components-theme-application/references/renderer-adapters.md +4 -2
- package/package/corpus/skills/cratis-content-length/SKILL.md +34 -46
- package/package/corpus/skills/cratis-content-length/references/length-evidence.md +26 -127
- package/package/corpus/skills/cratis-developer-marketing/SKILL.md +15 -27
- package/package/corpus/skills/cratis-developer-marketing/references/measurement.md +3 -19
- package/package/corpus/skills/cratis-developer-marketing/references/playbook-evidence.md +29 -224
- package/package/corpus/skills/cratis-discoverability/SKILL.md +11 -4
- package/package/corpus/skills/cratis-discoverability/references/package-metadata.md +2 -2
- package/package/corpus/skills/cratis-documentation-writing/SKILL.md +4 -3
- package/package/corpus/skills/cratis-engineering-ci-gates/SKILL.md +13 -129
- package/package/corpus/skills/cratis-engineering-ci-gates/references/gate-operation.md +132 -0
- package/package/corpus/skills/cratis-engineering-consolidation-guard/SKILL.md +11 -100
- package/package/corpus/skills/cratis-engineering-consolidation-guard/references/ci-required-check.md +55 -40
- package/package/corpus/skills/cratis-engineering-consolidation-guard/references/source-verification.md +68 -0
- package/package/corpus/skills/cratis-engineering-consolidation-guard/references/verification-details.md +38 -0
- package/package/corpus/skills/cratis-engineering-csharp-conventions/SKILL.md +14 -65
- package/package/corpus/skills/cratis-engineering-csharp-conventions/references/exceptions-logging-and-di.md +40 -174
- package/package/corpus/skills/cratis-engineering-decision-record/SKILL.md +8 -52
- package/package/corpus/skills/cratis-engineering-decision-record/references/decision-pitfalls.md +29 -0
- package/package/corpus/skills/cratis-engineering-decision-record/references/decision-scope.md +20 -0
- package/package/corpus/skills/cratis-engineering-decision-record/references/record-format.md +3 -4
- package/package/corpus/skills/cratis-engineering-docs-authoring/SKILL.md +7 -12
- package/package/corpus/skills/cratis-engineering-docs-authoring/references/site-format.md +5 -4
- package/package/corpus/skills/cratis-engineering-effect-boundaries/SKILL.md +6 -40
- package/package/corpus/skills/cratis-engineering-effect-boundaries/references/failure-archetypes.md +18 -151
- package/package/corpus/skills/cratis-engineering-inherited-work/SKILL.md +5 -21
- package/package/corpus/skills/cratis-engineering-inherited-work/references/continue-inherited-work.md +19 -0
- package/package/corpus/skills/cratis-engineering-issue-design-note/SKILL.md +3 -66
- package/package/corpus/skills/cratis-engineering-issue-design-note/references/design-note-format.md +68 -0
- package/package/corpus/skills/cratis-engineering-issue-hygiene/SKILL.md +2 -84
- package/package/corpus/skills/cratis-engineering-issue-hygiene/references/issue-disposition.md +87 -0
- package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/SKILL.md +15 -263
- package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/dependency-map.md +3 -3
- package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/docker-images.md +28 -6
- package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/dotnet-nuget.md +18 -14
- package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/helper-runbook.md +231 -0
- package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/other-environments.md +2 -3
- package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/worked-examples.md +62 -77
- package/package/corpus/skills/cratis-engineering-post-mortem/SKILL.md +6 -39
- package/package/corpus/skills/cratis-engineering-post-mortem/references/proportionate-follow-up.md +36 -0
- package/package/corpus/skills/cratis-engineering-regression-cluster/SKILL.md +4 -4
- package/package/corpus/skills/cratis-engineering-release-trains/SKILL.md +8 -134
- package/package/corpus/skills/cratis-engineering-release-trains/references/candidate-assembly.md +139 -0
- package/package/corpus/skills/cratis-engineering-review-rounds/SKILL.md +3 -100
- package/package/corpus/skills/cratis-engineering-review-rounds/references/round-handoffs.md +109 -0
- package/package/corpus/skills/cratis-environments-and-secrets/SKILL.md +1 -5
- package/package/corpus/skills/cratis-environments-and-secrets/references/environment-file.md +1 -3
- package/package/corpus/skills/cratis-event-model-diagram/SKILL.md +11 -116
- package/package/corpus/skills/cratis-event-model-diagram/references/frame-patterns.md +93 -0
- package/package/corpus/skills/cratis-fundamentals-concept-go/SKILL.md +4 -15
- package/package/corpus/skills/cratis-fundamentals-name-value/SKILL.md +8 -8
- package/package/corpus/skills/cratis-fundamentals-name-value/references/csharp.md +4 -4
- package/package/corpus/skills/cratis-fundamentals-name-value/references/elixir.md +1 -1
- package/package/corpus/skills/cratis-fundamentals-name-value/references/go.md +1 -1
- package/package/corpus/skills/cratis-fundamentals-name-value/references/java.md +5 -5
- package/package/corpus/skills/cratis-fundamentals-name-value/references/kotlin.md +15 -2
- package/package/corpus/skills/cratis-fundamentals-name-value/references/python.md +1 -1
- package/package/corpus/skills/cratis-fundamentals-name-value/references/typescript.md +1 -1
- package/package/corpus/skills/cratis-fundamentals-telemetry/SKILL.md +10 -27
- package/package/corpus/skills/cratis-fundamentals-telemetry/references/otlp-export.md +16 -0
- package/package/corpus/skills/cratis-fundamentals-type-discovery/SKILL.md +26 -188
- package/package/corpus/skills/cratis-fundamentals-type-discovery/references/diagnostics.md +14 -0
- package/package/corpus/skills/cratis-governed-release-methodology/SKILL.md +7 -5
- package/package/corpus/skills/cratis-lens-browser-extension/SKILL.md +23 -157
- package/package/corpus/skills/cratis-lens-browser-extension/references/troubleshooting.md +139 -0
- package/package/corpus/skills/cratis-llm-friendly-documentation/SKILL.md +7 -5
- package/package/corpus/skills/cratis-modeling-design-event-model/SKILL.md +2 -4
- package/package/corpus/skills/cratis-modeling-design-event-model/references/model-first.md +7 -0
- package/package/corpus/skills/cratis-modeling-discover-timeline/SKILL.md +2 -2
- package/package/corpus/skills/cratis-modeling-discover-timeline/references/group-and-document-intake.md +1 -1
- package/package/corpus/skills/cratis-modeling-review-event-model/SKILL.md +2 -2
- package/package/corpus/skills/cratis-modeling-review-event-model/references/implementation-findings.md +2 -2
- package/package/corpus/skills/cratis-modeling-trace-existing-behavior/SKILL.md +5 -23
- package/package/corpus/skills/cratis-modeling-trace-existing-behavior/references/compare-evidence.md +20 -0
- package/package/corpus/skills/cratis-modeling-trace-existing-behavior/references/recovery-inputs.md +3 -3
- package/package/corpus/skills/cratis-multi-service-local-orchestration/SKILL.md +8 -63
- package/package/corpus/skills/cratis-multi-service-local-orchestration/references/aspire.md +52 -0
- package/package/corpus/skills/cratis-observability/SKILL.md +1 -1
- package/package/corpus/skills/cratis-observability/references/arc-and-chronicle-signals.md +9 -23
- package/package/corpus/skills/cratis-observability/references/chronicle-kernel-export.md +3 -14
- package/package/corpus/skills/cratis-observability/references/csharp.md +4 -6
- package/package/corpus/skills/cratis-observability/references/elixir.md +1 -1
- package/package/corpus/skills/cratis-observability/references/troubleshooting.md +4 -5
- package/package/corpus/skills/cratis-onboarding-runtime/SKILL.md +1 -4
- package/package/corpus/skills/cratis-onboarding-runtime/references/default-offering.md +0 -3
- package/package/corpus/skills/cratis-onboarding-runtime/references/sign-up-review.md +0 -4
- package/package/corpus/skills/cratis-orchestration-lanes/SKILL.md +7 -49
- package/package/corpus/skills/cratis-orchestration-lanes/references/escalation.md +22 -0
- package/package/corpus/skills/cratis-orchestration-lanes/references/inbox-and-handover.md +4 -4
- package/package/corpus/skills/cratis-orchestration-lanes/references/placeholders.md +1 -1
- package/package/corpus/skills/cratis-orchestration-lanes/references/roles.md +12 -0
- package/package/corpus/skills/cratis-orchestration-lanes/references/roll-call.md +12 -0
- package/package/corpus/skills/cratis-orchestration-lanes/references/worktrees.md +10 -0
- package/package/corpus/skills/cratis-orchestration-merge-gates/SKILL.md +14 -13
- package/package/corpus/skills/cratis-orchestration-merge-gates/references/merge-queue.md +51 -26
- package/package/corpus/skills/cratis-orchestration-merge-gates/references/unattended-guards.md +8 -14
- package/package/corpus/skills/cratis-orleans-jobs/SKILL.md +9 -65
- package/package/corpus/skills/cratis-orleans-jobs/references/activation-callbacks.md +5 -0
- package/package/corpus/skills/cratis-orleans-jobs/references/lifecycle-and-placement.md +11 -7
- package/package/corpus/skills/cratis-orleans-jobs/references/state-machines.md +1 -1
- package/package/corpus/skills/cratis-orleans-jobs/references/step-planning.md +27 -0
- package/package/corpus/skills/cratis-orleans-jobs/references/storage-and-options.md +35 -0
- package/package/corpus/skills/cratis-performance-review/SKILL.md +6 -76
- package/package/corpus/skills/cratis-performance-review/references/review-checklist.md +79 -0
- package/package/corpus/skills/cratis-platform-configure-environment/SKILL.md +19 -16
- package/package/corpus/skills/cratis-platform-contribute-change/SKILL.md +2 -2
- package/package/corpus/skills/cratis-platform-deliver-slice/SKILL.md +5 -5
- package/package/corpus/skills/cratis-platform-deliver-slice/references/coordinate-slices.md +1 -1
- package/package/corpus/skills/cratis-platform-diagnose-slice/SKILL.md +2 -3
- package/package/corpus/skills/cratis-platform-prepare-release-pr/SKILL.md +2 -2
- package/package/corpus/skills/cratis-platform-start-application/SKILL.md +10 -8
- package/package/corpus/skills/cratis-platform-start-application/references/csharp.md +6 -6
- package/package/corpus/skills/cratis-platform-start-application/references/java.md +4 -4
- package/package/corpus/skills/cratis-platform-start-application/references/kotlin.md +4 -4
- package/package/corpus/skills/cratis-platform-verify-service-handoff/SKILL.md +3 -3
- package/package/corpus/skills/cratis-release-notes/SKILL.md +9 -133
- package/package/corpus/skills/cratis-release-notes/references/channel-guidance.md +59 -0
- package/package/corpus/skills/cratis-release-notes/references/publish-repair.md +64 -0
- package/package/corpus/skills/cratis-rtk/SKILL.md +12 -18
- package/package/corpus/skills/cratis-screenplay-accept-model/SKILL.md +3 -3
- package/package/corpus/skills/cratis-screenplay-accept-model/references/capability-consumption.md +1 -1
- package/package/corpus/skills/cratis-screenplay-accept-model/references/coverage-obligations.md +1 -1
- package/package/corpus/skills/cratis-screenplay-authentication-and-onboarding/SKILL.md +25 -59
- package/package/corpus/skills/cratis-screenplay-authentication-and-onboarding/references/onboarding-directives.md +11 -10
- package/package/corpus/skills/cratis-screenplay-author-extension/SKILL.md +9 -6
- package/package/corpus/skills/cratis-screenplay-author-extension/references/consume.md +3 -3
- package/package/corpus/skills/cratis-screenplay-author-extension/references/stage-candidate.md +8 -0
- package/package/corpus/skills/cratis-screenplay-availability/SKILL.md +20 -167
- package/package/corpus/skills/cratis-screenplay-availability/references/complete-example.md +23 -47
- package/package/corpus/skills/cratis-screenplay-availability/references/review-checks.md +9 -10
- package/package/corpus/skills/cratis-screenplay-availability/references/runtime-ownership.md +26 -23
- package/package/corpus/skills/cratis-screenplay-declare-slice/SKILL.md +6 -14
- package/package/corpus/skills/cratis-screenplay-declare-slice/references/projection-replay.md +2 -2
- package/package/corpus/skills/cratis-screenplay-declare-slice/references/read-identity.md +1 -1
- package/package/corpus/skills/cratis-screenplay-edit-workspace/SKILL.md +7 -9
- package/package/corpus/skills/cratis-screenplay-edit-workspace/references/model-notes.md +1 -1
- package/package/corpus/skills/cratis-screenplay-handoff-slice/SKILL.md +10 -14
- package/package/corpus/skills/cratis-screenplay-model-automation/SKILL.md +1 -1
- package/package/corpus/skills/cratis-screenplay-model-automation/references/reaction-boundaries.md +1 -1
- package/package/corpus/skills/cratis-screenplay-model-interaction/SKILL.md +6 -31
- package/package/corpus/skills/cratis-screenplay-model-interaction/references/shell-and-data.md +22 -0
- package/package/corpus/skills/cratis-screenplay-model-translation/SKILL.md +5 -5
- package/package/corpus/skills/cratis-screenplay-onboard-workspace/SKILL.md +5 -5
- package/package/corpus/skills/cratis-screenplay-onboard-workspace/references/version-migration.md +4 -4
- package/package/corpus/skills/cratis-screenplay-recover-intent/SKILL.md +2 -2
- package/package/corpus/skills/cratis-screenplay-recover-intent/references/csharp.md +2 -2
- package/package/corpus/skills/cratis-screenplay-recover-intent/references/ground-truth-benchmark.md +1 -1
- package/package/corpus/skills/cratis-screenplay-specify-outcome/SKILL.md +4 -75
- package/package/corpus/skills/cratis-screenplay-specify-outcome/references/host-body-execution.md +0 -2
- package/package/corpus/skills/cratis-screenplay-specify-outcome/references/observable-result.md +85 -1
- package/package/corpus/skills/cratis-screenplay-specify-outcome/references/query-rejections.md +1 -1
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +15 -133
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/boundaries.md +5 -5
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/chronicle-boundaries.md +4 -12
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/consistency-and-concurrency.md +28 -57
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/evolution-example.md +4 -5
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/evolution.md +13 -20
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/multi-service-models.md +1 -1
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/neighbouring-skills.md +1 -1
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/read-model-keys.md +3 -5
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/stream-id-rules.md +2 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/stream-patterns.md +5 -5
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/streams-example.md +82 -71
- package/package/corpus/skills/cratis-security-review/SKILL.md +4 -73
- package/package/corpus/skills/cratis-security-review/references/arc-boundaries.md +24 -13
- package/package/corpus/skills/cratis-security-review/references/review-checklist.md +74 -0
- package/package/corpus/skills/cratis-session-handoff/SKILL.md +7 -32
- package/package/corpus/skills/cratis-session-handoff/references/handoff-template.md +2 -2
- package/package/corpus/skills/cratis-session-handoff/references/session-hygiene.md +20 -0
- package/package/corpus/skills/cratis-showrunner-herald/SKILL.md +9 -17
- package/package/corpus/skills/cratis-showrunner-herald/references/options.md +2 -2
- package/package/corpus/skills/cratis-showrunner-herald/references/templates-and-images.md +16 -10
- package/package/corpus/skills/cratis-social-feed-post/SKILL.md +9 -162
- package/package/corpus/skills/cratis-social-feed-post/references/asset-and-formatting.md +37 -0
- package/package/corpus/skills/cratis-social-feed-post/references/editorial-checks.md +40 -0
- package/package/corpus/skills/cratis-social-feed-post/references/engagement-evidence.md +39 -150
- package/package/corpus/skills/cratis-social-feed-post/references/linkedin-media.md +24 -0
- package/package/corpus/skills/cratis-social-feed-post/references/other-channels.md +23 -0
- package/package/corpus/skills/cratis-specifications-exercise-backend/SKILL.md +5 -5
- package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-command-results.md +2 -2
- package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-query-scenario.md +13 -5
- package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp.md +7 -4
- package/package/corpus/skills/cratis-specifications-exercise-backend/references/elixir.md +1 -1
- package/package/corpus/skills/cratis-specifications-exercise-backend/references/go.md +20 -4
- package/package/corpus/skills/cratis-specifications-exercise-backend/references/typescript.md +1 -1
- package/package/corpus/skills/cratis-specifications-isolate-behavior/SKILL.md +2 -2
- package/package/corpus/skills/cratis-specifications-observe-ui/SKILL.md +5 -5
- package/package/corpus/skills/cratis-specifications-test-application-ui/SKILL.md +2 -2
- package/package/corpus/skills/cratis-specifications-test-application-ui/references/typescript-command-results.md +2 -2
- package/package/corpus/skills/cratis-specifications-test-typescript-behavior/SKILL.md +2 -2
- package/package/corpus/skills/cratis-stage-render-slice/SKILL.md +10 -9
- package/package/corpus/skills/cratis-stage-run-sandbox/SKILL.md +3 -3
- package/package/corpus/skills/cratis-stage-run-sandbox/references/semantic-spec-runner.md +7 -6
- package/package/corpus/skills/cratis-studio-mcp-safety-guidance/SKILL.md +4 -6
- package/package/corpus/skills/cratis-technical-examples/SKILL.md +10 -106
- package/package/corpus/skills/cratis-technical-examples/references/csharp-package-checks.md +1 -1
- package/package/corpus/skills/cratis-technical-examples/references/source-and-format.md +42 -0
- package/package/corpus/skills/cratis-technical-examples/references/typescript-package-checks.md +2 -2
- package/package/corpus/skills/cratis-technical-examples/references/verification-scope.md +37 -0
- package/package/corpus/skills/cratis-ux-review/SKILL.md +8 -40
- package/package/corpus/skills/cratis-ux-review/references/capture-contract.md +24 -0
- package/package/corpus/skills/cratis-ux-review/references/checklist.md +1 -1
- package/package/corpus/skills/cratis-ux-review/references/report-template.md +2 -1
- package/package/corpus/skills/cratis-writing-voice-and-cadence/SKILL.md +19 -132
- package/package/corpus/skills/cratis-writing-voice-and-cadence/references/ai-tells.md +24 -97
- package/package/corpus/skills/cratis-writing-voice-and-cadence/references/author-and-batch.md +23 -0
- package/package/corpus/skills/cratis-writing-voice-and-cadence/references/documentation-evidence.md +25 -0
- package/package/corpus/skills/cratis-writing-voice-and-cadence/references/interpretation.md +17 -0
- package/package/corpus/skills/cratis-writing-voice-and-cadence/references/stock-constructions.md +23 -0
- package/package/corpus/skills/cratis-writing-voice-and-cadence/references/voice-guidance.md +8 -29
- package/package.json +1 -1
- /package/package/corpus/skills/cratis-chronicle-protect-decision/references/{standalone.md → csharp-standalone.md} +0 -0
- /package/package/corpus/skills/cratis-engineering-post-mortem/references/{examples/silent-backup-failure.md → silent-backup-failure.md} +0 -0
- /package/package/corpus/skills/cratis-engineering-post-mortem/references/{examples/unintended-release-regression.md → unintended-release-regression.md} +0 -0
|
@@ -5,101 +5,11 @@ paths:
|
|
|
5
5
|
- "**/*.tsx"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
StateChange = 'stateChange',
|
|
17
|
-
StateView = 'stateView',
|
|
18
|
-
Automation = 'automation',
|
|
19
|
-
Translator = 'translator',
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
// ❌ Wrong — no refactoring support, invisible to tooling
|
|
23
|
-
export type SliceType = 'stateChange' | 'stateView' | 'automation' | 'translator';
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
- Use enum members everywhere — `switch` cases, comparisons, defaults.
|
|
27
|
-
- Do **not** import enums as `type`; they are values.
|
|
28
|
-
- Export enums from `index.ts` without the `type` keyword.
|
|
29
|
-
|
|
30
|
-
## One Type or Enum per File
|
|
31
|
-
|
|
32
|
-
- Every interface, type alias, and enum lives in **its own file**, named after the type (e.g. `SliceType.ts`).
|
|
33
|
-
- **Never create** `types.ts`, `models.ts`, `interfaces.ts` grab-bag files — they become dumping grounds that grow without limit.
|
|
34
|
-
- Exception: component props interfaces (`*Props`) may live alongside their component `.tsx` file since they are tightly coupled to that component.
|
|
35
|
-
- Aggregate exports through the folder's `index.ts`.
|
|
36
|
-
|
|
37
|
-
## Type Safety
|
|
38
|
-
|
|
39
|
-
`any` disables the compiler — the one tool that catches bugs for free. Every `any` is a hole in the safety net. Use `unknown` and narrow with type guards instead.
|
|
40
|
-
|
|
41
|
-
- Never use `any` — use `unknown`, `Record<string, unknown>`, or proper generic constraints.
|
|
42
|
-
- Prefer `value as unknown as TargetType` over `value as any`.
|
|
43
|
-
- Use `unknown` as default generic parameter instead of `any`.
|
|
44
|
-
- React synthetic events (`React.MouseEvent<Element, MouseEvent>`) and DOM events (`MouseEvent`) are different types — don't mix them.
|
|
45
|
-
- **`int64`/`uint64` Chronicle fields generate as `bigint`** in the TypeScript proxies (not `number`, which silently truncated past `Number.MAX_SAFE_INTEGER`). Sequence numbers, large counters, and 64-bit ids surface as `bigint` — use `bigint` arithmetic, never `Number()`.
|
|
46
|
-
|
|
47
|
-
## User-facing strings (localization)
|
|
48
|
-
|
|
49
|
-
How user-visible text is handled is **product policy, not a Cratis framework rule**: locales belong in a downstream application's own rules. Cratis itself has no mandatory i18n layer or `Strings` alias.
|
|
50
|
-
|
|
51
|
-
- If the app has a localization convention (e.g. a translation object behind a `strings`/`Strings` import, or any i18n library), follow it consistently and keep raw string literals to constant, non-user-facing values (CSS class names, `key` props, internal identifiers).
|
|
52
|
-
- If the app ships literal text, literal labels in JSX are fine.
|
|
53
|
-
|
|
54
|
-
Either way, the Cratis-generic rule is only that strings are handled consistently within the app — not a specific file layout or import alias.
|
|
55
|
-
|
|
56
|
-
## Arc proxies
|
|
57
|
-
|
|
58
|
-
Generated command and query proxies, their hooks, paging and forms are covered by **cratis-arc-react-bind-slice** and **cratis-arc-generate-proxies** where those skills are installed. Never edit a generated proxy by hand: change the backend type and regenerate.
|
|
59
|
-
|
|
60
|
-
## Language — American English Only
|
|
61
|
-
|
|
62
|
-
All identifiers, comments, JSDoc, and string literals must use **American English** spelling (initialize, serialize, behavior, color, organization, center, modeling, dialog, license, judgment, gray).
|
|
63
|
-
|
|
64
|
-
## Variables and Naming
|
|
65
|
-
|
|
66
|
-
- Prefer `const` over `let` over `var` when declaring variables.
|
|
67
|
-
- Never use shortened or abbreviated names for variables, parameters, or properties.
|
|
68
|
-
- Use full descriptive names: `deltaX` not `dx`, `index` not `idx`, `event` not `e`, `previous` not `prev`, `direction` not `dir`, `position` not `pos`, `contextMenu` not `ctx`/`ctxMenu`.
|
|
69
|
-
- The only acceptable short names are well-established domain terms (e.g. `id`, `url`, `min`, `max`).
|
|
70
|
-
|
|
71
|
-
## Imports and Compilation
|
|
72
|
-
|
|
73
|
-
- Never leave unused import statements in the code.
|
|
74
|
-
- Always ensure that the code compiles without warnings — use `yarn compile` to verify (successful runs produce no output).
|
|
75
|
-
- Review each file for lint compliance before finalizing.
|
|
76
|
-
- Never use placeholder or temporary types — use proper types from the start.
|
|
77
|
-
- **Never modify any file inside `node_modules/` or any build cache (e.g. `.vite/deps/`).** These are managed by the package manager and will be overwritten on the next install. If something appears broken in a library, look harder at the application code — especially when other usages of the same library work fine. Fixes belong in application code or upstream in the library's own repo.
|
|
78
|
-
|
|
79
|
-
## Folder Structure
|
|
80
|
-
|
|
81
|
-
- **Never give a `.tsx` the same basename as a `.ts` in the same folder.** The Arc proxy generator emits `<Slice>.ts` beside the slice's C#; a component named `<Slice>.tsx` next to it is **silently dropped from the program**: for one basename TypeScript keeps only the `.ts`, so the component's type errors are never reported and `tsc -b` stays green while the file is broken (reproduced on TypeScript 6.0.3 and 7.0.2 with `include: ["src/**/*"]`). At Arc v22.75.0 use `<CratisProxiesUseProxyFileSuffix>true</CratisProxiesUseProxyFileSuffix>` to emit `<Slice>.proxy.ts` with matching barrels; that is the clean generator fix. Otherwise name the component for what it renders (`Listing.tsx`, `RegisterAuthor.tsx`), never for the slice, and consider a repository spec that fails on any `.tsx` with a sibling `.ts` of the same name.
|
|
82
|
-
- Do not prefix a file, component, type, or symbol with the name of its containing folder or the concept it belongs to. Instead, use folder structure to provide that context.
|
|
83
|
-
- Favor functional folder structure over technical folder structure.
|
|
84
|
-
- Group files by the feature or concept they belong to, not by their technical role.
|
|
85
|
-
- Avoid folders like `components/`, `hooks/`, `utils/`, `types/` at the feature level.
|
|
86
|
-
|
|
87
|
-
## Advanced Type Safety
|
|
88
|
-
|
|
89
|
-
**Storybook:**
|
|
90
|
-
- Use `React.ComponentType<Record<string, never>>` for components with no props.
|
|
91
|
-
- Always use `as unknown as` when converting component imports to avoid type mismatch errors.
|
|
92
|
-
- Properly type story args — never use `any`.
|
|
93
|
-
|
|
94
|
-
**External libraries with strict generic constraints:**
|
|
95
|
-
- Import necessary types (e.g. `Command` from `@cratis/arc/commands`) rather than asserting to `any`.
|
|
96
|
-
- Use type assertions through `unknown`: `props.command as unknown as Constructor<Command<...>>`.
|
|
97
|
-
- Extract tuple results explicitly rather than destructuring when type assertions are needed.
|
|
98
|
-
- Use proper library types when available; use specific property types (e.g. `{ canvas?: HTMLCanvasElement }`) over `any`.
|
|
99
|
-
|
|
100
|
-
**Dynamic and generic types:**
|
|
101
|
-
- Add type guards for unknown function parameters: `if (typeof accessor !== 'function') return ''`.
|
|
102
|
-
- Type parameters with fallbacks: `function<T = unknown>(accessor: ((obj: T) => unknown) | unknown)`.
|
|
103
|
-
- Cast arrays from `unknown` explicitly: `((obj as Record<string, unknown>).items || []) as string[]`.
|
|
104
|
-
- Use `String(value)` for string conversions in generic contexts.
|
|
105
|
-
- Use explicit Date parameter types: `new Date(value as string | number | Date)`.
|
|
8
|
+
# TypeScript conventions
|
|
9
|
+
|
|
10
|
+
- Group files by feature. Give named types and enums their own files and export the public surface through `index.ts` where the package uses barrels. Keep component props beside their component. Avoid grab-bag files and redundant folder-name prefixes.
|
|
11
|
+
- Use enums for owned sets of named domain values, not for external string contracts or scripts restricted to erasable TypeScript. Import and export enums as values.
|
|
12
|
+
- Prefer `const`, descriptive names and American English. Follow the application's localization convention; Cratis does not require one.
|
|
13
|
+
- Use `unknown` and narrow it, or use a real generic constraint. Do not hide a type mismatch with `any` or a double assertion. Keep React events distinct from DOM events. Preserve precision when a generated type uses `bigint`.
|
|
14
|
+
- Don't give `.ts` and `.tsx` files in the same folder the same basename: TypeScript may exclude the `.tsx` file. Name the component for what it renders. If generated Arc proxies need distinct names, set the generator's `CratisProxiesUseProxyFileSuffix` MSBuild property to `true`.
|
|
15
|
+
- Use the repository's type-check and lint commands. Never edit generated proxies, `node_modules/` or build caches; change the source or fix the owning package. For proxy generation and binding, use **cratis-arc-generate-proxies** and **cratis-arc-react-bind-slice**.
|
|
@@ -5,52 +5,8 @@ paths:
|
|
|
5
5
|
- "**/Documentation/**/*.mdx"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
# Writing
|
|
8
|
+
# Writing correct examples
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Use **cratis-technical-examples**. Verify every framework API, receiver, argument, default and import against released source for that client, not a sibling checkout's working tree or another client. Teach the current convention first. Keep tag, path and line evidence in the review report, not the example or skill.
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
For each framework type, attribute, method, prop, hook, or import in an example, confirm it exists and has that exact shape in **source**, not in another doc page (the docs themselves had the bugs):
|
|
15
|
-
|
|
16
|
-
- **C# / backend** — grep real usage in a reference application (e.g. Cratis **Studio**) and the product `Source/` trees of the Cratis repos checked out alongside this one (`Arc/Source`, `Chronicle/Source`). For extension methods, find the `public static … (this <Type> …)` signature and note **which type it extends**.
|
|
17
|
-
- **React / Components** — the authoritative prop names are in the compiled type defs of the installed package (`node_modules/@cratis/components/dist/esm/**/*.d.ts`) or the `Components` source `dist`. Real usage: a reference app's `*.tsx`.
|
|
18
|
-
- **Invented *domain* names are fine** (event/concept/command names like `AuthorRegistered`, `BookId`). Only **framework APIs** must be real. Never invent a framework interface, attribute, prop, method, or import path.
|
|
19
|
-
- **Read the source at the version the reader runs, never at a checkout's `HEAD`.** A sibling clone's working tree is whatever someone last checked out; the package the reader installed is a tag. Read with `git show <tag>:<path>` and `git grep <pattern> <tag> -- <path>` — both work without touching the checkout, so a dirty or shared worktree is never a reason to skip the check. Name the repository and the tag in the claim ("`Arc v22.16.0`, `ParameterDependencyResolver.cs:44-62`") so the next reader can re-run it. Where the corpus states a version in a skill's *Verified product sources* table, that tag is the one to read; when a consumer's pin is newer, re-read at theirs. A release note is a reason to look, not evidence that a behavior changed or that a workaround can be retired — retire a workaround only after the original reproduction passes at the new tag.
|
|
20
|
-
|
|
21
|
-
## Choose a maintained source for the example
|
|
22
|
-
|
|
23
|
-
For a long example or threaded tutorial, derive displayed snippets from a
|
|
24
|
-
compiling, tested sample or spec when tooling supports extraction; otherwise
|
|
25
|
-
compare each block to that source and check both together. For a short,
|
|
26
|
-
illustrative excerpt, write purpose-built code but verify its framework APIs
|
|
27
|
-
against the product source at the supported version. Do not forbid copying
|
|
28
|
-
from a runnable sample: copying *without a check that prevents drift* is the
|
|
29
|
-
problem. Multi-client pages use their client-owned snippet sources and checks;
|
|
30
|
-
never hand-translate an unsupported SDK. See the **cratis-technical-examples**
|
|
31
|
-
skill for the workflow.
|
|
32
|
-
|
|
33
|
-
## Complete and correct
|
|
34
|
-
|
|
35
|
-
- No pseudo-code, no `// ...` elisions that leave the reader guessing, no props/members that don't exist.
|
|
36
|
-
- A standalone snippet should compile with its stated prerequisites. Label an excerpt as an excerpt and supply or link the domain types it assumes.
|
|
37
|
-
- Show the run command and an observable result for a substantial sample; a passing site build does not prove behavior.
|
|
38
|
-
|
|
39
|
-
## Historical API pitfalls to recheck
|
|
40
|
-
|
|
41
|
-
These reminders are not versioned API evidence and must not be copied as an
|
|
42
|
-
unchecked contract. Before using one in a new example, resolve the reader's
|
|
43
|
-
package version and verify the exact receiver, signature and source path at
|
|
44
|
-
that tag. Recheck affected examples on product version changes; remove a
|
|
45
|
-
workaround only after its reproduction passes. The source check above, not
|
|
46
|
-
this list, establishes which shape the target version supports.
|
|
47
|
-
|
|
48
|
-
- Commands/queries are **model-bound**: a `[Command]` record with `Handle()` **on the record**, and `[ReadModel]` records with **static** query methods. The marker/handler interfaces `ICommand`, `ICommandHandler<T>`, `IQuery<T>`, `IQueryHandler<T,R>` **do not exist** — never use them.
|
|
49
|
-
- Bootstrap: `ArcApplication.CreateBuilder(args)` (not `ArcApplicationBuilder.CreateBuilder`). `builder.AddCratisArc()` on the builder (`WebApplicationBuilder`/`IHostBuilder`); `app.UseCratisArc()` on the built app and it takes **no args** (the listen URL comes from `ArcOptions.Hosting.ApplicationUrl`).
|
|
50
|
-
- Read the current user inside `Handle()` by injecting **`IHttpContextAccessor`** and reading `HttpContext?.User` (`ClaimsPrincipal`). There is no `CommandContext.User` and no `IUserAccessor` Arc type. In-`Handle` guards return **`Result<TEvent, ValidationResult>`** (success type first, error type second) + `ValidationResult.Error(...)` — there is no `CommandResult.Forbidden`/`Unauthorized` to return.
|
|
51
|
-
- Components: `DataPage` uses the **compound** `DataPage.Columns` / `DataPage.MenuItems`; the detail prop is **`detailsComponent`** (lowercase) — `detailsTitle`/`initialSizes` are **not** props. Import `DataTableForObservableQuery` from `@cratis/components/DataTables` (the root barrel only re-exports namespaces); `DataPage`/`MenuItem` from `@cratis/components/DataPage`. Required props like `emptyMessage`/`title` must be present.
|
|
52
|
-
- Chronicle model-bound projections use property attributes **`[SetFrom<T>]`** / **`[SetValue<T>]`** (and `[FromEvent<T>]` AutoMap) — **not** `static On(event)` methods (that shape does not exist). Retrieve a read model with `eventStore.ReadModels.GetInstanceById<T>(id)`. Assertion signatures depend on the extension receiver: the out-of-process `IChronicleSetupFixture` extension is `ShouldHaveAppendedEvent<TEvent>(sequenceNumber, eventSourceId, validator)`, while Arc's in-process `CommandScenario<TCommand>` extensions use `<TCommand, TEvent>` with the event-source id and optional predicate. Verify the receiver type and its exact extension signature before copying either shape.
|
|
53
|
-
|
|
54
|
-
## Auditing at scale
|
|
55
|
-
|
|
56
|
-
Re-run a snippet-correctness audit periodically — it keeps finding bugs (the list above came from three rounds). Delegate the cross-checking to subagents that compare each snippet to source and report only confirmed discrepancies; **verify each finding against source yourself before fixing**. Consider adopting an automated example tester (**Doc Detective**, **Squidler** — from awesome-docs) that actually runs the snippets, so correctness is enforced by CI rather than by hand. The principle, from jvns's "write good examples by starting with real code": derive examples from working source, don't compose them from memory.
|
|
12
|
+
Derive substantial examples from a maintained runnable sample or spec. Label excerpts and supply or link the prerequisites; do not omit code the reader needs. Build and exercise the example and show an observable result. A site build proves rendering, not example behavior.
|
|
@@ -5,70 +5,8 @@ paths:
|
|
|
5
5
|
- "**/Documentation/**/*.mdx"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
# Writing Cratis
|
|
8
|
+
# Writing Cratis documentation
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
page purpose, then **cratis-engineering-docs-authoring** to draft from product
|
|
12
|
-
evidence. Before writing explanations beside examples, work through
|
|
13
|
-
that skill's explaining-code reference.
|
|
14
|
-
It shows how a concrete registration or directive can carry the explanation
|
|
15
|
-
without making the page read like a review form. Read a current, well-reviewed
|
|
16
|
-
tutorial in the product or a closely related product before writing, without
|
|
17
|
-
assuming its vocabulary fits this product.
|
|
10
|
+
Use **cratis-documentation-writing** to define the reader's goal and **cratis-engineering-docs-authoring** for evidence, drafting and explaining code. Use **cratis-technical-examples** for runnable examples. Lead with the current convention, explain invisible wiring against the backend the reader built, and show an observable result before introducing another concept. Keep limitations beside the action they affect. Preserve the site's snippet and language-tab workflow. When both sides matter, show the backend contract and generated frontend shape in producer-to-consumer order.
|
|
18
11
|
|
|
19
|
-
|
|
20
|
-
reader's problem, show the relevant example, and explain the part they cannot
|
|
21
|
-
see: why this type matters, what the call changes, or where responsibility
|
|
22
|
-
passes to another component. Let each paragraph develop that point. Use steps
|
|
23
|
-
for a procedure and a table for a comparison; neither replaces a connected
|
|
24
|
-
explanation. A reference entry can state its contract directly.
|
|
25
|
-
|
|
26
|
-
The example should also teach the intended idiom. Explain a tempting alternative
|
|
27
|
-
when it exposes a real trap, and put a limitation beside the action it affects.
|
|
28
|
-
Do not add a stock warning or a closing list of everything the product does not
|
|
29
|
-
do. A concrete recommendation with a source-backed reason is useful perspective;
|
|
30
|
-
an invented customer story or personal experience is not. Make the first example
|
|
31
|
-
the convention path: do not hand-register what the framework already discovers.
|
|
32
|
-
Explain that invisible wiring against the backend the reader actually built,
|
|
33
|
-
then show an observable result before introducing another concept.
|
|
34
|
-
|
|
35
|
-
Use **cratis-technical-examples** to verify code, configuration, commands and
|
|
36
|
-
results against the applicable product source. It is fine to explain the effect
|
|
37
|
-
of code that is absent, such as convention-based wiring, but establish that
|
|
38
|
-
effect first. Do not infer a second client's API or behavior from the first.
|
|
39
|
-
Read the multi-client section of **Explaining code** before choosing shared
|
|
40
|
-
prose, tabs or separate guides. Preserve the owning repository's snippet and
|
|
41
|
-
language-tab workflow rather than inventing another one. Show both the backend
|
|
42
|
-
contract and generated frontend shape when both matter, keeping required
|
|
43
|
-
producer/consumer actions sequential.
|
|
44
|
-
|
|
45
|
-
Choose presentation to support the reader, not decorate the page. The exact
|
|
46
|
-
Markdown/MDX boundary, aside semantics, component contracts and rendering checks
|
|
47
|
-
live in [Documentation Structure and Formatting](documentation-structure-and-formatting.md).
|
|
48
|
-
Use the owning site's supported components and inspect the emitted Markdown;
|
|
49
|
-
a raw source mirror is not proof that essential labels or warnings survive.
|
|
50
|
-
|
|
51
|
-
Link the guided explanation to exact reference and connect neighboring products
|
|
52
|
-
at their workflow seams instead of retelling their setup. A coming-from-X bridge
|
|
53
|
-
can put the reader's existing code beside the Cratis equivalent and explain
|
|
54
|
-
what changes. Keep that comparison fair and version-accurate, or label it
|
|
55
|
-
illustrative; say when the existing approach remains the better fit. It does
|
|
56
|
-
not impose universal navigation buckets.
|
|
57
|
-
|
|
58
|
-
Follow the [documentation rule](documentation.md) for naming, claims and version
|
|
59
|
-
constraints. The reader needs the minimum or compatibility boundary that changes
|
|
60
|
-
what they can run, not the author's source-checking diary. Keep verification
|
|
61
|
-
provenance in the private change summary. A rendered page, compiling example,
|
|
62
|
-
observed result and successful reader journey are different evidence.
|
|
63
|
-
|
|
64
|
-
Before returning a draft, read its explanation as prose: does it make the code
|
|
65
|
-
easier to understand, or merely name responsibilities and limitations? Use
|
|
66
|
-
**cratis-writing-voice-and-cadence** for an authorized revision, preserving
|
|
67
|
-
technical claims and approval boundaries. For a materially changed journey,
|
|
68
|
-
follow the reader-review procedure owned by **cratis-documentation-writing**;
|
|
69
|
-
report when independent review is unavailable. Do not edit generated copies,
|
|
70
|
-
change navigation, or publish as part of writing. Run the owning documentation
|
|
71
|
-
gate and, when available, the Documentation site's full check for attributable
|
|
72
|
-
lint and rendered-link errors. For a visual page, use the owning preview workflow
|
|
73
|
-
and inspect light and dark screenshots. Source ownership and the edit/sync/verify
|
|
74
|
-
loop live in [Editing Cratis Documentation](editing-cratis-docs.md).
|
|
12
|
+
Follow [Documentation](documentation.md) for naming and claims, [Structure and Formatting](documentation-structure-and-formatting.md) for supported site components, and [Editing Cratis Documentation](editing-cratis-docs.md) for source ownership and gates. Do not edit generated copies or change navigation or publish as part of writing. Verify rendered links and critical content; use the owning preview and inspect light and dark output for visual changes. Report when the reader review or a gate is unavailable.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cratis-application-growth
|
|
3
|
-
description: Use when a Cratis application’s source tree must grow from one project into modules or module projects, untangle a catch-all project, rename namespaces after moves, or decide whether a new application starts modular. Not for
|
|
3
|
+
description: Use when a Cratis application’s source tree must grow from one project into modules or module projects, untangle a catch-all project, rename namespaces after moves, or decide whether a new application starts modular. Not for verifying communication between separately deployed services (use cratis-platform-verify-service-handoff).
|
|
4
4
|
license: MIT
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -11,13 +11,12 @@ license: MIT
|
|
|
11
11
|
|
|
12
12
|
Keep each slice together throughout the move. Preserve stored identities until the separate rename window.
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
check passes; do not start the next one before.
|
|
14
|
+
For an existing application, **decide, guard, move, untangle, rename if needed, and verify**. Finish each phase before the next so a failed gate identifies the change that caused it.
|
|
16
15
|
|
|
17
16
|
## 1. Decide
|
|
18
17
|
|
|
19
18
|
1. Name the current stage and the signal that justifies the next, using the [stage guide](references/stages.md#stages-and-promotion). No signal, no move.
|
|
20
|
-
2.
|
|
19
|
+
2. **Choose a modular start when** a new application already meets a stage 2 or 3 signal; otherwise start with one backend project and one frontend package.
|
|
21
20
|
3. Read the accepted decision records that describe the current structure. If the target contradicts one,
|
|
22
21
|
write the superseding record first; a record binds until then. See
|
|
23
22
|
`cratis-engineering-decision-record` (in the `cratis/engineering/core` profile).
|
|
@@ -37,39 +36,13 @@ Done when: the gates run in the normal spec pass and fail on a planted violation
|
|
|
37
36
|
|
|
38
37
|
Keep namespaces and assembly names while moving. A path-only move leaves name-based identities intact; changing the namespace can change them. Inventory [affected identities](references/stages.md#what-a-rename-changes-in-net), then see the [rename window](references/rename-window.md).
|
|
39
38
|
|
|
40
|
-
|
|
41
|
-
| --- | --- |
|
|
42
|
-
| **1 → 2** | Create the module folder, `git mv` the related feature folders under it, add its `README.md`. |
|
|
43
|
-
| **2 → 3** | Create the module project and frontend package; `git mv` the module folder into them; reference only what the [layer table](references/stages.md#allowed-references) allows. Add the module declaration and register its routes, navigation and settings by convention. |
|
|
44
|
-
| **3 → 4** | At the first cross-module need, create `<Module>.Contracts` in the owning module and point the consumer at it. Replace the direct reference; never keep both. |
|
|
45
|
-
|
|
46
|
-
- `git mv` for files; no behavior change, rename or refactor in a move commit.
|
|
47
|
-
- When a project is renamed and stored names are assembly-qualified, keep its `AssemblyName`.
|
|
48
|
-
- A folder whose namespace no longer matches goes into the namespace allowlist until the rename window.
|
|
49
|
-
- Never add `InternalsVisibleTo` or a seam to make a move compile. A move that would need one waits
|
|
50
|
-
until step 4 has replaced the dependency.
|
|
51
|
-
- Large reshapes split into lanes: one worktree and branch per module or engine, each owning disjoint
|
|
52
|
-
folders, merged into one integration branch. Re-run every gate after each merge; when two lanes both
|
|
53
|
-
shrank a baseline, record the merged value, never the larger one.
|
|
39
|
+
Follow the [path-only move steps](references/move-and-untangle.md#path-only-moves) for the selected stage. If a move cannot compile without a new cross-module dependency, replace that dependency first.
|
|
54
40
|
|
|
55
41
|
Done when: build, specs and gates pass and every baseline is equal or smaller.
|
|
56
42
|
|
|
57
43
|
## 4. Untangle
|
|
58
44
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
| The dependency is | Fix |
|
|
62
|
-
| --- | --- |
|
|
63
|
-
| A question or request to another module | Grain or service interface in the owner's `.Contracts` |
|
|
64
|
-
| "Tell me when" | Public event in the owner's `.Contracts`; the consumer reacts |
|
|
65
|
-
| A module needing an external provider | Port in the module's `.Contracts`; each `Integration.<Provider>` project implements it |
|
|
66
|
-
| Platform code that knows a module | Discovery interface in the platform; the module implements it |
|
|
67
|
-
| Technical code with no domain | Move it to Infrastructure (or Components for UI) |
|
|
68
|
-
|
|
69
|
-
**Dissolving a catch-all project** (`Global`, `Shared`, `Common`): measure what other projects actually
|
|
70
|
-
import from it, folder by folder. Each cluster that several modules use becomes a platform project with
|
|
71
|
-
one purpose (shell and tenancy into the host or a `Tenancy.Contracts`, an engine into its own project
|
|
72
|
-
with contracts); everything else moves into the module that owns it. Delete the project when it is empty.
|
|
45
|
+
Replace each upward or sideways dependency using the [dependency guide](references/move-and-untangle.md#replace-a-dependency). Use it also when dissolving a catch-all project or troubleshooting cutover.
|
|
73
46
|
|
|
74
47
|
**Before retiring a project that owns persisted events**, preserve the types and their replay path. If registrations or stored events need to change, plan that migration separately with `cratis-chronicle-evolve-event` (in `cratis/chronicle`).
|
|
75
48
|
|
|
@@ -77,10 +50,9 @@ Done when: the seam baseline and the module-reference baseline reach zero.
|
|
|
77
50
|
|
|
78
51
|
## 5. Rename window
|
|
79
52
|
|
|
80
|
-
|
|
81
|
-
production rollout. Read [references/rename-window.md](references/rename-window.md) before starting it.
|
|
53
|
+
**Choose a separate rename rollout when** namespaces must change. Align with the repository namespace convention after the moves; preserve stored and public identities or plan their transition. Read [references/rename-window.md](references/rename-window.md) before starting it.
|
|
82
54
|
|
|
83
|
-
Done when: the namespace allowlist is empty and
|
|
55
|
+
Done when: the namespace allowlist is empty or every remaining exception has an owner, and any required repair has passed its dry run and tests.
|
|
84
56
|
|
|
85
57
|
## 6. Verify
|
|
86
58
|
|
|
@@ -97,23 +69,4 @@ Then boot the host and drive it end to end (integration specs over HTTP, then a
|
|
|
97
69
|
Unit specs construct types directly; they do not see DI registration order, routes, generated proxies or
|
|
98
70
|
name-scoped filters, which is where structural changes break. Say which phases were not run.
|
|
99
71
|
|
|
100
|
-
## Pitfalls
|
|
101
|
-
|
|
102
|
-
| Symptom | Cause | Fix |
|
|
103
|
-
| --- | --- | --- |
|
|
104
|
-
| Observers replay from the start, side effects repeat | A namespace or type name changed an observer identity | Pin the id, or repair stored identities before starting the new version |
|
|
105
|
-
| `IFoo` not resolved, or the wrong implementation wins | Interface moved to `.Contracts`, so the same-namespace convention no longer binds; or extra bindings ran before explicit registrations | Register the pair explicitly; apply generated bindings once, after all explicit ones |
|
|
106
|
-
| 404 from the frontend or a script after a rename | Arc routes follow the namespace | Regenerate proxies; replace hard-coded routes; update reverse-proxy rewrites |
|
|
107
|
-
| A generated proxy lost members after a split | A project that only references a type emitted a copy over the owner’s proxy | Generate each project into its own package; map referenced assemblies with `AssemblyToPackageMapping`. See the `cratis-arc-generate-proxies` skill (in `cratis/arc/csharp`). |
|
|
108
|
-
| API docs, authorization or Release stripping silently stopped applying | Code keyed on a namespace or path | Replace name keys with explicit declarations or one shared pattern |
|
|
109
|
-
| Stored jobs fail to resume after a project rename or a move | Job type names are assembly-qualified | Keep `AssemblyName`; for a job type moved to another assembly, rewrite the stored names or leave a type forwarder |
|
|
110
|
-
| Module B does not compile without module A's internals | Hidden coupling | Contract or lower project; never `InternalsVisibleTo` |
|
|
111
|
-
| Gate baseline keeps growing | Moving and refactoring in one step | Split the commit; fix the dependency, not the baseline |
|
|
112
|
-
|
|
113
|
-
## Related
|
|
114
|
-
|
|
115
|
-
- Modules deployed as separate services: the `cratis-platform-verify-service-handoff` skill (in `cratis/application/arc-chronicle`) and the `cratis-chronicle-publish-contract` skill (in `cratis/chronicle`).
|
|
116
|
-
- Superseding the structure's accepted records: `cratis-engineering-decision-record` (in the `cratis/engineering/core` profile).
|
|
117
|
-
- Verifying a slice against its model after a move: the `cratis-platform-deliver-slice` skill (in `cratis/application`).
|
|
118
|
-
|
|
119
72
|
The host composes modules; platform code knows none. For example, Billing owns invoicing; Orders consumes Billing.Contracts, not Billing implementation files through a compile include. Before moving namespaces, inventory persisted observer and model IDs; preserve identity or plan a verified migration before rollout.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Move whole slices and replace dependencies
|
|
2
|
+
|
|
3
|
+
## Path-only moves
|
|
4
|
+
|
|
5
|
+
| Move | Steps (each a separate commit; build and run specs after each) |
|
|
6
|
+
| --- | --- |
|
|
7
|
+
| **1 → 2** | Create the module folder, `git mv` the related feature folders under it, add its `README.md`. |
|
|
8
|
+
| **2 → 3** | Create the module project and frontend package; `git mv` the module folder into them; reference only what the [layer table](stages.md#allowed-references) allows. Add the module declaration and register its routes, navigation and settings by convention. |
|
|
9
|
+
| **3 → 4** | At the first cross-module need, create `<Module>.Contracts` in the owning module and point the consumer at it. Replace the direct reference; never keep both. |
|
|
10
|
+
|
|
11
|
+
- `git mv` for files; no behavior change, rename or refactor in a move commit.
|
|
12
|
+
- When a project is renamed and stored names are assembly-qualified, keep its `AssemblyName`.
|
|
13
|
+
- A folder whose namespace no longer matches goes into the namespace allowlist until the rename window.
|
|
14
|
+
- Never add `InternalsVisibleTo` or a seam to make a move compile. Replace the dependency before attempting a move that would otherwise need one.
|
|
15
|
+
- Large reshapes split into lanes: one worktree and branch per module or engine, each owning disjoint
|
|
16
|
+
folders, merged into one integration branch. Re-run every gate after each merge; when two lanes both
|
|
17
|
+
shrank a baseline, record the merged value, never the larger one.
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
## Replace a dependency
|
|
21
|
+
|
|
22
|
+
For each dependency that points up or sideways, pick one fix:
|
|
23
|
+
|
|
24
|
+
| The dependency is | Fix |
|
|
25
|
+
| --- | --- |
|
|
26
|
+
| A question or request to another module | Grain or service interface in the owner's `.Contracts` |
|
|
27
|
+
| "Tell me when" | Public event in the owner's `.Contracts`; the consumer reacts |
|
|
28
|
+
| A module needing an external provider | Port in the module's `.Contracts`; each `Integration.<Provider>` project implements it |
|
|
29
|
+
| Platform code that knows a module | Discovery interface in the platform; the module implements it |
|
|
30
|
+
| Technical code with no domain | Move it to Infrastructure (or Components for UI) |
|
|
31
|
+
|
|
32
|
+
**Dissolving a catch-all project** (`Global`, `Shared`, `Common`): measure what other projects actually
|
|
33
|
+
import from it, folder by folder. Each cluster that several modules use becomes a platform project with
|
|
34
|
+
one purpose (shell and tenancy into the host or a `Tenancy.Contracts`, an engine into its own project
|
|
35
|
+
with contracts); everything else moves into the module that owns it. Delete the project when it is empty.
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
## Pitfalls
|
|
39
|
+
|
|
40
|
+
| Symptom | Cause | Fix |
|
|
41
|
+
| --- | --- | --- |
|
|
42
|
+
| Observers replay from the start, side effects repeat | A namespace or type name changed an observer identity | Pin the id, or repair stored identities before starting the new version |
|
|
43
|
+
| `IFoo` not resolved, or the wrong implementation wins | Interface moved to `.Contracts`, so the same-namespace convention no longer binds; or extra bindings ran before explicit registrations | Register the pair explicitly before convention binding so convention registration can skip it |
|
|
44
|
+
| 404 from the frontend or a script after a rename | Convention-based Arc routes can follow the namespace | Regenerate proxies; replace hard-coded routes; update reverse-proxy rewrites |
|
|
45
|
+
| A generated proxy lost members after a split | A project that only references a type emitted a copy over the owner’s proxy | Generate each project into its own package; map referenced assemblies with `AssemblyToPackageMapping`. See the `cratis-arc-generate-proxies` skill (in `cratis/arc/csharp`). |
|
|
46
|
+
| API docs, authorization or Release stripping silently stopped applying | Code keyed on a namespace or path | Replace name keys with explicit declarations or one shared pattern |
|
|
47
|
+
| Stored jobs fail to resume after a namespace or type rename | A persisted job type or state identity no longer resolves | Keep `AssemblyName` where possible. If the type moved to another assembly, verify how the job resolves its identity before planning a migration |
|
|
48
|
+
| Module B does not compile without module A's internals | Hidden coupling | Contract or lower project; never `InternalsVisibleTo` |
|
|
49
|
+
| Gate baseline keeps growing | Moving and refactoring in one step | Split the commit; fix the dependency, not the baseline |
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
# The namespace rename window
|
|
5
5
|
|
|
6
|
-
A namespace
|
|
7
|
-
repair, once, after the structural moves.
|
|
6
|
+
After the structural moves, inventory stored and public identities. A namespace change can alter them. Prepare a repair only for persisted identifiers that will change and must survive; preserve or pin the rest.
|
|
8
7
|
|
|
9
8
|
## 1. Prepare the code
|
|
10
9
|
|
|
@@ -15,27 +14,27 @@ repair, once, after the structural moves.
|
|
|
15
14
|
widen access unnoticed.
|
|
16
15
|
2. **Pin what can be pinned:** event types without an explicit id keep theirs while the class name stays.
|
|
17
16
|
Pin an observer id only when its stored state must survive and you will not repair it.
|
|
18
|
-
3. **Rename:**
|
|
19
|
-
`<Company>.<Product>.<Project>.<folder path
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
3. **Rename:** match the repository namespace convention, for example
|
|
18
|
+
`<Company>.<Product>.<Project>.<folder path>`. Keep `AssemblyName` if stored names depend on it.
|
|
19
|
+
If the prefix changes, adjust `SegmentsToSkipForRoute` and `CratisProxiesSegmentsToSkip` together
|
|
20
|
+
to preserve convention-based routes. They must agree for generated proxies to call those routes;
|
|
21
|
+
check the resulting server routes and generated paths.
|
|
22
22
|
4. **Regenerate** every proxy, then search specs, scripts, documentation and reverse-proxy rewrites for
|
|
23
23
|
literal routes and compare each with the generated ones.
|
|
24
|
-
5. **Bindings:** interface/implementation pairs that no longer share a namespace
|
|
25
|
-
generated registration, applied after every explicit registration.
|
|
24
|
+
5. **Bindings:** interface/implementation pairs that no longer share a namespace need an explicit registration before convention binding if they relied on the same-namespace convention.
|
|
26
25
|
|
|
27
26
|
## 2. Build the repair
|
|
28
27
|
|
|
29
|
-
|
|
28
|
+
First check for a supported migration for the affected artifact. If one is unavailable, design a deployment-specific repair with the storage owner; a type rename is not a reason to edit kernel collections directly. Inventory these potential dependencies before the new application starts:
|
|
30
29
|
|
|
31
30
|
| Stored identity | Typical location |
|
|
32
31
|
| --- | --- |
|
|
33
32
|
| Reactor, reducer and projection ids, observer state, failed partitions, replay state | the event store's system and per-namespace collections |
|
|
34
|
-
| Read model identifiers and definitions |
|
|
33
|
+
| Read model identifiers and definitions | read-model definitions and materialized storage; verify effective collection names |
|
|
35
34
|
| Grain state type names | the Orleans storage |
|
|
36
35
|
| Job, job step and request type names | job storage |
|
|
37
36
|
|
|
38
|
-
|
|
37
|
+
This repair is for stored names only. If events, event type IDs or stored read-model shapes must change, plan that migration separately.
|
|
39
38
|
|
|
40
39
|
The repair is a script with:
|
|
41
40
|
|
|
@@ -47,11 +46,10 @@ The repair is a script with:
|
|
|
47
46
|
|
|
48
47
|
## 3. Run the window
|
|
49
48
|
|
|
50
|
-
1.
|
|
49
|
+
1. Obtain approval for the exact target, maintenance window and rollback plan. Publish the application without starting it against unrepaired storage.
|
|
51
50
|
2. Scale the application to zero, back up the affected collections, run the dry runs and compare their
|
|
52
51
|
counts with the expected ones.
|
|
53
|
-
3.
|
|
54
|
-
them), then start the new version.
|
|
52
|
+
3. Have the authorized operator apply the reviewed repair and refresh any cached registrations as required by the deployment plan. Then start the new application.
|
|
55
53
|
4. Check: no observer registered under a new id from position zero, no identity-drift warnings, every
|
|
56
54
|
screen loads, stored jobs resume.
|
|
57
55
|
|
|
@@ -35,5 +35,5 @@ Use fast specs for: no friend-assembly grants or cross-project file inclusion; o
|
|
|
35
35
|
Moving a file without changing its namespace or assembly normally leaves identity intact. Inventory and plan any persisted or public changes before a rename:
|
|
36
36
|
|
|
37
37
|
- Chronicle event IDs default to the simple type name. Preserve the old name or pin its ID with `[EventType("id")]`. Observer IDs for reactors, reducers and projections default to full type names; pin the explicit ID or plan the transition, since a fresh observer ID can replay history. Plan read-model ID migration or a rebuild when a full type name changes. See the event-type migration skill when deliberately changing an event contract.
|
|
38
|
-
- Arc route paths derive from the namespace with `SegmentsToSkipForRoute`; generated proxy paths use `CratisProxiesSegmentsToSkip`. Review updated callers, generated paths and package ownership.
|
|
39
|
-
- Check persisted type names
|
|
38
|
+
- Arc route paths derive from the namespace with `SegmentsToSkipForRoute`; generated proxy paths use `CratisProxiesSegmentsToSkip`. Review updated callers, generated paths and package ownership. **Choose `AssemblyToPackageMapping`** when a referenced assembly's proxies belong to a different package.
|
|
39
|
+
- Check persisted CLR type names against the actual serialization and registration. Chronicle job types use namespace and type; other serialized state can depend on an assembly name. Preserve `AssemblyName` during a project rename or plan the persisted-name migration before deployment. Audit custom name-based access rules, configuration and filters; make identity explicit before the move.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cratis-arc-authorize-request
|
|
3
|
-
description: Use when a developer needs to require sign-in or restrict an Arc command or query by role or policy. Not for selecting a tenant.
|
|
3
|
+
description: Use when a developer needs to require sign-in or restrict an Arc command or query by role or policy. Not for selecting a tenant (use cratis-arc-isolate-tenant).
|
|
4
4
|
compatibility: Requires an Arc backend whose host already authenticates callers.
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -16,7 +16,7 @@ The artifact being changed selects the one reference to read: `*.csproj` → [C#
|
|
|
16
16
|
|
|
17
17
|
## Expected outcome
|
|
18
18
|
|
|
19
|
-
Execute through the pipeline
|
|
19
|
+
Execute through the pipeline. For a sign-in requirement, the anonymous caller is refused and an authenticated caller succeeds. For a role or policy that also restricts authenticated callers, prove a signed-in nonmember is refused and an eligible caller succeeds. Refused calls write nothing or return no protected rows. Check the server verdict rather than whether the UI shows a control.
|
|
20
20
|
|
|
21
21
|
Invocation authorization does not continually recheck a live subscription. The reference says whether the SDK can recheck each emission; otherwise reopen the subscription after access changes.
|
|
22
22
|
|
|
@@ -6,7 +6,7 @@ For a role requirement, add Arc's authorization attribute to the existing comman
|
|
|
6
6
|
|
|
7
7
|
```csharp
|
|
8
8
|
// Add to the existing RegisterAuthor declaration, alongside [Command].
|
|
9
|
-
[Cratis.Arc.Authorization.
|
|
9
|
+
[Cratis.Arc.Authorization.Roles("catalog-editor")]
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
Execute through the pipeline as an anonymous caller, a signed-in reader and a catalog editor. Both refused results have `IsAuthorized` false and append nothing; the editor succeeds. If the HTTP request reaches Arc and produces an unauthorized command result, Arc maps that result to HTTP 403. Check the server verdict rather than whether the UI shows the registration button.
|
|
@@ -41,7 +41,7 @@ public sealed class RequireActiveSession(ILibrarySessions sessions) : IGuardObse
|
|
|
41
41
|
|
|
42
42
|
Revoke the session after the first result. Verify that no subsequent protected data arrives on each exposed transport.
|
|
43
43
|
|
|
44
|
-
A valid session can outlast a role or organization assignment. In a discovered `
|
|
44
|
+
A valid session can outlast a role or organization assignment. In a discovered `IAuthorizationQueryFilter`, have `OnPerform(QueryContext context)` return `QueryResult.Success(context.CorrelationId)` for other fully qualified `context.Name` values. For the protected query, return `QueryResult.Unauthorized(context.CorrelationId)` if access is denied; otherwise set `context.SubscriptionScope` to the authorized organization ID and return success. The query itself must restrict rows to that organization.
|
|
45
45
|
|
|
46
46
|
In an `IGuardObservableQueryEmission`, return `Allow` for other `context.QueryName` values. For this query, use the captured `context.Principal` only to identify the caller. Its WebSocket handshake claims do not refresh: calling `IsInRole` again is not a revocation check. On every emission fetch current membership, active organization and roles from the authoritative store. Return `DenyAndTerminate` unless access is confirmed for the captured `context.SubscriptionScope`, including when the lookup fails. Test without reconnecting: keep the session active, revoke the role after the first result, publish a matching change, and assert termination with no protected update.
|
|
47
47
|
|
|
@@ -66,4 +66,4 @@ Test a request without credentials and a token for the wrong audience against th
|
|
|
66
66
|
|
|
67
67
|
Arc also ships personal access tokens (`IPersonalAccessTokens`) for non-interactive callers. Pick the mechanism the deployment needs; no single topology is required.
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
If a client falls back to cached presentation data when the identity route is absent (404), never use that fallback after a challenge or denial (401/403). Neither the cache nor a display cookie establishes a caller for a write.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Enforce admission at the server in Kotlin
|
|
2
2
|
|
|
3
|
-
Once the JVM host authenticates callers, declare the named policy on the command. This example assumes the Chronicle integration is installed and `BookRetired` is registered as an event type:
|
|
3
|
+
Once the JVM host authenticates callers, declare the named policy on the command. This example assumes the Chronicle integration is installed and `BookRetired` is registered as an event type. Reuse an existing declaration unchanged so its serialized event type ID still matches the history:
|
|
4
4
|
|
|
5
5
|
```kotlin
|
|
6
6
|
import io.cratis.arc.artifacts.Command
|
|
@@ -8,7 +8,7 @@ import io.cratis.arc.authorization.Authorize
|
|
|
8
8
|
import io.cratis.chronicle.eventSequences.EventForEventSourceId
|
|
9
9
|
import io.cratis.chronicle.events.EventType
|
|
10
10
|
|
|
11
|
-
@EventType
|
|
11
|
+
@EventType
|
|
12
12
|
data class BookRetired(val reason: String)
|
|
13
13
|
|
|
14
14
|
@Command
|