@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.
Files changed (490) hide show
  1. package/package/corpus/harnesses/copilot/instructions/ai-distribution.instructions.md +9 -102
  2. package/package/corpus/harnesses/copilot/instructions/authoring-skills.instructions.md +3 -5
  3. package/package/corpus/harnesses/copilot/instructions/browser.instructions.md +8 -49
  4. package/package/corpus/harnesses/copilot/instructions/code-health.instructions.md +1 -1
  5. package/package/corpus/harnesses/copilot/instructions/code-quality.csharp.instructions.md +3 -84
  6. package/package/corpus/harnesses/copilot/instructions/code-quality.instructions.md +6 -51
  7. package/package/corpus/harnesses/copilot/instructions/code-quality.typescript.instructions.md +4 -81
  8. package/package/corpus/harnesses/copilot/instructions/codescene.instructions.md +5 -54
  9. package/package/corpus/harnesses/copilot/instructions/components.instructions.md +1 -1
  10. package/package/corpus/harnesses/copilot/instructions/cratis-folder-is-configuration.instructions.md +5 -22
  11. package/package/corpus/harnesses/copilot/instructions/csharp.instructions.md +7 -315
  12. package/package/corpus/harnesses/copilot/instructions/dialogs.instructions.md +1 -1
  13. package/package/corpus/harnesses/copilot/instructions/discoverability.instructions.md +3 -25
  14. package/package/corpus/harnesses/copilot/instructions/documentation-structure-and-formatting.instructions.md +5 -151
  15. package/package/corpus/harnesses/copilot/instructions/documentation.instructions.md +5 -104
  16. package/package/corpus/harnesses/copilot/instructions/editing-cratis-docs.instructions.md +5 -63
  17. package/package/corpus/harnesses/copilot/instructions/efcore.instructions.md +8 -55
  18. package/package/corpus/harnesses/copilot/instructions/efcore.specs.instructions.md +3 -33
  19. package/package/corpus/harnesses/copilot/instructions/elixir.instructions.md +6 -79
  20. package/package/corpus/harnesses/copilot/instructions/exit-codes-and-wrappers.instructions.md +4 -27
  21. package/package/corpus/harnesses/copilot/instructions/framework-dotnet.instructions.md +4 -6
  22. package/package/corpus/harnesses/copilot/instructions/framework.instructions.md +0 -2
  23. package/package/corpus/harnesses/copilot/instructions/frontend-quality.instructions.md +0 -1
  24. package/package/corpus/harnesses/copilot/instructions/frontend-testing.instructions.md +1 -1
  25. package/package/corpus/harnesses/copilot/instructions/github-actions.instructions.md +7 -138
  26. package/package/corpus/harnesses/copilot/instructions/glossary.instructions.md +19 -19
  27. package/package/corpus/harnesses/copilot/instructions/go-engineering.instructions.md +1 -4
  28. package/package/corpus/harnesses/copilot/instructions/go.instructions.md +2 -7
  29. package/package/corpus/harnesses/copilot/instructions/guards-and-fuses.instructions.md +5 -6
  30. package/package/corpus/harnesses/copilot/instructions/java.instructions.md +7 -129
  31. package/package/corpus/harnesses/copilot/instructions/kotlin.instructions.md +8 -165
  32. package/package/corpus/harnesses/copilot/instructions/local-work-artifacts.instructions.md +4 -1
  33. package/package/corpus/harnesses/copilot/instructions/orleans.instructions.md +5 -98
  34. package/package/corpus/harnesses/copilot/instructions/profiles.instructions.md +9 -63
  35. package/package/corpus/harnesses/copilot/instructions/scripting.instructions.md +1 -1
  36. package/package/corpus/harnesses/copilot/instructions/specs.csharp.instructions.md +8 -148
  37. package/package/corpus/harnesses/copilot/instructions/specs.elixir.instructions.md +4 -37
  38. package/package/corpus/harnesses/copilot/instructions/specs.typescript.instructions.md +3 -1
  39. package/package/corpus/harnesses/copilot/instructions/storybook.instructions.md +7 -70
  40. package/package/corpus/harnesses/copilot/instructions/typescript.instructions.md +8 -98
  41. package/package/corpus/harnesses/copilot/instructions/writing-correct-examples.instructions.md +3 -47
  42. package/package/corpus/harnesses/copilot/instructions/writing-cratis-docs.instructions.md +3 -65
  43. package/package/corpus/hooks/README.md +16 -8
  44. package/package/corpus/hooks/scripts/cratis-cleanup-worktrees.sh +109 -6
  45. package/package/corpus/hooks/scripts/cratis-guard-shell-writes.sh +1 -1
  46. package/package/corpus/hooks/scripts/quality-gates.json +3 -5
  47. package/package/corpus/rules/ai-distribution.md +9 -102
  48. package/package/corpus/rules/authoring-skills.md +3 -5
  49. package/package/corpus/rules/browser.md +8 -49
  50. package/package/corpus/rules/code-health-policy.txt +4 -24
  51. package/package/corpus/rules/code-health.md +1 -1
  52. package/package/corpus/rules/code-quality.csharp.md +3 -84
  53. package/package/corpus/rules/code-quality.md +6 -51
  54. package/package/corpus/rules/code-quality.typescript.md +4 -81
  55. package/package/corpus/rules/codescene.md +5 -54
  56. package/package/corpus/rules/components.md +1 -1
  57. package/package/corpus/rules/cratis-folder-is-configuration.md +5 -22
  58. package/package/corpus/rules/csharp.md +7 -315
  59. package/package/corpus/rules/dialogs.md +1 -1
  60. package/package/corpus/rules/discoverability.md +3 -25
  61. package/package/corpus/rules/documentation-structure-and-formatting.md +5 -151
  62. package/package/corpus/rules/documentation.md +5 -104
  63. package/package/corpus/rules/editing-cratis-docs.md +5 -63
  64. package/package/corpus/rules/efcore.md +8 -55
  65. package/package/corpus/rules/efcore.specs.md +3 -33
  66. package/package/corpus/rules/elixir.md +6 -79
  67. package/package/corpus/rules/exit-codes-and-wrappers.md +4 -27
  68. package/package/corpus/rules/framework-dotnet.md +4 -6
  69. package/package/corpus/rules/framework.md +0 -2
  70. package/package/corpus/rules/frontend-quality.md +0 -1
  71. package/package/corpus/rules/frontend-testing.md +1 -1
  72. package/package/corpus/rules/general.md +2 -2
  73. package/package/corpus/rules/github-actions.md +7 -138
  74. package/package/corpus/rules/glossary.md +19 -19
  75. package/package/corpus/rules/go-engineering.md +1 -4
  76. package/package/corpus/rules/go.md +2 -7
  77. package/package/corpus/rules/guards-and-fuses.md +5 -6
  78. package/package/corpus/rules/java.md +7 -129
  79. package/package/corpus/rules/kotlin.md +8 -165
  80. package/package/corpus/rules/local-work-artifacts.md +4 -1
  81. package/package/corpus/rules/orleans.md +5 -98
  82. package/package/corpus/rules/profiles.md +9 -63
  83. package/package/corpus/rules/scripting.md +1 -1
  84. package/package/corpus/rules/specs.csharp.md +8 -148
  85. package/package/corpus/rules/specs.elixir.md +4 -37
  86. package/package/corpus/rules/specs.typescript.md +3 -1
  87. package/package/corpus/rules/storybook.md +7 -70
  88. package/package/corpus/rules/typescript.md +8 -98
  89. package/package/corpus/rules/writing-correct-examples.md +3 -47
  90. package/package/corpus/rules/writing-cratis-docs.md +3 -65
  91. package/package/corpus/skills/cratis-application-growth/SKILL.md +7 -54
  92. package/package/corpus/skills/cratis-application-growth/references/move-and-untangle.md +49 -0
  93. package/package/corpus/skills/cratis-application-growth/references/rename-window.md +12 -14
  94. package/package/corpus/skills/cratis-application-growth/references/stages.md +2 -2
  95. package/package/corpus/skills/cratis-arc-authorize-request/SKILL.md +2 -2
  96. package/package/corpus/skills/cratis-arc-authorize-request/references/csharp.md +3 -3
  97. package/package/corpus/skills/cratis-arc-authorize-request/references/kotlin.md +2 -2
  98. package/package/corpus/skills/cratis-arc-code-analysis-typescript/SKILL.md +10 -43
  99. package/package/corpus/skills/cratis-arc-code-analysis-typescript/references/rule-fixes.md +40 -0
  100. package/package/corpus/skills/cratis-arc-connect-storage/SKILL.md +1 -1
  101. package/package/corpus/skills/cratis-arc-connect-storage/references/csharp.md +1 -1
  102. package/package/corpus/skills/cratis-arc-declare-command/references/csharp.md +4 -4
  103. package/package/corpus/skills/cratis-arc-declare-command/references/go.md +1 -1
  104. package/package/corpus/skills/cratis-arc-declare-command/references/kotlin.md +6 -7
  105. package/package/corpus/skills/cratis-arc-declare-operation/SKILL.md +2 -8
  106. package/package/corpus/skills/cratis-arc-declare-operation/references/csharp.md +1 -1
  107. package/package/corpus/skills/cratis-arc-diagnose-live-query/SKILL.md +1 -1
  108. package/package/corpus/skills/cratis-arc-diagnose-live-query/references/csharp.md +1 -1
  109. package/package/corpus/skills/cratis-arc-expose-mcp-operation/SKILL.md +6 -12
  110. package/package/corpus/skills/cratis-arc-expose-mcp-operation/references/custom-exposure-and-audit.md +4 -0
  111. package/package/corpus/skills/cratis-arc-expose-query/SKILL.md +2 -2
  112. package/package/corpus/skills/cratis-arc-expose-query/references/csharp.md +11 -4
  113. package/package/corpus/skills/cratis-arc-expose-query/references/typescript.md +1 -1
  114. package/package/corpus/skills/cratis-arc-generate-proxies/SKILL.md +2 -2
  115. package/package/corpus/skills/cratis-arc-generate-proxies/references/csharp.md +1 -1
  116. package/package/corpus/skills/cratis-arc-generate-proxies/references/go.md +19 -2
  117. package/package/corpus/skills/cratis-arc-generate-proxies/references/typescript.md +1 -1
  118. package/package/corpus/skills/cratis-arc-host-application/SKILL.md +1 -1
  119. package/package/corpus/skills/cratis-arc-host-application/references/csharp.md +1 -2
  120. package/package/corpus/skills/cratis-arc-host-application/references/elixir.md +2 -2
  121. package/package/corpus/skills/cratis-arc-host-application/references/go.md +5 -1
  122. package/package/corpus/skills/cratis-arc-host-application/references/java.md +1 -1
  123. package/package/corpus/skills/cratis-arc-host-application/references/kotlin.md +1 -1
  124. package/package/corpus/skills/cratis-arc-host-application/references/typescript.md +1 -1
  125. package/package/corpus/skills/cratis-arc-identity-and-tenancy-kotlin/SKILL.md +4 -7
  126. package/package/corpus/skills/cratis-arc-invoke-command/SKILL.md +1 -1
  127. package/package/corpus/skills/cratis-arc-invoke-command/references/csharp.md +4 -4
  128. package/package/corpus/skills/cratis-arc-invoke-command/references/typescript.md +1 -1
  129. package/package/corpus/skills/cratis-arc-isolate-tenant/SKILL.md +2 -2
  130. package/package/corpus/skills/cratis-arc-isolate-tenant/references/csharp.md +2 -2
  131. package/package/corpus/skills/cratis-arc-isolate-tenant/references/elixir.md +1 -1
  132. package/package/corpus/skills/cratis-arc-isolate-tenant/references/java.md +1 -1
  133. package/package/corpus/skills/cratis-arc-isolate-tenant/references/kotlin.md +1 -1
  134. package/package/corpus/skills/cratis-arc-isolate-tenant/references/typescript.md +4 -2
  135. package/package/corpus/skills/cratis-arc-migrate-relational-schema/SKILL.md +6 -6
  136. package/package/corpus/skills/cratis-arc-page-query/SKILL.md +3 -3
  137. package/package/corpus/skills/cratis-arc-page-query/references/csharp.md +10 -6
  138. package/package/corpus/skills/cratis-arc-page-query/references/elixir.md +2 -2
  139. package/package/corpus/skills/cratis-arc-page-query/references/java.md +1 -1
  140. package/package/corpus/skills/cratis-arc-page-query/references/kotlin.md +1 -1
  141. package/package/corpus/skills/cratis-arc-react-bind-slice/SKILL.md +2 -2
  142. package/package/corpus/skills/cratis-arc-react-bind-slice/references/csharp.md +1 -1
  143. package/package/corpus/skills/cratis-arc-react-bind-slice/references/kotlin.md +1 -1
  144. package/package/corpus/skills/cratis-arc-react-separate-view-model/SKILL.md +7 -3
  145. package/package/corpus/skills/cratis-arc-react-separate-view-model/references/react-routing-and-messaging.md +1 -1
  146. package/package/corpus/skills/cratis-arc-select-backend-sdk/SKILL.md +2 -2
  147. package/package/corpus/skills/cratis-arc-select-backend-sdk/references/elixir.md +2 -4
  148. package/package/corpus/skills/cratis-arc-select-backend-sdk/references/go.md +2 -2
  149. package/package/corpus/skills/cratis-arc-select-backend-sdk/references/java.md +1 -1
  150. package/package/corpus/skills/cratis-arc-select-backend-sdk/references/kotlin.md +2 -2
  151. package/package/corpus/skills/cratis-arc-select-backend-sdk/references/typescript.md +1 -3
  152. package/package/corpus/skills/cratis-arc-spring-data-kotlin/SKILL.md +13 -51
  153. package/package/corpus/skills/cratis-arc-spring-data-kotlin/references/read-model-naming.md +9 -1
  154. package/package/corpus/skills/cratis-arc-spring-data-kotlin/references/storage-boundaries.md +40 -0
  155. package/package/corpus/skills/cratis-arc-storage-typescript/SKILL.md +19 -64
  156. package/package/corpus/skills/cratis-arc-storage-typescript/references/drizzle.md +62 -0
  157. package/package/corpus/skills/cratis-arc-tenancy-typescript/SKILL.md +24 -55
  158. package/package/corpus/skills/cratis-arc-tenancy-typescript/references/tenant-selection.md +49 -0
  159. package/package/corpus/skills/cratis-arc-testing-kotlin/SKILL.md +13 -31
  160. package/package/corpus/skills/cratis-arc-testing-kotlin/references/jvm-scenario-variants.md +25 -0
  161. package/package/corpus/skills/cratis-arc-testing-typescript/SKILL.md +24 -62
  162. package/package/corpus/skills/cratis-arc-testing-typescript/references/hosts-and-runners.md +51 -0
  163. package/package/corpus/skills/cratis-arc-validate-command/SKILL.md +4 -4
  164. package/package/corpus/skills/cratis-arc-validate-command/references/csharp.md +10 -12
  165. package/package/corpus/skills/cratis-arc-validate-command/references/elixir.md +16 -3
  166. package/package/corpus/skills/cratis-arc-validate-command/references/go.md +19 -2
  167. package/package/corpus/skills/cratis-arc-validate-command/references/java.md +20 -7
  168. package/package/corpus/skills/cratis-arc-validate-command/references/kotlin.md +22 -2
  169. package/package/corpus/skills/cratis-arc-validate-command/references/python.md +8 -2
  170. package/package/corpus/skills/cratis-arc-validate-command/references/typescript.md +22 -2
  171. package/package/corpus/skills/cratis-arc-validation-kotlin/SKILL.md +22 -248
  172. package/package/corpus/skills/cratis-arc-validation-kotlin/references/feature-filters.md +55 -0
  173. package/package/corpus/skills/cratis-arc-validation-kotlin/references/model-validation.md +72 -0
  174. package/package/corpus/skills/cratis-arc-validation-kotlin/references/server-validators.md +86 -0
  175. package/package/corpus/skills/cratis-arc-validation-typescript/SKILL.md +27 -275
  176. package/package/corpus/skills/cratis-arc-validation-typescript/references/models-and-queries.md +63 -0
  177. package/package/corpus/skills/cratis-arc-validation-typescript/references/rules-and-checks.md +46 -0
  178. package/package/corpus/skills/cratis-arc-validation-typescript/references/server-decisions.md +114 -0
  179. package/package/corpus/skills/cratis-chronicle-cli-operations/SKILL.md +15 -255
  180. package/package/corpus/skills/cratis-chronicle-cli-operations/references/command-effects.md +13 -6
  181. package/package/corpus/skills/cratis-chronicle-cli-operations/references/inspection.md +75 -0
  182. package/package/corpus/skills/cratis-chronicle-cli-operations/references/project-tooling.md +78 -13
  183. package/package/corpus/skills/cratis-chronicle-cli-operations/references/recovery-and-comparison.md +16 -14
  184. package/package/corpus/skills/cratis-chronicle-connect-application/SKILL.md +1 -1
  185. package/package/corpus/skills/cratis-chronicle-connect-application/references/csharp.md +10 -6
  186. package/package/corpus/skills/cratis-chronicle-connect-application/references/elixir.md +1 -1
  187. package/package/corpus/skills/cratis-chronicle-constrain-append/SKILL.md +2 -2
  188. package/package/corpus/skills/cratis-chronicle-constrain-append/references/csharp.md +8 -8
  189. package/package/corpus/skills/cratis-chronicle-deploy-kernel/SKILL.md +10 -8
  190. package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/storage.md +8 -4
  191. package/package/corpus/skills/cratis-chronicle-evolve-event/SKILL.md +4 -4
  192. package/package/corpus/skills/cratis-chronicle-evolve-event/references/csharp.md +2 -2
  193. package/package/corpus/skills/cratis-chronicle-evolve-event/references/deployed-readers.md +21 -8
  194. package/package/corpus/skills/cratis-chronicle-evolve-event/references/elixir.md +1 -1
  195. package/package/corpus/skills/cratis-chronicle-inspect-observer/SKILL.md +1 -1
  196. package/package/corpus/skills/cratis-chronicle-inspect-observer/references/csharp.md +5 -7
  197. package/package/corpus/skills/cratis-chronicle-inspect-observer/references/elixir.md +3 -3
  198. package/package/corpus/skills/cratis-chronicle-mcp-inspection/SKILL.md +10 -80
  199. package/package/corpus/skills/cratis-chronicle-mcp-inspection/references/blocked-tools.md +2 -2
  200. package/package/corpus/skills/cratis-chronicle-mcp-inspection/references/deployment.md +9 -24
  201. package/package/corpus/skills/cratis-chronicle-mcp-inspection/references/observational-tools.md +10 -0
  202. package/package/corpus/skills/cratis-chronicle-project-view/SKILL.md +2 -2
  203. package/package/corpus/skills/cratis-chronicle-project-view/references/csharp.md +7 -6
  204. package/package/corpus/skills/cratis-chronicle-project-view/references/elixir.md +2 -2
  205. package/package/corpus/skills/cratis-chronicle-project-view/references/go.md +6 -0
  206. package/package/corpus/skills/cratis-chronicle-project-view/references/java.md +6 -0
  207. package/package/corpus/skills/cratis-chronicle-project-view/references/kotlin.md +6 -0
  208. package/package/corpus/skills/cratis-chronicle-project-view/references/typescript.md +11 -5
  209. package/package/corpus/skills/cratis-chronicle-protect-decision/SKILL.md +2 -2
  210. package/package/corpus/skills/cratis-chronicle-protect-decision/references/csharp.md +4 -4
  211. package/package/corpus/skills/cratis-chronicle-protect-decision/references/elixir.md +2 -2
  212. package/package/corpus/skills/cratis-chronicle-protect-decision/references/go.md +3 -1
  213. package/package/corpus/skills/cratis-chronicle-protect-personal-data/SKILL.md +1 -1
  214. package/package/corpus/skills/cratis-chronicle-protect-personal-data/references/csharp.md +1 -1
  215. package/package/corpus/skills/cratis-chronicle-publish-contract/SKILL.md +1 -1
  216. package/package/corpus/skills/cratis-chronicle-publish-contract/references/csharp.md +51 -40
  217. package/package/corpus/skills/cratis-chronicle-publish-contract/references/elixir.md +1 -1
  218. package/package/corpus/skills/cratis-chronicle-react-to-fact/SKILL.md +1 -1
  219. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/{occurrences.md → csharp-occurrences.md} +2 -2
  220. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/csharp.md +5 -6
  221. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/go.md +1 -1
  222. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/java.md +1 -1
  223. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/kotlin.md +1 -1
  224. package/package/corpus/skills/cratis-chronicle-record-event/SKILL.md +1 -1
  225. package/package/corpus/skills/cratis-chronicle-record-event/references/csharp.md +21 -19
  226. package/package/corpus/skills/cratis-chronicle-record-event/references/elixir.md +3 -3
  227. package/package/corpus/skills/cratis-chronicle-record-event/references/go.md +1 -1
  228. package/package/corpus/skills/cratis-chronicle-record-event/references/java.md +3 -4
  229. package/package/corpus/skills/cratis-chronicle-record-event/references/kotlin.md +3 -4
  230. package/package/corpus/skills/cratis-chronicle-record-event/references/typescript.md +2 -2
  231. package/package/corpus/skills/cratis-chronicle-reduce-state/SKILL.md +1 -1
  232. package/package/corpus/skills/cratis-chronicle-reduce-state/references/csharp.md +7 -2
  233. package/package/corpus/skills/cratis-chronicle-reduce-state/references/typescript.md +1 -1
  234. package/package/corpus/skills/cratis-chronicle-select-client/SKILL.md +4 -4
  235. package/package/corpus/skills/cratis-chronicle-select-client/references/csharp.md +3 -3
  236. package/package/corpus/skills/cratis-chronicle-select-client/references/elixir.md +2 -6
  237. package/package/corpus/skills/cratis-chronicle-select-client/references/go.md +2 -2
  238. package/package/corpus/skills/cratis-chronicle-select-client/references/java.md +1 -1
  239. package/package/corpus/skills/cratis-chronicle-select-client/references/kotlin.md +1 -5
  240. package/package/corpus/skills/cratis-chronicle-select-client/references/python.md +3 -3
  241. package/package/corpus/skills/cratis-chronicle-select-client/references/typescript.md +2 -2
  242. package/package/corpus/skills/cratis-chronicle-web-workbench/SKILL.md +12 -201
  243. package/package/corpus/skills/cratis-chronicle-web-workbench/references/hosting.md +67 -0
  244. package/package/corpus/skills/cratis-chronicle-web-workbench/references/operations.md +88 -0
  245. package/package/corpus/skills/cratis-ci-pipeline-performance/SKILL.md +8 -4
  246. package/package/corpus/skills/cratis-ci-pipeline-performance/references/build-once-and-shard.md +13 -11
  247. package/package/corpus/skills/cratis-ci-pipeline-performance/references/caching.md +2 -2
  248. package/package/corpus/skills/cratis-ci-pipeline-performance/references/flaky-and-hung-jobs.md +6 -4
  249. package/package/corpus/skills/cratis-ci-pipeline-performance/references/required-checks-and-path-filters.md +20 -61
  250. package/package/corpus/skills/cratis-ci-pipeline-performance/references/security-and-pinning.md +1 -1
  251. package/package/corpus/skills/cratis-cli-terminal-workbench/SKILL.md +15 -26
  252. package/package/corpus/skills/cratis-code-review/SKILL.md +7 -6
  253. package/package/corpus/skills/cratis-commits-and-pull-requests/SKILL.md +1 -1
  254. package/package/corpus/skills/cratis-commits-and-pull-requests/references/pr-description.md +1 -1
  255. package/package/corpus/skills/cratis-components-accessibility/SKILL.md +14 -206
  256. package/package/corpus/skills/cratis-components-accessibility/references/control-labels.md +29 -0
  257. package/package/corpus/skills/cratis-components-accessibility/references/focus-and-announcements.md +8 -0
  258. package/package/corpus/skills/cratis-components-build-canvas/SKILL.md +7 -7
  259. package/package/corpus/skills/cratis-components-build-canvas/references/pixi-items.md +1 -1
  260. package/package/corpus/skills/cratis-components-choose-control/SKILL.md +7 -8
  261. package/package/corpus/skills/cratis-components-choose-control/references/collections.md +2 -2
  262. package/package/corpus/skills/cratis-components-choose-control/references/inputs.md +1 -1
  263. package/package/corpus/skills/cratis-components-compose-toolbar/SKILL.md +22 -27
  264. package/package/corpus/skills/cratis-components-compose-toolbar/references/contributed-tools.md +5 -0
  265. package/package/corpus/skills/cratis-components-coordinate-feedback/SKILL.md +19 -25
  266. package/package/corpus/skills/cratis-components-display-list/SKILL.md +26 -19
  267. package/package/corpus/skills/cratis-components-display-list/references/server-query.md +3 -3
  268. package/package/corpus/skills/cratis-components-edit-schema-data/SKILL.md +15 -12
  269. package/package/corpus/skills/cratis-components-edit-schema-data/references/controlled-editor.md +3 -3
  270. package/package/corpus/skills/cratis-components-explore-data/SKILL.md +7 -7
  271. package/package/corpus/skills/cratis-components-host-chat/SKILL.md +7 -7
  272. package/package/corpus/skills/cratis-components-submit-form/SKILL.md +9 -15
  273. package/package/corpus/skills/cratis-components-submit-form/references/confirmation.md +5 -5
  274. package/package/corpus/skills/cratis-components-submit-form/references/wizard.md +3 -3
  275. package/package/corpus/skills/cratis-components-theme-application/SKILL.md +7 -51
  276. package/package/corpus/skills/cratis-components-theme-application/references/palette.md +49 -0
  277. package/package/corpus/skills/cratis-components-theme-application/references/renderer-adapters.md +4 -2
  278. package/package/corpus/skills/cratis-content-length/SKILL.md +34 -46
  279. package/package/corpus/skills/cratis-content-length/references/length-evidence.md +26 -127
  280. package/package/corpus/skills/cratis-developer-marketing/SKILL.md +15 -27
  281. package/package/corpus/skills/cratis-developer-marketing/references/measurement.md +3 -19
  282. package/package/corpus/skills/cratis-developer-marketing/references/playbook-evidence.md +29 -224
  283. package/package/corpus/skills/cratis-discoverability/SKILL.md +11 -4
  284. package/package/corpus/skills/cratis-discoverability/references/package-metadata.md +2 -2
  285. package/package/corpus/skills/cratis-documentation-writing/SKILL.md +4 -3
  286. package/package/corpus/skills/cratis-engineering-ci-gates/SKILL.md +13 -129
  287. package/package/corpus/skills/cratis-engineering-ci-gates/references/gate-operation.md +132 -0
  288. package/package/corpus/skills/cratis-engineering-consolidation-guard/SKILL.md +11 -100
  289. package/package/corpus/skills/cratis-engineering-consolidation-guard/references/ci-required-check.md +55 -40
  290. package/package/corpus/skills/cratis-engineering-consolidation-guard/references/source-verification.md +68 -0
  291. package/package/corpus/skills/cratis-engineering-consolidation-guard/references/verification-details.md +38 -0
  292. package/package/corpus/skills/cratis-engineering-csharp-conventions/SKILL.md +14 -65
  293. package/package/corpus/skills/cratis-engineering-csharp-conventions/references/exceptions-logging-and-di.md +40 -174
  294. package/package/corpus/skills/cratis-engineering-decision-record/SKILL.md +8 -52
  295. package/package/corpus/skills/cratis-engineering-decision-record/references/decision-pitfalls.md +29 -0
  296. package/package/corpus/skills/cratis-engineering-decision-record/references/decision-scope.md +20 -0
  297. package/package/corpus/skills/cratis-engineering-decision-record/references/record-format.md +3 -4
  298. package/package/corpus/skills/cratis-engineering-docs-authoring/SKILL.md +7 -12
  299. package/package/corpus/skills/cratis-engineering-docs-authoring/references/site-format.md +5 -4
  300. package/package/corpus/skills/cratis-engineering-effect-boundaries/SKILL.md +6 -40
  301. package/package/corpus/skills/cratis-engineering-effect-boundaries/references/failure-archetypes.md +18 -151
  302. package/package/corpus/skills/cratis-engineering-inherited-work/SKILL.md +5 -21
  303. package/package/corpus/skills/cratis-engineering-inherited-work/references/continue-inherited-work.md +19 -0
  304. package/package/corpus/skills/cratis-engineering-issue-design-note/SKILL.md +3 -66
  305. package/package/corpus/skills/cratis-engineering-issue-design-note/references/design-note-format.md +68 -0
  306. package/package/corpus/skills/cratis-engineering-issue-hygiene/SKILL.md +2 -84
  307. package/package/corpus/skills/cratis-engineering-issue-hygiene/references/issue-disposition.md +87 -0
  308. package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/SKILL.md +15 -263
  309. package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/dependency-map.md +3 -3
  310. package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/docker-images.md +28 -6
  311. package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/dotnet-nuget.md +18 -14
  312. package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/helper-runbook.md +231 -0
  313. package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/other-environments.md +2 -3
  314. package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/worked-examples.md +62 -77
  315. package/package/corpus/skills/cratis-engineering-post-mortem/SKILL.md +6 -39
  316. package/package/corpus/skills/cratis-engineering-post-mortem/references/proportionate-follow-up.md +36 -0
  317. package/package/corpus/skills/cratis-engineering-regression-cluster/SKILL.md +4 -4
  318. package/package/corpus/skills/cratis-engineering-release-trains/SKILL.md +8 -134
  319. package/package/corpus/skills/cratis-engineering-release-trains/references/candidate-assembly.md +139 -0
  320. package/package/corpus/skills/cratis-engineering-review-rounds/SKILL.md +3 -100
  321. package/package/corpus/skills/cratis-engineering-review-rounds/references/round-handoffs.md +109 -0
  322. package/package/corpus/skills/cratis-environments-and-secrets/SKILL.md +1 -5
  323. package/package/corpus/skills/cratis-environments-and-secrets/references/environment-file.md +1 -3
  324. package/package/corpus/skills/cratis-event-model-diagram/SKILL.md +11 -116
  325. package/package/corpus/skills/cratis-event-model-diagram/references/frame-patterns.md +93 -0
  326. package/package/corpus/skills/cratis-fundamentals-concept-go/SKILL.md +4 -15
  327. package/package/corpus/skills/cratis-fundamentals-name-value/SKILL.md +8 -8
  328. package/package/corpus/skills/cratis-fundamentals-name-value/references/csharp.md +4 -4
  329. package/package/corpus/skills/cratis-fundamentals-name-value/references/elixir.md +1 -1
  330. package/package/corpus/skills/cratis-fundamentals-name-value/references/go.md +1 -1
  331. package/package/corpus/skills/cratis-fundamentals-name-value/references/java.md +5 -5
  332. package/package/corpus/skills/cratis-fundamentals-name-value/references/kotlin.md +15 -2
  333. package/package/corpus/skills/cratis-fundamentals-name-value/references/python.md +1 -1
  334. package/package/corpus/skills/cratis-fundamentals-name-value/references/typescript.md +1 -1
  335. package/package/corpus/skills/cratis-fundamentals-telemetry/SKILL.md +10 -27
  336. package/package/corpus/skills/cratis-fundamentals-telemetry/references/otlp-export.md +16 -0
  337. package/package/corpus/skills/cratis-fundamentals-type-discovery/SKILL.md +26 -188
  338. package/package/corpus/skills/cratis-fundamentals-type-discovery/references/diagnostics.md +14 -0
  339. package/package/corpus/skills/cratis-governed-release-methodology/SKILL.md +7 -5
  340. package/package/corpus/skills/cratis-lens-browser-extension/SKILL.md +23 -157
  341. package/package/corpus/skills/cratis-lens-browser-extension/references/troubleshooting.md +139 -0
  342. package/package/corpus/skills/cratis-llm-friendly-documentation/SKILL.md +7 -5
  343. package/package/corpus/skills/cratis-modeling-design-event-model/SKILL.md +2 -4
  344. package/package/corpus/skills/cratis-modeling-design-event-model/references/model-first.md +7 -0
  345. package/package/corpus/skills/cratis-modeling-discover-timeline/SKILL.md +2 -2
  346. package/package/corpus/skills/cratis-modeling-discover-timeline/references/group-and-document-intake.md +1 -1
  347. package/package/corpus/skills/cratis-modeling-review-event-model/SKILL.md +2 -2
  348. package/package/corpus/skills/cratis-modeling-review-event-model/references/implementation-findings.md +2 -2
  349. package/package/corpus/skills/cratis-modeling-trace-existing-behavior/SKILL.md +5 -23
  350. package/package/corpus/skills/cratis-modeling-trace-existing-behavior/references/compare-evidence.md +20 -0
  351. package/package/corpus/skills/cratis-modeling-trace-existing-behavior/references/recovery-inputs.md +3 -3
  352. package/package/corpus/skills/cratis-multi-service-local-orchestration/SKILL.md +8 -63
  353. package/package/corpus/skills/cratis-multi-service-local-orchestration/references/aspire.md +52 -0
  354. package/package/corpus/skills/cratis-observability/SKILL.md +1 -1
  355. package/package/corpus/skills/cratis-observability/references/arc-and-chronicle-signals.md +9 -23
  356. package/package/corpus/skills/cratis-observability/references/chronicle-kernel-export.md +3 -14
  357. package/package/corpus/skills/cratis-observability/references/csharp.md +4 -6
  358. package/package/corpus/skills/cratis-observability/references/elixir.md +1 -1
  359. package/package/corpus/skills/cratis-observability/references/troubleshooting.md +4 -5
  360. package/package/corpus/skills/cratis-onboarding-runtime/SKILL.md +1 -4
  361. package/package/corpus/skills/cratis-onboarding-runtime/references/default-offering.md +0 -3
  362. package/package/corpus/skills/cratis-onboarding-runtime/references/sign-up-review.md +0 -4
  363. package/package/corpus/skills/cratis-orchestration-lanes/SKILL.md +7 -49
  364. package/package/corpus/skills/cratis-orchestration-lanes/references/escalation.md +22 -0
  365. package/package/corpus/skills/cratis-orchestration-lanes/references/inbox-and-handover.md +4 -4
  366. package/package/corpus/skills/cratis-orchestration-lanes/references/placeholders.md +1 -1
  367. package/package/corpus/skills/cratis-orchestration-lanes/references/roles.md +12 -0
  368. package/package/corpus/skills/cratis-orchestration-lanes/references/roll-call.md +12 -0
  369. package/package/corpus/skills/cratis-orchestration-lanes/references/worktrees.md +11 -0
  370. package/package/corpus/skills/cratis-orchestration-merge-gates/SKILL.md +14 -13
  371. package/package/corpus/skills/cratis-orchestration-merge-gates/references/merge-queue.md +51 -26
  372. package/package/corpus/skills/cratis-orchestration-merge-gates/references/unattended-guards.md +8 -14
  373. package/package/corpus/skills/cratis-orleans-jobs/SKILL.md +9 -65
  374. package/package/corpus/skills/cratis-orleans-jobs/references/activation-callbacks.md +5 -0
  375. package/package/corpus/skills/cratis-orleans-jobs/references/lifecycle-and-placement.md +11 -7
  376. package/package/corpus/skills/cratis-orleans-jobs/references/state-machines.md +1 -1
  377. package/package/corpus/skills/cratis-orleans-jobs/references/step-planning.md +27 -0
  378. package/package/corpus/skills/cratis-orleans-jobs/references/storage-and-options.md +35 -0
  379. package/package/corpus/skills/cratis-performance-review/SKILL.md +6 -76
  380. package/package/corpus/skills/cratis-performance-review/references/review-checklist.md +79 -0
  381. package/package/corpus/skills/cratis-platform-configure-environment/SKILL.md +19 -16
  382. package/package/corpus/skills/cratis-platform-contribute-change/SKILL.md +2 -2
  383. package/package/corpus/skills/cratis-platform-deliver-slice/SKILL.md +5 -5
  384. package/package/corpus/skills/cratis-platform-deliver-slice/references/coordinate-slices.md +1 -1
  385. package/package/corpus/skills/cratis-platform-diagnose-slice/SKILL.md +2 -3
  386. package/package/corpus/skills/cratis-platform-prepare-release-pr/SKILL.md +2 -2
  387. package/package/corpus/skills/cratis-platform-start-application/SKILL.md +10 -8
  388. package/package/corpus/skills/cratis-platform-start-application/references/csharp.md +6 -6
  389. package/package/corpus/skills/cratis-platform-start-application/references/java.md +4 -4
  390. package/package/corpus/skills/cratis-platform-start-application/references/kotlin.md +4 -4
  391. package/package/corpus/skills/cratis-platform-verify-service-handoff/SKILL.md +3 -3
  392. package/package/corpus/skills/cratis-release-notes/SKILL.md +9 -133
  393. package/package/corpus/skills/cratis-release-notes/references/channel-guidance.md +59 -0
  394. package/package/corpus/skills/cratis-release-notes/references/publish-repair.md +64 -0
  395. package/package/corpus/skills/cratis-rtk/SKILL.md +12 -18
  396. package/package/corpus/skills/cratis-screenplay-accept-model/SKILL.md +3 -3
  397. package/package/corpus/skills/cratis-screenplay-accept-model/references/capability-consumption.md +1 -1
  398. package/package/corpus/skills/cratis-screenplay-accept-model/references/coverage-obligations.md +1 -1
  399. package/package/corpus/skills/cratis-screenplay-authentication-and-onboarding/SKILL.md +25 -59
  400. package/package/corpus/skills/cratis-screenplay-authentication-and-onboarding/references/onboarding-directives.md +11 -10
  401. package/package/corpus/skills/cratis-screenplay-author-extension/SKILL.md +9 -6
  402. package/package/corpus/skills/cratis-screenplay-author-extension/references/consume.md +3 -3
  403. package/package/corpus/skills/cratis-screenplay-author-extension/references/stage-candidate.md +8 -0
  404. package/package/corpus/skills/cratis-screenplay-availability/SKILL.md +20 -167
  405. package/package/corpus/skills/cratis-screenplay-availability/references/complete-example.md +23 -47
  406. package/package/corpus/skills/cratis-screenplay-availability/references/review-checks.md +9 -10
  407. package/package/corpus/skills/cratis-screenplay-availability/references/runtime-ownership.md +26 -23
  408. package/package/corpus/skills/cratis-screenplay-declare-slice/SKILL.md +6 -14
  409. package/package/corpus/skills/cratis-screenplay-declare-slice/references/projection-replay.md +2 -2
  410. package/package/corpus/skills/cratis-screenplay-declare-slice/references/read-identity.md +1 -1
  411. package/package/corpus/skills/cratis-screenplay-edit-workspace/SKILL.md +7 -9
  412. package/package/corpus/skills/cratis-screenplay-edit-workspace/references/model-notes.md +1 -1
  413. package/package/corpus/skills/cratis-screenplay-handoff-slice/SKILL.md +10 -14
  414. package/package/corpus/skills/cratis-screenplay-model-automation/SKILL.md +1 -1
  415. package/package/corpus/skills/cratis-screenplay-model-automation/references/reaction-boundaries.md +1 -1
  416. package/package/corpus/skills/cratis-screenplay-model-interaction/SKILL.md +6 -31
  417. package/package/corpus/skills/cratis-screenplay-model-interaction/references/shell-and-data.md +22 -0
  418. package/package/corpus/skills/cratis-screenplay-model-translation/SKILL.md +5 -5
  419. package/package/corpus/skills/cratis-screenplay-onboard-workspace/SKILL.md +5 -5
  420. package/package/corpus/skills/cratis-screenplay-onboard-workspace/references/version-migration.md +4 -4
  421. package/package/corpus/skills/cratis-screenplay-recover-intent/SKILL.md +2 -2
  422. package/package/corpus/skills/cratis-screenplay-recover-intent/references/csharp.md +2 -2
  423. package/package/corpus/skills/cratis-screenplay-recover-intent/references/ground-truth-benchmark.md +1 -1
  424. package/package/corpus/skills/cratis-screenplay-specify-outcome/SKILL.md +4 -75
  425. package/package/corpus/skills/cratis-screenplay-specify-outcome/references/host-body-execution.md +0 -2
  426. package/package/corpus/skills/cratis-screenplay-specify-outcome/references/observable-result.md +85 -1
  427. package/package/corpus/skills/cratis-screenplay-specify-outcome/references/query-rejections.md +1 -1
  428. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +15 -133
  429. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/boundaries.md +5 -5
  430. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/chronicle-boundaries.md +4 -12
  431. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/consistency-and-concurrency.md +28 -57
  432. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/evolution-example.md +4 -5
  433. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/evolution.md +13 -20
  434. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/multi-service-models.md +1 -1
  435. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/neighbouring-skills.md +1 -1
  436. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/read-model-keys.md +3 -5
  437. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/stream-id-rules.md +2 -0
  438. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/stream-patterns.md +5 -5
  439. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/streams-example.md +82 -71
  440. package/package/corpus/skills/cratis-security-review/SKILL.md +4 -73
  441. package/package/corpus/skills/cratis-security-review/references/arc-boundaries.md +24 -13
  442. package/package/corpus/skills/cratis-security-review/references/review-checklist.md +74 -0
  443. package/package/corpus/skills/cratis-session-handoff/SKILL.md +7 -32
  444. package/package/corpus/skills/cratis-session-handoff/references/handoff-template.md +2 -2
  445. package/package/corpus/skills/cratis-session-handoff/references/session-hygiene.md +20 -0
  446. package/package/corpus/skills/cratis-showrunner-herald/SKILL.md +9 -17
  447. package/package/corpus/skills/cratis-showrunner-herald/references/options.md +2 -2
  448. package/package/corpus/skills/cratis-showrunner-herald/references/templates-and-images.md +16 -10
  449. package/package/corpus/skills/cratis-social-feed-post/SKILL.md +9 -162
  450. package/package/corpus/skills/cratis-social-feed-post/references/asset-and-formatting.md +37 -0
  451. package/package/corpus/skills/cratis-social-feed-post/references/editorial-checks.md +40 -0
  452. package/package/corpus/skills/cratis-social-feed-post/references/engagement-evidence.md +39 -150
  453. package/package/corpus/skills/cratis-social-feed-post/references/linkedin-media.md +24 -0
  454. package/package/corpus/skills/cratis-social-feed-post/references/other-channels.md +23 -0
  455. package/package/corpus/skills/cratis-specifications-exercise-backend/SKILL.md +5 -5
  456. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-command-results.md +2 -2
  457. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-query-scenario.md +13 -5
  458. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp.md +7 -4
  459. package/package/corpus/skills/cratis-specifications-exercise-backend/references/elixir.md +1 -1
  460. package/package/corpus/skills/cratis-specifications-exercise-backend/references/go.md +20 -4
  461. package/package/corpus/skills/cratis-specifications-exercise-backend/references/typescript.md +1 -1
  462. package/package/corpus/skills/cratis-specifications-isolate-behavior/SKILL.md +2 -2
  463. package/package/corpus/skills/cratis-specifications-observe-ui/SKILL.md +5 -5
  464. package/package/corpus/skills/cratis-specifications-test-application-ui/SKILL.md +2 -2
  465. package/package/corpus/skills/cratis-specifications-test-application-ui/references/typescript-command-results.md +2 -2
  466. package/package/corpus/skills/cratis-specifications-test-typescript-behavior/SKILL.md +2 -2
  467. package/package/corpus/skills/cratis-stage-render-slice/SKILL.md +10 -9
  468. package/package/corpus/skills/cratis-stage-run-sandbox/SKILL.md +3 -3
  469. package/package/corpus/skills/cratis-stage-run-sandbox/references/semantic-spec-runner.md +7 -6
  470. package/package/corpus/skills/cratis-studio-mcp-safety-guidance/SKILL.md +4 -6
  471. package/package/corpus/skills/cratis-technical-examples/SKILL.md +10 -106
  472. package/package/corpus/skills/cratis-technical-examples/references/csharp-package-checks.md +1 -1
  473. package/package/corpus/skills/cratis-technical-examples/references/source-and-format.md +42 -0
  474. package/package/corpus/skills/cratis-technical-examples/references/typescript-package-checks.md +2 -2
  475. package/package/corpus/skills/cratis-technical-examples/references/verification-scope.md +37 -0
  476. package/package/corpus/skills/cratis-ux-review/SKILL.md +8 -40
  477. package/package/corpus/skills/cratis-ux-review/references/capture-contract.md +24 -0
  478. package/package/corpus/skills/cratis-ux-review/references/checklist.md +1 -1
  479. package/package/corpus/skills/cratis-ux-review/references/report-template.md +2 -1
  480. package/package/corpus/skills/cratis-writing-voice-and-cadence/SKILL.md +19 -132
  481. package/package/corpus/skills/cratis-writing-voice-and-cadence/references/ai-tells.md +24 -97
  482. package/package/corpus/skills/cratis-writing-voice-and-cadence/references/author-and-batch.md +23 -0
  483. package/package/corpus/skills/cratis-writing-voice-and-cadence/references/documentation-evidence.md +25 -0
  484. package/package/corpus/skills/cratis-writing-voice-and-cadence/references/interpretation.md +17 -0
  485. package/package/corpus/skills/cratis-writing-voice-and-cadence/references/stock-constructions.md +23 -0
  486. package/package/corpus/skills/cratis-writing-voice-and-cadence/references/voice-guidance.md +8 -29
  487. package/package.json +1 -1
  488. /package/package/corpus/skills/cratis-chronicle-protect-decision/references/{standalone.md → csharp-standalone.md} +0 -0
  489. /package/package/corpus/skills/cratis-engineering-post-mortem/references/{examples/silent-backup-failure.md → silent-backup-failure.md} +0 -0
  490. /package/package/corpus/skills/cratis-engineering-post-mortem/references/{examples/unintended-release-regression.md → unintended-release-regression.md} +0 -0
