@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
|
@@ -4,109 +4,10 @@ paths:
|
|
|
4
4
|
- "**/Documentation/**/*.{md,mdx}"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
#
|
|
7
|
+
# Writing Cratis documentation
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Use [Writing Cratis Documentation](./writing-cratis-docs.md) and the **cratis-documentation-writing** skill for reader goals, page structure and voice. Verify examples with **cratis-technical-examples**. Follow [Editing Cratis Documentation](./editing-cratis-docs.md) for ownership and checks.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
In reader-facing documentation and discovery, **Cratis** is the organization and
|
|
16
|
-
**Cratis Platform** is the umbrella offering. Chronicle, Arc, Components,
|
|
17
|
-
Screenplay, Studio, CLI, and other named tools are components or supporting tools
|
|
18
|
-
with distinct roles, not competing platforms. When a reader or search query asks
|
|
19
|
-
about a Cratis framework, route to the relevant Platform component without
|
|
20
|
-
pretending its name, API or package identifier changed.
|
|
21
|
-
|
|
22
|
-
Readers may adopt one component independently or combine several. Never imply
|
|
23
|
-
that a component requires the whole Platform. For a cross-component task, name
|
|
24
|
-
which component owns each responsibility and show the handoffs, prerequisites
|
|
25
|
-
and result instead of using the umbrella name as an explanation. Preserve
|
|
26
|
-
verified product terminology, literal package IDs and API names.
|
|
27
|
-
|
|
28
|
-
Use authoritative source for capability, compatibility, dependency and maturity
|
|
29
|
-
claims; label unknown pairings as unverified. Do not infer support from branding
|
|
30
|
-
or navigation, and do not invent guarantees, performance or production-readiness
|
|
31
|
-
claims. Shared overview pages should link to component-owned procedures rather
|
|
32
|
-
than duplicate their setup.
|
|
33
|
-
|
|
34
|
-
The site is built with [Astro Starlight](https://starlight.astro.build/). Documentation lives in the `Documentation/` folder of each product repository as [GitHub Flavored Markdown](https://github.github.com/gfm/); a converter synchronizes product `.md`/`.mdx` into the Starlight site, and all repositories are aggregated into one published site. Readers experience it as a single place — write for that whole, not for one repository in isolation. For the authoritative rendering contract, see [Documentation Structure and Formatting](./documentation-structure-and-formatting.md).
|
|
35
|
-
|
|
36
|
-
## Give each page one primary reader purpose
|
|
37
|
-
|
|
38
|
-
Use [Diátaxis](https://diataxis.fr/) as a compass: decide whether the reader is primarily learning, solving a task, looking up a contract, or understanding a concept. Brief context that helps someone complete a tutorial or how-to is welcome. Move an exhaustive lookup or a long conceptual detour to its own linked page; do not split a coherent reader task merely to keep categories pure.
|
|
39
|
-
|
|
40
|
-
| Type | The reader is… | Reads like | Rule |
|
|
41
|
-
|---|---|---|---|
|
|
42
|
-
| **Tutorial** | learning by doing | a guided lesson | Steps that each produce a visible result. Briefly explain the invisible effect after a step; link out for deeper theory rather than stopping the lesson. The reader must succeed even before they fully understand. |
|
|
43
|
-
| **How-to guide** | solving a specific problem | a recipe | Assume competence. Goal → prerequisites → steps → completion check. Explain necessary concepts, effects and recovery beside the step; link sustained teaching elsewhere. |
|
|
44
|
-
| **Reference** | looking something up | a dictionary | Exhaustive and terse. Tables, signatures, attributes, configuration; concise explanation where a default or interaction would otherwise surprise the reader. |
|
|
45
|
-
| **Explanation** | trying to understand | a discussion | Concepts, trade-offs, architecture, *why*. A short example or sequence can clarify an effect without becoming a full procedure. Use diagrams when they explain a relationship. |
|
|
46
|
-
|
|
47
|
-
Diátaxis governs a page's purpose and voice, not a universal set of sidebar labels. Each product has navigation buckets suited to its domain; read `PRODUCTS[].buckets` in the Documentation site's sync script before placing a new section.
|
|
48
|
-
|
|
49
|
-
For a reader-centered writing workflow, use **cratis-documentation-writing**; for source-verified snippets use **cratis-technical-examples**. Before drafting or revising an explanation beside code, read and apply the explaining-code reference of **cratis-engineering-docs-authoring**: develop the point from the example instead of turning source-checking questions into public prose.
|
|
50
|
-
|
|
51
|
-
## Onboarding is the most important documentation you write
|
|
52
|
-
|
|
53
|
-
Most readers decide whether to adopt Cratis in the first ten minutes. Protect that path.
|
|
54
|
-
|
|
55
|
-
- **One clear 'start here' entry per product**, not a menu of competing front doors. Let it direct readers to separate language or host procedures when those are genuinely different; do not force incompatible readers through one runnable recipe.
|
|
56
|
-
- Drive to a **visible payoff fast** — something running the reader can see. State it up front: “By the end you'll have X running.”
|
|
57
|
-
- **Thread tutorials when the product warrants a multi-chapter journey.** Use one realistic domain across chapters, each adding one concept and visible result. A small tool may need only a short guided lesson; don't create filler chapters to satisfy a template.
|
|
58
|
-
- **One cross-product capstone tutorial** builds a real full-stack feature using the relevant Cratis products together. This is the connective tissue between products — keep it current and runnable.
|
|
59
|
-
|
|
60
|
-
## Connect the products
|
|
61
|
-
|
|
62
|
-
Readers do not care about repository boundaries — they are building one application.
|
|
63
|
-
|
|
64
|
-
- The site has **one front door** stating what Cratis is, with a one-sentence definition and a “start here” link for each product.
|
|
65
|
-
- Every product index makes the product's purpose clear near the beginning. Use a **one-sentence definition** or **“without vs. with” framing** where it helps the reader choose; do not force one opening or sequence onto every product.
|
|
66
|
-
- **Cross-link at the seams** rather than re-explaining: show how the products meet in the reader's workflow. Before a procedure uses another product's command, link its installation procedure as a prerequisite instead of assuming the command is already available. Prefer the canonical procedure over copying installation commands that can drift.
|
|
67
|
-
- Maintain a **glossary** of shared terms and link to it instead of redefining terms per page. One term, one concept, everywhere.
|
|
68
|
-
|
|
69
|
-
## Writing style
|
|
70
|
-
|
|
71
|
-
The project's voice is **direct, practical, and opinionated**. Write like an experienced colleague explaining something to a capable developer — confident but never condescending.
|
|
72
|
-
|
|
73
|
-
- **Active voice, present tense.** Address the reader when giving an action; let the API or component be the subject when it makes a contract clearer.
|
|
74
|
-
- Explain the reason where it helps the reader choose or understand an effect. A lookup can open directly with its contract.
|
|
75
|
-
- **Do not document the obvious.** If the API is self-explanatory, a complete code example is enough.
|
|
76
|
-
- Use connected paragraphs to develop an explanation, headings to locate it, and lists or tables for real steps and comparisons.
|
|
77
|
-
- **Be honest about trade-offs.** Put a limit where it changes the reader's action or expectation, before risk when relevant; a separate wrong-fit section is useful only when it has something to explain.
|
|
78
|
-
- Focus on public APIs and behavior. Explain internals only where they clarify a supported boundary or failure mode; link to third-party documentation rather than retelling it.
|
|
79
|
-
|
|
80
|
-
## Diagrams
|
|
81
|
-
|
|
82
|
-
- Use [Mermaid](https://mermaid-js.github.io/mermaid/#/) where a concept has structure that prose conveys poorly — architecture, event and command flow, state transitions, projection and reactor pipelines. Many strong pages carry their load in prose, real code, and real output instead; add a diagram because it explains something, not because the page type seems to require one.
|
|
83
|
-
|
|
84
|
-
## Code examples
|
|
85
|
-
|
|
86
|
-
- Prefer `record` types for events, commands, and read models — match the codebase.
|
|
87
|
-
- Use plain `[EventType]` for new events. A new generation or an explicit id is valid only when documenting evolution of an existing stored-event contract (a retained persisted id) or a cross-package short-name collision.
|
|
88
|
-
- A standalone example must be **complete and correct** at its stated scope. Mark a partial excerpt as an excerpt, state its prerequisites, and never leave an essential step behind `// ...`. Do not offer an incomplete block as click-to-copy code.
|
|
89
|
-
- **State version requirements, not the test log.** Name minimum, fixed or breaking releases and meaningful compatibility or peer ranges. Ordinary installation follows the supported latest-release path, not universal exact-patch pins; latest does not imply every package combination is compatible. Keep resolved versions in maintained manifests/lockfiles, or pin deliberately reproducible tutorials when needed. Preserve required security/deployment constraints and production image policy. Do not end a page with verification provenance (SDK build, image digest or SHA, date, "tested with", unrun samples); that belongs in the change summary. See **cratis-technical-examples**.
|
|
90
|
-
- **Short illustrative snippets** may be purpose-built after checking their framework APIs against source. Derive substantial or runnable examples from compiled, tested sample or spec code; extract or check displayed snippets with the owning repository's tooling so they do not drift. Never substitute a bare “see the repository” link for showing the code.
|
|
91
|
-
- Where a feature spans products or languages, show both sides when both matter. Keep sequential backend-producer/frontend-consumer examples together. Tabs are alternatives for the same reader task, not evidence of client parity; apply the multi-client guidance in the same explaining-code reference before choosing that shape.
|
|
92
|
-
|
|
93
|
-
## Links
|
|
94
|
-
|
|
95
|
-
- **Link text must describe the destination.** Write `[Event types](...)`, never `[see documentation](...)`, `[here](...)`, or `[click here](...)`. Non-descriptive link text is a defect.
|
|
96
|
-
- Named Markdown reference links (`[Install the CLI][cli-installation]` with a same-page `[cli-installation]: /cli/getting-started/` definition) can make cross-product prerequisites readable and reusable. These are page-local labels, not DocFX symbols; verify the target route in the aggregated site.
|
|
97
|
-
- Use relative links for internal product-source references and root-relative site routes (`/arc/backend/commands/`) for another product's pages — not absolute `cratis.io` or GitHub URLs, and not `xref:` symbol links, which the site does not support. Verify every link resolves — broken links and links to non-existent folders fail review.
|
|
98
|
-
|
|
99
|
-
## Cover the reader's needs at the product's scale
|
|
100
|
-
|
|
101
|
-
- Every navigable product needs an **index** that defines it and points to a first useful outcome.
|
|
102
|
-
- When a product has enough tutorials or how-to guides to warrant an index, list each by the **situation it solves**, with a one-line description (for example, "Dealing with concurrency" or "Multi-tenancy end to end"), not only by chapter number or API name. Don't add a landing page merely to satisfy this rule, or restructure navigation as a side effect of one page.
|
|
103
|
-
- Document the **diagnostic surface**: the CLI commands, MCP tools, and observable state that tell a reader why the product behaves as it does. A capability with no documented way to inspect it becomes a support request, and an AI assistant helping the reader cannot use it.
|
|
104
|
-
- Provide a **getting-started route**, exact reference, limitations, and recovery information where the product's complexity requires them. A small tool need not manufacture a multi-chapter tutorial, FAQ, glossary, or architecture diagram.
|
|
105
|
-
- Connect related products with links instead of duplicating the same explanation. Share task-area and product indexes through the site's AI-facing exports where useful; don't require a separate full-text download per product or claim that an export alone proves answer quality.
|
|
106
|
-
|
|
107
|
-
## File rules
|
|
108
|
-
|
|
109
|
-
- Follow [Documentation Structure and Formatting](./documentation-structure-and-formatting.md) for frontmatter, landing pages, `toc.yml`, Markdown/MDX, links, and rendering.
|
|
110
|
-
- End every Markdown file with a single trailing newline.
|
|
111
|
-
- Run the owning repository's local documentation gate when present; use `cd ../Documentation/web && npm run check` for full-fidelity site verification when the sibling checkout is available.
|
|
112
|
-
- For a new or materially changed reader journey, use the fresh-context reader review of **cratis-documentation-writing**. Report unavailable review rather than calling an author's reread independent evidence; a passing build is not a comprehension check.
|
|
11
|
+
- **Cratis** is the organization; **Cratis Platform** is the umbrella. Use the component's public name and package IDs. Do not imply that adopting one component requires all the others.
|
|
12
|
+
- Give each product a clear starting point; link to the owning installation or setup procedure at cross-product prerequisites. Do not duplicate installation commands.
|
|
13
|
+
- Use authoritative evidence for capabilities, compatibility and maturity. Do not infer a support guarantee from branding or navigation. Show the verified handoff when an example spans products or languages. For a new or materially changed reader journey, request the skill’s fresh-context reader review; report it if unavailable.
|
|
@@ -7,67 +7,9 @@ paths:
|
|
|
7
7
|
|
|
8
8
|
# Editing Cratis documentation
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Edit the owning product repository, never the synchronized copy under `Documentation/web/src/content/docs/`. The Documentation site's `web/scripts/sync-content.mjs` (`PRODUCTS`, including `familySources`) maps product ownership; site-level content outside synchronized paths is owned by Documentation.
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
| Public route | Authored source |
|
|
17
|
-
|---|---|
|
|
18
|
-
| `/chronicle/**` | `Chronicle/Documentation/**` |
|
|
19
|
-
| `/arc/**` | `Arc/Documentation/**` |
|
|
20
|
-
| `/components/**` | `Components/Documentation/**` |
|
|
21
|
-
| `/chronicle-mcp/**`, `/authproxy/**`, `/cli/**`, `/fundamentals/**`, `/screenplay/**`, `/prologue/**`, `/prompter/**`, and other product routes | The product or family-source repository selected by `PRODUCTS` |
|
|
22
|
-
| `/contributing/**` | The organization `.github` repository (legacy fallback: `GitHubLanding`) |
|
|
23
|
-
| Site-level routes such as `/`, `/why-cratis`, `/cratis-stack`, `/glossary`, `/ai/**`, and `/compare-event-sourcing-*` | `Documentation/web/src/content/docs/**` |
|
|
24
|
-
|
|
25
|
-
The definitive source map is `PRODUCTS` and its optional `familySources` in `Documentation/web/scripts/sync-content.mjs`. The site prefers sibling checkouts and falls back to configured submodules. Do not hard-code a shorter product list when the script can answer ownership.
|
|
26
|
-
|
|
27
|
-
Never edit a synchronized subtree under `Documentation/web/src/content/docs/`. Each `PRODUCTS[].key` is regenerated there even when Git state or `.gitignore` makes a particular directory look hand-authored. Site-level files that are not populated from `PRODUCTS` are authored directly in the Documentation repository. Check `PRODUCTS`, source paths, and the site configuration when ownership is unclear.
|
|
28
|
-
|
|
29
|
-
## Edit and verify
|
|
30
|
-
|
|
31
|
-
From the owning repository:
|
|
32
|
-
|
|
33
|
-
1. Edit the authored `.md` or `.mdx` file and preserve its existing frontmatter unless the task deliberately changes it.
|
|
34
|
-
2. Run that repository's local documentation gate when present, commonly `./Documentation/verify-markdown.sh`.
|
|
35
|
-
3. For full rendering, run the site from the sibling checkout:
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
cd ../Documentation/web
|
|
39
|
-
npm run check
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
4. Preview with `npm run dev` from that same `../Documentation/web` directory and inspect visual changes in light and dark.
|
|
43
|
-
|
|
44
|
-
The local gate validates authored content without requiring every sibling product. The full site check synchronizes every available product and can expose unrelated sibling or optional-tool failures; diagnose and report those separately. Report which checks actually ran when local prose, Markdown, or external-link tools skip because their executables are absent.
|
|
45
|
-
|
|
46
|
-
The published site builds when the Documentation repository's `main` changes and when a product repository dispatches `build-docs`. Product repositories such as Chronicle, Arc, and Components dispatch from a dedicated documentation workflow when `Documentation/**` changes on `main`, and also from their publish workflows. A merge is not proof the changed page is live: confirm that a site build containing it deployed before saying so. Because correcting a page is cheap, prefer a small accurate edit now over queuing a rewrite.
|
|
47
|
-
|
|
48
|
-
Restart `npm run dev` after a build/check. The build re-sync can degrade a running dev server, producing 500s or missing table rendering. If a change still appears stale, clear `web/.astro` and `web/node_modules/.astro`, restart, and recheck before blaming the source.
|
|
49
|
-
|
|
50
|
-
## Add, move, rename, or delete a page
|
|
51
|
-
|
|
52
|
-
- Adding a page inside the existing structure, with its `toc.yml` entry, is part of writing it. Adding a navigation bucket, reordering a product's navigation, or moving pages between products is a separate decision about the product's information architecture: make it when the request asks for it, not as a side effect of writing one page.
|
|
53
|
-
- Product navigation comes from its `toc.yml`; site-level navigation comes from `astro.config.mjs`.
|
|
54
|
-
- Product navigation buckets are defined per product in `PRODUCTS[].buckets`. Read the actual names and section lists before changing them.
|
|
55
|
-
- Keep exactly one landing for a route. A sibling `<folder>.md[x]` collides with `<folder>/index.md[x]`; a legacy `.md` collision can move the directory index to `/overview/`, while other duplicate landing shapes can fail the build.
|
|
56
|
-
- Update inbound links and `toc.yml` together. For a published route change, inspect the Documentation site's redirect mechanism rather than assuming a source-file move preserves old URLs.
|
|
57
|
-
- Watch sync output for dropped toc entries and verify the built sidebar. External, `../`, and `/api/` toc targets are intentionally omitted; single-child groups collapse.
|
|
58
|
-
|
|
59
|
-
## Links
|
|
60
|
-
|
|
61
|
-
- Product source links to files keep the real `.md` or `.mdx` extension. The converter removes either extension for the public route.
|
|
62
|
-
- Directory links end in `/`.
|
|
63
|
-
- Site-level MDX and cross-product links use clean root-relative public routes such as `/arc/backend/commands/` - never `https://cratis.io/...` or a GitHub `blob/` URL, which the site build does not check. There are no symbol (`xref:`) links: the converter turns them into plain text.
|
|
64
|
-
- A product's local link gate skips root-relative links to other products by rule, not by product name; the full site check is what verifies them. See [Documentation Structure and Formatting](./documentation-structure-and-formatting.md#tables-images-links-and-diagrams).
|
|
65
|
-
- Slugification removes punctuation from path segments (`react.mvvm` becomes `reactmvvm`), so verify hand-authored site-absolute paths against the build.
|
|
66
|
-
|
|
67
|
-
## Content and rendering
|
|
68
|
-
|
|
69
|
-
- Match the page's Diátaxis type and the tour voice in [Writing Cratis Documentation](./writing-cratis-docs.md).
|
|
70
|
-
- Verify framework APIs against source using [Writing Correct Code Examples](./writing-correct-examples.md).
|
|
71
|
-
- Follow [Documentation Structure and Formatting](./documentation-structure-and-formatting.md) as the single authority for frontmatter, Markdown/MDX boundaries, asides, components, navigation behavior, and gates.
|
|
72
|
-
|
|
73
|
-
Commit in the repository that owns the authored source. Touch the Documentation repository only when the task deliberately changes site-level content, navigation composition, components, styling, redirects, or build behavior.
|
|
12
|
+
- Update the related `toc.yml` and inbound links when adding or moving a product page. Preserve published routes or add a redirect through the site's mechanism. Do not redesign navigation as a side effect of editing a page.
|
|
13
|
+
- Run the owning repository's local documentation gate if present. For site rendering or cross-product links, run `npm run check` from `Documentation/web`. Distinguish missing tools or unrelated sibling failures from passed checks.
|
|
14
|
+
- Use `npm run dev` there for light/dark preview. Restart the dev server after a build or check if preview becomes stale. See [Documentation Structure and Formatting](./documentation-structure-and-formatting.md) for authored format.
|
|
15
|
+
- A product merge or `build-docs` dispatch is not a deployment verdict. Verify the deployed page before claiming it is live.
|
|
@@ -6,60 +6,13 @@ paths:
|
|
|
6
6
|
profile: application
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
# Entity Framework Core
|
|
9
|
+
# Arc Entity Framework Core
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Applies to applications using `Cratis.Arc.EntityFrameworkCore`.
|
|
12
12
|
|
|
13
|
-
`
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
- **`ReadOnlyDbContext`** — for every read model / projection context (the vast majority). Its save-changes interceptor **throws** on any `SaveChanges`, so a projection cannot be bypassed by accident.
|
|
20
|
-
- **`BaseDbContext`** — only for a writable context that genuinely owns state (device state, infrastructure state).
|
|
21
|
-
|
|
22
|
-
```csharp
|
|
23
|
-
public class StartupPhaseDbContext(DbContextOptions<StartupPhaseDbContext> options)
|
|
24
|
-
: ReadOnlyDbContext(options)
|
|
25
|
-
{
|
|
26
|
-
public DbSet<StartupPhase> StartupPhases => Set<StartupPhase>();
|
|
27
|
-
}
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
Use the primary constructor; expose each `DbSet<T>` as an expression-bodied property over `Set<T>()`. Co-locate the context with the feature whose read models it holds.
|
|
31
|
-
|
|
32
|
-
## Feature contexts — not god contexts **[convention]**
|
|
33
|
-
|
|
34
|
-
One focused `DbContext` per feature or tightly related feature group. Never aggregate unrelated entities into a single context: a context's shape is a cohesion boundary, and a god context couples every feature's schema change to every other's.
|
|
35
|
-
|
|
36
|
-
## State mutation — the golden rule **[convention]**
|
|
37
|
-
|
|
38
|
-
> **Never mutate state directly through a DbContext.**
|
|
39
|
-
|
|
40
|
-
All state changes flow through events and Chronicle projections; a direct write bypasses the event log and the audit trail. Only projection infrastructure, the Chronicle engine, and deliberate reference-data synchronization write through a context — and those are `BaseDbContext`s, never `ReadOnlyDbContext`s.
|
|
41
|
-
|
|
42
|
-
## Registration **[contract]**
|
|
43
|
-
|
|
44
|
-
Wire EF Core through the Arc builder and give it the connection string:
|
|
45
|
-
|
|
46
|
-
```csharp
|
|
47
|
-
builder.AddCratisArc(arc => arc.WithEntityFrameworkCore(
|
|
48
|
-
options => options.ConnectionString = connectionString));
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
With a non-empty connection string and `AutoDiscoverDbContexts` (the default), Arc discovers every public `BaseDbContext` subtype not marked `[IgnoreAutoRegistration]`, registering `ReadOnlyDbContext` subtypes read-only and the rest read-write. ⚠️ `WithEntityFrameworkCore()` with **no** connection string discovers nothing. Explicit registration remains available (`AddDbContextWithConnectionString<T>`, `AddReadOnlyDbContextWithConnectionString<T>`, `AddReadModelDbContextsFromAssemblies`, `AddReadModelDbContextsWithConnectionStringFromAssemblies`).
|
|
52
|
-
|
|
53
|
-
Select the provider with **`UseDatabaseFromConnectionString(connectionString)`** — never hard-code `UseSqlite` / `UseNpgsql` / `UseSqlServer`. It infers `DatabaseType` (`Sqlite`, `SqlServer`, `PostgreSql`) from the connection string, ensures a SQLite file's directory exists, and installs Arc's migrations SQL generator for that provider (which is what adds the JSON validation constraint for `[Json]` columns). An unsupported connection string throws `UnsupportedDatabaseType`.
|
|
54
|
-
|
|
55
|
-
## Migrations
|
|
56
|
-
|
|
57
|
-
Generating, reviewing, applying and rolling back a migration, including Arc's cross-provider column helpers, belongs to the **cratis-arc-migrate-relational-schema** skill. Where a repository organizes its migrations (a dedicated project, a file naming scheme, a table-name constants class) is its own convention: follow what the repository already does, and do not introduce one as if Arc required it.
|
|
58
|
-
|
|
59
|
-
## Concepts and JSON **[contract]**
|
|
60
|
-
|
|
61
|
-
`ConceptAs<T>` properties map to their underlying primitive without per-property value converters: `BaseDbContext.OnModelCreating` applies the concept conversions, and every Arc registration path calls `AddConceptAsSupport()` so concepts also work inside LINQ predicates. (A context you register with plain EF `AddDbContext` must call `options.AddConceptAsSupport()` itself.) Mark a property `[Json]` to store it as a JSON column with the provider's validation constraint.
|
|
62
|
-
|
|
63
|
-
## Observation **[contract]**
|
|
64
|
-
|
|
65
|
-
An EF Core read model can back an observable query: `dbSet.Observe(...)`, `ObserveById(...)` and `ObserveSingle(...)` (extension methods declared in the `Microsoft.EntityFrameworkCore` namespace, so they are in scope wherever the `DbSet` is) push changes through the provider's change notifier. Auxiliary sources support `ignoreQueryContext: true`; single-instance observations emit `default` on absence/deletion/filter exit. Indexer-property keys are supported; composite/shadow-only keys are refused at setup.
|
|
13
|
+
- Use `ReadOnlyDbContext` for feature-owned read models; ordinary `SaveChanges()` and `SaveChangesAsync(cancellationToken)` calls throw. This does not replace database write permissions. Change projected state through events, not through the read context. Use `BaseDbContext` for a context that intentionally owns writable state.
|
|
14
|
+
- Keep related entities in one focused context. Configure the shared connection string through `WithEntityFrameworkCore`. Discovery is on by default and registers public `BaseDbContext` subtypes when that string is set.
|
|
15
|
+
- For a context with its own connection or options, opt out with `[IgnoreAutoRegistration]`. Register it with `AddReadOnlyDbContextWithConnectionString<T>` for read models or `AddDbContextWithConnectionString<T>` for writable state. To scan only selected assemblies for read models, use `AddReadModelDbContextsFromAssemblies` with an options callback or `AddReadModelDbContextsWithConnectionStringFromAssemblies` with a shared connection string. Disable broad discovery when using assembly scanning instead.
|
|
16
|
+
- Use `UseDatabaseFromConnectionString` for Arc’s provider inference and migration SQL generators.
|
|
17
|
+
- Keep concept properties strongly typed. When registering a context using plain EF Core, enable Arc's concept query support with `AddConceptAsSupport()` if the context queries concepts. Do not duplicate the setup in Arc-managed registration. Use `[Json]` for Arc-managed JSON columns.
|
|
18
|
+
- For live read models, use `DbSet` observation: `Observe` for collections, `ObserveById` for a key and `ObserveSingle` for one matching row. Follow the Arc documentation for supported keys, absence/deletion behavior and provider-specific setup. For migration generation, rehearsal, application or rollback, use **cratis-arc-migrate-relational-schema**. Migration runner, design-time factory and folder layout are not Arc conventions.
|
|
@@ -6,38 +6,8 @@ paths:
|
|
|
6
6
|
profile: application
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
#
|
|
9
|
+
# EF Core specs
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
For direct `DbContext` query behavior, use an isolated SQLite in-memory database. Keep its connection open through setup and assertions; dispose it afterward. For meaningful database failures, arrange the specific failure at the write boundary and assert what the caller observes.
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
These specs are for code that interacts directly with `DbContext`. For a command, event or read-model outcome in an event-sourced slice, use **cratis-specifications-exercise-backend** instead.
|
|
16
|
-
|
|
17
|
-
## Database Setup
|
|
18
|
-
|
|
19
|
-
- Use SQLite in-memory database for all `DbContext` specs — it's fast and each spec gets a clean database.
|
|
20
|
-
- Configure and dispose the in-memory database properly to avoid state leakage between tests. Each spec run should start with a fresh schema.
|
|
21
|
-
|
|
22
|
-
## Mocking DbContext
|
|
23
|
-
|
|
24
|
-
- `SaveChanges()` and `SaveChangesAsync()` are virtual — mock with NSubstitute.
|
|
25
|
-
- `DbSet<T>` methods are virtual — mock as needed.
|
|
26
|
-
- Pass options when substituting: `Substitute.For<YourDbContext>(options)`.
|
|
27
|
-
|
|
28
|
-
```csharp
|
|
29
|
-
var options = new DbContextOptionsBuilder<YourDbContext>()
|
|
30
|
-
.UseSqlite("DataSource=:memory:")
|
|
31
|
-
.Options;
|
|
32
|
-
|
|
33
|
-
var context = Substitute.For<YourDbContext>(options);
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
## Simulating Failures
|
|
37
|
-
|
|
38
|
-
Mock `SaveChanges` / `SaveChangesAsync` to throw exceptions for testing error handling and recovery:
|
|
39
|
-
|
|
40
|
-
```csharp
|
|
41
|
-
context.SaveChangesAsync(Arg.Any<CancellationToken>())
|
|
42
|
-
.Throws(new DbUpdateException("Simulated failure"));
|
|
43
|
-
```
|
|
13
|
+
SQLite does not prove production-provider behavior or migration compatibility. Rehearse migrations with **cratis-arc-migrate-relational-schema**. For event-sourced command and read-model outcomes, use **cratis-specifications-exercise-backend**.
|
|
@@ -8,84 +8,11 @@ paths:
|
|
|
8
8
|
<!-- Copyright (c) Cratis. All rights reserved. -->
|
|
9
9
|
<!-- Licensed under the MIT license. See LICENSE file in the project root for full license information. -->
|
|
10
10
|
|
|
11
|
-
# Elixir
|
|
11
|
+
# Elixir conventions
|
|
12
12
|
|
|
13
|
-
Use
|
|
13
|
+
Use the project's `mix.exs` and `.formatter.exs`. Run `mix compile --warnings-as-errors`, `mix test` and `mix format --check-formatted` for affected projects. Do not assume the Chronicle dependency exports no-paren formatter rules.
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
`mix format --check-formatted` with the project's formatter inputs.
|
|
20
|
-
- Use two-space indentation and let `mix format` own layout.
|
|
21
|
-
- Chronicle exports no `locals_without_parens` formatter configuration. Accept
|
|
22
|
-
parentheses around its DSL calls; do not assume `import_deps` supplies them.
|
|
23
|
-
|
|
24
|
-
## Code shape
|
|
25
|
-
|
|
26
|
-
- PascalCase module names; snake_case functions, variables and struct fields.
|
|
27
|
-
- Use structs for event/read-model data and pattern-matching clauses for
|
|
28
|
-
dispatch. Schema-bearing structs need typed defaults; `nil` is not a type
|
|
29
|
-
declaration and registers as string in this client.
|
|
30
|
-
- Preserve tagged results such as `:ok`, `{:ok, value}`, and `{:error, reason}`.
|
|
31
|
-
Handle expected remote failures explicitly rather than using a success-only
|
|
32
|
-
match in a long-lived process.
|
|
33
|
-
- Put long-lived processes under the application's supervision tree. Wait for
|
|
34
|
-
actual client readiness, not merely a successful supervisor start.
|
|
35
|
-
- Process-local context is not inherited by `Task` processes; pass required
|
|
36
|
-
context explicitly at that boundary.
|
|
37
|
-
- Document public APIs with `@moduledoc`, `@doc`, and `@spec`; use `Logger` for
|
|
38
|
-
operational logging and keep credentials out of messages and crash reports.
|
|
39
|
-
- Use American English in identifiers, comments and documentation.
|
|
40
|
-
|
|
41
|
-
## Anti-patterns to avoid
|
|
42
|
-
|
|
43
|
-
Check new Elixir against the official anti-pattern pages (code, design, process and meta-programming
|
|
44
|
-
anti-patterns in the Elixir documentation). The ones that matter most here:
|
|
45
|
-
|
|
46
|
-
- **Never create atoms from input.** `String.to_atom/1` on a name that a user, a file or a wire message
|
|
47
|
-
supplies leaks atoms. Compare as strings, or map through an explicit table or
|
|
48
|
-
`String.to_existing_atom/1`. A bounded, developer-written set of names is acceptable.
|
|
49
|
-
- **Match the shape you need.** Use `%{key: value} = map` or `Map.fetch!/2` for required data; `Map.get/3`
|
|
50
|
-
and `opts[:key]` are for optional data, and a default must not hide a missing required value
|
|
51
|
-
(`Map.get(actor, :id) || "unknown"`). Prefer `%{parts: parts} <- state` to `x when x != nil <- state`.
|
|
52
|
-
- **Do not rescue to find out whether something exists.** Check with `function_exported?/3` (after
|
|
53
|
-
`Code.ensure_loaded?/1`) or a pattern match. `rescue _ ->` that returns a default swallows real errors;
|
|
54
|
-
rescue narrowly, around foreign code only.
|
|
55
|
-
- **Do not let `with ... else` carry business logic.** Make each step return a tagged result
|
|
56
|
-
(`:ok` or `{:error, reason}`) so `else` is unnecessary or has one clause per distinct failure. Do not
|
|
57
|
-
mix a boolean into a `with` (`true <- cond`); wrap it in a function that returns a tagged result.
|
|
58
|
-
- **Return one shape.** Do not let an option or an argument change the return type or select between
|
|
59
|
-
different outcomes (`outcome: "applied" | "failed"` choosing the event); use two functions or commands.
|
|
60
|
-
Use `{:error, :not_found}` rather than `{:ok, nil}` when absence is a failure for the caller.
|
|
61
|
-
- **Keep parameter lists short.** Three or four. When a function needs more, or discards most of them,
|
|
62
|
-
pass one map or struct. Do not keep an unused parameter.
|
|
63
|
-
- **Supervise processes.** No bare `Task.start/1` or `spawn` for work that must not fail silently; start it
|
|
64
|
-
under a `Task.Supervisor` in the supervision tree. A process dictionary value does not reach a `Task`.
|
|
65
|
-
- **Libraries do not read global application configuration.** Take options from the caller. An
|
|
66
|
-
application may call `Application.get_env/2` for its own settings, ideally in one settings module.
|
|
67
|
-
Compile-time config belongs in `Application.compile_env/3`.
|
|
68
|
-
- **Macros earn their place.** Use a macro for syntax a function cannot take (a declaration DSL, a block)
|
|
69
|
-
and `use` only to define or register something, not to import functions.
|
|
70
|
-
- **Stringly typed values stay at the boundary.** Wire strings (ids, ISO 8601 times, enum names) are fine in
|
|
71
|
-
events and commands; decide on atoms or structs inside the code.
|
|
72
|
-
|
|
73
|
-
### Cohesion over file count
|
|
74
|
-
|
|
75
|
-
Do not split code only because a file is long or holds several modules. **High cohesion wins**: keep a
|
|
76
|
-
slice's command, its events and its specs next to each other, and a view's markup with the LiveView that
|
|
77
|
-
owns it. A module is too big when it has several reasons to change, not when it has many lines. These
|
|
78
|
-
anti-pattern fixes must not scatter a vertical slice across folders.
|
|
79
|
-
|
|
80
|
-
## Specs
|
|
81
|
-
|
|
82
|
-
Specs follow the `specs.elixir` rule: scripts in `for_*`/`when_*` folders beside the code, no `_test` suffix, `should` assertions.
|
|
83
|
-
|
|
84
|
-
Every `.ex` and `.exs` source file starts with:
|
|
85
|
-
|
|
86
|
-
```elixir
|
|
87
|
-
# Copyright (c) Cratis. All rights reserved.
|
|
88
|
-
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
Name modules by behavior, not generic layers. Keep secrets and credential derivatives out of persistent facts. Deliver external effects after append in a reactor. When another fact requires a decision, dispatch the authorized follow-up command through `Cratis.Arc.execute/3`; do not manufacture authority from the triggering event.
|
|
15
|
+
- Use OTP supervision for long-lived processes and consequential async work; await actual readiness. Pass process-local context explicitly to tasks.
|
|
16
|
+
- Keep domain values in structs and use named tagged results for expected outcomes. Do not hide missing required input with defaults or broadly rescue failures. Map untrusted strings to a bounded set; never create atoms from input.
|
|
17
|
+
- Keep slices cohesive, use American English, and apply repository copyright and public API documentation conventions. See `specs.elixir` for spec shape.
|
|
18
|
+
- Choose client APIs through **cratis-chronicle-select-client** or **cratis-arc-select-backend-sdk**. Keep secrets out of persistent facts. Deliver external effects after append; execute an authorized follow-up command through the pipeline rather than deriving authority from the triggering event.
|
|
@@ -10,30 +10,7 @@ paths:
|
|
|
10
10
|
|
|
11
11
|
# Exit codes and wrappers
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
- **[contract] Three codes, three meanings.** `0` ran clean, `1` found defects, `2` could
|
|
18
|
-
not run. A tool that cannot distinguish "found nothing" from "never looked" has no
|
|
19
|
-
usable verdict.
|
|
20
|
-
- **[contract] `2` is never reported as a pass.** Could-not-run is an unknown, and
|
|
21
|
-
unknown is not pass: report it as not run.
|
|
22
|
-
- **[contract] A wrapper's own success is not the child's verdict.** A script that runs a
|
|
23
|
-
checker and then exits `0` because *the script* finished has thrown the result away.
|
|
24
|
-
Propagate the child's status.
|
|
25
|
-
- **[contract] Pipelines and loops lose exit codes by default.** Use `set -euo pipefail`,
|
|
26
|
-
check `PIPESTATUS` where a pipeline's left side matters, and accumulate a failure flag
|
|
27
|
-
inside a loop rather than relying on the last iteration.
|
|
28
|
-
- **[contract] Green prints counts.** A clean run says how many subjects it examined. A
|
|
29
|
-
bare "OK" cannot be distinguished from a run over an empty set; the
|
|
30
|
-
`guards-and-fuses` rule covers the non-vacuity check.
|
|
31
|
-
- **[contract] `--self-test` plants defects.** A checker ships a self-test that seeds
|
|
32
|
-
known violations and fails if it does not find every one of them. That is the only way
|
|
33
|
-
to know the checker still detects anything.
|
|
34
|
-
- **[contract] Never swallow output to make a gate quiet.** Redirecting stderr, adding
|
|
35
|
-
`|| true`, or catching and ignoring is a decision to stop checking. Say so out loud or
|
|
36
|
-
do not do it.
|
|
37
|
-
- **[convention] Name the subject in the failure line.** The path, the id, the rule — a
|
|
38
|
-
failure a reader cannot locate costs more than it saves.
|
|
39
|
-
- **[convention] Keep the wrapper thin.** Logic in a wrapper is logic no test covers.
|
|
13
|
+
- **[contract]** For our checkers, `0` means ran clean, `1` found defects and `2` could not run. For an external tool, interpret its documented codes; a wrapper must not turn failure, interruption or unknown into success.
|
|
14
|
+
- **[contract]** Preserve the child's status before filtering output. In Bash, use `pipefail` for aggregate pipeline status or capture `PIPESTATUS` immediately when an individual command's status matters. In PowerShell, capture `$LASTEXITCODE` immediately after a native command. Accumulate failures in loops; never rely on the last iteration.
|
|
15
|
+
- **[contract]** A clean checker reports examined counts. Its `--self-test` must plant known violations and detect every one; see `guards-and-fuses` for non-vacuity. Do not suppress errors to pass.
|
|
16
|
+
- **[convention]** Keep wrappers thin and name the failed subject in diagnostics.
|
|
@@ -7,10 +7,8 @@ profile: framework
|
|
|
7
7
|
|
|
8
8
|
# Platform .NET conventions
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Read `global.json`, build props and the project before choosing language features or runtime APIs. A language feature supported by the compiler is not permission to use a runtime API absent from another target. Preserve every supported target, guard target-specific code, and build all affected targets.
|
|
11
11
|
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
- SDK 11 reports IDE0001/IDE0002 (simplify names and member access) in the IDE and `dotnet format --verify-no-changes`, not in builds. IDE0370 (unnecessary `!`) also runs in builds when explicitly enabled, for example by `EnforceCodeStyleInBuild` with `dotnet_analyzer_diagnostic.severity = warning`. Keep existing warning-level enforcement and fix its findings.
|
|
16
|
-
- IDE0370 analyzes each target separately. Remove each `!` unnecessary on every target. If another target still needs a flagged `!`, a multi-target library may set `dotnet_diagnostic.IDE0370.severity = suggestion` in its own `.editorconfig`, with a tracking issue and a build of all targets. Never use `none` or a shared or global setting; the exception does not apply to net11-only executables.
|
|
12
|
+
- Prefer extension blocks for new extension APIs where supported; do not rewrite existing ones incidentally. Prefer `field` for simple backing storage and `System.Threading.Lock` where all targets support it.
|
|
13
|
+
- Do not add `closed` to a published hierarchy, or introduce preview features that the project does not support.
|
|
14
|
+
- Respect existing analyzer enforcement. Remove null suppression only when unnecessary on all targets; if only some targets need a suppression flagged by IDE0370, use at most a project-local `suggestion` setting with a tracking issue and verify all targets. Do not weaken shared rules.
|
|
@@ -28,5 +28,3 @@ This repository is a Cratis library or tool, not an application built on one.
|
|
|
28
28
|
Use the `cratis-platform-contribute-change` skill (in `cratis/engineering/core`) to locate the contract and its focused check, and `cratis-platform-prepare-release-pr` (in `cratis/engineering/core`) for the release note and label.
|
|
29
29
|
|
|
30
30
|
For platform .NET implementation, SDK or analyzer changes consult `framework-dotnet.md`.
|
|
31
|
-
|
|
32
|
-
Design the ordinary call so a consumer can use it correctly without knowing implementation details. Treat generated proxy signatures and serialized output shapes as published contracts.
|
|
@@ -10,7 +10,6 @@ paths:
|
|
|
10
10
|
|
|
11
11
|
Split a crowded component by behavior, not a line-count threshold. Preserve keyboard reachability, visible focus and actionable error states when extracting controls. Follow the component README contract in `components.md` when changing state ownership or extension points.
|
|
12
12
|
|
|
13
|
-
|
|
14
13
|
- Do not ship stub controls, lorem ipsum or fake counts as real UI. Remove the placeholder and its strings when real behavior lands.
|
|
15
14
|
- After replacing a `.tsx` body, read through the end of the file for stale JSX, duplicate bodies and unreachable code.
|
|
16
15
|
- Keep helpers beside their slice until a second real consumer needs the same behavior; then promote them to shared components.
|
|
@@ -8,4 +8,4 @@ paths:
|
|
|
8
8
|
|
|
9
9
|
# Frontend testing
|
|
10
10
|
|
|
11
|
-
Exercise the interaction and assert what the user observes. Run the relevant spec project; building a story does not execute its play function. Follow adjacent Vitest assertions; use instrumented
|
|
11
|
+
Exercise the interaction and assert what the user observes. Run the relevant spec project; building a story does not execute its play function. Follow adjacent Vitest assertions; for a Storybook `play` interaction, use the instrumented assertions from the project’s Storybook test entry point.
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
- Implement the smallest observable contract.
|
|
11
11
|
- Choose skills by task and nearest exclusion; load linked skills only at their boundary.
|
|
12
|
-
- Examples yield to repository facts
|
|
12
|
+
- Examples yield to verified repository facts; check the current API before using a snippet.
|
|
13
13
|
- Fix in-scope behavior; report unrelated defects.
|
|
14
14
|
- Change owning contracts and regenerate outputs.
|
|
15
15
|
- Existing code or local instructions do not override corpus conventions. Only an accepted decision record naming the rule it replaces can do so, and it never relaxes security, framework or API contracts, or gates.
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
Plan/model acceptance is not execution approval. Ask before render, apply, deploy, live changes, hosted disclosure, MCP configuration or force-rendering over edits.
|
|
21
21
|
|
|
22
|
-
Screenplay
|
|
22
|
+
Use Screenplay only on an explicit Screenplay/Stage request, existing `.play` source, or a configured `mcpServers.screenplay.root`. An installed server, profile or empty folder alone is not opt-in. For a project with `modelFirst.frozen: true`, treat committed `.play` as evidence and work code-first from accepted examples unless the user names the models or paths to edit or regenerate. Without opt-in, work code-first.
|
|
23
23
|
|
|
24
24
|
## Protect tenants, data and secrets
|
|
25
25
|
|