@cratis/pi 8.0.1 → 8.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (486) 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/orleans.instructions.md +5 -98
  33. package/package/corpus/harnesses/copilot/instructions/profiles.instructions.md +9 -63
  34. package/package/corpus/harnesses/copilot/instructions/scripting.instructions.md +1 -1
  35. package/package/corpus/harnesses/copilot/instructions/specs.csharp.instructions.md +8 -148
  36. package/package/corpus/harnesses/copilot/instructions/specs.elixir.instructions.md +4 -37
  37. package/package/corpus/harnesses/copilot/instructions/specs.typescript.instructions.md +3 -1
  38. package/package/corpus/harnesses/copilot/instructions/storybook.instructions.md +7 -70
  39. package/package/corpus/harnesses/copilot/instructions/typescript.instructions.md +8 -98
  40. package/package/corpus/harnesses/copilot/instructions/writing-correct-examples.instructions.md +3 -47
  41. package/package/corpus/harnesses/copilot/instructions/writing-cratis-docs.instructions.md +3 -65
  42. package/package/corpus/hooks/README.md +4 -7
  43. package/package/corpus/hooks/scripts/quality-gates.json +3 -5
  44. package/package/corpus/rules/ai-distribution.md +9 -102
  45. package/package/corpus/rules/authoring-skills.md +3 -5
  46. package/package/corpus/rules/browser.md +8 -49
  47. package/package/corpus/rules/code-health-policy.txt +4 -24
  48. package/package/corpus/rules/code-health.md +1 -1
  49. package/package/corpus/rules/code-quality.csharp.md +3 -84
  50. package/package/corpus/rules/code-quality.md +6 -51
  51. package/package/corpus/rules/code-quality.typescript.md +4 -81
  52. package/package/corpus/rules/codescene.md +5 -54
  53. package/package/corpus/rules/components.md +1 -1
  54. package/package/corpus/rules/cratis-folder-is-configuration.md +5 -22
  55. package/package/corpus/rules/csharp.md +7 -315
  56. package/package/corpus/rules/dialogs.md +1 -1
  57. package/package/corpus/rules/discoverability.md +3 -25
  58. package/package/corpus/rules/documentation-structure-and-formatting.md +5 -151
  59. package/package/corpus/rules/documentation.md +5 -104
  60. package/package/corpus/rules/editing-cratis-docs.md +5 -63
  61. package/package/corpus/rules/efcore.md +8 -55
  62. package/package/corpus/rules/efcore.specs.md +3 -33
  63. package/package/corpus/rules/elixir.md +6 -79
  64. package/package/corpus/rules/exit-codes-and-wrappers.md +4 -27
  65. package/package/corpus/rules/framework-dotnet.md +4 -6
  66. package/package/corpus/rules/framework.md +0 -2
  67. package/package/corpus/rules/frontend-quality.md +0 -1
  68. package/package/corpus/rules/frontend-testing.md +1 -1
  69. package/package/corpus/rules/general.md +2 -2
  70. package/package/corpus/rules/github-actions.md +7 -138
  71. package/package/corpus/rules/glossary.md +19 -19
  72. package/package/corpus/rules/go-engineering.md +1 -4
  73. package/package/corpus/rules/go.md +2 -7
  74. package/package/corpus/rules/guards-and-fuses.md +5 -6
  75. package/package/corpus/rules/java.md +7 -129
  76. package/package/corpus/rules/kotlin.md +8 -165
  77. package/package/corpus/rules/orleans.md +5 -98
  78. package/package/corpus/rules/profiles.md +9 -63
  79. package/package/corpus/rules/scripting.md +1 -1
  80. package/package/corpus/rules/specs.csharp.md +8 -148
  81. package/package/corpus/rules/specs.elixir.md +4 -37
  82. package/package/corpus/rules/specs.typescript.md +3 -1
  83. package/package/corpus/rules/storybook.md +7 -70
  84. package/package/corpus/rules/typescript.md +8 -98
  85. package/package/corpus/rules/writing-correct-examples.md +3 -47
  86. package/package/corpus/rules/writing-cratis-docs.md +3 -65
  87. package/package/corpus/skills/cratis-application-growth/SKILL.md +7 -54
  88. package/package/corpus/skills/cratis-application-growth/references/move-and-untangle.md +49 -0
  89. package/package/corpus/skills/cratis-application-growth/references/rename-window.md +12 -14
  90. package/package/corpus/skills/cratis-application-growth/references/stages.md +2 -2
  91. package/package/corpus/skills/cratis-arc-authorize-request/SKILL.md +2 -2
  92. package/package/corpus/skills/cratis-arc-authorize-request/references/csharp.md +3 -3
  93. package/package/corpus/skills/cratis-arc-authorize-request/references/kotlin.md +2 -2
  94. package/package/corpus/skills/cratis-arc-code-analysis-typescript/SKILL.md +10 -43
  95. package/package/corpus/skills/cratis-arc-code-analysis-typescript/references/rule-fixes.md +40 -0
  96. package/package/corpus/skills/cratis-arc-connect-storage/SKILL.md +1 -1
  97. package/package/corpus/skills/cratis-arc-connect-storage/references/csharp.md +1 -1
  98. package/package/corpus/skills/cratis-arc-declare-command/references/csharp.md +4 -4
  99. package/package/corpus/skills/cratis-arc-declare-command/references/go.md +1 -1
  100. package/package/corpus/skills/cratis-arc-declare-command/references/kotlin.md +6 -7
  101. package/package/corpus/skills/cratis-arc-declare-operation/SKILL.md +2 -8
  102. package/package/corpus/skills/cratis-arc-declare-operation/references/csharp.md +1 -1
  103. package/package/corpus/skills/cratis-arc-diagnose-live-query/SKILL.md +1 -1
  104. package/package/corpus/skills/cratis-arc-diagnose-live-query/references/csharp.md +1 -1
  105. package/package/corpus/skills/cratis-arc-expose-mcp-operation/SKILL.md +6 -12
  106. package/package/corpus/skills/cratis-arc-expose-mcp-operation/references/custom-exposure-and-audit.md +4 -0
  107. package/package/corpus/skills/cratis-arc-expose-query/SKILL.md +2 -2
  108. package/package/corpus/skills/cratis-arc-expose-query/references/csharp.md +11 -4
  109. package/package/corpus/skills/cratis-arc-expose-query/references/typescript.md +1 -1
  110. package/package/corpus/skills/cratis-arc-generate-proxies/SKILL.md +2 -2
  111. package/package/corpus/skills/cratis-arc-generate-proxies/references/csharp.md +1 -1
  112. package/package/corpus/skills/cratis-arc-generate-proxies/references/go.md +19 -2
  113. package/package/corpus/skills/cratis-arc-generate-proxies/references/typescript.md +1 -1
  114. package/package/corpus/skills/cratis-arc-host-application/SKILL.md +1 -1
  115. package/package/corpus/skills/cratis-arc-host-application/references/csharp.md +1 -2
  116. package/package/corpus/skills/cratis-arc-host-application/references/elixir.md +2 -2
  117. package/package/corpus/skills/cratis-arc-host-application/references/go.md +5 -1
  118. package/package/corpus/skills/cratis-arc-host-application/references/java.md +1 -1
  119. package/package/corpus/skills/cratis-arc-host-application/references/kotlin.md +1 -1
  120. package/package/corpus/skills/cratis-arc-host-application/references/typescript.md +1 -1
  121. package/package/corpus/skills/cratis-arc-identity-and-tenancy-kotlin/SKILL.md +4 -7
  122. package/package/corpus/skills/cratis-arc-invoke-command/SKILL.md +1 -1
  123. package/package/corpus/skills/cratis-arc-invoke-command/references/csharp.md +4 -4
  124. package/package/corpus/skills/cratis-arc-invoke-command/references/typescript.md +1 -1
  125. package/package/corpus/skills/cratis-arc-isolate-tenant/SKILL.md +2 -2
  126. package/package/corpus/skills/cratis-arc-isolate-tenant/references/csharp.md +2 -2
  127. package/package/corpus/skills/cratis-arc-isolate-tenant/references/elixir.md +1 -1
  128. package/package/corpus/skills/cratis-arc-isolate-tenant/references/java.md +1 -1
  129. package/package/corpus/skills/cratis-arc-isolate-tenant/references/kotlin.md +1 -1
  130. package/package/corpus/skills/cratis-arc-isolate-tenant/references/typescript.md +4 -2
  131. package/package/corpus/skills/cratis-arc-migrate-relational-schema/SKILL.md +6 -6
  132. package/package/corpus/skills/cratis-arc-page-query/SKILL.md +3 -3
  133. package/package/corpus/skills/cratis-arc-page-query/references/csharp.md +10 -6
  134. package/package/corpus/skills/cratis-arc-page-query/references/elixir.md +2 -2
  135. package/package/corpus/skills/cratis-arc-page-query/references/java.md +1 -1
  136. package/package/corpus/skills/cratis-arc-page-query/references/kotlin.md +1 -1
  137. package/package/corpus/skills/cratis-arc-react-bind-slice/SKILL.md +2 -2
  138. package/package/corpus/skills/cratis-arc-react-bind-slice/references/csharp.md +1 -1
  139. package/package/corpus/skills/cratis-arc-react-bind-slice/references/kotlin.md +1 -1
  140. package/package/corpus/skills/cratis-arc-react-separate-view-model/SKILL.md +7 -3
  141. package/package/corpus/skills/cratis-arc-react-separate-view-model/references/react-routing-and-messaging.md +1 -1
  142. package/package/corpus/skills/cratis-arc-select-backend-sdk/SKILL.md +2 -2
  143. package/package/corpus/skills/cratis-arc-select-backend-sdk/references/elixir.md +2 -4
  144. package/package/corpus/skills/cratis-arc-select-backend-sdk/references/go.md +2 -2
  145. package/package/corpus/skills/cratis-arc-select-backend-sdk/references/java.md +1 -1
  146. package/package/corpus/skills/cratis-arc-select-backend-sdk/references/kotlin.md +2 -2
  147. package/package/corpus/skills/cratis-arc-select-backend-sdk/references/typescript.md +1 -3
  148. package/package/corpus/skills/cratis-arc-spring-data-kotlin/SKILL.md +13 -51
  149. package/package/corpus/skills/cratis-arc-spring-data-kotlin/references/read-model-naming.md +9 -1
  150. package/package/corpus/skills/cratis-arc-spring-data-kotlin/references/storage-boundaries.md +40 -0
  151. package/package/corpus/skills/cratis-arc-storage-typescript/SKILL.md +19 -64
  152. package/package/corpus/skills/cratis-arc-storage-typescript/references/drizzle.md +62 -0
  153. package/package/corpus/skills/cratis-arc-tenancy-typescript/SKILL.md +24 -55
  154. package/package/corpus/skills/cratis-arc-tenancy-typescript/references/tenant-selection.md +49 -0
  155. package/package/corpus/skills/cratis-arc-testing-kotlin/SKILL.md +13 -31
  156. package/package/corpus/skills/cratis-arc-testing-kotlin/references/jvm-scenario-variants.md +25 -0
  157. package/package/corpus/skills/cratis-arc-testing-typescript/SKILL.md +24 -62
  158. package/package/corpus/skills/cratis-arc-testing-typescript/references/hosts-and-runners.md +51 -0
  159. package/package/corpus/skills/cratis-arc-validate-command/SKILL.md +4 -4
  160. package/package/corpus/skills/cratis-arc-validate-command/references/csharp.md +10 -12
  161. package/package/corpus/skills/cratis-arc-validate-command/references/elixir.md +16 -3
  162. package/package/corpus/skills/cratis-arc-validate-command/references/go.md +19 -2
  163. package/package/corpus/skills/cratis-arc-validate-command/references/java.md +20 -7
  164. package/package/corpus/skills/cratis-arc-validate-command/references/kotlin.md +22 -2
  165. package/package/corpus/skills/cratis-arc-validate-command/references/python.md +8 -2
  166. package/package/corpus/skills/cratis-arc-validate-command/references/typescript.md +22 -2
  167. package/package/corpus/skills/cratis-arc-validation-kotlin/SKILL.md +22 -248
  168. package/package/corpus/skills/cratis-arc-validation-kotlin/references/feature-filters.md +55 -0
  169. package/package/corpus/skills/cratis-arc-validation-kotlin/references/model-validation.md +72 -0
  170. package/package/corpus/skills/cratis-arc-validation-kotlin/references/server-validators.md +86 -0
  171. package/package/corpus/skills/cratis-arc-validation-typescript/SKILL.md +27 -275
  172. package/package/corpus/skills/cratis-arc-validation-typescript/references/models-and-queries.md +63 -0
  173. package/package/corpus/skills/cratis-arc-validation-typescript/references/rules-and-checks.md +46 -0
  174. package/package/corpus/skills/cratis-arc-validation-typescript/references/server-decisions.md +114 -0
  175. package/package/corpus/skills/cratis-chronicle-cli-operations/SKILL.md +15 -255
  176. package/package/corpus/skills/cratis-chronicle-cli-operations/references/command-effects.md +13 -6
  177. package/package/corpus/skills/cratis-chronicle-cli-operations/references/inspection.md +75 -0
  178. package/package/corpus/skills/cratis-chronicle-cli-operations/references/project-tooling.md +78 -13
  179. package/package/corpus/skills/cratis-chronicle-cli-operations/references/recovery-and-comparison.md +16 -14
  180. package/package/corpus/skills/cratis-chronicle-connect-application/SKILL.md +1 -1
  181. package/package/corpus/skills/cratis-chronicle-connect-application/references/csharp.md +10 -6
  182. package/package/corpus/skills/cratis-chronicle-connect-application/references/elixir.md +1 -1
  183. package/package/corpus/skills/cratis-chronicle-constrain-append/SKILL.md +2 -2
  184. package/package/corpus/skills/cratis-chronicle-constrain-append/references/csharp.md +8 -8
  185. package/package/corpus/skills/cratis-chronicle-deploy-kernel/SKILL.md +10 -8
  186. package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/storage.md +8 -4
  187. package/package/corpus/skills/cratis-chronicle-evolve-event/SKILL.md +4 -4
  188. package/package/corpus/skills/cratis-chronicle-evolve-event/references/csharp.md +2 -2
  189. package/package/corpus/skills/cratis-chronicle-evolve-event/references/deployed-readers.md +21 -8
  190. package/package/corpus/skills/cratis-chronicle-evolve-event/references/elixir.md +1 -1
  191. package/package/corpus/skills/cratis-chronicle-inspect-observer/SKILL.md +1 -1
  192. package/package/corpus/skills/cratis-chronicle-inspect-observer/references/csharp.md +5 -7
  193. package/package/corpus/skills/cratis-chronicle-inspect-observer/references/elixir.md +3 -3
  194. package/package/corpus/skills/cratis-chronicle-mcp-inspection/SKILL.md +10 -80
  195. package/package/corpus/skills/cratis-chronicle-mcp-inspection/references/blocked-tools.md +2 -2
  196. package/package/corpus/skills/cratis-chronicle-mcp-inspection/references/deployment.md +9 -24
  197. package/package/corpus/skills/cratis-chronicle-mcp-inspection/references/observational-tools.md +10 -0
  198. package/package/corpus/skills/cratis-chronicle-project-view/SKILL.md +2 -2
  199. package/package/corpus/skills/cratis-chronicle-project-view/references/csharp.md +7 -6
  200. package/package/corpus/skills/cratis-chronicle-project-view/references/elixir.md +2 -2
  201. package/package/corpus/skills/cratis-chronicle-project-view/references/go.md +6 -0
  202. package/package/corpus/skills/cratis-chronicle-project-view/references/java.md +6 -0
  203. package/package/corpus/skills/cratis-chronicle-project-view/references/kotlin.md +6 -0
  204. package/package/corpus/skills/cratis-chronicle-project-view/references/typescript.md +11 -5
  205. package/package/corpus/skills/cratis-chronicle-protect-decision/SKILL.md +2 -2
  206. package/package/corpus/skills/cratis-chronicle-protect-decision/references/csharp.md +4 -4
  207. package/package/corpus/skills/cratis-chronicle-protect-decision/references/elixir.md +2 -2
  208. package/package/corpus/skills/cratis-chronicle-protect-decision/references/go.md +3 -1
  209. package/package/corpus/skills/cratis-chronicle-protect-personal-data/SKILL.md +1 -1
  210. package/package/corpus/skills/cratis-chronicle-protect-personal-data/references/csharp.md +1 -1
  211. package/package/corpus/skills/cratis-chronicle-publish-contract/SKILL.md +1 -1
  212. package/package/corpus/skills/cratis-chronicle-publish-contract/references/csharp.md +51 -40
  213. package/package/corpus/skills/cratis-chronicle-publish-contract/references/elixir.md +1 -1
  214. package/package/corpus/skills/cratis-chronicle-react-to-fact/SKILL.md +1 -1
  215. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/{occurrences.md → csharp-occurrences.md} +2 -2
  216. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/csharp.md +5 -6
  217. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/go.md +1 -1
  218. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/java.md +1 -1
  219. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/kotlin.md +1 -1
  220. package/package/corpus/skills/cratis-chronicle-record-event/SKILL.md +1 -1
  221. package/package/corpus/skills/cratis-chronicle-record-event/references/csharp.md +21 -19
  222. package/package/corpus/skills/cratis-chronicle-record-event/references/elixir.md +3 -3
  223. package/package/corpus/skills/cratis-chronicle-record-event/references/go.md +1 -1
  224. package/package/corpus/skills/cratis-chronicle-record-event/references/java.md +3 -4
  225. package/package/corpus/skills/cratis-chronicle-record-event/references/kotlin.md +3 -4
  226. package/package/corpus/skills/cratis-chronicle-record-event/references/typescript.md +2 -2
  227. package/package/corpus/skills/cratis-chronicle-reduce-state/SKILL.md +1 -1
  228. package/package/corpus/skills/cratis-chronicle-reduce-state/references/csharp.md +7 -2
  229. package/package/corpus/skills/cratis-chronicle-reduce-state/references/typescript.md +1 -1
  230. package/package/corpus/skills/cratis-chronicle-select-client/SKILL.md +4 -4
  231. package/package/corpus/skills/cratis-chronicle-select-client/references/csharp.md +3 -3
  232. package/package/corpus/skills/cratis-chronicle-select-client/references/elixir.md +2 -6
  233. package/package/corpus/skills/cratis-chronicle-select-client/references/go.md +2 -2
  234. package/package/corpus/skills/cratis-chronicle-select-client/references/java.md +1 -1
  235. package/package/corpus/skills/cratis-chronicle-select-client/references/kotlin.md +1 -5
  236. package/package/corpus/skills/cratis-chronicle-select-client/references/python.md +3 -3
  237. package/package/corpus/skills/cratis-chronicle-select-client/references/typescript.md +2 -2
  238. package/package/corpus/skills/cratis-chronicle-web-workbench/SKILL.md +12 -201
  239. package/package/corpus/skills/cratis-chronicle-web-workbench/references/hosting.md +67 -0
  240. package/package/corpus/skills/cratis-chronicle-web-workbench/references/operations.md +88 -0
  241. package/package/corpus/skills/cratis-ci-pipeline-performance/SKILL.md +8 -4
  242. package/package/corpus/skills/cratis-ci-pipeline-performance/references/build-once-and-shard.md +13 -11
  243. package/package/corpus/skills/cratis-ci-pipeline-performance/references/caching.md +2 -2
  244. package/package/corpus/skills/cratis-ci-pipeline-performance/references/flaky-and-hung-jobs.md +6 -4
  245. package/package/corpus/skills/cratis-ci-pipeline-performance/references/required-checks-and-path-filters.md +20 -61
  246. package/package/corpus/skills/cratis-ci-pipeline-performance/references/security-and-pinning.md +1 -1
  247. package/package/corpus/skills/cratis-cli-terminal-workbench/SKILL.md +15 -26
  248. package/package/corpus/skills/cratis-code-review/SKILL.md +7 -6
  249. package/package/corpus/skills/cratis-commits-and-pull-requests/SKILL.md +1 -1
  250. package/package/corpus/skills/cratis-commits-and-pull-requests/references/pr-description.md +1 -1
  251. package/package/corpus/skills/cratis-components-accessibility/SKILL.md +14 -206
  252. package/package/corpus/skills/cratis-components-accessibility/references/control-labels.md +29 -0
  253. package/package/corpus/skills/cratis-components-accessibility/references/focus-and-announcements.md +8 -0
  254. package/package/corpus/skills/cratis-components-build-canvas/SKILL.md +7 -7
  255. package/package/corpus/skills/cratis-components-build-canvas/references/pixi-items.md +1 -1
  256. package/package/corpus/skills/cratis-components-choose-control/SKILL.md +7 -8
  257. package/package/corpus/skills/cratis-components-choose-control/references/collections.md +2 -2
  258. package/package/corpus/skills/cratis-components-choose-control/references/inputs.md +1 -1
  259. package/package/corpus/skills/cratis-components-compose-toolbar/SKILL.md +22 -27
  260. package/package/corpus/skills/cratis-components-compose-toolbar/references/contributed-tools.md +5 -0
  261. package/package/corpus/skills/cratis-components-coordinate-feedback/SKILL.md +19 -25
  262. package/package/corpus/skills/cratis-components-display-list/SKILL.md +26 -19
  263. package/package/corpus/skills/cratis-components-display-list/references/server-query.md +3 -3
  264. package/package/corpus/skills/cratis-components-edit-schema-data/SKILL.md +15 -12
  265. package/package/corpus/skills/cratis-components-edit-schema-data/references/controlled-editor.md +3 -3
  266. package/package/corpus/skills/cratis-components-explore-data/SKILL.md +7 -7
  267. package/package/corpus/skills/cratis-components-host-chat/SKILL.md +7 -7
  268. package/package/corpus/skills/cratis-components-submit-form/SKILL.md +9 -15
  269. package/package/corpus/skills/cratis-components-submit-form/references/confirmation.md +5 -5
  270. package/package/corpus/skills/cratis-components-submit-form/references/wizard.md +3 -3
  271. package/package/corpus/skills/cratis-components-theme-application/SKILL.md +7 -51
  272. package/package/corpus/skills/cratis-components-theme-application/references/palette.md +49 -0
  273. package/package/corpus/skills/cratis-components-theme-application/references/renderer-adapters.md +4 -2
  274. package/package/corpus/skills/cratis-content-length/SKILL.md +34 -46
  275. package/package/corpus/skills/cratis-content-length/references/length-evidence.md +26 -127
  276. package/package/corpus/skills/cratis-developer-marketing/SKILL.md +15 -27
  277. package/package/corpus/skills/cratis-developer-marketing/references/measurement.md +3 -19
  278. package/package/corpus/skills/cratis-developer-marketing/references/playbook-evidence.md +29 -224
  279. package/package/corpus/skills/cratis-discoverability/SKILL.md +11 -4
  280. package/package/corpus/skills/cratis-discoverability/references/package-metadata.md +2 -2
  281. package/package/corpus/skills/cratis-documentation-writing/SKILL.md +4 -3
  282. package/package/corpus/skills/cratis-engineering-ci-gates/SKILL.md +13 -129
  283. package/package/corpus/skills/cratis-engineering-ci-gates/references/gate-operation.md +132 -0
  284. package/package/corpus/skills/cratis-engineering-consolidation-guard/SKILL.md +11 -100
  285. package/package/corpus/skills/cratis-engineering-consolidation-guard/references/ci-required-check.md +55 -40
  286. package/package/corpus/skills/cratis-engineering-consolidation-guard/references/source-verification.md +68 -0
  287. package/package/corpus/skills/cratis-engineering-consolidation-guard/references/verification-details.md +38 -0
  288. package/package/corpus/skills/cratis-engineering-csharp-conventions/SKILL.md +14 -65
  289. package/package/corpus/skills/cratis-engineering-csharp-conventions/references/exceptions-logging-and-di.md +40 -174
  290. package/package/corpus/skills/cratis-engineering-decision-record/SKILL.md +8 -52
  291. package/package/corpus/skills/cratis-engineering-decision-record/references/decision-pitfalls.md +29 -0
  292. package/package/corpus/skills/cratis-engineering-decision-record/references/decision-scope.md +20 -0
  293. package/package/corpus/skills/cratis-engineering-decision-record/references/record-format.md +3 -4
  294. package/package/corpus/skills/cratis-engineering-docs-authoring/SKILL.md +7 -12
  295. package/package/corpus/skills/cratis-engineering-docs-authoring/references/site-format.md +5 -4
  296. package/package/corpus/skills/cratis-engineering-effect-boundaries/SKILL.md +6 -40
  297. package/package/corpus/skills/cratis-engineering-effect-boundaries/references/failure-archetypes.md +18 -151
  298. package/package/corpus/skills/cratis-engineering-inherited-work/SKILL.md +5 -21
  299. package/package/corpus/skills/cratis-engineering-inherited-work/references/continue-inherited-work.md +19 -0
  300. package/package/corpus/skills/cratis-engineering-issue-design-note/SKILL.md +3 -66
  301. package/package/corpus/skills/cratis-engineering-issue-design-note/references/design-note-format.md +68 -0
  302. package/package/corpus/skills/cratis-engineering-issue-hygiene/SKILL.md +2 -84
  303. package/package/corpus/skills/cratis-engineering-issue-hygiene/references/issue-disposition.md +87 -0
  304. package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/SKILL.md +15 -263
  305. package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/dependency-map.md +3 -3
  306. package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/docker-images.md +28 -6
  307. package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/dotnet-nuget.md +18 -14
  308. package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/helper-runbook.md +231 -0
  309. package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/other-environments.md +2 -3
  310. package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/worked-examples.md +62 -77
  311. package/package/corpus/skills/cratis-engineering-post-mortem/SKILL.md +6 -39
  312. package/package/corpus/skills/cratis-engineering-post-mortem/references/proportionate-follow-up.md +36 -0
  313. package/package/corpus/skills/cratis-engineering-regression-cluster/SKILL.md +4 -4
  314. package/package/corpus/skills/cratis-engineering-release-trains/SKILL.md +8 -134
  315. package/package/corpus/skills/cratis-engineering-release-trains/references/candidate-assembly.md +139 -0
  316. package/package/corpus/skills/cratis-engineering-review-rounds/SKILL.md +3 -100
  317. package/package/corpus/skills/cratis-engineering-review-rounds/references/round-handoffs.md +109 -0
  318. package/package/corpus/skills/cratis-environments-and-secrets/SKILL.md +1 -5
  319. package/package/corpus/skills/cratis-environments-and-secrets/references/environment-file.md +1 -3
  320. package/package/corpus/skills/cratis-event-model-diagram/SKILL.md +11 -116
  321. package/package/corpus/skills/cratis-event-model-diagram/references/frame-patterns.md +93 -0
  322. package/package/corpus/skills/cratis-fundamentals-concept-go/SKILL.md +4 -15
  323. package/package/corpus/skills/cratis-fundamentals-name-value/SKILL.md +8 -8
  324. package/package/corpus/skills/cratis-fundamentals-name-value/references/csharp.md +4 -4
  325. package/package/corpus/skills/cratis-fundamentals-name-value/references/elixir.md +1 -1
  326. package/package/corpus/skills/cratis-fundamentals-name-value/references/go.md +1 -1
  327. package/package/corpus/skills/cratis-fundamentals-name-value/references/java.md +5 -5
  328. package/package/corpus/skills/cratis-fundamentals-name-value/references/kotlin.md +15 -2
  329. package/package/corpus/skills/cratis-fundamentals-name-value/references/python.md +1 -1
  330. package/package/corpus/skills/cratis-fundamentals-name-value/references/typescript.md +1 -1
  331. package/package/corpus/skills/cratis-fundamentals-telemetry/SKILL.md +10 -27
  332. package/package/corpus/skills/cratis-fundamentals-telemetry/references/otlp-export.md +16 -0
  333. package/package/corpus/skills/cratis-fundamentals-type-discovery/SKILL.md +26 -188
  334. package/package/corpus/skills/cratis-fundamentals-type-discovery/references/diagnostics.md +14 -0
  335. package/package/corpus/skills/cratis-governed-release-methodology/SKILL.md +7 -5
  336. package/package/corpus/skills/cratis-lens-browser-extension/SKILL.md +23 -157
  337. package/package/corpus/skills/cratis-lens-browser-extension/references/troubleshooting.md +139 -0
  338. package/package/corpus/skills/cratis-llm-friendly-documentation/SKILL.md +7 -5
  339. package/package/corpus/skills/cratis-modeling-design-event-model/SKILL.md +2 -4
  340. package/package/corpus/skills/cratis-modeling-design-event-model/references/model-first.md +7 -0
  341. package/package/corpus/skills/cratis-modeling-discover-timeline/SKILL.md +2 -2
  342. package/package/corpus/skills/cratis-modeling-discover-timeline/references/group-and-document-intake.md +1 -1
  343. package/package/corpus/skills/cratis-modeling-review-event-model/SKILL.md +2 -2
  344. package/package/corpus/skills/cratis-modeling-review-event-model/references/implementation-findings.md +2 -2
  345. package/package/corpus/skills/cratis-modeling-trace-existing-behavior/SKILL.md +5 -23
  346. package/package/corpus/skills/cratis-modeling-trace-existing-behavior/references/compare-evidence.md +20 -0
  347. package/package/corpus/skills/cratis-modeling-trace-existing-behavior/references/recovery-inputs.md +3 -3
  348. package/package/corpus/skills/cratis-multi-service-local-orchestration/SKILL.md +8 -63
  349. package/package/corpus/skills/cratis-multi-service-local-orchestration/references/aspire.md +52 -0
  350. package/package/corpus/skills/cratis-observability/SKILL.md +1 -1
  351. package/package/corpus/skills/cratis-observability/references/arc-and-chronicle-signals.md +9 -23
  352. package/package/corpus/skills/cratis-observability/references/chronicle-kernel-export.md +3 -14
  353. package/package/corpus/skills/cratis-observability/references/csharp.md +4 -6
  354. package/package/corpus/skills/cratis-observability/references/elixir.md +1 -1
  355. package/package/corpus/skills/cratis-observability/references/troubleshooting.md +4 -5
  356. package/package/corpus/skills/cratis-onboarding-runtime/SKILL.md +1 -4
  357. package/package/corpus/skills/cratis-onboarding-runtime/references/default-offering.md +0 -3
  358. package/package/corpus/skills/cratis-onboarding-runtime/references/sign-up-review.md +0 -4
  359. package/package/corpus/skills/cratis-orchestration-lanes/SKILL.md +7 -49
  360. package/package/corpus/skills/cratis-orchestration-lanes/references/escalation.md +22 -0
  361. package/package/corpus/skills/cratis-orchestration-lanes/references/inbox-and-handover.md +4 -4
  362. package/package/corpus/skills/cratis-orchestration-lanes/references/placeholders.md +1 -1
  363. package/package/corpus/skills/cratis-orchestration-lanes/references/roles.md +12 -0
  364. package/package/corpus/skills/cratis-orchestration-lanes/references/roll-call.md +12 -0
  365. package/package/corpus/skills/cratis-orchestration-lanes/references/worktrees.md +10 -0
  366. package/package/corpus/skills/cratis-orchestration-merge-gates/SKILL.md +14 -13
  367. package/package/corpus/skills/cratis-orchestration-merge-gates/references/merge-queue.md +51 -26
  368. package/package/corpus/skills/cratis-orchestration-merge-gates/references/unattended-guards.md +8 -14
  369. package/package/corpus/skills/cratis-orleans-jobs/SKILL.md +9 -65
  370. package/package/corpus/skills/cratis-orleans-jobs/references/activation-callbacks.md +5 -0
  371. package/package/corpus/skills/cratis-orleans-jobs/references/lifecycle-and-placement.md +11 -7
  372. package/package/corpus/skills/cratis-orleans-jobs/references/state-machines.md +1 -1
  373. package/package/corpus/skills/cratis-orleans-jobs/references/step-planning.md +27 -0
  374. package/package/corpus/skills/cratis-orleans-jobs/references/storage-and-options.md +35 -0
  375. package/package/corpus/skills/cratis-performance-review/SKILL.md +6 -76
  376. package/package/corpus/skills/cratis-performance-review/references/review-checklist.md +79 -0
  377. package/package/corpus/skills/cratis-platform-configure-environment/SKILL.md +19 -16
  378. package/package/corpus/skills/cratis-platform-contribute-change/SKILL.md +2 -2
  379. package/package/corpus/skills/cratis-platform-deliver-slice/SKILL.md +5 -5
  380. package/package/corpus/skills/cratis-platform-deliver-slice/references/coordinate-slices.md +1 -1
  381. package/package/corpus/skills/cratis-platform-diagnose-slice/SKILL.md +2 -3
  382. package/package/corpus/skills/cratis-platform-prepare-release-pr/SKILL.md +2 -2
  383. package/package/corpus/skills/cratis-platform-start-application/SKILL.md +10 -8
  384. package/package/corpus/skills/cratis-platform-start-application/references/csharp.md +6 -6
  385. package/package/corpus/skills/cratis-platform-start-application/references/java.md +4 -4
  386. package/package/corpus/skills/cratis-platform-start-application/references/kotlin.md +4 -4
  387. package/package/corpus/skills/cratis-platform-verify-service-handoff/SKILL.md +3 -3
  388. package/package/corpus/skills/cratis-release-notes/SKILL.md +9 -133
  389. package/package/corpus/skills/cratis-release-notes/references/channel-guidance.md +59 -0
  390. package/package/corpus/skills/cratis-release-notes/references/publish-repair.md +64 -0
  391. package/package/corpus/skills/cratis-rtk/SKILL.md +12 -18
  392. package/package/corpus/skills/cratis-screenplay-accept-model/SKILL.md +3 -3
  393. package/package/corpus/skills/cratis-screenplay-accept-model/references/capability-consumption.md +1 -1
  394. package/package/corpus/skills/cratis-screenplay-accept-model/references/coverage-obligations.md +1 -1
  395. package/package/corpus/skills/cratis-screenplay-authentication-and-onboarding/SKILL.md +25 -59
  396. package/package/corpus/skills/cratis-screenplay-authentication-and-onboarding/references/onboarding-directives.md +11 -10
  397. package/package/corpus/skills/cratis-screenplay-author-extension/SKILL.md +9 -6
  398. package/package/corpus/skills/cratis-screenplay-author-extension/references/consume.md +3 -3
  399. package/package/corpus/skills/cratis-screenplay-author-extension/references/stage-candidate.md +8 -0
  400. package/package/corpus/skills/cratis-screenplay-availability/SKILL.md +20 -167
  401. package/package/corpus/skills/cratis-screenplay-availability/references/complete-example.md +23 -47
  402. package/package/corpus/skills/cratis-screenplay-availability/references/review-checks.md +9 -10
  403. package/package/corpus/skills/cratis-screenplay-availability/references/runtime-ownership.md +26 -23
  404. package/package/corpus/skills/cratis-screenplay-declare-slice/SKILL.md +6 -14
  405. package/package/corpus/skills/cratis-screenplay-declare-slice/references/projection-replay.md +2 -2
  406. package/package/corpus/skills/cratis-screenplay-declare-slice/references/read-identity.md +1 -1
  407. package/package/corpus/skills/cratis-screenplay-edit-workspace/SKILL.md +7 -9
  408. package/package/corpus/skills/cratis-screenplay-edit-workspace/references/model-notes.md +1 -1
  409. package/package/corpus/skills/cratis-screenplay-handoff-slice/SKILL.md +10 -14
  410. package/package/corpus/skills/cratis-screenplay-model-automation/SKILL.md +1 -1
  411. package/package/corpus/skills/cratis-screenplay-model-automation/references/reaction-boundaries.md +1 -1
  412. package/package/corpus/skills/cratis-screenplay-model-interaction/SKILL.md +6 -31
  413. package/package/corpus/skills/cratis-screenplay-model-interaction/references/shell-and-data.md +22 -0
  414. package/package/corpus/skills/cratis-screenplay-model-translation/SKILL.md +5 -5
  415. package/package/corpus/skills/cratis-screenplay-onboard-workspace/SKILL.md +5 -5
  416. package/package/corpus/skills/cratis-screenplay-onboard-workspace/references/version-migration.md +4 -4
  417. package/package/corpus/skills/cratis-screenplay-recover-intent/SKILL.md +2 -2
  418. package/package/corpus/skills/cratis-screenplay-recover-intent/references/csharp.md +2 -2
  419. package/package/corpus/skills/cratis-screenplay-recover-intent/references/ground-truth-benchmark.md +1 -1
  420. package/package/corpus/skills/cratis-screenplay-specify-outcome/SKILL.md +4 -75
  421. package/package/corpus/skills/cratis-screenplay-specify-outcome/references/host-body-execution.md +0 -2
  422. package/package/corpus/skills/cratis-screenplay-specify-outcome/references/observable-result.md +85 -1
  423. package/package/corpus/skills/cratis-screenplay-specify-outcome/references/query-rejections.md +1 -1
  424. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +15 -133
  425. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/boundaries.md +5 -5
  426. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/chronicle-boundaries.md +4 -12
  427. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/consistency-and-concurrency.md +28 -57
  428. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/evolution-example.md +4 -5
  429. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/evolution.md +13 -20
  430. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/multi-service-models.md +1 -1
  431. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/neighbouring-skills.md +1 -1
  432. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/read-model-keys.md +3 -5
  433. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/stream-id-rules.md +2 -0
  434. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/stream-patterns.md +5 -5
  435. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/streams-example.md +82 -71
  436. package/package/corpus/skills/cratis-security-review/SKILL.md +4 -73
  437. package/package/corpus/skills/cratis-security-review/references/arc-boundaries.md +24 -13
  438. package/package/corpus/skills/cratis-security-review/references/review-checklist.md +74 -0
  439. package/package/corpus/skills/cratis-session-handoff/SKILL.md +7 -32
  440. package/package/corpus/skills/cratis-session-handoff/references/handoff-template.md +2 -2
  441. package/package/corpus/skills/cratis-session-handoff/references/session-hygiene.md +20 -0
  442. package/package/corpus/skills/cratis-showrunner-herald/SKILL.md +9 -17
  443. package/package/corpus/skills/cratis-showrunner-herald/references/options.md +2 -2
  444. package/package/corpus/skills/cratis-showrunner-herald/references/templates-and-images.md +16 -10
  445. package/package/corpus/skills/cratis-social-feed-post/SKILL.md +9 -162
  446. package/package/corpus/skills/cratis-social-feed-post/references/asset-and-formatting.md +37 -0
  447. package/package/corpus/skills/cratis-social-feed-post/references/editorial-checks.md +40 -0
  448. package/package/corpus/skills/cratis-social-feed-post/references/engagement-evidence.md +39 -150
  449. package/package/corpus/skills/cratis-social-feed-post/references/linkedin-media.md +24 -0
  450. package/package/corpus/skills/cratis-social-feed-post/references/other-channels.md +23 -0
  451. package/package/corpus/skills/cratis-specifications-exercise-backend/SKILL.md +5 -5
  452. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-command-results.md +2 -2
  453. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-query-scenario.md +13 -5
  454. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp.md +7 -4
  455. package/package/corpus/skills/cratis-specifications-exercise-backend/references/elixir.md +1 -1
  456. package/package/corpus/skills/cratis-specifications-exercise-backend/references/go.md +20 -4
  457. package/package/corpus/skills/cratis-specifications-exercise-backend/references/typescript.md +1 -1
  458. package/package/corpus/skills/cratis-specifications-isolate-behavior/SKILL.md +2 -2
  459. package/package/corpus/skills/cratis-specifications-observe-ui/SKILL.md +5 -5
  460. package/package/corpus/skills/cratis-specifications-test-application-ui/SKILL.md +2 -2
  461. package/package/corpus/skills/cratis-specifications-test-application-ui/references/typescript-command-results.md +2 -2
  462. package/package/corpus/skills/cratis-specifications-test-typescript-behavior/SKILL.md +2 -2
  463. package/package/corpus/skills/cratis-stage-render-slice/SKILL.md +10 -9
  464. package/package/corpus/skills/cratis-stage-run-sandbox/SKILL.md +3 -3
  465. package/package/corpus/skills/cratis-stage-run-sandbox/references/semantic-spec-runner.md +7 -6
  466. package/package/corpus/skills/cratis-studio-mcp-safety-guidance/SKILL.md +4 -6
  467. package/package/corpus/skills/cratis-technical-examples/SKILL.md +10 -106
  468. package/package/corpus/skills/cratis-technical-examples/references/csharp-package-checks.md +1 -1
  469. package/package/corpus/skills/cratis-technical-examples/references/source-and-format.md +42 -0
  470. package/package/corpus/skills/cratis-technical-examples/references/typescript-package-checks.md +2 -2
  471. package/package/corpus/skills/cratis-technical-examples/references/verification-scope.md +37 -0
  472. package/package/corpus/skills/cratis-ux-review/SKILL.md +8 -40
  473. package/package/corpus/skills/cratis-ux-review/references/capture-contract.md +24 -0
  474. package/package/corpus/skills/cratis-ux-review/references/checklist.md +1 -1
  475. package/package/corpus/skills/cratis-ux-review/references/report-template.md +2 -1
  476. package/package/corpus/skills/cratis-writing-voice-and-cadence/SKILL.md +19 -132
  477. package/package/corpus/skills/cratis-writing-voice-and-cadence/references/ai-tells.md +24 -97
  478. package/package/corpus/skills/cratis-writing-voice-and-cadence/references/author-and-batch.md +23 -0
  479. package/package/corpus/skills/cratis-writing-voice-and-cadence/references/documentation-evidence.md +25 -0
  480. package/package/corpus/skills/cratis-writing-voice-and-cadence/references/interpretation.md +17 -0
  481. package/package/corpus/skills/cratis-writing-voice-and-cadence/references/stock-constructions.md +23 -0
  482. package/package/corpus/skills/cratis-writing-voice-and-cadence/references/voice-guidance.md +8 -29
  483. package/package.json +1 -1
  484. /package/package/corpus/skills/cratis-chronicle-protect-decision/references/{standalone.md → csharp-standalone.md} +0 -0
  485. /package/package/corpus/skills/cratis-engineering-post-mortem/references/{examples/silent-backup-failure.md → silent-backup-failure.md} +0 -0
  486. /package/package/corpus/skills/cratis-engineering-post-mortem/references/{examples/unintended-release-regression.md → unintended-release-regression.md} +0 -0