@@ -4,320 +4,12 @@ paths:
4
4
  - "**/*.cs"
5
5
  ---
6
6
 
7
+ # C# conventions
7
8
 
8
- # C# Conventions
9
+ Apply the repository's `.editorconfig` and analyzers. Use **cratis-engineering-csharp-conventions** for style, naming, XML docs, logging, outcomes and DI. Treat `CRARCH` diagnostics as conventions to satisfy, not suppress. Use the SDK and language version configured by the repository.
9
10
 
10
- Favor records, primary constructors, pattern matching and file-scoped namespaces. Where installed, consult `efcore` for Arc EF storage, `reactors` for after-commit effects and `orleans` for grains or silo hosting, regardless of filename.
11
-
12
- ## Building
13
-
14
- - Use `dotnet build` from the command line.
15
- - Follow `.editorconfig`; run `dotnet format` only when CI requires it.
16
- - Run affected spec executables; use `dotnet test <project> --no-build` only for VSTest (see `specs.csharp.md`).
17
-
18
- ## Formatting
19
-
20
- - Apply code-formatting style defined in `.editorconfig`.
21
- - Use file-scoped namespace declarations — one less level of indentation for the entire file.
22
- - Use single-line `using` directives, sorted alphabetically.
23
- - Never qualify a type that is already unambiguously in scope via a `using` directive. When two `using` directives introduce conflicting type names, qualify only the conflicting occurrences using the shortest unambiguous path (e.g. `Concepts.Events.Foo` or `Contracts.Events.Foo`) — do not add `using` aliases for every conflicting type.
24
- - Insert a blank line before the opening `{` of every code block (`if`, `for`, `foreach`, `try`, `using`, etc.).
25
- - Ensure the final `return` statement of a method is on its own line.
26
- - Use pattern matching and switch expressions wherever possible — they are more readable and the compiler verifies exhaustiveness.
27
- - Use `nameof` instead of string literals — it survives refactoring.
28
- - Place private class declarations at the bottom of the file — public API first, implementation details last.
29
-
30
- ## Language — American English Only
31
-
32
- All identifiers, comments, XML docs, and string literals must use **American English** spelling (initialize, serialize, behavior, color, organization, center, modeling, dialog, license, judgment, gray).
33
-
34
- ## Naming
35
-
36
- - PascalCase for type names, method names, and public members.
37
- - camelCase for private fields and local variables.
38
- - Prefix private fields with `_` (e.g. `_myField`).
39
- - Prefix interface names with `I` (e.g. `IMyService`).
40
-
41
- ## Code Style
42
-
43
- - Prefer `var` over explicit types — the right side of the assignment already tells you the type.
44
- - Use expression-bodied members for simple methods and properties.
45
- - Favor primary constructors for all types — they eliminate field declarations for injected dependencies.
46
- - Use string interpolation instead of `string.Format()` or concatenation.
47
- - Favor collection initializers and object initializers.
48
- - Use `IEnumerable<T>` for collections that are not modified; never return mutable collections from public APIs.
49
- - Prefer LINQ (`.Where`, `.Any`, `.Select`, `.FirstOrDefault`) over a `foreach` that filters inside its body with an `if`/`continue` or an early `return` — put the filter in the query so the intent is explicit (`items.Where(predicate)`, `return items.Any(predicate);`). Reserve `foreach` for genuine iteration with side effects. (Filtering inside a loop is what the analyzers flag as a "missed opportunity to use Where".)
50
- - Don't use regions — they hide code instead of organizing it. If a file needs regions, it needs refactoring.
51
- - Never add postfixes like `Async`, `Impl`, `Service` to class names — they add noise without information.
52
- - Name a method without the `Async` suffix unless a synchronous method of the same name also exists, never write an explicit `private` modifier (property setters excepted), and never put a `.Features.` segment in a namespace.
53
- - The `Cratis.Architecture.CodeAnalysis` analyzer package (26 diagnostics, `CRARCH0001`–`CRARCH0026`, in 1.0.2) enforces these and others: `CRARCH0003` postfixes, `0004` `.Features.` namespaces, `0005` regions, `0006`/`0024` `LoggerMessage`, `0007` `IServiceProvider` injection, `0008` `is null`, `0017` namespace matches folder, `0019` `Async` suffix, `0022` explicit `private`, `0023` typed logger category; `0012` (`async void`) and `0014` (test types in production) are errors. When a repository has the package, a `CRARCH` warning is the house convention, not noise.
54
- - For types with no implementation body, omit the braces (e.g. `public interface IMyInterface;`).
55
- - Prefer `record` types for immutable data structures (events, commands, read models, concepts) — they give you value equality, immutability, and concise syntax for free.
56
- - Use the language features the repository's SDK and `LangVersion` support.
57
- - Keep `ConceptAs<T>` and the existing result envelopes unchanged.
58
- - Keep IDE style rule severities at `suggestion`, never `warning`: Release builds treat warnings as errors.
59
-
60
- ## Nullable Reference Types
61
-
62
- - Use `is null` / `is not null` — never `== null` / `!= null`.
63
- - Trust the C# null annotations; don't add defensive null checks when the type system guarantees a value.
64
- - Add `!` operator where nullability warnings occur and you are certain the value is non-null.
65
- - Use `is not null` checks before dereferencing potentially null values.
66
-
67
- ## XML Documentation
68
-
69
- XML doc comments are the public API's first impression. They must be multiline — never cram `<summary>` onto a single line. Every public type, method, property, and operator must have XML docs.
70
-
71
- - Always use **multiline** `<summary>` tags — opening and closing tags on their own lines:
72
-
73
- ```csharp
74
- /// <summary>
75
- /// Represents the unique identifier of a project.
76
- /// </summary>
77
- ```
78
-
79
- - **Never** use single-line summaries:
80
-
81
- ```csharp
82
- // ❌ Wrong
83
- /// <summary>Represents the unique identifier of a project.</summary>
84
- ```
85
-
86
- - Every method or operator with parameters **must** include `<param name="...">` for each parameter.
87
- - Every method or operator that returns a value (non-void) **must** include `<returns>`.
88
- - Every method that throws must document the exception with `<exception cref="...">` tags.
89
- - Use `<see cref="..."/>` and `<paramref name="..."/>` to cross-reference types and parameters.
90
- - Keep summaries concise and purposeful — only document when it adds understanding beyond the name itself.
91
-
92
- Example:
93
-
94
- ```csharp
95
- /// <summary>
96
- /// Represents an instance of <see cref="ICommandFilters"/>.
97
- /// </summary>
98
- /// <param name="filters">The collection of <see cref="ICommandFilter"/> to use for filtering commands.</param>
99
- [Singleton]
100
- public class CommandFilters(IInstancesOf<ICommandFilter> filters) : ICommandFilters
101
- {
102
- /// <summary>
103
- /// Filters the command execution through all registered command filters.
104
- /// </summary>
105
- /// <param name="context">The <see cref="CommandContext"/> to filter.</param>
106
- /// <returns>A <see cref="CommandResult"/> representing the aggregated filter outcome.</returns>
107
- public async Task<CommandResult> OnExecution(CommandContext context)
108
- {
109
- // ...
110
- }
111
- }
112
- ```
113
-
114
- ## Exceptions
115
-
116
- Every exception type in the codebase should communicate *what went wrong* in domain terms. Built-in types like `InvalidOperationException` tell you nothing about the problem — a custom `AuthorAlreadyRegistered` tells you everything.
117
-
118
- - **Exceptions are for exceptional, unrecoverable state only — never for control flow.** "Unrecoverable" means the caller has no correct next step to take other than to stop: a violated invariant, a bug, a dependency that is simply gone. If a caller is expected to `catch` a specific type and then do something sensible and ordinary in response — retry, record an impediment, try a different branch, return a different response to a user — that outcome is not exceptional, it is a normal result of the operation, and it belongs in the method's return type, not in its throw list.
119
- - **The tell: a caller-side `catch` block whose body is not "log and rethrow" or "crash louder".** A `catch (SomeException)` that goes on to do real application work — write a different event, set a different HTTP status, schedule a retry, record why something didn't happen — is exception-driven flow control wearing a `try`/`catch` costume. This applies even when the exception type is well-named and richly documented; a beautifully named exception thrown for an anticipated, recoverable outcome is still the wrong tool.
120
- - **Wrong** — `IWorkerRuntime.Start` throwing `WorkerIsAlreadyRunning`/`WorkerIsStillGoingAway`/`WorkerLaunchWasRefused` for three entirely anticipated outcomes of trying to launch a worker, with the caller structured as one `try` and three `catch` blocks each doing real, different application work (recording a specific impediment, deciding whether to keep the callback token):
121
-
122
- ```csharp
123
- try
124
- {
125
- await workerRuntime.Start(job, cancellationToken);
126
- }
127
- catch (WorkerIsStillGoingAway stillGoingAway)
128
- {
129
- await commandPipeline.Execute(new RecordDispatchImpediment(work.Id, "The previous worker is still shutting down"));
130
- return false;
131
- }
132
- catch (WorkerIsAlreadyRunning alreadyRunning)
133
- {
134
- await commandPipeline.Execute(new RecordDispatchImpediment(work.Id, "A worker for this work is already running"));
135
- return false;
136
- }
137
- ```
138
-
139
- - **Right** — a `Cratis.Monads` return type naming every real outcome, so the compiler forces every caller to handle each one and nothing is discoverable only by reading a `<exception>` tag or by triggering it at runtime:
140
-
141
- ```csharp
142
- public enum WorkerLaunchOutcome { Started, StillGoingAway, AlreadyRunning, RefusedByCluster }
143
-
144
- Task<Result<WorkerLaunchOutcome, ClusterFailure>> Start(WorkerJob job, CancellationToken cancellationToken = default);
145
-
146
- // caller:
147
- var outcome = await workerRuntime.Start(job, cancellationToken);
148
- if (!outcome.TryGetResult(out var launched))
149
- {
150
- // genuinely exceptional - the cluster itself failed in a way retry logic doesn't cover
151
- throw new WorkerLaunchIrrecoverablyFailed(work.Id, outcome);
152
- }
153
-
154
- var impediment = launched switch
155
- {
156
- WorkerLaunchOutcome.StillGoingAway => "The previous worker is still shutting down",
157
- WorkerLaunchOutcome.AlreadyRunning => "A worker for this work is already running",
158
- _ => null
159
- };
160
- if (impediment is not null)
161
- {
162
- await commandPipeline.Execute(new RecordDispatchImpediment(work.Id, impediment));
163
- return false;
164
- }
165
- ```
166
-
167
- A single-outcome case uses `Result<TResult, TError>` directly rather than an enum; `Option<TValue>` is the equivalent for "a value, or nothing" with no error to describe. Reach for these from `Cratis.Monads` before reaching for a custom exception type whenever the "failure" is something a caller is meant to branch on rather than merely propagate.
168
- - Always create a custom exception type that derives from `Exception`.
169
- - Never use built-in exception types (`InvalidOperationException`, `ArgumentException`, etc.).
170
- - Never suffix exception class names with `Exception` — `AuthorNotFound` reads better than `AuthorNotFoundException`.
171
- - Always provide a meaningful message when throwing.
172
- - Add XML doc on the exception type starting with "The exception that is thrown when ...".
173
- - Never write an empty or silently-swallowing `catch` block. Handle the exception, log it, or let it propagate. When ignoring is genuinely correct, use an exception filter (`catch (SomeException) when (…)`) with a body that states the decision (a comment and/or a fallback) — never a bare `catch { }`.
174
-
175
- ## Dependency Injection
176
-
177
- The framework discovers and wires dependencies by convention. Explicit registration is the exception, not the rule.
178
-
179
- - Prefer constructor injection; avoid `IServiceProvider` directly (service locator anti-pattern).
180
- - For singletons, use the `[Singleton]` attribute — no explicit registration needed.
181
- - Systems with a convention of `IFoo → Foo` do not need to be registered explicitly.
182
- - Command/query `Handle()` method parameters are automatically resolved from DI by type.
183
-
184
- ### Service lifetimes — anything taking a scoped dependency is scoped or transient, never a singleton
185
-
186
- **The rule, before any of the reasoning:**
187
-
188
- > **A type that takes a scoped dependency is itself scoped or transient. If you are reaching for `[Singleton]` on something that needs the event store, a database, or a read model, the answer is to not make it a singleton.**
189
-
190
- `[Singleton]` is the exception, not the default. It is for what is genuinely process-wide *and* holds nothing belonging to a tenant, a user, or a request. Everything else takes the convention (transient) or `[Scoped]`, and inherits the resolving scope — and therefore the right tenant — for free.
191
-
192
- **Assume every application you build is multi-tenant.** Not "design for it later" — assume it now, even when the deployment ships with a single tenant and no tenant resolution configured. A single-tenant application is a multi-tenant one with one tenant in it, and the code shape that serves both is the same shape. The code shape that serves only one has to be found and rewritten later, from the far side of a data migration, under production. The same reasoning applies to the signed-in user: an application always has one, and a service that remembers *which* one will eventually answer for the wrong person.
193
-
194
- So the rule has a second face:
195
-
196
- > **A singleton may not depend on anything that belongs to a tenant, a user, or a request.**
197
-
198
- These resolve **per scope**, and the scope is what carries the tenant — so none of them may be injected into a `[Singleton]`:
199
-
200
- | Off limits in a singleton | Why |
201
- | --- | --- |
202
- | `IEventStore` — and everything off it: `IEventLog`, `IReadModels`, `IConstraints`, `IEventTypes`, `IProjections`, `IReducers`, `IPII` | resolved for the scope's namespace |
203
- | `IMongoCollection<T>`, `IMongoDatabase`, `IMongoClient` | the database name is resolved per scope from the current tenant |
204
- | An EF Core `DbContext` | scoped for the same reason, plus it is not thread-safe |
205
- | A read model injected directly by key | same scope, same binding |
206
- | Any held tenant, principal, claims, correlation id, or `HttpContext` **value** | belongs to one request and outlives it in a singleton |
207
-
208
- A `[Singleton]` taking one of these is a **captive dependency**: the container hands it the *root* scope's instance and keeps it for process lifetime. The root scope has no request, so it resolves no tenant — every read and write goes to the default namespace forever, regardless of who is asking.
209
-
210
- **It does not throw. It returns nothing.** A query against the wrong namespace hits a database that exists and is empty, so the caller gets an empty collection, a `null` read model, or a default-valued options object, and carries on. The application starts, the pages render, the build is green, and the configuration a tenant spent an afternoon entering is simply not there. It is also invisible while there is only one tenant — every symptom appears on the day a second one arrives.
211
-
212
- **What to do instead — in this order.**
213
-
214
- **1. Drop `[Singleton]`.** This is the answer almost every time. Delete the attribute and let the type be transient by convention, or mark it `[Scoped]` when one request should share one instance. Nothing else changes: the constructor keeps the collaborator it wanted, and now gets the caller's tenant instead of the root scope's.
215
-
216
- ```csharp
217
- // ❌ Wrong — IEventStore is scoped; this captures the root scope's default namespace forever.
218
- [Singleton]
219
- public class DigestSources(IEventStore eventStore) : IDigestSources
220
- {
221
- public Task<DigestConfiguration?> GetCurrent() =>
222
- eventStore.ReadModels.GetInstanceById<DigestConfiguration>(DigestId.Default);
223
- }
224
-
225
- // ✅ Right — no attribute at all. Transient by convention, so it resolves in the caller's scope
226
- // and reads that caller's tenant. There was never a reason for this to be process-wide.
227
- public class DigestSources(IEventStore eventStore) : IDigestSources
228
- {
229
- public Task<DigestConfiguration?> GetCurrent() =>
230
- eventStore.ReadModels.GetInstanceById<DigestConfiguration>(DigestId.Default);
231
- }
232
- ```
233
-
234
- **2. Only when the lifetime is forced on you, open a scope per unit of work.** A hosted service or `BackgroundService` is resolved once by the host, so it *is* a singleton whether or not you asked — and it runs with no request to inherit a scope from. That, and only that, is what `IServiceScopeFactory` is for:
235
-
236
- ```csharp
237
- // ✅ Right for a hosted service — a scope per unit of work, so collaborators bind to a real scope.
238
- public class DigestDispatcher(IServiceScopeFactory scopeFactory) : BackgroundService
239
- {
240
- protected override async Task ExecuteAsync(CancellationToken cancellationToken)
241
- {
242
- while (!cancellationToken.IsCancellationRequested)
243
- {
244
- using var scope = scopeFactory.CreateScope();
245
- var eventStore = scope.ServiceProvider.GetRequiredService<IEventStore>();
246
- await Dispatch(eventStore, cancellationToken);
247
- }
248
- }
249
- }
250
- ```
251
-
252
- ⚠️ **`IServiceScopeFactory` is not a way to keep `[Singleton]` on a service that had no reason to be one.** It is more code, it hides the lifetime question behind a scope nobody asked for, and — because a scope with no request still resolves no tenant — it does not by itself make an off-request flow tenant-correct. Reaching for it first is how a codebase ends up with dozens of these — a sweep of a real application found several dozen singletons holding a scoped service, not one of which needed to be a singleton at all. If the type is not the host's own, the fix is the attribute, not the factory.
253
-
254
- `IChronicleClient` **is** singleton-safe, and is the right collaborator when a flow knows which namespace it means and has no scope to resolve one from — it names the event store and namespace explicitly: `await chronicleClient.GetEventStore("MyStore", tenantId.Value)`. Naming the namespace is a deliberate, readable statement that this code crosses a tenant boundary; capturing a scoped service is the same crossing made by accident.
255
-
256
- **The current user is not process-wide either.** Never keep the signed-in user, their principal, claims, roles, or anything derived from them in a singleton. The distinction that matters: *the accessor is fine, the value is not.* `IHttpContextAccessor` is itself a singleton and safe to inject; reading a value out of it once and keeping it is not. A current-user service may be a singleton only when every method reads through the accessor on each call and stores nothing. Anything that derives something per user and wants to keep it holds a cache **keyed by the user**, never a single field.
257
-
258
- **Off-request work carries its tenant.** Reactors, hosted services, background dispatch and scheduled jobs run with no HTTP request, so there is nothing for a tenant resolver to read. Chronicle observers are themselves instantiated per namespace, but the collaborators they call are not — a reactor that reaches a tenant-blind singleton has left its namespace behind without saying so. Such a flow states its tenant explicitly rather than inheriting whatever the root scope happens to be.
259
-
260
- **Caching.** A process-wide cache of tenant data is the same bug wearing a performance justification. If a singleton caches, the tenant (and where relevant the user) is part of the key. The same holds for `static` fields: a `static` cache of anything tenant-scoped is shared by every tenant in the process.
261
-
262
- **Enforce it, do not remember it.** This failure is silent, so review will not reliably catch it. Two gates, and an application wants both:
263
-
264
- **Turn .NET's own scope validation on in every environment, not just Development.** `ServiceProviderOptions.ValidateScopes` rejects resolving a scoped service from the root provider, and `ValidateOnBuild` walks every registration at startup so a captive dependency fails the host immediately rather than at whichever request first happens to need it. The host enables both in Development by default and **neither outside it** — which is exactly backwards for a failure whose whole character is that it stays quiet:
265
-
266
- ```csharp
267
- builder.Host.UseDefaultServiceProvider(options =>
268
- {
269
- options.ValidateScopes = true;
270
- options.ValidateOnBuild = true;
271
- });
272
- ```
273
-
274
- Enable it on an existing codebase in this order, or it will simply refuse to start: turn it on locally first, fix everything it names, and only then let it reach the deployed environments. Turning it on *before* the sweep converts a silent multi-tenant bug into a production outage, which is a worse trade, not a braver one.
275
-
276
- **And add an architecture spec**, because validation only catches what a run actually resolves. Reflect over the assembly, find every `[Singleton]` whose constructor takes a scope-bound service, and assert the set is empty. It is a few dozen lines, it names every offender in one pass rather than one per restart, and it holds for the types no startup path touches.
277
-
278
- ### Discovering multiple implementations — use `IInstancesOf<T>`, never `IEnumerable<T>`
279
-
280
- When a type needs every implementation of an abstraction (handlers, strategies, filters, validators, formatters), inject `IInstancesOf<TInterface>` from `Cratis.Types`. The framework discovers and instantiates every implementation by convention — no `services.AddSingleton<TInterface, Impl1>()` calls anywhere.
281
-
282
- ```csharp
283
- // ❌ Wrong — requires hand-maintained registrations for every implementation.
284
- // Adding a new IReactorSideEffectHandler somewhere else in the codebase silently
285
- // does nothing until someone remembers to register it here, and dead registrations
286
- // linger after types are removed.
287
- services.AddSingleton<IReactorSideEffectHandler, EventResultHandler>();
288
- services.AddSingleton<IReactorSideEffectHandler, EventsResultHandler>();
289
- services.AddSingleton<IReactorSideEffectHandlers, ReactorSideEffectHandlers>();
290
-
291
- public class ReactorSideEffectHandlers(IEnumerable<IReactorSideEffectHandler> handlers) : IReactorSideEffectHandlers { ... }
292
-
293
- // ✅ Right — implementations discovered automatically. Mark singletons with [Singleton].
294
- [Singleton]
295
- public class EventResultHandler(IEventTypes eventTypes) : IReactorSideEffectHandler { ... }
296
-
297
- [Singleton]
298
- public class EventsResultHandler(IEventTypes eventTypes) : IReactorSideEffectHandler { ... }
299
-
300
- [Singleton]
301
- public class ReactorSideEffectHandlers(IInstancesOf<IReactorSideEffectHandler> handlers) : IReactorSideEffectHandlers { ... }
302
- ```
303
-
304
- **Rules:**
305
-
306
- - Never inject `IEnumerable<TInterface>` to enumerate implementations of an abstraction. That signature only works if every implementation is hand-registered, which defeats convention-based discovery. Use `IInstancesOf<TInterface>` instead.
307
- - Never write `services.AddSingleton<TInterface, Impl>()` or `services.AddTransient<TInterface, Impl>()` for a type that exists to be discovered. Mark the implementation with `[Singleton]` (for singletons) or rely on the `IFoo → Foo` convention (for transients) and remove the registration line.
308
- - `IInstancesOf<T>` fixes its type set at construction and resolves instances on each enumeration through the consumer's service provider (Fundamentals 7.23.0). It does not discover late-loaded implementations on access. A singleton consumer captures the root provider; it must not enumerate scoped implementations. Resolve a scoped or transient consumer inside a scope when any implementation is scoped.
309
- - `IEnumerable<T>` is still the right type to **return** from a method that yields a sequence of values. The rule applies only when the goal is to enumerate **implementations** of an abstraction.
310
-
311
- ## Logging
312
-
313
- - Use structured logging with named parameters.
314
- - Use `ILogger<T>` where `T` is the class name.
315
- - Keep log messages in a separate `<ClassName>Logging.cs` partial static internal class.
316
- - Use `[LoggerMessage]` attribute (without `eventId`).
317
-
318
- ## Async
319
-
320
- - Use `async`/`await` for asynchronous programming.
321
- - Use `Task` and `Task<T>` for asynchronous methods.
322
-
323
- Chronicle projections map same-named properties by default. Remove redundant `.AutoMap()` calls, but keep an intentional re-enable after `.NoAutoMap()`.
11
+ - Use records for immutable domain data and primary constructors for straightforward dependency injection. Prefer named result or option types for outcomes the caller must handle; do not drive expected decisions through exceptions.
12
+ - A singleton cannot capture tenant-, user-, request- or scope-bound services, including transitive and convention-discovered dependencies. Remove the singleton lifetime first. If the host forces one, open a scope per unit of work and establish the correct tenant before resolving scoped services.
13
+ - Do not conflate scope validation with eager build validation. Keep scope validation on as a project policy; Arc’s host builder only enables it in Development by default. Arc disables `ValidateOnBuild` for context-bound registrations; do not turn it on indiscriminately. Cover consequential lifetime and cross-tenant failures.
14
+ - Use `IInstancesOf<T>` for convention-discovered implementations, not for arbitrary collections or explicitly registered pipelines. It captures the discovered types when constructed and resolves implementations when enumerated; the consumer must be resolved in a suitable scope.
15
+ - Where installed, consult `efcore` for Arc EF storage, `reactors` for after-commit effects, `orleans` for grains and `specs.csharp` for the spec runner.
@@ -7,4 +7,4 @@ paths:
7
7
 
