@cratis/pi 8.0.1 → 8.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package/corpus/harnesses/copilot/instructions/ai-distribution.instructions.md +9 -102
- package/package/corpus/harnesses/copilot/instructions/authoring-skills.instructions.md +3 -5
- package/package/corpus/harnesses/copilot/instructions/browser.instructions.md +8 -49
- package/package/corpus/harnesses/copilot/instructions/code-health.instructions.md +1 -1
- package/package/corpus/harnesses/copilot/instructions/code-quality.csharp.instructions.md +3 -84
- package/package/corpus/harnesses/copilot/instructions/code-quality.instructions.md +6 -51
- package/package/corpus/harnesses/copilot/instructions/code-quality.typescript.instructions.md +4 -81
- package/package/corpus/harnesses/copilot/instructions/codescene.instructions.md +5 -54
- package/package/corpus/harnesses/copilot/instructions/components.instructions.md +1 -1
- package/package/corpus/harnesses/copilot/instructions/cratis-folder-is-configuration.instructions.md +5 -22
- package/package/corpus/harnesses/copilot/instructions/csharp.instructions.md +7 -315
- package/package/corpus/harnesses/copilot/instructions/dialogs.instructions.md +1 -1
- package/package/corpus/harnesses/copilot/instructions/discoverability.instructions.md +3 -25
- package/package/corpus/harnesses/copilot/instructions/documentation-structure-and-formatting.instructions.md +5 -151
- package/package/corpus/harnesses/copilot/instructions/documentation.instructions.md +5 -104
- package/package/corpus/harnesses/copilot/instructions/editing-cratis-docs.instructions.md +5 -63
- package/package/corpus/harnesses/copilot/instructions/efcore.instructions.md +8 -55
- package/package/corpus/harnesses/copilot/instructions/efcore.specs.instructions.md +3 -33
- package/package/corpus/harnesses/copilot/instructions/elixir.instructions.md +6 -79
- package/package/corpus/harnesses/copilot/instructions/exit-codes-and-wrappers.instructions.md +4 -27
- package/package/corpus/harnesses/copilot/instructions/framework-dotnet.instructions.md +4 -6
- package/package/corpus/harnesses/copilot/instructions/framework.instructions.md +0 -2
- package/package/corpus/harnesses/copilot/instructions/frontend-quality.instructions.md +0 -1
- package/package/corpus/harnesses/copilot/instructions/frontend-testing.instructions.md +1 -1
- package/package/corpus/harnesses/copilot/instructions/github-actions.instructions.md +7 -138
- package/package/corpus/harnesses/copilot/instructions/glossary.instructions.md +19 -19
- package/package/corpus/harnesses/copilot/instructions/go-engineering.instructions.md +1 -4
- package/package/corpus/harnesses/copilot/instructions/go.instructions.md +2 -7
- package/package/corpus/harnesses/copilot/instructions/guards-and-fuses.instructions.md +5 -6
- package/package/corpus/harnesses/copilot/instructions/java.instructions.md +7 -129
- package/package/corpus/harnesses/copilot/instructions/kotlin.instructions.md +8 -165
- package/package/corpus/harnesses/copilot/instructions/orleans.instructions.md +5 -98
- package/package/corpus/harnesses/copilot/instructions/profiles.instructions.md +9 -63
- package/package/corpus/harnesses/copilot/instructions/scripting.instructions.md +1 -1
- package/package/corpus/harnesses/copilot/instructions/specs.csharp.instructions.md +8 -148
- package/package/corpus/harnesses/copilot/instructions/specs.elixir.instructions.md +4 -37
- package/package/corpus/harnesses/copilot/instructions/specs.typescript.instructions.md +3 -1
- package/package/corpus/harnesses/copilot/instructions/storybook.instructions.md +7 -70
- package/package/corpus/harnesses/copilot/instructions/typescript.instructions.md +8 -98
- package/package/corpus/harnesses/copilot/instructions/writing-correct-examples.instructions.md +3 -47
- package/package/corpus/harnesses/copilot/instructions/writing-cratis-docs.instructions.md +3 -65
- package/package/corpus/hooks/README.md +4 -7
- package/package/corpus/hooks/scripts/quality-gates.json +3 -5
- package/package/corpus/rules/ai-distribution.md +9 -102
- package/package/corpus/rules/authoring-skills.md +3 -5
- package/package/corpus/rules/browser.md +8 -49
- package/package/corpus/rules/code-health-policy.txt +4 -24
- package/package/corpus/rules/code-health.md +1 -1
- package/package/corpus/rules/code-quality.csharp.md +3 -84
- package/package/corpus/rules/code-quality.md +6 -51
- package/package/corpus/rules/code-quality.typescript.md +4 -81
- package/package/corpus/rules/codescene.md +5 -54
- package/package/corpus/rules/components.md +1 -1
- package/package/corpus/rules/cratis-folder-is-configuration.md +5 -22
- package/package/corpus/rules/csharp.md +7 -315
- package/package/corpus/rules/dialogs.md +1 -1
- package/package/corpus/rules/discoverability.md +3 -25
- package/package/corpus/rules/documentation-structure-and-formatting.md +5 -151
- package/package/corpus/rules/documentation.md +5 -104
- package/package/corpus/rules/editing-cratis-docs.md +5 -63
- package/package/corpus/rules/efcore.md +8 -55
- package/package/corpus/rules/efcore.specs.md +3 -33
- package/package/corpus/rules/elixir.md +6 -79
- package/package/corpus/rules/exit-codes-and-wrappers.md +4 -27
- package/package/corpus/rules/framework-dotnet.md +4 -6
- package/package/corpus/rules/framework.md +0 -2
- package/package/corpus/rules/frontend-quality.md +0 -1
- package/package/corpus/rules/frontend-testing.md +1 -1
- package/package/corpus/rules/general.md +2 -2
- package/package/corpus/rules/github-actions.md +7 -138
- package/package/corpus/rules/glossary.md +19 -19
- package/package/corpus/rules/go-engineering.md +1 -4
- package/package/corpus/rules/go.md +2 -7
- package/package/corpus/rules/guards-and-fuses.md +5 -6
- package/package/corpus/rules/java.md +7 -129
- package/package/corpus/rules/kotlin.md +8 -165
- package/package/corpus/rules/orleans.md +5 -98
- package/package/corpus/rules/profiles.md +9 -63
- package/package/corpus/rules/scripting.md +1 -1
- package/package/corpus/rules/specs.csharp.md +8 -148
- package/package/corpus/rules/specs.elixir.md +4 -37
- package/package/corpus/rules/specs.typescript.md +3 -1
- package/package/corpus/rules/storybook.md +7 -70
- package/package/corpus/rules/typescript.md +8 -98
- package/package/corpus/rules/writing-correct-examples.md +3 -47
- package/package/corpus/rules/writing-cratis-docs.md +3 -65
- package/package/corpus/skills/cratis-application-growth/SKILL.md +7 -54
- package/package/corpus/skills/cratis-application-growth/references/move-and-untangle.md +49 -0
- package/package/corpus/skills/cratis-application-growth/references/rename-window.md +12 -14
- package/package/corpus/skills/cratis-application-growth/references/stages.md +2 -2
- package/package/corpus/skills/cratis-arc-authorize-request/SKILL.md +2 -2
- package/package/corpus/skills/cratis-arc-authorize-request/references/csharp.md +3 -3
- package/package/corpus/skills/cratis-arc-authorize-request/references/kotlin.md +2 -2
- package/package/corpus/skills/cratis-arc-code-analysis-typescript/SKILL.md +10 -43
- package/package/corpus/skills/cratis-arc-code-analysis-typescript/references/rule-fixes.md +40 -0
- package/package/corpus/skills/cratis-arc-connect-storage/SKILL.md +1 -1
- package/package/corpus/skills/cratis-arc-connect-storage/references/csharp.md +1 -1
- package/package/corpus/skills/cratis-arc-declare-command/references/csharp.md +4 -4
- package/package/corpus/skills/cratis-arc-declare-command/references/go.md +1 -1
- package/package/corpus/skills/cratis-arc-declare-command/references/kotlin.md +6 -7
- package/package/corpus/skills/cratis-arc-declare-operation/SKILL.md +2 -8
- package/package/corpus/skills/cratis-arc-declare-operation/references/csharp.md +1 -1
- package/package/corpus/skills/cratis-arc-diagnose-live-query/SKILL.md +1 -1
- package/package/corpus/skills/cratis-arc-diagnose-live-query/references/csharp.md +1 -1
- package/package/corpus/skills/cratis-arc-expose-mcp-operation/SKILL.md +6 -12
- package/package/corpus/skills/cratis-arc-expose-mcp-operation/references/custom-exposure-and-audit.md +4 -0
- package/package/corpus/skills/cratis-arc-expose-query/SKILL.md +2 -2
- package/package/corpus/skills/cratis-arc-expose-query/references/csharp.md +11 -4
- package/package/corpus/skills/cratis-arc-expose-query/references/typescript.md +1 -1
- package/package/corpus/skills/cratis-arc-generate-proxies/SKILL.md +2 -2
- package/package/corpus/skills/cratis-arc-generate-proxies/references/csharp.md +1 -1
- package/package/corpus/skills/cratis-arc-generate-proxies/references/go.md +19 -2
- package/package/corpus/skills/cratis-arc-generate-proxies/references/typescript.md +1 -1
- package/package/corpus/skills/cratis-arc-host-application/SKILL.md +1 -1
- package/package/corpus/skills/cratis-arc-host-application/references/csharp.md +1 -2
- package/package/corpus/skills/cratis-arc-host-application/references/elixir.md +2 -2
- package/package/corpus/skills/cratis-arc-host-application/references/go.md +5 -1
- package/package/corpus/skills/cratis-arc-host-application/references/java.md +1 -1
- package/package/corpus/skills/cratis-arc-host-application/references/kotlin.md +1 -1
- package/package/corpus/skills/cratis-arc-host-application/references/typescript.md +1 -1
- package/package/corpus/skills/cratis-arc-identity-and-tenancy-kotlin/SKILL.md +4 -7
- package/package/corpus/skills/cratis-arc-invoke-command/SKILL.md +1 -1
- package/package/corpus/skills/cratis-arc-invoke-command/references/csharp.md +4 -4
- package/package/corpus/skills/cratis-arc-invoke-command/references/typescript.md +1 -1
- package/package/corpus/skills/cratis-arc-isolate-tenant/SKILL.md +2 -2
- package/package/corpus/skills/cratis-arc-isolate-tenant/references/csharp.md +2 -2
- package/package/corpus/skills/cratis-arc-isolate-tenant/references/elixir.md +1 -1
- package/package/corpus/skills/cratis-arc-isolate-tenant/references/java.md +1 -1
- package/package/corpus/skills/cratis-arc-isolate-tenant/references/kotlin.md +1 -1
- package/package/corpus/skills/cratis-arc-isolate-tenant/references/typescript.md +4 -2
- package/package/corpus/skills/cratis-arc-migrate-relational-schema/SKILL.md +6 -6
- package/package/corpus/skills/cratis-arc-page-query/SKILL.md +3 -3
- package/package/corpus/skills/cratis-arc-page-query/references/csharp.md +10 -6
- package/package/corpus/skills/cratis-arc-page-query/references/elixir.md +2 -2
- package/package/corpus/skills/cratis-arc-page-query/references/java.md +1 -1
- package/package/corpus/skills/cratis-arc-page-query/references/kotlin.md +1 -1
- package/package/corpus/skills/cratis-arc-react-bind-slice/SKILL.md +2 -2
- package/package/corpus/skills/cratis-arc-react-bind-slice/references/csharp.md +1 -1
- package/package/corpus/skills/cratis-arc-react-bind-slice/references/kotlin.md +1 -1
- package/package/corpus/skills/cratis-arc-react-separate-view-model/SKILL.md +7 -3
- package/package/corpus/skills/cratis-arc-react-separate-view-model/references/react-routing-and-messaging.md +1 -1
- package/package/corpus/skills/cratis-arc-select-backend-sdk/SKILL.md +2 -2
- package/package/corpus/skills/cratis-arc-select-backend-sdk/references/elixir.md +2 -4
- package/package/corpus/skills/cratis-arc-select-backend-sdk/references/go.md +2 -2
- package/package/corpus/skills/cratis-arc-select-backend-sdk/references/java.md +1 -1
- package/package/corpus/skills/cratis-arc-select-backend-sdk/references/kotlin.md +2 -2
- package/package/corpus/skills/cratis-arc-select-backend-sdk/references/typescript.md +1 -3
- package/package/corpus/skills/cratis-arc-spring-data-kotlin/SKILL.md +13 -51
- package/package/corpus/skills/cratis-arc-spring-data-kotlin/references/read-model-naming.md +9 -1
- package/package/corpus/skills/cratis-arc-spring-data-kotlin/references/storage-boundaries.md +40 -0
- package/package/corpus/skills/cratis-arc-storage-typescript/SKILL.md +19 -64
- package/package/corpus/skills/cratis-arc-storage-typescript/references/drizzle.md +62 -0
- package/package/corpus/skills/cratis-arc-tenancy-typescript/SKILL.md +24 -55
- package/package/corpus/skills/cratis-arc-tenancy-typescript/references/tenant-selection.md +49 -0
- package/package/corpus/skills/cratis-arc-testing-kotlin/SKILL.md +13 -31
- package/package/corpus/skills/cratis-arc-testing-kotlin/references/jvm-scenario-variants.md +25 -0
- package/package/corpus/skills/cratis-arc-testing-typescript/SKILL.md +24 -62
- package/package/corpus/skills/cratis-arc-testing-typescript/references/hosts-and-runners.md +51 -0
- package/package/corpus/skills/cratis-arc-validate-command/SKILL.md +4 -4
- package/package/corpus/skills/cratis-arc-validate-command/references/csharp.md +10 -12
- package/package/corpus/skills/cratis-arc-validate-command/references/elixir.md +16 -3
- package/package/corpus/skills/cratis-arc-validate-command/references/go.md +19 -2
- package/package/corpus/skills/cratis-arc-validate-command/references/java.md +20 -7
- package/package/corpus/skills/cratis-arc-validate-command/references/kotlin.md +22 -2
- package/package/corpus/skills/cratis-arc-validate-command/references/python.md +8 -2
- package/package/corpus/skills/cratis-arc-validate-command/references/typescript.md +22 -2
- package/package/corpus/skills/cratis-arc-validation-kotlin/SKILL.md +22 -248
- package/package/corpus/skills/cratis-arc-validation-kotlin/references/feature-filters.md +55 -0
- package/package/corpus/skills/cratis-arc-validation-kotlin/references/model-validation.md +72 -0
- package/package/corpus/skills/cratis-arc-validation-kotlin/references/server-validators.md +86 -0
- package/package/corpus/skills/cratis-arc-validation-typescript/SKILL.md +27 -275
- package/package/corpus/skills/cratis-arc-validation-typescript/references/models-and-queries.md +63 -0
- package/package/corpus/skills/cratis-arc-validation-typescript/references/rules-and-checks.md +46 -0
- package/package/corpus/skills/cratis-arc-validation-typescript/references/server-decisions.md +114 -0
- package/package/corpus/skills/cratis-chronicle-cli-operations/SKILL.md +15 -255
- package/package/corpus/skills/cratis-chronicle-cli-operations/references/command-effects.md +13 -6
- package/package/corpus/skills/cratis-chronicle-cli-operations/references/inspection.md +75 -0
- package/package/corpus/skills/cratis-chronicle-cli-operations/references/project-tooling.md +78 -13
- package/package/corpus/skills/cratis-chronicle-cli-operations/references/recovery-and-comparison.md +16 -14
- package/package/corpus/skills/cratis-chronicle-connect-application/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-connect-application/references/csharp.md +10 -6
- package/package/corpus/skills/cratis-chronicle-connect-application/references/elixir.md +1 -1
- package/package/corpus/skills/cratis-chronicle-constrain-append/SKILL.md +2 -2
- package/package/corpus/skills/cratis-chronicle-constrain-append/references/csharp.md +8 -8
- package/package/corpus/skills/cratis-chronicle-deploy-kernel/SKILL.md +10 -8
- package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/storage.md +8 -4
- package/package/corpus/skills/cratis-chronicle-evolve-event/SKILL.md +4 -4
- package/package/corpus/skills/cratis-chronicle-evolve-event/references/csharp.md +2 -2
- package/package/corpus/skills/cratis-chronicle-evolve-event/references/deployed-readers.md +21 -8
- package/package/corpus/skills/cratis-chronicle-evolve-event/references/elixir.md +1 -1
- package/package/corpus/skills/cratis-chronicle-inspect-observer/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-inspect-observer/references/csharp.md +5 -7
- package/package/corpus/skills/cratis-chronicle-inspect-observer/references/elixir.md +3 -3
- package/package/corpus/skills/cratis-chronicle-mcp-inspection/SKILL.md +10 -80
- package/package/corpus/skills/cratis-chronicle-mcp-inspection/references/blocked-tools.md +2 -2
- package/package/corpus/skills/cratis-chronicle-mcp-inspection/references/deployment.md +9 -24
- package/package/corpus/skills/cratis-chronicle-mcp-inspection/references/observational-tools.md +10 -0
- package/package/corpus/skills/cratis-chronicle-project-view/SKILL.md +2 -2
- package/package/corpus/skills/cratis-chronicle-project-view/references/csharp.md +7 -6
- package/package/corpus/skills/cratis-chronicle-project-view/references/elixir.md +2 -2
- package/package/corpus/skills/cratis-chronicle-project-view/references/go.md +6 -0
- package/package/corpus/skills/cratis-chronicle-project-view/references/java.md +6 -0
- package/package/corpus/skills/cratis-chronicle-project-view/references/kotlin.md +6 -0
- package/package/corpus/skills/cratis-chronicle-project-view/references/typescript.md +11 -5
- package/package/corpus/skills/cratis-chronicle-protect-decision/SKILL.md +2 -2
- package/package/corpus/skills/cratis-chronicle-protect-decision/references/csharp.md +4 -4
- package/package/corpus/skills/cratis-chronicle-protect-decision/references/elixir.md +2 -2
- package/package/corpus/skills/cratis-chronicle-protect-decision/references/go.md +3 -1
- package/package/corpus/skills/cratis-chronicle-protect-personal-data/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-protect-personal-data/references/csharp.md +1 -1
- package/package/corpus/skills/cratis-chronicle-publish-contract/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-publish-contract/references/csharp.md +51 -40
- package/package/corpus/skills/cratis-chronicle-publish-contract/references/elixir.md +1 -1
- package/package/corpus/skills/cratis-chronicle-react-to-fact/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-react-to-fact/references/{occurrences.md → csharp-occurrences.md} +2 -2
- package/package/corpus/skills/cratis-chronicle-react-to-fact/references/csharp.md +5 -6
- package/package/corpus/skills/cratis-chronicle-react-to-fact/references/go.md +1 -1
- package/package/corpus/skills/cratis-chronicle-react-to-fact/references/java.md +1 -1
- package/package/corpus/skills/cratis-chronicle-react-to-fact/references/kotlin.md +1 -1
- package/package/corpus/skills/cratis-chronicle-record-event/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-record-event/references/csharp.md +21 -19
- package/package/corpus/skills/cratis-chronicle-record-event/references/elixir.md +3 -3
- package/package/corpus/skills/cratis-chronicle-record-event/references/go.md +1 -1
- package/package/corpus/skills/cratis-chronicle-record-event/references/java.md +3 -4
- package/package/corpus/skills/cratis-chronicle-record-event/references/kotlin.md +3 -4
- package/package/corpus/skills/cratis-chronicle-record-event/references/typescript.md +2 -2
- package/package/corpus/skills/cratis-chronicle-reduce-state/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-reduce-state/references/csharp.md +7 -2
- package/package/corpus/skills/cratis-chronicle-reduce-state/references/typescript.md +1 -1
- package/package/corpus/skills/cratis-chronicle-select-client/SKILL.md +4 -4
- package/package/corpus/skills/cratis-chronicle-select-client/references/csharp.md +3 -3
- package/package/corpus/skills/cratis-chronicle-select-client/references/elixir.md +2 -6
- package/package/corpus/skills/cratis-chronicle-select-client/references/go.md +2 -2
- package/package/corpus/skills/cratis-chronicle-select-client/references/java.md +1 -1
- package/package/corpus/skills/cratis-chronicle-select-client/references/kotlin.md +1 -5
- package/package/corpus/skills/cratis-chronicle-select-client/references/python.md +3 -3
- package/package/corpus/skills/cratis-chronicle-select-client/references/typescript.md +2 -2
- package/package/corpus/skills/cratis-chronicle-web-workbench/SKILL.md +12 -201
- package/package/corpus/skills/cratis-chronicle-web-workbench/references/hosting.md +67 -0
- package/package/corpus/skills/cratis-chronicle-web-workbench/references/operations.md +88 -0
- package/package/corpus/skills/cratis-ci-pipeline-performance/SKILL.md +8 -4
- package/package/corpus/skills/cratis-ci-pipeline-performance/references/build-once-and-shard.md +13 -11
- package/package/corpus/skills/cratis-ci-pipeline-performance/references/caching.md +2 -2
- package/package/corpus/skills/cratis-ci-pipeline-performance/references/flaky-and-hung-jobs.md +6 -4
- package/package/corpus/skills/cratis-ci-pipeline-performance/references/required-checks-and-path-filters.md +20 -61
- package/package/corpus/skills/cratis-ci-pipeline-performance/references/security-and-pinning.md +1 -1
- package/package/corpus/skills/cratis-cli-terminal-workbench/SKILL.md +15 -26
- package/package/corpus/skills/cratis-code-review/SKILL.md +7 -6
- package/package/corpus/skills/cratis-commits-and-pull-requests/SKILL.md +1 -1
- package/package/corpus/skills/cratis-commits-and-pull-requests/references/pr-description.md +1 -1
- package/package/corpus/skills/cratis-components-accessibility/SKILL.md +14 -206
- package/package/corpus/skills/cratis-components-accessibility/references/control-labels.md +29 -0
- package/package/corpus/skills/cratis-components-accessibility/references/focus-and-announcements.md +8 -0
- package/package/corpus/skills/cratis-components-build-canvas/SKILL.md +7 -7
- package/package/corpus/skills/cratis-components-build-canvas/references/pixi-items.md +1 -1
- package/package/corpus/skills/cratis-components-choose-control/SKILL.md +7 -8
- package/package/corpus/skills/cratis-components-choose-control/references/collections.md +2 -2
- package/package/corpus/skills/cratis-components-choose-control/references/inputs.md +1 -1
- package/package/corpus/skills/cratis-components-compose-toolbar/SKILL.md +22 -27
- package/package/corpus/skills/cratis-components-compose-toolbar/references/contributed-tools.md +5 -0
- package/package/corpus/skills/cratis-components-coordinate-feedback/SKILL.md +19 -25
- package/package/corpus/skills/cratis-components-display-list/SKILL.md +26 -19
- package/package/corpus/skills/cratis-components-display-list/references/server-query.md +3 -3
- package/package/corpus/skills/cratis-components-edit-schema-data/SKILL.md +15 -12
- package/package/corpus/skills/cratis-components-edit-schema-data/references/controlled-editor.md +3 -3
- package/package/corpus/skills/cratis-components-explore-data/SKILL.md +7 -7
- package/package/corpus/skills/cratis-components-host-chat/SKILL.md +7 -7
- package/package/corpus/skills/cratis-components-submit-form/SKILL.md +9 -15
- package/package/corpus/skills/cratis-components-submit-form/references/confirmation.md +5 -5
- package/package/corpus/skills/cratis-components-submit-form/references/wizard.md +3 -3
- package/package/corpus/skills/cratis-components-theme-application/SKILL.md +7 -51
- package/package/corpus/skills/cratis-components-theme-application/references/palette.md +49 -0
- package/package/corpus/skills/cratis-components-theme-application/references/renderer-adapters.md +4 -2
- package/package/corpus/skills/cratis-content-length/SKILL.md +34 -46
- package/package/corpus/skills/cratis-content-length/references/length-evidence.md +26 -127
- package/package/corpus/skills/cratis-developer-marketing/SKILL.md +15 -27
- package/package/corpus/skills/cratis-developer-marketing/references/measurement.md +3 -19
- package/package/corpus/skills/cratis-developer-marketing/references/playbook-evidence.md +29 -224
- package/package/corpus/skills/cratis-discoverability/SKILL.md +11 -4
- package/package/corpus/skills/cratis-discoverability/references/package-metadata.md +2 -2
- package/package/corpus/skills/cratis-documentation-writing/SKILL.md +4 -3
- package/package/corpus/skills/cratis-engineering-ci-gates/SKILL.md +13 -129
- package/package/corpus/skills/cratis-engineering-ci-gates/references/gate-operation.md +132 -0
- package/package/corpus/skills/cratis-engineering-consolidation-guard/SKILL.md +11 -100
- package/package/corpus/skills/cratis-engineering-consolidation-guard/references/ci-required-check.md +55 -40
- package/package/corpus/skills/cratis-engineering-consolidation-guard/references/source-verification.md +68 -0
- package/package/corpus/skills/cratis-engineering-consolidation-guard/references/verification-details.md +38 -0
- package/package/corpus/skills/cratis-engineering-csharp-conventions/SKILL.md +14 -65
- package/package/corpus/skills/cratis-engineering-csharp-conventions/references/exceptions-logging-and-di.md +40 -174
- package/package/corpus/skills/cratis-engineering-decision-record/SKILL.md +8 -52
- package/package/corpus/skills/cratis-engineering-decision-record/references/decision-pitfalls.md +29 -0
- package/package/corpus/skills/cratis-engineering-decision-record/references/decision-scope.md +20 -0
- package/package/corpus/skills/cratis-engineering-decision-record/references/record-format.md +3 -4
- package/package/corpus/skills/cratis-engineering-docs-authoring/SKILL.md +7 -12
- package/package/corpus/skills/cratis-engineering-docs-authoring/references/site-format.md +5 -4
- package/package/corpus/skills/cratis-engineering-effect-boundaries/SKILL.md +6 -40
- package/package/corpus/skills/cratis-engineering-effect-boundaries/references/failure-archetypes.md +18 -151
- package/package/corpus/skills/cratis-engineering-inherited-work/SKILL.md +5 -21
- package/package/corpus/skills/cratis-engineering-inherited-work/references/continue-inherited-work.md +19 -0
- package/package/corpus/skills/cratis-engineering-issue-design-note/SKILL.md +3 -66
- package/package/corpus/skills/cratis-engineering-issue-design-note/references/design-note-format.md +68 -0
- package/package/corpus/skills/cratis-engineering-issue-hygiene/SKILL.md +2 -84
- package/package/corpus/skills/cratis-engineering-issue-hygiene/references/issue-disposition.md +87 -0
- package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/SKILL.md +15 -263
- package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/dependency-map.md +3 -3
- package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/docker-images.md +28 -6
- package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/dotnet-nuget.md +18 -14
- package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/helper-runbook.md +231 -0
- package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/other-environments.md +2 -3
- package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/worked-examples.md +62 -77
- package/package/corpus/skills/cratis-engineering-post-mortem/SKILL.md +6 -39
- package/package/corpus/skills/cratis-engineering-post-mortem/references/proportionate-follow-up.md +36 -0
- package/package/corpus/skills/cratis-engineering-regression-cluster/SKILL.md +4 -4
- package/package/corpus/skills/cratis-engineering-release-trains/SKILL.md +8 -134
- package/package/corpus/skills/cratis-engineering-release-trains/references/candidate-assembly.md +139 -0
- package/package/corpus/skills/cratis-engineering-review-rounds/SKILL.md +3 -100
- package/package/corpus/skills/cratis-engineering-review-rounds/references/round-handoffs.md +109 -0
- package/package/corpus/skills/cratis-environments-and-secrets/SKILL.md +1 -5
- package/package/corpus/skills/cratis-environments-and-secrets/references/environment-file.md +1 -3
- package/package/corpus/skills/cratis-event-model-diagram/SKILL.md +11 -116
- package/package/corpus/skills/cratis-event-model-diagram/references/frame-patterns.md +93 -0
- package/package/corpus/skills/cratis-fundamentals-concept-go/SKILL.md +4 -15
- package/package/corpus/skills/cratis-fundamentals-name-value/SKILL.md +8 -8
- package/package/corpus/skills/cratis-fundamentals-name-value/references/csharp.md +4 -4
- package/package/corpus/skills/cratis-fundamentals-name-value/references/elixir.md +1 -1
- package/package/corpus/skills/cratis-fundamentals-name-value/references/go.md +1 -1
- package/package/corpus/skills/cratis-fundamentals-name-value/references/java.md +5 -5
- package/package/corpus/skills/cratis-fundamentals-name-value/references/kotlin.md +15 -2
- package/package/corpus/skills/cratis-fundamentals-name-value/references/python.md +1 -1
- package/package/corpus/skills/cratis-fundamentals-name-value/references/typescript.md +1 -1
- package/package/corpus/skills/cratis-fundamentals-telemetry/SKILL.md +10 -27
- package/package/corpus/skills/cratis-fundamentals-telemetry/references/otlp-export.md +16 -0
- package/package/corpus/skills/cratis-fundamentals-type-discovery/SKILL.md +26 -188
- package/package/corpus/skills/cratis-fundamentals-type-discovery/references/diagnostics.md +14 -0
- package/package/corpus/skills/cratis-governed-release-methodology/SKILL.md +7 -5
- package/package/corpus/skills/cratis-lens-browser-extension/SKILL.md +23 -157
- package/package/corpus/skills/cratis-lens-browser-extension/references/troubleshooting.md +139 -0
- package/package/corpus/skills/cratis-llm-friendly-documentation/SKILL.md +7 -5
- package/package/corpus/skills/cratis-modeling-design-event-model/SKILL.md +2 -4
- package/package/corpus/skills/cratis-modeling-design-event-model/references/model-first.md +7 -0
- package/package/corpus/skills/cratis-modeling-discover-timeline/SKILL.md +2 -2
- package/package/corpus/skills/cratis-modeling-discover-timeline/references/group-and-document-intake.md +1 -1
- package/package/corpus/skills/cratis-modeling-review-event-model/SKILL.md +2 -2
- package/package/corpus/skills/cratis-modeling-review-event-model/references/implementation-findings.md +2 -2
- package/package/corpus/skills/cratis-modeling-trace-existing-behavior/SKILL.md +5 -23
- package/package/corpus/skills/cratis-modeling-trace-existing-behavior/references/compare-evidence.md +20 -0
- package/package/corpus/skills/cratis-modeling-trace-existing-behavior/references/recovery-inputs.md +3 -3
- package/package/corpus/skills/cratis-multi-service-local-orchestration/SKILL.md +8 -63
- package/package/corpus/skills/cratis-multi-service-local-orchestration/references/aspire.md +52 -0
- package/package/corpus/skills/cratis-observability/SKILL.md +1 -1
- package/package/corpus/skills/cratis-observability/references/arc-and-chronicle-signals.md +9 -23
- package/package/corpus/skills/cratis-observability/references/chronicle-kernel-export.md +3 -14
- package/package/corpus/skills/cratis-observability/references/csharp.md +4 -6
- package/package/corpus/skills/cratis-observability/references/elixir.md +1 -1
- package/package/corpus/skills/cratis-observability/references/troubleshooting.md +4 -5
- package/package/corpus/skills/cratis-onboarding-runtime/SKILL.md +1 -4
- package/package/corpus/skills/cratis-onboarding-runtime/references/default-offering.md +0 -3
- package/package/corpus/skills/cratis-onboarding-runtime/references/sign-up-review.md +0 -4
- package/package/corpus/skills/cratis-orchestration-lanes/SKILL.md +7 -49
- package/package/corpus/skills/cratis-orchestration-lanes/references/escalation.md +22 -0
- package/package/corpus/skills/cratis-orchestration-lanes/references/inbox-and-handover.md +4 -4
- package/package/corpus/skills/cratis-orchestration-lanes/references/placeholders.md +1 -1
- package/package/corpus/skills/cratis-orchestration-lanes/references/roles.md +12 -0
- package/package/corpus/skills/cratis-orchestration-lanes/references/roll-call.md +12 -0
- package/package/corpus/skills/cratis-orchestration-lanes/references/worktrees.md +10 -0
- package/package/corpus/skills/cratis-orchestration-merge-gates/SKILL.md +14 -13
- package/package/corpus/skills/cratis-orchestration-merge-gates/references/merge-queue.md +51 -26
- package/package/corpus/skills/cratis-orchestration-merge-gates/references/unattended-guards.md +8 -14
- package/package/corpus/skills/cratis-orleans-jobs/SKILL.md +9 -65
- package/package/corpus/skills/cratis-orleans-jobs/references/activation-callbacks.md +5 -0
- package/package/corpus/skills/cratis-orleans-jobs/references/lifecycle-and-placement.md +11 -7
- package/package/corpus/skills/cratis-orleans-jobs/references/state-machines.md +1 -1
- package/package/corpus/skills/cratis-orleans-jobs/references/step-planning.md +27 -0
- package/package/corpus/skills/cratis-orleans-jobs/references/storage-and-options.md +35 -0
- package/package/corpus/skills/cratis-performance-review/SKILL.md +6 -76
- package/package/corpus/skills/cratis-performance-review/references/review-checklist.md +79 -0
- package/package/corpus/skills/cratis-platform-configure-environment/SKILL.md +19 -16
- package/package/corpus/skills/cratis-platform-contribute-change/SKILL.md +2 -2
- package/package/corpus/skills/cratis-platform-deliver-slice/SKILL.md +5 -5
- package/package/corpus/skills/cratis-platform-deliver-slice/references/coordinate-slices.md +1 -1
- package/package/corpus/skills/cratis-platform-diagnose-slice/SKILL.md +2 -3
- package/package/corpus/skills/cratis-platform-prepare-release-pr/SKILL.md +2 -2
- package/package/corpus/skills/cratis-platform-start-application/SKILL.md +10 -8
- package/package/corpus/skills/cratis-platform-start-application/references/csharp.md +6 -6
- package/package/corpus/skills/cratis-platform-start-application/references/java.md +4 -4
- package/package/corpus/skills/cratis-platform-start-application/references/kotlin.md +4 -4
- package/package/corpus/skills/cratis-platform-verify-service-handoff/SKILL.md +3 -3
- package/package/corpus/skills/cratis-release-notes/SKILL.md +9 -133
- package/package/corpus/skills/cratis-release-notes/references/channel-guidance.md +59 -0
- package/package/corpus/skills/cratis-release-notes/references/publish-repair.md +64 -0
- package/package/corpus/skills/cratis-rtk/SKILL.md +12 -18
- package/package/corpus/skills/cratis-screenplay-accept-model/SKILL.md +3 -3
- package/package/corpus/skills/cratis-screenplay-accept-model/references/capability-consumption.md +1 -1
- package/package/corpus/skills/cratis-screenplay-accept-model/references/coverage-obligations.md +1 -1
- package/package/corpus/skills/cratis-screenplay-authentication-and-onboarding/SKILL.md +25 -59
- package/package/corpus/skills/cratis-screenplay-authentication-and-onboarding/references/onboarding-directives.md +11 -10
- package/package/corpus/skills/cratis-screenplay-author-extension/SKILL.md +9 -6
- package/package/corpus/skills/cratis-screenplay-author-extension/references/consume.md +3 -3
- package/package/corpus/skills/cratis-screenplay-author-extension/references/stage-candidate.md +8 -0
- package/package/corpus/skills/cratis-screenplay-availability/SKILL.md +20 -167
- package/package/corpus/skills/cratis-screenplay-availability/references/complete-example.md +23 -47
- package/package/corpus/skills/cratis-screenplay-availability/references/review-checks.md +9 -10
- package/package/corpus/skills/cratis-screenplay-availability/references/runtime-ownership.md +26 -23
- package/package/corpus/skills/cratis-screenplay-declare-slice/SKILL.md +6 -14
- package/package/corpus/skills/cratis-screenplay-declare-slice/references/projection-replay.md +2 -2
- package/package/corpus/skills/cratis-screenplay-declare-slice/references/read-identity.md +1 -1
- package/package/corpus/skills/cratis-screenplay-edit-workspace/SKILL.md +7 -9
- package/package/corpus/skills/cratis-screenplay-edit-workspace/references/model-notes.md +1 -1
- package/package/corpus/skills/cratis-screenplay-handoff-slice/SKILL.md +10 -14
- package/package/corpus/skills/cratis-screenplay-model-automation/SKILL.md +1 -1
- package/package/corpus/skills/cratis-screenplay-model-automation/references/reaction-boundaries.md +1 -1
- package/package/corpus/skills/cratis-screenplay-model-interaction/SKILL.md +6 -31
- package/package/corpus/skills/cratis-screenplay-model-interaction/references/shell-and-data.md +22 -0
- package/package/corpus/skills/cratis-screenplay-model-translation/SKILL.md +5 -5
- package/package/corpus/skills/cratis-screenplay-onboard-workspace/SKILL.md +5 -5
- package/package/corpus/skills/cratis-screenplay-onboard-workspace/references/version-migration.md +4 -4
- package/package/corpus/skills/cratis-screenplay-recover-intent/SKILL.md +2 -2
- package/package/corpus/skills/cratis-screenplay-recover-intent/references/csharp.md +2 -2
- package/package/corpus/skills/cratis-screenplay-recover-intent/references/ground-truth-benchmark.md +1 -1
- package/package/corpus/skills/cratis-screenplay-specify-outcome/SKILL.md +4 -75
- package/package/corpus/skills/cratis-screenplay-specify-outcome/references/host-body-execution.md +0 -2
- package/package/corpus/skills/cratis-screenplay-specify-outcome/references/observable-result.md +85 -1
- package/package/corpus/skills/cratis-screenplay-specify-outcome/references/query-rejections.md +1 -1
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +15 -133
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/boundaries.md +5 -5
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/chronicle-boundaries.md +4 -12
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/consistency-and-concurrency.md +28 -57
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/evolution-example.md +4 -5
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/evolution.md +13 -20
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/multi-service-models.md +1 -1
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/neighbouring-skills.md +1 -1
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/read-model-keys.md +3 -5
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/stream-id-rules.md +2 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/stream-patterns.md +5 -5
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/streams-example.md +82 -71
- package/package/corpus/skills/cratis-security-review/SKILL.md +4 -73
- package/package/corpus/skills/cratis-security-review/references/arc-boundaries.md +24 -13
- package/package/corpus/skills/cratis-security-review/references/review-checklist.md +74 -0
- package/package/corpus/skills/cratis-session-handoff/SKILL.md +7 -32
- package/package/corpus/skills/cratis-session-handoff/references/handoff-template.md +2 -2
- package/package/corpus/skills/cratis-session-handoff/references/session-hygiene.md +20 -0
- package/package/corpus/skills/cratis-showrunner-herald/SKILL.md +9 -17
- package/package/corpus/skills/cratis-showrunner-herald/references/options.md +2 -2
- package/package/corpus/skills/cratis-showrunner-herald/references/templates-and-images.md +16 -10
- package/package/corpus/skills/cratis-social-feed-post/SKILL.md +9 -162
- package/package/corpus/skills/cratis-social-feed-post/references/asset-and-formatting.md +37 -0
- package/package/corpus/skills/cratis-social-feed-post/references/editorial-checks.md +40 -0
- package/package/corpus/skills/cratis-social-feed-post/references/engagement-evidence.md +39 -150
- package/package/corpus/skills/cratis-social-feed-post/references/linkedin-media.md +24 -0
- package/package/corpus/skills/cratis-social-feed-post/references/other-channels.md +23 -0
- package/package/corpus/skills/cratis-specifications-exercise-backend/SKILL.md +5 -5
- package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-command-results.md +2 -2
- package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-query-scenario.md +13 -5
- package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp.md +7 -4
- package/package/corpus/skills/cratis-specifications-exercise-backend/references/elixir.md +1 -1
- package/package/corpus/skills/cratis-specifications-exercise-backend/references/go.md +20 -4
- package/package/corpus/skills/cratis-specifications-exercise-backend/references/typescript.md +1 -1
- package/package/corpus/skills/cratis-specifications-isolate-behavior/SKILL.md +2 -2
- package/package/corpus/skills/cratis-specifications-observe-ui/SKILL.md +5 -5
- package/package/corpus/skills/cratis-specifications-test-application-ui/SKILL.md +2 -2
- package/package/corpus/skills/cratis-specifications-test-application-ui/references/typescript-command-results.md +2 -2
- package/package/corpus/skills/cratis-specifications-test-typescript-behavior/SKILL.md +2 -2
- package/package/corpus/skills/cratis-stage-render-slice/SKILL.md +10 -9
- package/package/corpus/skills/cratis-stage-run-sandbox/SKILL.md +3 -3
- package/package/corpus/skills/cratis-stage-run-sandbox/references/semantic-spec-runner.md +7 -6
- package/package/corpus/skills/cratis-studio-mcp-safety-guidance/SKILL.md +4 -6
- package/package/corpus/skills/cratis-technical-examples/SKILL.md +10 -106
- package/package/corpus/skills/cratis-technical-examples/references/csharp-package-checks.md +1 -1
- package/package/corpus/skills/cratis-technical-examples/references/source-and-format.md +42 -0
- package/package/corpus/skills/cratis-technical-examples/references/typescript-package-checks.md +2 -2
- package/package/corpus/skills/cratis-technical-examples/references/verification-scope.md +37 -0
- package/package/corpus/skills/cratis-ux-review/SKILL.md +8 -40
- package/package/corpus/skills/cratis-ux-review/references/capture-contract.md +24 -0
- package/package/corpus/skills/cratis-ux-review/references/checklist.md +1 -1
- package/package/corpus/skills/cratis-ux-review/references/report-template.md +2 -1
- package/package/corpus/skills/cratis-writing-voice-and-cadence/SKILL.md +19 -132
- package/package/corpus/skills/cratis-writing-voice-and-cadence/references/ai-tells.md +24 -97
- package/package/corpus/skills/cratis-writing-voice-and-cadence/references/author-and-batch.md +23 -0
- package/package/corpus/skills/cratis-writing-voice-and-cadence/references/documentation-evidence.md +25 -0
- package/package/corpus/skills/cratis-writing-voice-and-cadence/references/interpretation.md +17 -0
- package/package/corpus/skills/cratis-writing-voice-and-cadence/references/stock-constructions.md +23 -0
- package/package/corpus/skills/cratis-writing-voice-and-cadence/references/voice-guidance.md +8 -29
- package/package.json +1 -1
- /package/package/corpus/skills/cratis-chronicle-protect-decision/references/{standalone.md → csharp-standalone.md} +0 -0
- /package/package/corpus/skills/cratis-engineering-post-mortem/references/{examples/silent-backup-failure.md → silent-backup-failure.md} +0 -0
- /package/package/corpus/skills/cratis-engineering-post-mortem/references/{examples/unintended-release-regression.md → unintended-release-regression.md} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cratis-engineering-csharp-conventions
|
|
3
|
-
description: Use when writing or reviewing C#
|
|
3
|
+
description: Use when writing or reviewing C# naming, formatting or service lifetimes. Not for specification authoring (use cratis-specifications-exercise-backend).
|
|
4
4
|
license: LICENSE
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -11,22 +11,6 @@ repository. They are **conventions**, not framework contracts: nothing here is
|
|
|
11
11
|
enforced by an analyzer unless this skill says so. Follow them for consistency;
|
|
12
12
|
do not claim the framework requires them.
|
|
13
13
|
|
|
14
|
-
## Packages covered
|
|
15
|
-
|
|
16
|
-
| Package | Purpose |
|
|
17
|
-
| --- | --- |
|
|
18
|
-
| `Cratis.Fundamentals` | DI lifetime attributes and `IInstancesOf<T>` instance resolution |
|
|
19
|
-
|
|
20
|
-
## Route near misses
|
|
21
|
-
|
|
22
|
-
- The question is what a Cratis product API *does*: resolve it against the
|
|
23
|
-
owning product repository, not against this style guide.
|
|
24
|
-
- The subject is a specification file: the specification conventions own the
|
|
25
|
-
`Establish`/`Because`/`should_` pattern and the `for_`/`when_` hierarchy.
|
|
26
|
-
- The subject is TypeScript or React: this skill covers C# only.
|
|
27
|
-
- The subject is repository structure or documentation: those are separate
|
|
28
|
-
workflows.
|
|
29
|
-
|
|
30
14
|
## Quick reference
|
|
31
15
|
|
|
32
16
|
- Use current C# language features — records, primary constructors, pattern
|
|
@@ -42,41 +26,12 @@ do not claim the framework requires them.
|
|
|
42
26
|
- Never throw a built-in exception type. Always define a domain exception.
|
|
43
27
|
- `record` for events, commands, read models, concepts, and DTOs.
|
|
44
28
|
- `is null` and `is not null` — never `== null` or `!= null`.
|
|
45
|
-
-
|
|
29
|
+
- Braces go on their own lines. Leave a blank line before a standalone nested block, not between a declaration or control statement and its opening brace.
|
|
46
30
|
- A final `return` sits on its own line.
|
|
47
31
|
- Private fields are `_camelCase`; interfaces take the `I` prefix.
|
|
48
32
|
- American English everywhere — initialize, behavior, color, serialize.
|
|
49
33
|
- Every file starts with the repository license header.
|
|
50
34
|
|
|
51
|
-
## Formatting
|
|
52
|
-
|
|
53
|
-
```csharp
|
|
54
|
-
// Copyright (c) Cratis. All rights reserved.
|
|
55
|
-
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
56
|
-
|
|
57
|
-
namespace <RootNamespace>.<Feature>;
|
|
58
|
-
|
|
59
|
-
using <Namespace>.<First>;
|
|
60
|
-
using <Namespace>.<Second>;
|
|
61
|
-
|
|
62
|
-
// Blank line before the opening brace of every block
|
|
63
|
-
if (<condition>)
|
|
64
|
-
{
|
|
65
|
-
<statement>;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// Expression-bodied form for simple members
|
|
69
|
-
public string <PropertyName> => $"{<First>} {<Second>}";
|
|
70
|
-
|
|
71
|
-
// The final return stands alone
|
|
72
|
-
public <ReturnType> <MethodName>()
|
|
73
|
-
{
|
|
74
|
-
var result = <expression>;
|
|
75
|
-
|
|
76
|
-
return result;
|
|
77
|
-
}
|
|
78
|
-
```
|
|
79
|
-
|
|
80
35
|
## Naming
|
|
81
36
|
|
|
82
37
|
| Artifact | Convention | Example |
|
|
@@ -104,24 +59,18 @@ the domain, not the pattern.
|
|
|
104
59
|
|
|
105
60
|
Read the reference that covers the decision at hand rather than all three.
|
|
106
61
|
|
|
107
|
-
##
|
|
108
|
-
|
|
109
|
-
**Anything taking a scoped dependency is scoped or transient, never a
|
|
110
|
-
singleton.** A singleton may not depend on anything that belongs to a tenant, a
|
|
111
|
-
user, or a request. Capturing a scoped collaborator does not throw — it silently
|
|
112
|
-
binds to the root scope's default namespace forever and returns empty results.
|
|
113
|
-
The fix is almost always to drop `[Singleton]`, not to reach for
|
|
114
|
-
`IServiceScopeFactory`. See
|
|
115
|
-
[exceptions-logging-and-di.md](references/exceptions-logging-and-di.md).
|
|
62
|
+
## Dependency lifetimes
|
|
116
63
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
64
|
+
Use constructor injection. For services discovered by Cratis conventions, leave
|
|
65
|
+
transient services unannotated. Use `[Scoped]` when they need one instance per
|
|
66
|
+
scope, and `[Singleton]` only for process-wide, thread-safe services whose entire
|
|
67
|
+
dependency graph is safe at that lifetime. A captive dependency can fail scope
|
|
68
|
+
validation; without it, the singleton can retain root-scope state instead of the
|
|
69
|
+
request's state.
|
|
121
70
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
71
|
+
Inject `IInstancesOf<T>` for convention-discovered implementations. Use
|
|
72
|
+
`IEnumerable<T>` when consuming the container's explicitly registered service set
|
|
73
|
+
(for example a third-party registration contract); it is not type discovery.
|
|
125
74
|
|
|
126
75
|
## Verify
|
|
127
76
|
|
|
@@ -137,8 +86,8 @@ hand-registered, which defeats convention-based discovery.
|
|
|
137
86
|
- Every public type, method, property, and operator carries multiline XML
|
|
138
87
|
documentation with `<param>` and `<returns>` where applicable.
|
|
139
88
|
- No `[Singleton]` takes a scoped dependency or holds tenant-, user-, or
|
|
140
|
-
request-bound state
|
|
141
|
-
in
|
|
89
|
+
request-bound state. Arc keeps `ValidateOnBuild` off and `ValidateScopes` on
|
|
90
|
+
in Development; integration specs exercise request-time resolutions.
|
|
142
91
|
- No `services.Add*<TInterface, TImplementation>()` registers a type that exists
|
|
143
92
|
to be discovered by convention.
|
|
144
93
|
- Text is American English.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
- Logging
|
|
7
7
|
- Dependency injection
|
|
8
8
|
- Service lifetimes — anything taking a scoped dependency is scoped or transient
|
|
9
|
-
- Discovering implementations
|
|
9
|
+
- Discovering implementations
|
|
10
10
|
|
|
11
11
|
## Exceptions
|
|
12
12
|
|
|
@@ -78,7 +78,7 @@ The framework discovers and wires dependencies by convention. Explicit
|
|
|
78
78
|
registration is the exception, not the rule.
|
|
79
79
|
|
|
80
80
|
- Prefer constructor injection. Never inject `IServiceProvider` to resolve
|
|
81
|
-
|
|
81
|
+
ordinary constructor dependencies — that is the service-locator anti-pattern.
|
|
82
82
|
- Mark a singleton with the `[Singleton]` attribute rather than registering it
|
|
83
83
|
explicitly.
|
|
84
84
|
- A convention-based `IFoo → Foo` pair needs no registration. The convention
|
|
@@ -103,193 +103,59 @@ public class <ClassName>(IServiceProvider provider)
|
|
|
103
103
|
|
|
104
104
|
## Service lifetimes — anything taking a scoped dependency is scoped or transient
|
|
105
105
|
|
|
106
|
-
|
|
106
|
+
For a convention-bound service, remove `[Singleton]` when it depends on a scoped
|
|
107
|
+
service. Use `[Scoped]` only when collaborators must share its instance in one
|
|
108
|
+
scope. Never cache a tenant, principal, claims, or HTTP context in a singleton.
|
|
109
|
+
Reading the current context from an accessor at the point of use is different
|
|
110
|
+
from holding a context value across requests.
|
|
107
111
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
112
|
+
Scope validation rejects captive dependencies. Without it, request-specific
|
|
113
|
+
reads can resolve against the root scope and return empty or incorrect data.
|
|
114
|
+
Validate the service graph in the host; use specifications to prove isolation
|
|
115
|
+
with different scopes and tenants. A constructor-only check is not a substitute
|
|
116
|
+
for a behavior specification or for transitive lifetime validation.
|
|
111
117
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
**Assume every application is multi-tenant**, even when it ships with a single
|
|
118
|
-
tenant and no tenant resolution configured. A single-tenant application is a
|
|
119
|
-
multi-tenant one with one tenant in it, and the code shape that serves both is
|
|
120
|
-
the same. The shape that serves only one has to be found and rewritten later,
|
|
121
|
-
from the far side of a data migration, in production.
|
|
122
|
-
|
|
123
|
-
So the rule has a second face:
|
|
124
|
-
|
|
125
|
-
> **A singleton may not depend on anything that belongs to a tenant, a user, or
|
|
126
|
-
> a request.**
|
|
127
|
-
|
|
128
|
-
These resolve **per scope**, and the scope carries the tenant, so none may be
|
|
129
|
-
injected into a `[Singleton]`:
|
|
130
|
-
|
|
131
|
-
| Off limits in a singleton | Why |
|
|
132
|
-
| --- | --- |
|
|
133
|
-
| The scoped event store and everything reached from it — event log, read models, constraints, event types, projections, reducers, PII | Resolved for the scope's namespace |
|
|
134
|
-
| A MongoDB collection, database, or client | The database name resolves per scope from the current tenant |
|
|
135
|
-
| An EF Core `DbContext` | Scoped for the same reason, and not thread-safe |
|
|
136
|
-
| A read model injected directly by key | Same scope, same binding |
|
|
137
|
-
| Any held tenant, principal, claims, correlation id, or HTTP context **value** | Belongs to one request and would outlive it |
|
|
138
|
-
|
|
139
|
-
A `[Singleton]` taking one of these is a **captive dependency**: the container
|
|
140
|
-
hands it the *root* scope's instance and keeps it for process lifetime. The root
|
|
141
|
-
scope has no request, so it resolves no tenant — every read and write goes to
|
|
142
|
-
the default namespace forever, regardless of who is asking.
|
|
143
|
-
|
|
144
|
-
**It does not throw. It returns nothing.** A query against the wrong namespace
|
|
145
|
-
hits a database that exists and is empty, so the caller receives an empty
|
|
146
|
-
collection, a null read model, or a default-valued options object and carries
|
|
147
|
-
on. The application starts, pages render, the build is green, and configuration
|
|
148
|
-
a tenant spent an afternoon entering is simply absent. It is invisible while
|
|
149
|
-
there is one tenant; every symptom appears the day a second arrives.
|
|
150
|
-
|
|
151
|
-
**What to do instead — in this order.**
|
|
152
|
-
|
|
153
|
-
**1. Drop `[Singleton]`.** This is the answer almost every time. Delete the
|
|
154
|
-
attribute and let the type be transient by convention, or mark it scoped when
|
|
155
|
-
one request should share one instance. Nothing else changes: the constructor
|
|
156
|
-
keeps the collaborator it wanted, and now gets the caller's tenant instead of
|
|
157
|
-
the root scope's. Reserve `[Singleton]` for what is genuinely process-wide and
|
|
158
|
-
holds no tenant-, user-, or request-bound state: implementation aggregators,
|
|
159
|
-
HTTP client wrappers, options readers, pure computation, framework plumbing.
|
|
160
|
-
|
|
161
|
-
```csharp
|
|
162
|
-
// Wrong — the scoped collaborator captures the root scope's default namespace forever
|
|
163
|
-
[Singleton]
|
|
164
|
-
public class <ClassName>(<IScopedCollaboratorType> <collaborator>) : <IInterfaceName>
|
|
165
|
-
{
|
|
166
|
-
public Task<<ResultType>?> <MethodName>() => <collaborator>.<Method>(<argument>);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
// Right — no attribute at all. Transient by convention, so it resolves in the
|
|
170
|
-
// caller's scope and reads that caller's tenant.
|
|
171
|
-
public class <ClassName>(<IScopedCollaboratorType> <collaborator>) : <IInterfaceName>
|
|
172
|
-
{
|
|
173
|
-
public Task<<ResultType>?> <MethodName>() => <collaborator>.<Method>(<argument>);
|
|
174
|
-
}
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
**2. Only when the lifetime is forced on you, open a scope per unit of work.** A
|
|
178
|
-
hosted or background service is resolved once by the host, so it *is* a
|
|
179
|
-
singleton whether or not you asked — and it runs with no request to inherit a
|
|
180
|
-
scope from. That, and only that, is what `IServiceScopeFactory` is for:
|
|
118
|
+
Choose an explicit scope when an inherently singleton host service must do
|
|
119
|
+
scoped work. Create and dispose one scope per unit of work, and establish the
|
|
120
|
+
tenant for work that does not originate in a request. An empty service scope
|
|
121
|
+
is not a tenant context.
|
|
181
122
|
|
|
182
123
|
```csharp
|
|
183
|
-
|
|
184
|
-
public class <ClassName>(IServiceScopeFactory scopeFactory) : BackgroundService
|
|
124
|
+
public class Worker(IServiceScopeFactory scopes) : BackgroundService
|
|
185
125
|
{
|
|
186
|
-
protected override async Task ExecuteAsync(CancellationToken
|
|
126
|
+
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
|
|
187
127
|
{
|
|
188
|
-
using var scope =
|
|
189
|
-
var
|
|
190
|
-
.GetRequiredService<<IScopedCollaboratorType>>();
|
|
128
|
+
await using var scope = scopes.CreateAsyncScope();
|
|
129
|
+
var work = scope.ServiceProvider.GetRequiredService<IBackgroundWork>();
|
|
191
130
|
|
|
192
|
-
await
|
|
131
|
+
await work.Run(stoppingToken);
|
|
193
132
|
}
|
|
194
133
|
}
|
|
195
134
|
```
|
|
196
135
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
A client that names its store and namespace explicitly **is** singleton-safe,
|
|
205
|
-
and is the right collaborator when a flow knows which namespace it means and has
|
|
206
|
-
no scope to resolve one from. Naming the namespace is a deliberate, readable
|
|
207
|
-
statement that this code crosses a tenant boundary; capturing a scoped service
|
|
208
|
-
is the same crossing made by accident.
|
|
209
|
-
|
|
210
|
-
**The current user is not process-wide either.** Never keep the signed-in user,
|
|
211
|
-
their principal, claims, roles, or anything derived from them in a singleton.
|
|
212
|
-
The distinction that matters: *the accessor is fine, the value is not.* An HTTP
|
|
213
|
-
context accessor is itself a singleton and safe to inject; reading a value out
|
|
214
|
-
of it once and keeping it is not. A current-user service may be a singleton only
|
|
215
|
-
when every method reads through the accessor on each call and stores nothing.
|
|
216
|
-
Anything that derives something per user and wants to keep it holds a cache
|
|
217
|
-
**keyed by the user**, never a single field.
|
|
136
|
+
Keep Arc's default host settings: `ValidateOnBuild` is off because some
|
|
137
|
+
registrations require an active command or request; `ValidateScopes` remains
|
|
138
|
+
on in Development. When configuring the provider explicitly, preserve those
|
|
139
|
+
settings for Arc. Neither startup nor scope validation alone exercises the
|
|
140
|
+
request-time factory paths; resolve and use those services in integration
|
|
141
|
+
specifications with the relevant request or command context.
|
|
218
142
|
|
|
219
|
-
|
|
220
|
-
dispatch, and scheduled jobs run with no request, so a tenant resolver has
|
|
221
|
-
nothing to read. Observers may be instantiated per namespace, but the
|
|
222
|
-
collaborators they call are not — a flow that reaches a tenant-blind singleton
|
|
223
|
-
has left its namespace behind without saying so. Such a flow states its tenant
|
|
224
|
-
explicitly rather than inheriting whatever the root scope happens to be.
|
|
143
|
+
## Discovering implementations
|
|
225
144
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
Turn .NET's own scope validation on in **every** environment, not just
|
|
230
|
-
Development. `ValidateScopes` rejects resolving a scoped service from the root
|
|
231
|
-
provider, and `ValidateOnBuild` walks every registration at startup so a captive
|
|
232
|
-
dependency fails the host immediately rather than at whichever request first
|
|
233
|
-
needs it. The host enables both in Development by default and neither outside
|
|
234
|
-
it — which is backwards for a failure whose whole character is that it stays
|
|
235
|
-
quiet:
|
|
145
|
+
Inject `IInstancesOf<T>` from `Cratis.Types` when the consumer needs the
|
|
146
|
+
convention-discovered implementations. No lifetime annotation is needed for
|
|
147
|
+
transient implementations or a transient consumer:
|
|
236
148
|
|
|
237
149
|
```csharp
|
|
238
|
-
|
|
150
|
+
public class Rules(IInstancesOf<IRule> rules)
|
|
239
151
|
{
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
});
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
See "The two rules most often got wrong" in SKILL.md.
|
|
246
|
-
|
|
247
|
-
And add an architecture specification, because validation only catches what a
|
|
248
|
-
run actually resolves. Reflect over the assembly, find every `[Singleton]` whose
|
|
249
|
-
constructor takes a scope-bound service, and assert the set is empty. It names
|
|
250
|
-
every offender in one pass rather than one per restart, and it covers the types
|
|
251
|
-
no startup path touches.
|
|
252
|
-
|
|
253
|
-
## Discovering implementations — `IInstancesOf<T>`, never `IEnumerable<T>`
|
|
254
|
-
|
|
255
|
-
When a type needs every implementation of an abstraction — handlers, strategies,
|
|
256
|
-
filters, validators, formatters — inject `IInstancesOf<TInterface>` from
|
|
257
|
-
`Cratis.Types`. The framework discovers and instantiates every implementation by
|
|
258
|
-
convention, so no explicit registration exists anywhere.
|
|
259
|
-
|
|
260
|
-
```csharp
|
|
261
|
-
// Wrong — hand-maintained registrations. A new implementation added elsewhere
|
|
262
|
-
// silently does nothing until someone remembers this file, and dead
|
|
263
|
-
// registrations linger after types are removed.
|
|
264
|
-
services.AddSingleton<<IHandlerType>, <FirstHandler>>();
|
|
265
|
-
services.AddSingleton<<IHandlerType>, <SecondHandler>>();
|
|
266
|
-
|
|
267
|
-
public class <AggregatorName>(IEnumerable<<IHandlerType>> handlers) : <IAggregatorType>;
|
|
268
|
-
|
|
269
|
-
// Right — implementations discovered automatically
|
|
270
|
-
[Singleton]
|
|
271
|
-
public class <FirstHandler>(<CollaboratorType> <collaborator>) : <IHandlerType>;
|
|
272
|
-
|
|
273
|
-
[Singleton]
|
|
274
|
-
public class <SecondHandler>(<CollaboratorType> <collaborator>) : <IHandlerType>;
|
|
275
|
-
|
|
276
|
-
[Singleton]
|
|
277
|
-
public class <AggregatorName>(IInstancesOf<<IHandlerType>> handlers) : <IAggregatorType>;
|
|
152
|
+
// Enumerate rules in the consumer's scope.
|
|
153
|
+
}
|
|
278
154
|
```
|
|
279
155
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
rely on the `IFoo → Foo` convention for a transient, and delete the
|
|
287
|
-
registration line.
|
|
288
|
-
- `IInstancesOf<T>` fixes its type set at construction and resolves instances on
|
|
289
|
-
each enumeration through the consumer's provider. Late
|
|
290
|
-
assemblies do not update that set. A singleton captures the root provider;
|
|
291
|
-
never use it to enumerate scoped implementations. Resolve a scoped or
|
|
292
|
-
transient consumer inside a scope instead; follow `csharp.md`'s lifetime rule.
|
|
293
|
-
- `IEnumerable<T>` remains the right type to **return** from a method that
|
|
294
|
-
yields a sequence of values. The rule applies only to enumerating
|
|
295
|
-
*implementations* of an abstraction.
|
|
156
|
+
The type set is fixed at construction, and each enumeration resolves instances
|
|
157
|
+
through the captured provider. Resolve a scoped or transient consumer inside a
|
|
158
|
+
scope when an implementation is scope-bound. A singleton cannot use this to
|
|
159
|
+
access request-bound implementations safely. Use `IEnumerable<T>` when the
|
|
160
|
+
service contract calls for the container's explicitly registered collection,
|
|
161
|
+
not for convention discovery. `IEnumerable<T>` is also a normal return type.
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cratis-engineering-decision-record
|
|
3
|
-
description: Use
|
|
3
|
+
description: Use when recording or consulting a durable architecture or contract decision. Not for an issue-specific implementation design (use cratis-engineering-issue-design-note).
|
|
4
4
|
license: LICENSE
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Cratis decision records
|
|
8
8
|
|
|
9
9
|
A decision is a durable choice with a **decider** and a **date**. It is
|
|
10
|
-
documentation, not a work record: it
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
decision; it never holds the only copy.
|
|
10
|
+
documentation, not a work record: keep it in the repository’s `decisions` folder
|
|
11
|
+
unless the repository documents a different location. A handoff can summarize
|
|
12
|
+
a decision but must not hold the only copy.
|
|
14
13
|
|
|
15
14
|
This skill owns the *procedure* — how to consult, author, accept, and supersede
|
|
16
15
|
a record. It does not decide what to decide, and it never grants acceptance. Do
|
|
@@ -31,29 +30,12 @@ into an approval ceremony merely because this skill is available.
|
|
|
31
30
|
- Your change would contradict an accepted record. Stop: supersession or a human
|
|
32
31
|
verdict comes first, never a workaround.
|
|
33
32
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
- **Session notes, plans, handovers, status boards.** Those are work records.
|
|
37
|
-
They belong in the repository's ignored local working directory, never in
|
|
38
|
-
the decision folder.
|
|
39
|
-
- **Product or API documentation.** A record says what was chosen and why; the
|
|
40
|
-
documentation says how the thing works. Use the documentation workflow.
|
|
41
|
-
- **A work item's status.** "Blocked on X" is a work item field, not a decision.
|
|
42
|
-
- **A reversible choice inside your own scope that nobody will re-litigate.**
|
|
43
|
-
Make it and move on; see the significance test in step 3.
|
|
44
|
-
- **An implementation request or an issue's proposed plan.** A request to do the
|
|
45
|
-
work authorizes ordinary in-scope implementation; it is not automatically a
|
|
46
|
-
request to create or accept an architectural record. Apply the significance
|
|
47
|
-
test and ask only about a concrete unresolved choice with meaningfully
|
|
48
|
-
different consequences.
|
|
49
|
-
- **A decision this repository does not own.** Company-level and portfolio
|
|
50
|
-
decisions live in the record set that owns them. Cite that id; do not copy the
|
|
51
|
-
record into a repository that cannot supersede it.
|
|
33
|
+
Read [scope exclusions](references/decision-scope.md) when deciding whether a durable record is warranted.
|
|
52
34
|
|
|
53
35
|
## Steps
|
|
54
36
|
|
|
55
37
|
1. **List the records in force for the paths you are changing.** Read
|
|
56
|
-
the decision
|
|
38
|
+
the decision index, then read the records whose `applies-to` matches a path you are
|
|
57
39
|
about to touch and whose `status` is `accepted`, and order them newest first.
|
|
58
40
|
Report the count — "0 records matched" and "3 matched, none contradicted" are
|
|
59
41
|
different verdicts and must read differently.
|
|
@@ -78,7 +60,7 @@ into an approval ceremony merely because this skill is available.
|
|
|
78
60
|
observable signal that will say the decision was actually carried out, as
|
|
79
61
|
`Done when` and `Verify by`. A decision whose success cannot be observed
|
|
80
62
|
cannot reach `stage: verified`.
|
|
81
|
-
6. **Open
|
|
63
|
+
6. **Open a complete draft as `status: proposed`, `stage: none`, and update the
|
|
82
64
|
index.** A record the index does not list is a record the consult step in
|
|
83
65
|
step 1 will never find.
|
|
84
66
|
7. **Accept only after a human makes the significant choice.** Set `status` to
|
|
@@ -112,33 +94,7 @@ into an approval ceremony merely because this skill is available.
|
|
|
112
94
|
|
|
113
95
|
Read [record-format.md](references/record-format.md) when authoring or updating a record or regenerating its index; it defines the exact front-matter fields, closed value sets, and index shape.
|
|
114
96
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
- **Governance ceremony before user clarity.** Asking someone to choose between
|
|
118
|
-
unexplained policy labels, approve an issue plan they already asked to
|
|
119
|
-
implement, or name a decider before explaining the durable decision transfers
|
|
120
|
-
the agent's interpretation burden to the user.
|
|
121
|
-
- **A role in the `decider` field.** "The architecture team decided" names
|
|
122
|
-
nobody who can be asked what they meant or who can supersede it. The record
|
|
123
|
-
reads as authority but resolves to no one.
|
|
124
|
-
- **Decision text edited in place.** The next reader sees text nobody ever
|
|
125
|
-
agreed to, and the people who relied on the old wording have no way to tell
|
|
126
|
-
what changed. This is the failure that makes the decision folder
|
|
127
|
-
untrustworthy, because it is invisible.
|
|
128
|
-
- **A one-way supersession.** The new record says it supersedes the old one, but
|
|
129
|
-
the old one still reads as accepted. Whoever arrives from a search, a
|
|
130
|
-
citation, or an old pull request follows a decision that was replaced.
|
|
131
|
-
- **`stage: verified` set on a green build.** Compilation proves it builds, not
|
|
132
|
-
that the decision was carried out. The stage then lies about the only thing it
|
|
133
|
-
exists to say.
|
|
134
|
-
- **A ruling that stayed in chat.** It binds the next change and nobody can find
|
|
135
|
-
it. The symptom is the same argument being had a second time, with a different
|
|
136
|
-
outcome.
|
|
137
|
-
- **One record settling three questions.** It cannot be superseded for one of
|
|
138
|
-
them, so it survives past the point where a third of it is wrong.
|
|
139
|
-
- **An `applies-to` that matches nothing.** Step 1 returns zero records and reads
|
|
140
|
-
as "nothing binds this change" instead of "the glob is wrong". Report the count
|
|
141
|
-
so an empty result is visible rather than reassuring.
|
|
97
|
+
Read [decision pitfalls](references/decision-pitfalls.md) when checking a proposal or supersession for common gaps.
|
|
142
98
|
|
|
143
99
|
## How it is proven
|
|
144
100
|
|
package/package/corpus/skills/cratis-engineering-decision-record/references/decision-pitfalls.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Decision record pitfalls
|
|
2
|
+
|
|
3
|
+
## What breaks
|
|
4
|
+
|
|
5
|
+
- **Governance ceremony before user clarity.** Asking someone to choose between
|
|
6
|
+
unexplained policy labels, approve an issue plan they already asked to
|
|
7
|
+
implement, or name a decider before explaining the durable decision transfers
|
|
8
|
+
the agent's interpretation burden to the user.
|
|
9
|
+
- **A role in the `decider` field.** "The architecture team decided" names
|
|
10
|
+
nobody who can be asked what they meant or who can supersede it. The record
|
|
11
|
+
reads as authority but resolves to no one.
|
|
12
|
+
- **Decision text edited in place.** The next reader sees text nobody ever
|
|
13
|
+
agreed to, and the people who relied on the old wording have no way to tell
|
|
14
|
+
what changed. This is the failure that makes the decision folder
|
|
15
|
+
untrustworthy, because it is invisible.
|
|
16
|
+
- **A one-way supersession.** The new record says it supersedes the old one, but
|
|
17
|
+
the old one still reads as accepted. Whoever arrives from a search, a
|
|
18
|
+
citation, or an old pull request follows a decision that was replaced.
|
|
19
|
+
- **`stage: verified` set on a green build.** Compilation proves it builds, not
|
|
20
|
+
that the decision was carried out. The stage then lies about the only thing it
|
|
21
|
+
exists to say.
|
|
22
|
+
- **A ruling that stayed in chat.** It binds the next change and nobody can find
|
|
23
|
+
it. The symptom is the same argument being had a second time, with a different
|
|
24
|
+
outcome.
|
|
25
|
+
- **One record settling three questions.** It cannot be superseded for one of
|
|
26
|
+
them, so it survives past the point where a third of it is wrong.
|
|
27
|
+
- **An `applies-to` that matches nothing.** Step 1 returns zero records and reads
|
|
28
|
+
as "nothing binds this change" instead of "the glob is wrong". Report the count
|
|
29
|
+
so an empty result is visible rather than reassuring.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Decisions that do not belong in a record
|
|
2
|
+
|
|
3
|
+
## When you do not
|
|
4
|
+
|
|
5
|
+
- **Session notes, plans, handovers, status boards.** Those are work records.
|
|
6
|
+
They belong in the repository's ignored local working directory, never in
|
|
7
|
+
the decision folder.
|
|
8
|
+
- **Product or API documentation.** A record says what was chosen and why; the
|
|
9
|
+
documentation says how the thing works. Use the documentation workflow.
|
|
10
|
+
- **A work item's status.** "Blocked on X" is a work item field, not a decision.
|
|
11
|
+
- **A reversible choice inside your own scope that nobody will re-litigate.**
|
|
12
|
+
Make it and move on; see the significance test in step 3.
|
|
13
|
+
- **An implementation request or an issue's proposed plan.** A request to do the
|
|
14
|
+
work authorizes ordinary in-scope implementation; it is not automatically a
|
|
15
|
+
request to create or accept an architectural record. Apply the significance
|
|
16
|
+
test and ask only about a concrete unresolved choice with meaningfully
|
|
17
|
+
different consequences.
|
|
18
|
+
- **A decision this repository does not own.** Company-level and portfolio
|
|
19
|
+
decisions live in the record set that owns them. Cite that id; do not copy the
|
|
20
|
+
record into a repository that cannot supersede it.
|
package/package/corpus/skills/cratis-engineering-decision-record/references/record-format.md
CHANGED
|
@@ -50,7 +50,7 @@ Do not invent a word for a state one of these sets already names.
|
|
|
50
50
|
|
|
51
51
|
| Value | Meaning |
|
|
52
52
|
| --- | --- |
|
|
53
|
-
| `none` |
|
|
53
|
+
| `none` | No implementation has been recorded; this is also the stage for a new proposal. |
|
|
54
54
|
| `implemented` | The change the decision calls for exists in the tree. |
|
|
55
55
|
| `verified` | A signal observed this time confirms the implementation. |
|
|
56
56
|
|
|
@@ -98,7 +98,7 @@ A record's body carries, in this order:
|
|
|
98
98
|
A typo fix or added context goes under a dated banner inside the record:
|
|
99
99
|
|
|
100
100
|
```markdown
|
|
101
|
-
> **
|
|
101
|
+
> **YYYY-MM-DD — clarification.** The decision text below said "client"; every
|
|
102
102
|
> use of that word means the generated client SDK, not a consuming application.
|
|
103
103
|
> The choice itself is unchanged.
|
|
104
104
|
```
|
|
@@ -110,6 +110,5 @@ banner.
|
|
|
110
110
|
|
|
111
111
|
The folder carries an index listing every record with its id, title, status,
|
|
112
112
|
stage, decided date, and decider. The index is regenerated whenever a record is
|
|
113
|
-
added or
|
|
114
|
-
step will never find. Two checks keep it honest: every file in the folder appears
|
|
113
|
+
added or any indexed field changes; the consult step starts from this index. Two checks keep it honest: every file in the folder appears
|
|
115
114
|
in the index, and every index entry resolves to a file.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cratis-engineering-docs-authoring
|
|
3
|
-
description: Use when drafting a Cratis tutorial, how-to, explanation or reference after its reader, owning page and product evidence are known. Not for
|
|
3
|
+
description: Use when drafting a Cratis tutorial, how-to, explanation or reference after its reader, owning page and product evidence are known. Not for planning a reader journey (use cratis-documentation-writing).
|
|
4
4
|
license: LICENSE
|
|
5
5
|
metadata:
|
|
6
6
|
cratis-hint-paths: "**/{Documentation}/**/*.{md,mdx}"
|
|
@@ -13,14 +13,10 @@ by its document type. This skill owns **content**. It does not decide which
|
|
|
13
13
|
repository owns a page, wire site navigation, locate an existing source page, or
|
|
14
14
|
perform visual QA.
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
[Explaining code](references/explaining-code.md), including both worked
|
|
21
|
-
transformations. Choose the detail in your example that will carry its
|
|
22
|
-
explanation; apply the multi-client section before choosing shared prose,
|
|
23
|
-
tabs or separate guides.
|
|
16
|
+
Follow `cratis-documentation-writing` for the reader journey and the
|
|
17
|
+
`documentation` rule from `cratis/documentation` for Platform naming. Read
|
|
18
|
+
[explaining code](references/explaining-code.md) when teaching a code example
|
|
19
|
+
or deciding whether clients should share a section.
|
|
24
20
|
|
|
25
21
|
## Required inputs
|
|
26
22
|
|
|
@@ -29,7 +25,7 @@ Before drafting, establish:
|
|
|
29
25
|
- the owning repository and destination page;
|
|
30
26
|
- document type: tutorial, how-to, explanation, or reference;
|
|
31
27
|
- target reader and the outcome they need;
|
|
32
|
-
- authoritative product source for every API, command,
|
|
28
|
+
- authoritative released product source for every API, command, and capability;
|
|
33
29
|
- explicit scope and important exclusions.
|
|
34
30
|
|
|
35
31
|
Use repository evidence to resolve routine details. Ask only when materially
|
|
@@ -101,8 +97,7 @@ for the owning maintainer.
|
|
|
101
97
|
A successful build proves rendering, not technical correctness. The owning
|
|
102
98
|
repository still runs its documentation, snippet, link, and product gates.
|
|
103
99
|
For a new or materially changed journey, use the
|
|
104
|
-
|
|
105
|
-
owned by **cratis-documentation-writing**. Report unavailable independent review;
|
|
100
|
+
fresh-context reader review in `cratis-documentation-writing`. Report unavailable independent review;
|
|
106
101
|
source checks and a successful build do not prove comprehension.
|
|
107
102
|
|
|
108
103
|
## Output
|
|
@@ -4,7 +4,7 @@ Use these rules for a page that will render on the Cratis Astro Starlight site.
|
|
|
4
4
|
The owning repository remains authoritative when it defines a stricter format.
|
|
5
5
|
|
|
6
6
|
For purposeful Astro components and text/AI export limitations, read the
|
|
7
|
-
|
|
7
|
+
site presentation reference in `cratis-documentation-writing`.
|
|
8
8
|
Ordinary product Markdown supports native aside directives; component imports
|
|
9
9
|
require an eligible MDX pipeline. Choose aids for this task, not a uniform layout.
|
|
10
10
|
|
|
@@ -30,11 +30,12 @@ require an eligible MDX pipeline. Choose aids for this task, not a uniform layou
|
|
|
30
30
|
## Links and navigation
|
|
31
31
|
|
|
32
32
|
- Use descriptive link text, never "here" or "read more."
|
|
33
|
-
- Use root-relative
|
|
34
|
-
|
|
33
|
+
- Use the published root-relative route between products, not an absolute site
|
|
34
|
+
URL or a GitHub source link. Confirm the route in the rendered site.
|
|
35
35
|
- Do not use DocFX `xref:` symbol links; the site turns them into plain text. Name an API type in
|
|
36
36
|
inline code and link to the page that documents it.
|
|
37
|
-
-
|
|
37
|
+
- Define Markdown reference links on the same page. Link another product’s
|
|
38
|
+
installation procedure before using its commands instead of copying its setup.
|
|
38
39
|
- Keep site-level links extensionless.
|
|
39
40
|
- Preserve the owning product repository's source-link convention.
|
|
40
41
|
- Do not edit generated synchronized pages; edit the owning source repository.
|