@@ -5,143 +5,12 @@ paths:
5
5
  ---
6
6
  <!-- cratis-ai: generated Copilot instructions. Do not edit; rules/ is the source. -->
7
7
 
8
- # GitHub Actions workflows: capacity, cost, and release discipline
8
+ # GitHub Actions
9
9
 
10
- > **Why this rule exists.** On 2026-08-25 the organization's hosted runners starved for
11
- > most of a working day: every repository ran its scheduled jobs at the same minute,
12
- > hour-long jobs with no timeout occupied the shared concurrency pool, and a
13
- > comment-triggered assistant booted a runner for every comment in two repositories.
14
- > The remediation that followed is encoded here so it stays true.
10
+ Use **cratis-ci-pipeline-performance** for runner routing, scheduling, caching, required checks and publish queues; consult the [Infrastructure runner guide](https://github.com/Cratis/Infrastructure/blob/main/Documentation/deployment/github-runners.md) for current capacity. Use **cratis-engineering-ci-gates** to verify changes and watch the exact run.
15
11
 
16
- ## The budget you are spending
17
-
18
- - The whole organization shares **one hosted-runner concurrency pool** (20 concurrent
19
- jobs on the Free plan, 5 for macOS). Every queued job competes with every repository.
20
- - **Public repositories** run free on hosted runners; **private repositories bill every
21
- minute** — Linux 1×, Windows 2×, macOS 10× — against a small monthly allowance.
22
- - The organization runs self-hosted scale sets on UpCloud (`cratis-arc` and
23
- `cratis-arc-small`). They do not touch the hosted pool, but share infrastructure
24
- capacity and cost across Cratis repositories.
25
-
26
- ## Scheduling
27
-
28
- - **Never schedule on the top of the hour**, and never copy another repository's cron.
29
- `0 6 * * *` in 36 repositories produced a 270-job stampede into 20 slots. Pick a
30
- deterministic offset unique to the repository (minute 1–59, spread across 03:00–07:00 UTC).
31
- - A scheduled workflow that exists to keep coverage (nightly full matrix, health probe)
32
- should run the *narrowest* thing that preserves the claim it exists to make.
33
- - **A scheduled workflow whose subject no longer exists is deleted, not left running.**
34
- It still queues into the shared pool every day, and a scheduled no-op is the worst
35
- kind: it never fails, so nothing ever draws attention to it. Deleting it is also the
36
- only way to stop handing it whatever secrets it was passed — `Cratis/AI` ran a daily
37
- package update against a repository with no package manifest of any kind, checking out
38
- the full history under an organization-wide write PAT to find nothing to update.
39
-
40
- ## Every job, always
41
-
42
- - **`timeout-minutes` on every job.** The default is 6 hours; one hung job holds a
43
- pool slot for all of it. Tiers that work: quick checks 15, builds 30–45,
44
- publish/release 60, integration/benchmarks 120.
45
- - **A `concurrency` group on every pull-request verification workflow** with
46
- `cancel-in-progress: true`, keyed `${{ github.workflow }}-${{ github.ref }}`.
47
- **Never** cancel-in-progress on publish, release, or deploy workflows — a cancelled
48
- half-publish is worse than a queued one.
49
- - **Publish and release workflows never cancel** (`cancel-in-progress: false`) and set
50
- `queue: max`. A group holds one running and one pending run; a newer arrival replaces
51
- the pending one. Merges into the default branch share a group (a push, a repository-wide
52
- key, or `github.ref` on a merged `pull_request` `closed` event, which is the base
53
- branch), so without `queue: max` a newer merge replaces the older pending release.
54
- `queue: max` keeps up to 100 pending runs, processed in order, and applies only while
55
- `cancel-in-progress` is false or unset. Keep a single pending slot only for a documented
56
- design where each run releases everything since the last release, so a replaced run
57
- loses nothing; say so in a comment beside the `concurrency` block.
58
- - Avoid duplicate `push` and `pull_request` verification for the same feature-branch
59
- commit: use pull requests for branch verification and restrict push verification
60
- to the default branch. Filter unrelated heavy jobs by changed paths.
61
- - **A required check must not be skippable by `paths:` alone.** A workflow that never
62
- starts never reports, and the pull request hangs. Gate jobs on a change-detection job
63
- and require one always-run aggregator job (`if: always()`, checks every `needs.*.result`).
64
- - **Pin third-party actions by full commit SHA** (version in a comment) and set minimal
65
- `permissions:` on each job. Run `zizmor` locally on edited workflows: its `unpinned-uses`
66
- and `excessive-permissions` audits check exactly this. `actionlint` checks syntax,
67
- expressions and embedded shell, not pinning. Do not assume CI runs either tool.
68
- - To make a workflow faster, use the `cratis-ci-pipeline-performance` skill (in `cratis/engineering/core`).
69
-
70
- ## Matrices and operating systems
71
-
72
- - Run the full OS matrix on `schedule`/`workflow_dispatch`; run **Linux only on pull
73
- request syncs**. Windows bills double and macOS ten-fold, and per-PR duplication has
74
- to earn that cost with unique signal. (Measured before adopting this: 75 dual-OS runs
75
- of one private repository, zero Windows-only failures.)
76
- - Skip the expensive job entirely for documentation-only changes: a cheap change-detection
77
- job (`git diff --name-only HEAD^1 HEAD` on the merge commit) gating the build job.
78
-
79
- ## Runners
80
-
81
- These are judgment-shaped routing and cache choices. Read the
82
- [Infrastructure runner guide](https://github.com/Cratis/Infrastructure/blob/main/Documentation/deployment/github-runners.md)
83
- for UpCloud runner resources, ceilings and storage; link it rather than copying
84
- capacity numbers into workflows or guidance.
85
-
86
- - Use GitHub-hosted runners for public repositories (free hosted execution) and jobs
87
- needing Windows or macOS. Private Linux jobs use `cratis-arc` for builds, specs,
88
- audits, deployments or Docker; `cratis-arc-small` is only for lightweight script/API
89
- guards. The small set has no Docker: no container actions, services or Testcontainers.
90
- A repository runner variable can make routing configurable.
91
- - Compare job memory and in-job parallelism with the documented limits before
92
- increasing fan-out. Both sets share nodes; pod ceilings and node cold starts can
93
- make extra jobs wait. Use the `cratis-ci-pipeline-performance` skill (in `cratis/engineering/core`) for sizing.
94
- - Runner pods are ephemeral: workspaces, Docker data and local package downloads do
95
- not persist between jobs. Use the shared Cratis cache actions, `actions/cache` or
96
- `setup-*` caching keyed on lockfiles; never assume a warm local package cache.
97
- - When testing locally packed `0.0.0-ci` packages, a restored global NuGet cache can
98
- supply stale bytes for the same package ID/version. Use a unique version per run,
99
- a per-run packages folder, or remove that package from the restored cache before
100
- restoring consumers. See the skill's `references/caching.md`.
101
- - On self-hosted runners, `actions/setup-dotnet` cannot write `/usr/share/dotnet`.
102
- Set `DOTNET_INSTALL_DIR: ${{ runner.temp }}/dotnet` on the setup step.
103
- - **Never** route `pull_request`-triggered jobs of a *public* repository to self-hosted
104
- runners — that hands code execution on our infrastructure to any fork.
105
-
106
- ## Arc proxies
107
-
108
- - Workflows never generate Arc TypeScript proxies; the client commits them. Every `dotnet
109
- build`/`publish` of an Arc project passes `-p:CratisProxiesSkip=true -p:CratisProxiesOutputPath=`
110
- (Skip needs Arc 22.185.1 or later; the empty path covers earlier Arc). See
111
- **cratis-arc-generate-proxies**.
112
-
113
- ## Automation that writes back
114
-
115
- - A bot that pushes to a branch must **retry by merging** — the branch moves while the
116
- job runs, and a plain push loses the whole run to a non-fast-forward. Fetch, merge the
117
- remote branch into the bot's commit (`git pull --no-rebase`), and push again. Never
118
- rebase, amend, reset or force-push: published history is never rewritten, with no
119
- automation exception.
120
- - A bot's pre-push verification build must match the strictest configuration any CI in
121
- the organization applies to the same commit (build `Release` when consumers enforce
122
- analyzers there). Do not add `[skip ci]` to bot commits as a load optimization: the
123
- downstream CI run is the only check that sees the merged result. One exception: a
124
- bootstrap commit that changes **only** bootstrapped wrapper workflow files, whose
125
- content the source repository's CI verified before the rollout, may carry
126
- `[skip ci]` once the same wrapper content has landed with CI running in one canary
127
- repository. Package-update bots, and any commit touching another file, keep normal CI.
128
- - Never put a skip token in a pull request title or an ordinary commit message: a
129
- merge commit inherits the pull request title, so GitHub then runs nothing on the
130
- default branch. See `cratis-engineering-release-trains` (in `cratis/engineering/core`).
131
- - Comment-triggered agent workflows must gate on the trigger phrase in the job's `if:`
132
- (for example `contains(github.event.comment.body, '@claude')`) so a runner only
133
- starts when the agent is actually addressed.
134
-
135
- ## Releases
136
-
137
- - A pull request that changes nothing outward-facing — workflow edits, CI configuration,
138
- documentation — carries the **`no-release`** label, never `patch`. Merging config-only work under `patch` cuts
139
- an unintended release.
140
- - Every repository's release-intent gate must accept `no-release`; a gate that only
141
- accepts `major`/`minor`/`patch` forces exactly that mistake.
142
- - Do not merge a pull request that changes `.github/workflows/` while a release Publish
143
- run in the same repository has not created its tag yet. `GITHUB_TOKEN` cannot tag a
144
- commit whose workflows differ from the default branch, and rerunning fails the same
145
- way. Recover with the Publish `workflow_dispatch` from current main.
146
- - A release-verify job asserts that the GitHub release `v<version>` exists. A watch
147
- picks the exact run by head SHA, never by a time window.
12
+ - Stagger scheduled jobs by repository and remove schedules whose subject no longer exists. Bound every job with a timeout. Cancel superseded PR verification, never an in-progress publish or deploy. Preserve pending release work unless the next run safely subsumes it.
13
+ - Keep required checks reporting even when heavy jobs are irrelevant. Pin third-party actions by full SHA and grant least privilege per job. Do not route untrusted public PR work to self-hosted runners. Gate comment-triggered jobs before allocating a runner.
14
+ - Build and publish Arc against committed proxies in CI; disable generation with `-p:CratisProxiesSkip=true`. Use **cratis-arc-generate-proxies** for regeneration.
15
+ - Writeback automation verifies using the strictest consumer build configuration. Merge a moved branch and verify again before retrying push; never rewrite published history. Do not add skip tokens to PR titles or ordinary commits; a wrapper-only bootstrap exception requires both source CI verification and a successful canary with CI enabled.
16
+ - Use `no-release` for workflow-only and other non-release changes, and keep that label valid in release gates. Do not merge workflow changes while the active publish still needs to tag the previous commit. Verify the expected release exists for the exact commit; use **cratis-engineering-release-trains** for recovery.
@@ -11,43 +11,43 @@ One precise line per load-bearing term, so the same word means the same thing ev
11
11
 
12
12
  ## Events & streams
13
13
 
14
- - **Event** — an immutable, past-tense **fact** that something happened; an `[EventType]` record. Never mutated; lives in the log forever.
15
- - **Event source** — the entity an event stream belongs to (the stream key); identified by an `EventSourceId<T>`.
16
- - **Event source id** — the strongly-typed identity of an event source (`EventSourceId<T>`). Implicit in the event context — **never** an event payload property.
17
- - **Event stream** — the ordered events for one event source within an event sequence.
14
+ - **Event** — an immutable, past-tense **fact** that something happened; declared with `[EventType]` in .NET. Subject to the event store’s redaction policies.
15
+ - **Event source** — the entity or process whose changes are recorded; one event source can have multiple named streams.
16
+ - **Event source id** — the append routing identity of an event source, carried in event context. Do not duplicate it in the payload just to identify the current source. A related source ID can be part of the fact.
17
+ - **Event stream** — an ordered part of an event source’s history within an event sequence. A stream type names the part; a stream ID selects an instance of that part.
18
18
  - **Event sequence** — a named, append-ordered log; `EventSequenceId` (the event **log**, **outbox**, **inbox**).
19
19
  - **Event log** — the default event sequence where domain events are appended.
20
20
  - **Outbox / inbox** — cross-service event sequences: a producer appends its public contract event to the outbox; a consumer observes the inbox.
21
- - **Public event** — an event type that is part of the contract an event store exposes to other services (`[Public]`, or `[EventStore]` on the type or its assembly); events are private by default. The outbox accepts only public events, and the event log refuses them.
21
+ - **Public event** — an event type that is part of the contract an event store exposes to other services (`.NET`: `[Public]` or `[EventStore]` on the type, or `[EventStore]` on its assembly; otherwise private). The outbox rejects private events and the event log rejects public events.
22
22
  - **EventContext** — metadata traveling with an event (event source id, sequence number, occurred, causation/correlation, subject).
23
23
 
24
24
  ## Read side
25
25
 
26
26
  - **Read model** — derived state built from events by a projection or reducer; an optional Arc `[ReadModel]` record exposes static queries, but Chronicle-only models need no query attribute.
27
27
  - **Projection** — declares how events build a read model (model-bound attributes, fluent `IProjectionFor<T>`, or PDL outside application code); pure events→state, no side effects, never reads other read models.
28
- - **Reducer** — a "current state + event → next state" builder when transitions read better as code; new .NET code defaults to static `Reduce(event, model? current[, EventContext])` on a self-reducing model (no marker), with `IReducerFor<T>` for DI/replay instance behavior/separation and nominated plain classes when their assembly cannot reference Chronicle. Other SDKs retain their own contracts.
29
- - **Reactor** — `IReactor`; observes events and produces **side effects** (notifications, commands, follow-up events). The "if this then that".
30
- - **Observer** — Chronicle's umbrella for anything consuming an event sequence (projection, reducer, reactor); carries subscription / replay / **quarantine** state. Projection replay and catch-up each walk the sequence in one globally ordered job step; a new catch-up failure stops that step. Full replay is inactive and completion does not resume a quarantined observer (Chronicle v19.50.1, `Documentation/concepts/observers.mdx`, `Observation/Jobs/{CatchUpObserver,ReplayObserver}.cs` under `Source/Kernel/Core/`).
31
- - **Sink** — where a read model is persisted (MongoDB, EF Core).
32
- - **AutoMap** — Chronicle's on-by-default mapping of matching event→read-model property names; **never call `.AutoMap()`**.
28
+ - **Reducer** — computes next state from current state and an event. Use **cratis-chronicle-reduce-state** for the client’s default and alternatives.
29
+ - **Reactor** — observes recorded events to trigger effects such as notifications, commands or follow-up events. See `cratis-chronicle-react-to-fact` for the client’s registration and delivery conventions.
30
+ - **Observer** — a projection, reducer or reactor consuming an event sequence and maintaining subscription, replay and quarantine state.
31
+ - **Sink** — where Chronicle sends projection or reducer state: a store such as MongoDB or SQL, or an event-sequence sink that publishes the state as new events.
32
+ - **AutoMap** — Chronicle's on-by-default mapping of matching event→read-model property names; omit `.AutoMap()` unless explicitly re-enabling mapping after `.NoAutoMap()`.
33
33
  - **Graph** — a named property graph that events build through a graph projection: nodes, edges and their properties. Derived state like a read model; nothing writes to it directly.
34
34
  - **Node** — a graph element with a label, one unique key and primitive properties. The label is the type name.
35
35
  - **Edge** — a directed, typed graph relationship from a source node to a target node, identified by type, source key and target key (plus an identifying property when several edges of one type may join the same pair).
36
36
  - **Graph sink** — where a graph is persisted (Neo4j, or the in-memory graph); it applies the five idempotent graph operations, separate from the `ISink` of document read models.
37
- - **Query** — a `static` method on a `[ReadModel]`; returns derived state, **snapshot** (one-shot) or **observable** (live).
37
+ - **Query** — serves derived state as a **snapshot** (one-shot) or a **live** subscription. Use `cratis-arc-expose-query` for model-bound declaration or registration in the selected SDK.
38
38
 
39
39
  ## Write side
40
40
 
41
41
  - **Command** — a `[Command]` record expressing an imperative **intent**; its public `Handle()` produces event(s) (or a response).
42
- - **Provide()** — acquires inputs after validation/authorization and before `Handle()`; only short-circuits with a `ValidationResult` when acquisition yields nothing usable. Validators own refusals, including read-model existence.
42
+ - **Provide()** — acquires inputs before `Handle()`. Keep ordinary validation, including read-model existence checks, in validators. Arc also accepts `CommandResult`, `ValidationResult` (single or sequence), and `AuthorizationResult` as control results from `Provide()`; blocking results prevent `Handle()`.
43
43
  - **Causation chain** — the ordered links saying how an append came about (root process → command → …), each carrying properties. A command records its **name and its property values** there, so an event says what the command was asked to do; the chain lives in the event log and is as permanent as the events.
44
44
  - **Observation command** — a command whose input comes from outside the model's own decisions (webhook, poll, sweep, retry, classifier). It compares with current state and appends nothing when nothing changed; looking is not a fact.
45
45
  - **Signal event** — an event appended only to make a reactor do something (`…Requested`, `…Started`, `…Skipped`). Not a domain fact; use a job, state machine or command operation. Execute a command through the pipeline from a service; for a reactor follow-up, return the command invocation instead.
46
46
  - **Constraint** — `IConstraint`; an **append-time** invariant (uniqueness / concurrency) enforced at the event-store level.
47
- - **DCB (Dynamic Consistency Boundary)** — enforcing a state-dependent rule under concurrency over explicitly enrolled event-state reads: read-model parameters under Arc read protection `On`, stream decisions/exact scopes, or protected, admitted projection decision reads. Plain injected models under `Off` (set explicitly, or the Arc 22 behavior) and `Result<TEvent, ValidationResult>` alone are advisory, not a guard.
47
+ - **DCB (Dynamic Consistency Boundary)** — enforces a state-dependent invariant under concurrency over explicitly enrolled event-state reads. Use **cratis-chronicle-protect-decision**; an ordinary read or validation result does not enforce it.
48
48
  - **Consistency boundary** — the scope within which an invariant holds atomically (an event source, a routed stream, or the event state enrolled by an admitted protected read).
49
- - **EventForEventSourceId** — self-describing wrapper to append an event to a **specific** (cross-stream) event source, from a command `Handle()` or from a reactor handler (reactor support has shipped since Chronicle 15.35). It carries the event stream type and id, source type, subject, occurred time, tags and causation, so it is also how a reactor sets those explicitly.
50
- - **ReactorDelivery** — the identity of one delivery of one event to one reactor partition; declare it as a handler parameter and Chronicle passes it in. Stable across a replay and across recovering a failed partition, so a receipt kept under its `Id` is what makes a side effect survive re-delivery. An identity, not a guarantee — Chronicle does not know whether the effect ran.
49
+ - **EventForEventSourceId** — an envelope for appending an event to an explicit event source, with routing and append metadata where needed.
50
+ - **ReactorDelivery** — a stable identity for an event delivered to a reactor partition. Use it as an idempotency key; it is not a record that the effect ran.
51
51
 
52
52
  ## Structure & types
53
53
 
@@ -55,15 +55,15 @@ One precise line per load-bearing term, so the same word means the same thing ev
55
55
  - **Slice types** — **State Change** (command → events), **State View** (events → read model), **Automation** (events → side effect, including a follow-up command or event — a Screenplay `produces` / `invokes`), **Translation** (data from *outside* the model's own facts → our own facts: an external system's or another service's data recorded as events we own, keeping the external fact distinct from the local one; a Screenplay `Translate` slice with `direction outbound` is the other direction, publishing our private facts as one public contract event). A reactor that turns our own event into a follow-up event or command is an Automation, not a Translation.
56
56
  - **Concept** — a `ConceptAs<T>`, a strongly-typed wrapper over a primitive domain value (never raw `Guid`/`string`/`int`).
57
57
  - **EventSourceId<T>** — the strongly-typed event-source identity; derive entity identities from this, not `ConceptAs<Guid>`.
58
- - **Proxy** — the generated TypeScript command/query client, produced from C# on a **Debug** build; carries a `// @generated by Cratis` header and is never hand-edited.
58
+ - **Proxy** — the generated TypeScript command/query client, produced from C# by the configured build target; carries a `// @generated by Cratis` header and is never hand-edited.
59
59
 
60
60
  ## Compliance & multi-tenancy
61
61
 
62
62
  - **Subject / `[Subject]`** — the natural person a piece of PII belongs to (for GDPR erasure); defaults to the `EventSourceId<T>` identity.
63
63
  - **`[PII]`** — marks an inherently personal value so Chronicle can manage/erase it.
64
- - **`[NotAudited]`** — an **Arc** marking (`Cratis.Arc.Chronicle.Commands`, not a Chronicle type) for a value that is secret but *not* personal data (password, token, API key), so it is never written to the causation chain. Withholds only; it does not encrypt the value, so pair it with `[Encrypted]` for an operational secret. It never enrolls a value in erasure the way Chronicle's `[PII]` does.
65
- - **`[Encrypted]`** — a Chronicle marking (`Cratis.Chronicle.ProtectedValues`, Chronicle 19.32.0+) that encrypts an **operational secret** (API key, token, a company's bank account number) at rest on the event, without erasure. It does not keep a command input off the causation chain, so a secret gets `[Encrypted]` **plus** `[NotAudited]`. Never combine it with `[PII]` (`CHR0053`); never put it on an event source id (`CHR0052`).
66
- - **`[OnceOnly]`** — marks a reactor handler (or the whole reactor class) as non-replayable: Chronicle skips it for every event arriving as part of a **replay** — observer rewind, redaction, revision. Replay-exclusion only, not exactly-once, not a per-event-source run limit or deduplication; ordinary catch-up, crash redelivery and failed-partition recovery can run the handler again (Chronicle v19.50.1, `Documentation/code-analysis/CHR0022.mdx`). Use a `ReactorDelivery` receipt for that case.
64
+ - **`[NotAudited]`** — Arc marker that omits a command value from causation audit. It is not encryption or erasure.
65
+ - **`[Encrypted]`** — Chronicle marker for encrypting protected event values at rest. It does not suppress command auditing. Prefer a secret reference over persisting credentials; use **cratis-chronicle-protect-personal-data** for storage and erasure choices.
66
+ - **`[OnceOnly]`** — suppresses reactor delivery during replay. It does not guarantee exactly-once effects or suppress catch-up and recovery deliveries.
67
67
  - **Namespace / tenant** — Chronicle isolates tenants by **namespace**; each namespace has its own events, observers, and read models.
68
68
 
69
69
  ## Profiles
@@ -51,7 +51,4 @@ no-op success. Keep a limited conformance result limited; do not claim whole-pro
51
51
  Source/tag availability, module download, consumer compilation and proxy/pkg.go.dev
52
52
  indexing are separate results. Indexing delay never justifies retagging.
53
53
 
54
- Adapted from the repository-owned
55
- [Chronicle.Go parity rule](https://github.com/Cratis/Chronicle.Go/blob/v0.9.1/.cratis/ai/rules/go-cratis-parity.md)
56
- and [repository-owned module release guidance](https://github.com/Cratis/Chronicle.Go/tree/v0.9.1/.cratis/ai/skills),
57
- with repository-specific paths and commands removed.
54
+ Adapted from Chronicle.Go's repository-owned parity and module release guidance.
@@ -23,8 +23,6 @@ exact commands.
23
23
  preference does not replace minimum-version testing. Do not raise it incidentally
24
24
  or rewrite unrelated code to modernize syntax. Verify unfamiliar APIs against the
25
25
  documentation for that minimum, and keep experimental features opt-in.
26
- - Iterators require Go 1.23; `T.Context` and `B.Loop` require 1.24;
27
- stable `testing/synctest` and `WaitGroup.Go` require 1.25.
28
26
  - Prefer the standard library when it meets the contract. Review dependency
29
27
  capability, license and compatibility before adding one.
30
28
  - Change module files only for authorized dependency work. Review tidy changes,
@@ -140,11 +138,8 @@ exact commands.
140
138
 
141
139
  ## Adaptation and attribution
142
140
 
143
- This condensed rule adapts the repository-owned Go baseline at
144
- [Chronicle.Go v0.28.2](https://github.com/Cratis/Chronicle.Go/blob/v0.28.2/.cratis/ai/rules/go.md)
145
- and [Arc.Go v0.1.1](https://github.com/Cratis/Arc.Go/blob/v0.1.1/.cratis/ai/rules/go.md),
146
- not their project paths or commands. The baseline's adapted readability,
147
- error-boundary, public-option and goroutine recommendations retain attribution:
141
+ Adapted from the repository-owned Go rules in Chronicle.Go and Arc.Go.
142
+ The readability, error-boundary, public-option and goroutine recommendations retain attribution:
148
143
  [Google Go style](https://google.github.io/styleguide/go/guide.html), Google,
149
144
  [CC-BY-3.0](https://creativecommons.org/licenses/by/3.0/); and
150
145
  [Uber Go style](https://github.com/uber-go/guide/blob/master/style.md), Uber
@@ -61,12 +61,11 @@ one does.
61
61
  - **[contract] Re-read preconditions immediately before each mutation and stop when drift
62
62
  invalidates the authorized scope, safety assumptions, or recovery plan.** Benign drift
63
63
  within an already authorized bounded pass does not require another confirmation.
64
- - **[contract] A deploy gate asks the system of record; it does not predict it.** A gate
65
- for Chronicle event-type registration calls Chronicle's read-only registration check, or
66
- carries a contract spec against Chronicle's comparison for every change class (enum
67
- extension, enum rename, optional or required property added, property removed, retype).
68
- A reimplemented copy drifts, for example by demanding a registry repair for an
69
- enum-only change Chronicle accepts in place.
64
+ - **[contract] A deploy gate checks the system of record.** For Chronicle event types,
65
+ exercise registration against an isolated store seeded with the existing schemas.
66
+ If the gate also predicts compatibility, prove it against the kernel for enum
67
+ additions and renames, optional and required property additions, removals, and
68
+ type changes. Do not trigger registry repair on a schema diff alone.
70
69
  - **[convention] When the targets were not already established in the conversation, show
71
70
  the dry-run list and act on it once the user has answered.** A user who has reviewed
72
71
  and authorized those targets is not asked to approve the same pass again. The list is a
@@ -5,134 +5,12 @@ paths:
5
5
  ---
6
6
  <!-- cratis-ai: generated Copilot instructions. Do not edit; rules/ is the source. -->
7
7
 
8
- # Java Conventions
8
+ # Java conventions
9
9
 
10
- Java is a supported, first-class Cratis application language alongside Kotlin
11
- — an Arc.Kotlin-based application can be entirely Java source, with Kotlin and
12
- KSP present only in the build (Arc generates Kotlin adapters for Java
13
- declarations under the hood). Write idiomatic modern Java; do not import
14
- Kotlin idioms into Java source, and do not treat Java as a second-class
15
- citizen of a Kotlin codebase. Arc/Chronicle-specific shapes (`@Command`,
16
- `@ReadModel`, `@EventType`, and the rest) are chosen with **cratis-arc-select-backend-sdk**, not
17
- here.
10
+ Use idiomatic Java for Java callers. For Arc or Chronicle SDK choices use **cratis-arc-select-backend-sdk**.
18
11
 
19
- ## Building
20
-
21
- - Use `./gradlew build` (or the repository's Maven equivalent) from the
22
- command line; it is the definition of "the build is clean" — zero warnings,
23
- zero errors.
24
- - Treat compiler warnings as errors (`-Xlint:all -Werror`); do not suppress a
25
- warning to get to green.
26
-
27
- ## Formatting
28
-
29
- - Four-space indentation, no tabs.
30
- - One public top-level type per file, named after that type.
31
- - Sort imports alphabetically; no wildcard imports.
32
- - Braces on the same line as the declaration (`if (...) {`), closing brace on
33
- its own line.
34
-
35
- ## Language — American English Only
36
-
37
- All identifiers, Javadoc, and string literals use **American English**
38
- spelling (initialize, serialize, behavior, color, organization, center,
39
- modeling, dialog, license, judgment, gray).
40
-
41
- ## Naming
42
-
43
- - PascalCase for class and interface names.
44
- - camelCase for methods, fields, and local variables.
45
- - New application and Arc-style interfaces have no `I` prefix — name them
46
- for what they do. Chronicle.Kotlin's published interfaces retain their names
47
- (`IEventStore`, `IChronicleClient`, `IProjectionFor`, `IReactorMiddleware`).
48
- - Never suffix a class with `Impl`, `Manager`, or `Helper` purely to
49
- disambiguate — name it for its role; reserve `Default<Name>` for the
50
- concrete counterpart of an interface meant to be overridden.
51
-
52
- ## Records and Immutable Data
53
-
54
- - Prefer a `record` for an immutable value holder (DTOs, command payloads,
55
- query results, read models) over a hand-written class with a constructor,
56
- getters, `equals`, `hashCode`, and `toString` — the record gives all of that
57
- for free and keeps the file short.
58
- - Give a record component a validating compact constructor when the type must
59
- never hold an invalid value, rather than validating at every call site that
60
- constructs one.
61
- - Favor `sealed` interfaces with a closed set of `permits` implementations
62
- over a discriminator field, when a value can genuinely only be one of a
63
- known set of shapes — pattern matching over the sealed hierarchy replaces
64
- the `instanceof` chain.
65
-
66
- ## Nullability
67
-
68
- - Prefer `Optional<T>` for a method's **return type** when absence is a normal
69
- outcome the caller must handle; never use `Optional` as a field type, a
70
- constructor parameter, or a method parameter — that is not what it is for.
71
- - Prefer a non-null default and an explicit `Objects.requireNonNull(...)` at a
72
- constructor boundary over accepting `null` and checking for it throughout a
73
- class.
74
- - On a surface consumed from Kotlin (an Arc/Chronicle read model, event, or
75
- command reached from Kotlin code), be deliberate about which fields are
76
- genuinely optional — a Java field with no null-safety annotation reads as
77
- non-null to Kotlin-facing generated code by default.
78
-
79
- ## Classes
80
-
81
- - Favor composition over inheritance; an `interface` plus one or more
82
- implementing classes is the house shape for an overridable collaborator, not
83
- a base class meant to be extended.
84
- - Make a class `final` unless it is deliberately designed for extension.
85
- - Prefer constructor injection over field injection for a Spring-managed
86
- bean — a `final` field set in the constructor over an `@Autowired` field.
87
-
88
- ## Asynchronous Code
89
-
90
- - `CompletionStage<T>` (or its `CompletableFuture` implementation) is the
91
- house shape for an asynchronous Java API, mirroring how Kotlin exposes
92
- `suspend` — Arc's generated adapters await a returned `CompletionStage`
93
- without reflection.
94
- - Never block on a `CompletionStage` inside a method that itself returns
95
- one — compose with `.thenApply`/`.thenCompose` or `.thenAccept` instead of
96
- calling `.get()`/`.join()` inside the async chain.
97
- - Give a Java caller its own explicit scope (an `ExecutorService`, or the
98
- scope type the host library provides) rather than reaching for a shared
99
- global one.
100
-
101
- ## Javadoc
102
-
103
- - Every public type and method meant for consumption outside its package gets
104
- a Javadoc comment (`/** ... */`) — what it does and why, not a restatement
105
- of its name.
106
- - Use `@param`, `@return`, and `@throws` for parameters, return values, and
107
- checked exceptions.
108
-
109
- ## Exceptions
110
-
111
- - Use exceptions for genuinely exceptional, unrecoverable conditions — not for
112
- control flow a caller is expected to handle. A command or query rejection a
113
- user can act on is a validation result, not a thrown exception; see
114
- **cratis-arc-validate-command**.
115
- - Prefer an unchecked exception with a clear name over a checked exception
116
- that forces every caller to catch or declare it; reserve checked exceptions
117
- for conditions a caller genuinely has a recovery path for.
118
-
119
- ## Dependency Injection
120
-
121
- - Constructor injection is the default for a Spring-managed bean; avoid field
122
- injection (`@Autowired` on a field) even though Spring supports it.
123
-
124
- ## Logging
125
-
126
- - Log through the host's structured logging facility (SLF4J via Spring Boot),
127
- not `System.out`/`System.err`.
128
- - Log at the boundary where a decision is made or an error is handled, not at
129
- every intermediate call.
130
-
131
- ## Testing
132
-
133
- - JUnit Jupiter is the house test runner (the Cratis JVM repositories use
134
- Jupiter 6.1.x).
135
- - A test for a Java-facing surface belongs beside the Java production code
136
- (`src/test/java/.../<Thing>Test.java`) and must actually compile and run
137
- against that surface — a Kotlin-only test does not prove Java call-site
138
- compatibility for a mixed-language library.
12
+ - Four spaces, sorted explicit imports, one public top-level type per matching file, opening braces on the declaration line. Use PascalCase types, camelCase members and American English. Name new interfaces for their role, not with an `I` prefix; preserve published names.
13
+ - Prefer records for immutable values, compact constructors for invariants, and sealed interfaces for closed variants with different data. Make classes final unless designed for extension; favor composition and constructor injection. Document public API contracts in Javadoc.
14
+ - Prefer non-null inputs. Return `Optional<T>` for ordinary absence rather than using it as a field or parameter. Verify nullability at Java–Kotlin and generated contract boundaries.
15
+ - Return `CompletionStage<T>` from asynchronous Java APIs. Compose stages without blocking and use a caller-owned executor when an executor is needed. Return actionable command refusals through validation rather than treating them as exceptions.
16
+ - Use host logging at the handling boundary. Keep compiler warnings enabled and run the repository's Gradle or Maven check. Use JUnit Jupiter in JVM suites; test Java-facing contracts from Java, not only from Kotlin.
@@ -6,170 +6,13 @@ paths:
6
6
  ---
7
7
  <!-- cratis-ai: generated Copilot instructions. Do not edit; rules/ is the source. -->
8
8
 
9
- # Kotlin Conventions
9
+ # Kotlin conventions
10
10
 
11
- Kotlin is a JVM-first, coroutine-first language. Use its own idioms — data
12
- classes, `null`-aware types, coroutines, sealed hierarchies — instead of
13
- carrying Java or C# patterns across unchanged. A Cratis Arc or Chronicle
14
- application on Kotlin follows Spring Boot conventions for wiring and this
15
- file's conventions for everything else; Arc/Chronicle-specific shapes
16
- (`@Command`, `@ReadModel`, `@EventType`, and the rest) are chosen with
17
- **cratis-arc-select-backend-sdk**, not here.
11
+ Use idiomatic Kotlin and Spring Boot wiring. For Cratis SDK choices use **cratis-arc-select-backend-sdk**.
18
12
 
19
- ## Building
20
-
21
- - Use `./gradlew build` from the command line; it is the definition of "the
22
- build is clean" — zero warnings, zero errors.
23
- - Use `./gradlew test` to run tests.
24
- - Treat compiler warnings as errors. `allWarningsAsErrors` is the house
25
- default for Kotlin compilation; do not add a suppression to get to green.
26
-
27
- ## Formatting
28
-
29
- - Four-space indentation, no tabs.
30
- - One top-level public declaration per file, named after that declaration.
31
- - Sort imports alphabetically; no wildcard imports.
32
- - Trailing commas in multi-line parameter lists and call sites — they keep
33
- diffs to one line when a member is added or removed.
34
- - Insert a blank line before the opening `{` of a multi-line `if`/`when`/`for`
35
- block; keep single-expression bodies on one line.
36
-
37
- ## Language — American English Only
38
-
39
- All identifiers, KDoc, and string literals use **American English** spelling
40
- (initialize, serialize, behavior, color, organization, center, modeling,
41
- dialog, license, judgment, gray).
42
-
43
- ## Naming
44
-
45
- - PascalCase for class, interface, and object names.
46
- - camelCase for functions, properties, and local variables.
47
- - New application and Arc-style interfaces have no `I` prefix; name them for
48
- what they do (`CommandPipeline`, not `ICommandPipeline`). Reserve
49
- `Default<Name>` for a concrete/interface pair when needed. Chronicle.Kotlin's
50
- published types retain their names (`IEventStore`, `IChronicleClient`,
51
- `IProjectionFor`, `IReactorMiddleware`); do not rename framework APIs.
52
- - Never suffix a class with `Impl`, `Service`, or `Async` purely to
53
- disambiguate — name it for its role.
54
-
55
- ## Visibility
56
-
57
- - Kotlin's implicit-public default is what most declarations should use;
58
- spelling `public` is a style choice, not a requirement — decide once per
59
- file or module and stay consistent within it.
60
- - Mark a declaration `internal` when it must not cross a module boundary, and
61
- `private` for anything a class does not need to expose. Do not default
62
- everything to `public` "to be safe" — a wider surface than necessary is a
63
- bigger contract to keep stable.
64
- - Compile-time discovery (KSP, reflection-based scanning) generally requires
65
- **public** top-level types and members. A declaration silently excluded from
66
- discovery because it is `internal` or `private` is a visibility bug, not a
67
- framework limitation — check the matching skill's discovery rules before
68
- assuming a narrower visibility is safe.
69
-
70
- ## Nullability
71
-
72
- Kotlin's type system is the first line of defense against null-related bugs —
73
- trust it the same way C# nullable reference types are trusted.
74
-
75
- - Prefer a non-nullable type and a real default over a nullable one with a
76
- defensive check.
77
- - Use `?.`, `?:`, and `requireNotNull()`/`checkNotNull()` instead of manual
78
- `if (x != null)` guards.
79
- - A nullable outer collection (`List<T>?`) is supported; a nullable *element*
80
- inside a collection (`List<T?>`) is a narrower, often-unsupported shape in
81
- generated/serialized contracts — do not reach for it without checking
82
- whether the surface you are writing actually allows it.
83
- - Data classes model state, not behavior — keep validation and invariants in
84
- the type that owns them (a concept, a validator), not scattered across every
85
- call site that happens to touch a nullable field.
86
-
87
- ## Classes and Data
88
-
89
- - Prefer `data class` for immutable value holders (DTOs, events, command
90
- payloads, read models) — value equality, `copy()`, and `componentN()`
91
- destructuring come for free.
92
- - Prefer a primary constructor with `val` properties over a body full of
93
- assignment statements.
94
- - Reach for a `sealed class`/`sealed interface` hierarchy instead of an enum
95
- with a payload bolted on, whenever the variants carry different data.
96
- - Favor composition over inheritance; an `interface` plus a `Default*`
97
- implementation is the house shape for an overridable collaborator, not a
98
- base class meant to be extended.
99
-
100
- ## Coroutines
101
-
102
- - An asynchronous API is `suspend`, not a returned `Future`/`CompletableFuture`
103
- — Kotlin callers compose `suspend` functions directly, and a JVM-facing
104
- bridge (`CompletionStage`) is layered on top for Java callers, never the
105
- other way around.
106
- - Per-call state travels in a `CoroutineContext` element; never a
107
- `ThreadLocal`. A coroutine can move between threads, and thread-local state
108
- silently goes stale when it does.
109
- - Never launch on `GlobalScope`. Use the scope the host (Spring Boot's bounded
110
- application coroutine scope, a test's `runBlocking`/`runTest`) already
111
- provides.
112
- - Cleanup that must run even after cancellation goes in
113
- `withContext(NonCancellable) { ... }`; everything else should stay
114
- cancellable rather than swallow the cancellation.
115
- - Bridge a genuinely thread-bound third-party API with a
116
- `ThreadContextElement`; do not leak a raw `ThreadLocal` into coroutine-facing
117
- state as a shortcut.
118
-
119
- ## Java Interop
120
-
121
- Kotlin/Java interop is a first-class concern whenever a library or an
122
- application may be consumed from Java — which every Arc/Chronicle application
123
- should assume by default:
124
-
125
- - Add `@JvmStatic` to companion-object factories a Java caller needs to call
126
- without `Companion.`.
127
- - Add `@JvmOverloads` to a function with default parameter values so Java
128
- gets the shorter overloads too.
129
- - Give a function returning a value class or an inline class a `@JvmName`
130
- when Java needs to call it — the mangled synthetic name is not meant to be
131
- called directly.
132
- - Prefer a `List<T>`/`Map<K, V>` parameter type over a Kotlin-only collection
133
- interface on any Java-facing surface.
134
-
135
- ## KDoc
136
-
137
- - Every public type, function, and property meant for consumption outside its
138
- module gets a KDoc comment (`/** ... */`) — what it does and why, not a
139
- restatement of its name.
140
- - Keep the summary to one or two sentences; use `@param`, `@return`, and
141
- `@throws` for the rest.
142
-
143
- ## Exceptions
144
-
145
- - Use exceptions for genuinely exceptional, unrecoverable conditions — not for
146
- control flow a caller is expected to handle. A command or query rejection a
147
- user can act on is a validation result, not a thrown exception; see
148
- **cratis-arc-validate-command**.
149
- - Define a custom exception type when a caller needs to distinguish it from
150
- other failures; do not throw a bare `RuntimeException`/`IllegalStateException`
151
- for something callers are expected to catch specifically.
152
-
153
- ## Dependency Injection
154
-
155
- - Constructor injection through the primary constructor is the default; avoid
156
- field/property injection.
157
- - Give a collaborator an interface and a `Default*` implementation when an
158
- application might reasonably override it, bound with Spring's
159
- `@ConditionalOnMissingBean` so a consumer can replace it without forking.
160
-
161
- ## Logging
162
-
163
- - Log through the host's structured logging facility (SLF4J via Spring Boot),
164
- not `println`.
165
- - Log at the boundary where a decision is made or an error is handled, not at
166
- every intermediate call.
167
-
168
- ## Testing
169
-
170
- - JUnit Jupiter is the house test runner for Kotlin and Java alike (the
171
- Cratis JVM repositories use Jupiter 6.1.x).
172
- - A Kotlin test lives beside its Kotlin production code
173
- (`src/test/kotlin/.../<Thing>Test.kt`); a Java-facing surface also gets a
174
- Java test that compiles and runs against it, because Kotlin-only tests do
175
- not prove Java call-site compatibility.
13
+ - Four spaces, sorted explicit imports, trailing commas in multiline lists, one public top-level declaration per matching file. Use role-based names and American English. Keep implementation details `private` or `internal`; verify that declarations discovered by KSP have the visibility the generator requires.
14
+ - Prefer immutable `data class` values, sealed hierarchies for variants with distinct data, and composition. Keep invariants in the owning type. Prefer non-null types and check collection element nullability at generated contract boundaries.
15
+ - Use `suspend` APIs with caller-owned structured concurrency. Propagate cancellation and request context; use `NonCancellable` only for required suspending cleanup. Use `ThreadContextElement` only to bridge a truly thread-bound API. Do not use `GlobalScope`.
16
+ - Expose a `CompletionStage` bridge for asynchronous Java callers when needed. Choose `@JvmStatic`, `@JvmOverloads` and `@JvmName` only for real Java call sites; compile those call sites to verify the surface. Prefer standard collection interfaces.
17
+ - Use constructor injection; make replaceable Spring defaults conditional on a missing bean. Document public contracts with KDoc, use host logging at the handling boundary, and report actionable command refusals through validation.
18
+ - Run the repository's Gradle checks. Keep `allWarningsAsErrors` enabled where configured and use JUnit Jupiter. Cover a Java-facing contract from Java as well as Kotlin.