8
8
  # Dialogs
9
9
 
10
- Return focus to the modal trigger. Register fields by command property. Preserve drafts and show refusals; close only on the intended outcome. Boolean submit callbacks return true or false on every path.
10
+ Return focus to the modal trigger. Register fields by command property. Preserve drafts and show refusals; close only on the intended outcome. For Components `CommandDialog`, prefer its built-in command submission and omit `onConfirm` unless the caller needs a close decision after success. If provided, return `true` to allow closing; otherwise it stays open. See **cratis-components-submit-form** for wiring.
@@ -11,30 +11,8 @@ paths:
11
11
  - "**/src/content/**/*.mdx"
12
12
  ---
13
13
 
14
- # Writing content that people and assistants can find
14
+ # Discoverability
15
15
 
16
- Readability comes first. If a change for search engines or AI assistants makes a page harder to read, drop the change. Voice, structure and examples stay with the documentation rules `writing-cratis-docs`, `editing-cratis-docs` and `documentation-structure-and-formatting` where the `cratis/documentation` profile installs them; this rule adds only what they do not cover. Before publishing a page, post or package, use **cratis-discoverability**.
16
+ Use **cratis-discoverability** before publishing a page, post or package. Reader comprehension takes precedence over search optimization. Follow [Writing Cratis Documentation](./writing-cratis-docs.md) for prose and [Documentation Structure and Formatting](./documentation-structure-and-formatting.md) for site rules.
17
17
 
18
- ## Every page, post and README
19
-
20
- - **Define first, where a definition belongs.** Landing pages, glossary entries, READMEs and package descriptions open with one self-contained sentence: "X is a <category> for <audience> that <does>." Product index pages make the product's purpose clear near the beginning without requiring a definition as the opening sentence.
21
- - **Docs follow the `writing-cratis-docs` rule for voice and structure.** Let the reader's task and page purpose determine the opening and sequence; a concrete scenario is useful when it helps, not a required opener. Keep the self-contained definition or outcome in the frontmatter `description`, which serves search and AI. Reference entries stay terse, with introductory context only where needed to use them. That rule wins over discoverability suggestions.
22
- - **Title and description are written by hand.** Title with the distinguishing term first: 50-60 characters for blog and landing pages, 20-60 for docs and reference pages; a README H1 that is the product name is fine. Description is one sentence of 60-160 characters, never over 160, and not a copy of the title or of another page's description.
23
- - **Name things one way.** The first mention is the full name ("Cratis Chronicle"), later mentions may shorten it. Use the canonical names in the **cratis-discoverability** entity reference, and do not call the platform "Cratis.io".
24
- - **Links name their destination.** Link text says what is behind it. Outside the docs site, link docs with the absolute canonical host `https://www.cratis.io/...`, never the bare `cratis.io`.
25
- - **Images carry alt text.** Describe the content. Use an empty `alt=""` only for decoration.
26
- - **No keyword stuffing, no filler for length, no text hidden from readers.** A page is done when it is complete.
27
-
28
- ## Sites and packages
29
-
30
- - Public pages need a canonical link, one `<h1>`, Open Graph tags, valid JSON-LD that describes visible content, a sitemap entry and a `robots.txt` that allows crawling. Add no new `HowTo` or `FAQPage` markup; keep the visible Q&A.
31
- - `llms.txt` is an optional index. Never claim it improves ranking. See **cratis-llm-friendly-documentation**.
32
- - Package metadata uses `Cratis` for Authors and Company. Metadata (`Description`, `PackageProjectUrl`, `PackageTags`, npm `description`, `homepage`, `keywords`) and the README opener use the same definition sentence, and the project URL points at the docs page `https://www.cratis.io/<product>/`.
33
- - State only facts the repository supports: versions, licenses, limits. The claim gate in `BRAND.md`, `MESSAGING.md` and `SITE.md` still applies.
34
-
35
- ## Facts and publication guardrails
36
-
37
- - Each entity page has one sourced "at a glance" block: verifiable facts only, dated counts; never invent customers, user counts, benchmarks, certifications, prices or competitor comparisons.
38
- - Adoption claims count downloads per product through entry packages only, including predecessor names for a continuation; no sub-package sums or shared-dependency double counting. Round down to a stated threshold, name the month and registries, never say "users" or "customers".
39
- - Keep description and duplicate-title lint baselines at 0; never raise a baseline to pass. Preserve product names in rendered titles and enforce the site's `llms.txt` / `llms-small.txt` byte budgets.
40
- - Structured data uses only public, owner-approved founder/company facts. Community member profiles are `noindex`, with no personal data or `Person` entities in markup; this overrides the public-page indexing default above. Keep shared guidance generic: no private/unannounced integration names, legal entity details or factual counts.
18
+ Keep public content indexable unless policy says otherwise. Never publish private facts in structured data or inflate adoption, performance or customer claims. Do not weaken the site’s title/description checks or AI-index budgets to pass.
@@ -7,155 +7,9 @@ paths:
7
7
 
8
8
  # Documentation structure and formatting
9
9
 
10
- This is the authoritative rendering contract for product documentation consumed by the Astro Starlight site. For content and teaching voice, see [Writing Cratis Documentation](./writing-cratis-docs.md). For source ownership and the edit loop, see [Editing Cratis Documentation](./editing-cratis-docs.md).
10
+ For product pages synchronized into Starlight, use the **cratis-engineering-docs-authoring** site-format reference. [Editing Cratis Documentation](./editing-cratis-docs.md) owns the edit and verification loop.
11
11
 
12
- Product `.md` and `.mdx` files are copied through the Documentation repository's `web/scripts/sync-content.mjs`; the converter preserves the extension and rewrites the content before Starlight renders it.
13
-
14
- ## Frontmatter
15
-
16
- ```yaml
17
- ---
18
- title: Append an event
19
- description: Append a domain event to one event source and inspect the result.
20
- tableOfContents: false # optional per-page override
21
- sidebar:
22
- badge: { text: New, variant: tip }
23
- ---
24
- ```
25
-
26
- - Product pages should declare `title` and `description`. The title becomes the page H1; the description feeds metadata and AI-facing exports.
27
- - Preserve existing frontmatter when editing unless the task deliberately changes it. The converter preserves only `title`, `description`, `sidebar`, and `tableOfContents` from authored frontmatter; it drops DocFX keys and other Starlight keys. It generates `editUrl` separately from the owning product source path, so the page's edit action does not point to the synchronized copy. That link is the contribution path for a reader who is not set up locally: never hand-author `editUrl`, and after moving a page confirm its generated edit link still opens the file. Features such as `template`, `hero`, `banner`, `head`, `prev`, `next`, `slug`, and `draft` work only on site-level pages authored directly in the Documentation repository.
28
- - Product navigation comes from `toc.yml`, not Starlight autogeneration. `sidebar.badge` works, but `sidebar.order`, `sidebar.label`, and `sidebar.hidden` do not control product navigation.
29
- - A frontmatter-less page falls back to its first H1, but that loses the description and relies on converter inference. Do not add new pages that way.
30
-
31
- ## Headings
32
-
33
- - Do not put an H1 in the body; frontmatter supplies it.
34
- - The global “On this page” list shows H2 headings only. Organize the page around a short, flat set of `##` sections; use H3/H4 only inside them.
35
- - Use sentence case and no trailing punctuation.
36
- - Keep a real H2 when a section needs a stable URL anchor. A card or aside title is presentation, not document structure.
37
-
38
- ## Files, folders, and navigation
39
-
40
- - A navigable product folder normally has `toc.yml` plus one landing page: `<folder>/index.md[x]` or a sibling `<folder>.md[x]`.
41
- - Never keep both `<folder>.md[x]` and `<folder>/index.md[x]`. A legacy `<folder>.md` sibling makes the sync move the directory index to `/overview/`; other duplicate landing shapes can fail the build. Either outcome can orphan the intended landing page or make compatibility links point back to themselves.
42
- - A folder with neither an index nor a sibling landing has no page at its bare URL.
43
- - Product bucket names are product-specific. Read that product's `PRODUCTS[].buckets` entry in `web/scripts/sync-content.mjs`; do not assume generic “Get started / Guides / Understand / Reference” labels.
44
- - A missing built slug is dropped from the sidebar and counted as a broken toc entry. Keep that count at zero.
45
- - `toc.yml` entries with external URLs, `../`, or `/api/` are intentionally dropped. A group with one child collapses to the child link. Check the generated sidebar rather than inferring it from YAML alone.
46
- - Sync slugification lowercases path segments and removes characters outside `[a-z0-9_-]`; for example, `react.mvvm` becomes `reactmvvm`. Verify hand-authored site-absolute URLs against the built route.
47
-
48
- ## Choose Markdown or MDX
49
-
50
- Use the least powerful format that communicates the idea:
51
-
52
- - Keep `.md` for headings, prose, links, GFM tables, fenced code, Mermaid/EventModeling diagrams, images, and Starlight aside directives.
53
- - Use `.mdx` only when the page needs imported Astro components, expressions, props, or named slots. Every component costs machine readability: the Markdown mirror that assistants and "Copy Markdown" read keeps its imports and JSX. Spend that deliberately, where the component teaches better than plain Markdown.
54
- - Imports and JSX in `.md` fail silently: the import can render as visible prose and the component as an inert element. Permissive Markdown HTML allowlists can hide this mistake. A page using a component must be `.mdx`.
55
- - Do not rename a page to `.mdx` merely for a callout or diagram. Renames require checking `toc.yml`, inbound links, generated routes, and AI-facing Markdown output.
56
- - Do not add raw HTML, inline styling, scripts, or one-off visual components to decorate a product page. Reuse an established component or make an explicit reusable site change in the Documentation repository.
57
-
58
- ## Callouts and asides
59
-
60
- The complete Starlight directive set is `note`, `tip`, `caution`, and `danger`. These work in both `.md` and `.mdx` and support a custom title:
61
-
62
- ```markdown
63
- :::caution[Do not use a raw Guid as the event source id]
64
- Chronicle treats a raw `Guid` as an ordinary response value.
65
- :::
66
- ```
67
-
68
- | Variant | Meaning |
69
- |---|---|
70
- | `note` | Neutral context or an important clarification |
71
- | `tip` | A recommendation or easier path |
72
- | `caution` | A likely mistake, compatibility trap, or behavior that produces the wrong result |
73
- | `danger` | Destructive, security-sensitive, or data-loss consequences |
74
-
75
- The set is closed. Do not use `warning`, `important`, `info`, or `success`: an unknown container directive silently renders as an unstyled `<div>` rather than failing the build.
76
-
77
- Legacy DocFX alerts are converted as follows; prefer titled native directives when editing the surrounding content:
78
-
79
- | DocFX | Starlight |
80
- |---|---|
81
- | `> [!NOTE]` / `> [!IMPORTANT]` | `:::note` |
82
- | `> [!TIP]` | `:::tip` |
83
- | `> [!WARNING]` | `:::caution` |
84
- | `> [!CAUTION]` | `:::danger` |
85
-
86
- In MDX, `<Aside type="tip" title="A specific title">…</Aside>` is available when component composition requires it. Directive asides can also take a Starlight icon attribute, but verify the icon name first; a bad aside icon fails the build.
87
-
88
- ## Code blocks
89
-
90
- - Always tag the language: `csharp`, `tsx`, `typescript`, `bash`, `yaml`, and so on.
91
- - Expressive Code supports useful metadata such as ``title="Program.cs"`` and line/text markers. Use them to orient the reader or focus a diff, not to decorate every snippet.
92
- - DocFX-era aliases include `env`, `pdl`, `ebnf`, `pql`, `gitignore`, `flow`, and `screenplay`; use a real language where one exists.
93
- - Dedent snippets to column zero while preserving their internal indentation.
94
- - Show both sides of a full-stack contract, but do not automatically hide sequential C#→generated-TypeScript explanations behind tabs. Use `FullStackTabs` only when the snippets are alternatives that remain understandable independently.
95
- - The converter's DocFX-alert and link rewriting is not fully code-fence-aware. Literal `> [!NOTE]`, Markdown-link targets, or `href="…"` examples can be rewritten; inspect the synced output when documenting those syntaxes.
96
-
97
- ## Tables, images, links, and diagrams
98
-
99
- - Use GFM tables with a separator row and a blank line before the table. `remarkGfm` in the Documentation site's Astro config is load-bearing for `.mdx`; raw pipe text in a rendered page indicates that integration is missing or degraded.
100
- - Keep images beside the source page, use meaningful alt text, and rely on the site's click-to-zoom behavior.
101
- - In product source, relative links to files keep their real `.md` or `.mdx` extension. The converter strips either extension for the public route. Directory URLs end in `/`.
102
- - Site-level MDX uses clean root-relative routes such as `/arc/backend/commands/`. Cross-product links are also root-relative: link from a CLI page to an Arc page as `[Browse your embedded event model](/arc/backend/csharp/embedded-event-model/)`. The route is the owning product's key plus the page's source path without its extension, slugified.
103
- - Do not link another product's page through `https://cratis.io/...` or a GitHub `blob/` URL. Neither is checked by the site build: the first 404s until the next publish when the target is new, and the second sends a reader to raw source instead of the page.
104
- - Named Markdown reference links are supported, but their labels are local to the page, not a cross-repository symbol registry. Define the target in the same authored page and use the owning product's verified public route:
105
-
106
- ```markdown
107
- Before running these commands, [install the Cratis CLI][cli-installation].
108
-
109
- [cli-installation]: /cli/getting-started/
110
- ```
111
-
112
- Reuse a label within that page when helpful. Do not assume another repository's reference definitions or frontmatter `uid` are imported. Verify the generated route and any heading anchor with the full site's rendered-link check.
113
- - There are no DocFX symbol links. DocFX `[text](xref:UID)` and `<xref:UID>` are converted to plain text or inline code, never to a link, and `lint-docs.mjs` reports any `xref:` left in the synced output. Link to a page route; name an API type in inline code.
114
- - A product's own link gate cannot resolve root-relative links to other products. It skips them by rule, not by product name - with linkinator, skip the local-server URLs outside `/Documentation/` (`^https?://(localhost|127\.0\.0\.1):[0-9]+/(?!Documentation/)`). A name such as `arc/` would also match a product's own `Documentation/arc/` folder and silently stop checking its internal links. The Documentation site's `check-links.mjs` verifies every rendered root-relative link against the built site.
115
- - Content published outside the site - a repository README, a package readme, pull request descriptions and release notes - is not rewritten, so it uses absolute `https://` URLs.
116
- - Link text describes the destination; `here`, `click here`, and `see documentation` are hard lint errors.
117
- - Use `mermaid` for architecture, sequence, flow, and state diagrams. Use `eventmodeling` for EventModeling diagrams. Both are pre-rendered to responsive SVG at build time.
118
-
119
- ## MDX component surface
120
-
121
- Place imports immediately after frontmatter, with a blank line before the first body content. Import only what the page uses. Starlight exports exactly `Aside`, `Badge`, `Card`, `CardGrid`, `Code`, `FileTree`, `Icon`, `LinkButton`, `LinkCard`, `Steps`, `TabItem`, and `Tabs`:
122
-
123
- ```mdx
124
- import { Aside, Steps, TabItem, Tabs } from '@astrojs/starlight/components';
125
- ```
126
-
127
- Shared Cratis components are default imports through exact `@components/<Name>.astro` paths; there is no bare `@components` barrel:
128
-
129
- ```mdx
130
- import FullStackTabs from '@components/FullStackTabs.astro';
131
- import Recap from '@components/Recap.astro';
132
- ```
133
-
134
- Common shared components include `FullStackTabs`, `OsAwareTabs`, `TopicHero`, `SimpleCard`, `StackDiagram`, `YouWillLearn`, and `Recap`. Inspect the current component and an existing page before using its props or slots; do not infer an API from the component name.
135
-
136
- Icon names must come from the installed Starlight set. Use `seti:windows`, not `windows`. Invalid icons in `Icon`, `TabItem`, `SimpleCard`, and `TopicHero` can produce an empty SVG without a build failure, so visual verification is mandatory.
137
-
138
- ## AI-facing Markdown
139
-
140
- The published `.md` mirror behind page actions such as “Copy Markdown” is copied from synchronized Markdown/MDX rather than reconstructed from rendered HTML. Synced frontmatter and converter rewrites are present, but MDX imports and JSX remain visible in that raw Markdown surface. Prefer plain Markdown unless a component creates a real teaching advantage, and inspect the emitted `.md` artifact when changing a page's authoring format. Generated AI indexes can process content separately; do not infer their exact representation from the page action.
141
-
142
- ## Verification
143
-
144
- Run the owning repository's local documentation gate first when it has one. Many product repositories expose:
145
-
146
- ```bash
147
- ./Documentation/verify-markdown.sh
148
- ```
149
-
150
- For full-fidelity rendering, use the sibling Documentation checkout:
151
-
152
- ```bash
153
- cd ../Documentation/web
154
- npm run check
155
- ```
156
-
157
- The local gate validates the authored repository in isolation. The full site check builds and syncs every available sibling product, runs site linting and rendered-link checks, and can expose unrelated sibling failures; diagnose those separately rather than silently waiving them. Some optional local tools skip when not installed, so name what actually ran.
158
-
159
- A successful build proves syntax, not presentation. For any aside, diagram, tabs, cards, or custom component change, preview the owning site and inspect light and dark screenshots using its local screenshot workflow.
160
-
161
- End every file with a single trailing newline.
12
+ - Sync derives `editUrl` and carries `sidebar` and `tableOfContents` when set. Do not assume arbitrary site frontmatter survives sync.
13
+ - Product navigation comes from `toc.yml`. Use one landing per route (`<folder>.md[x]` or `<folder>/index.md[x]`, not both). Verify generated routes and sidebar after structural changes; no broken entries.
14
+ - Prefer `.md`, including for native asides, tables and diagrams. Use `.mdx` only when a component earns its cost: the Markdown export drops imports and unsupported JSX; check that it retains the intended information. Use the actual installed public component exports; inspect props, slots and icons before authoring. Preview both themes for visual changes.
15
+ - Preserve meaningful frontmatter, paths and inbound links. Check built link targets.