@cratis/pi 8.4.1 → 8.6.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 (286) hide show
  1. package/package/corpus/harnesses/copilot/instructions/ai-distribution.instructions.md +2 -1
  2. package/package/corpus/harnesses/copilot/instructions/exit-codes-and-wrappers.instructions.md +1 -1
  3. package/package/corpus/harnesses/copilot/instructions/glossary.instructions.md +5 -3
  4. package/package/corpus/harnesses/copilot/instructions/react.instructions.md +3 -1
  5. package/package/corpus/harnesses/copilot/instructions/reactors.instructions.md +3 -1
  6. package/package/corpus/harnesses/copilot/instructions/scripting.instructions.md +2 -1
  7. package/package/corpus/harnesses/copilot/instructions/specs.csharp.instructions.md +6 -3
  8. package/package/corpus/harnesses/copilot/instructions/vertical-slices.instructions.md +5 -2
  9. package/package/corpus/hooks/scripts/cratis-guard-secrets.sh +131 -9
  10. package/package/corpus/rules/ai-distribution.md +2 -1
  11. package/package/corpus/rules/exit-codes-and-wrappers.md +1 -1
  12. package/package/corpus/rules/glossary.md +5 -3
  13. package/package/corpus/rules/react.md +3 -1
  14. package/package/corpus/rules/reactors.md +3 -1
  15. package/package/corpus/rules/scripting.md +2 -1
  16. package/package/corpus/rules/specs.csharp.md +6 -3
  17. package/package/corpus/rules/vertical-slices.md +5 -2
  18. package/package/corpus/skills/cratis-application-growth/SKILL.md +1 -2
  19. package/package/corpus/skills/cratis-application-growth/references/csharp.md +1 -3
  20. package/package/corpus/skills/cratis-application-growth/references/move-and-untangle.md +1 -2
  21. package/package/corpus/skills/cratis-application-growth/references/rename-window.md +1 -3
  22. package/package/corpus/skills/cratis-application-growth/references/service-and-delivery.md +3 -2
  23. package/package/corpus/skills/cratis-application-growth/references/stages.md +2 -2
  24. package/package/corpus/skills/cratis-arc-authorize-request/SKILL.md +3 -3
  25. package/package/corpus/skills/cratis-arc-authorize-request/references/authproxy.md +47 -3
  26. package/package/corpus/skills/cratis-arc-authorize-request/references/csharp-query-security.md +18 -3
  27. package/package/corpus/skills/cratis-arc-authorize-request/references/csharp.md +12 -3
  28. package/package/corpus/skills/cratis-arc-authorize-request/references/typescript.md +2 -0
  29. package/package/corpus/skills/cratis-arc-connect-storage/references/csharp.md +1 -0
  30. package/package/corpus/skills/cratis-arc-connect-storage/references/elixir.md +9 -2
  31. package/package/corpus/skills/cratis-arc-declare-command/SKILL.md +2 -0
  32. package/package/corpus/skills/cratis-arc-declare-command/references/csharp-chronicle.md +47 -8
  33. package/package/corpus/skills/cratis-arc-declare-command/references/csharp-controller.md +3 -1
  34. package/package/corpus/skills/cratis-arc-declare-command/references/csharp-history.md +6 -3
  35. package/package/corpus/skills/cratis-arc-declare-command/references/csharp.md +38 -11
  36. package/package/corpus/skills/cratis-arc-declare-command/references/go.md +1 -1
  37. package/package/corpus/skills/cratis-arc-declare-operation/references/csharp-abilities.md +2 -2
  38. package/package/corpus/skills/cratis-arc-declare-operation/references/csharp-recovery.md +6 -4
  39. package/package/corpus/skills/cratis-arc-declare-operation/references/csharp.md +2 -2
  40. package/package/corpus/skills/cratis-arc-diagnose-live-query/SKILL.md +1 -1
  41. package/package/corpus/skills/cratis-arc-diagnose-live-query/references/csharp.md +29 -7
  42. package/package/corpus/skills/cratis-arc-diagnose-live-query/references/java.md +1 -1
  43. package/package/corpus/skills/cratis-arc-diagnose-live-query/references/kotlin.md +1 -1
  44. package/package/corpus/skills/cratis-arc-expose-mcp-operation/references/csharp-diagnose-tool-call.md +9 -7
  45. package/package/corpus/skills/cratis-arc-expose-mcp-operation/references/csharp.md +52 -1
  46. package/package/corpus/skills/cratis-arc-expose-query/SKILL.md +4 -2
  47. package/package/corpus/skills/cratis-arc-expose-query/references/csharp.md +36 -10
  48. package/package/corpus/skills/cratis-arc-expose-query/references/go.md +2 -2
  49. package/package/corpus/skills/cratis-arc-expose-query/references/typescript.md +6 -3
  50. package/package/corpus/skills/cratis-arc-generate-proxies/SKILL.md +1 -0
  51. package/package/corpus/skills/cratis-arc-generate-proxies/references/csharp.md +55 -6
  52. package/package/corpus/skills/cratis-arc-generate-proxies/references/typescript.md +9 -0
  53. package/package/corpus/skills/cratis-arc-host-application/SKILL.md +1 -1
  54. package/package/corpus/skills/cratis-arc-host-application/references/csharp-configuration.md +54 -0
  55. package/package/corpus/skills/cratis-arc-host-application/references/csharp-deployment.md +98 -0
  56. package/package/corpus/skills/cratis-arc-host-application/references/csharp-http.md +9 -1
  57. package/package/corpus/skills/cratis-arc-host-application/references/csharp-identity.md +87 -4
  58. package/package/corpus/skills/cratis-arc-host-application/references/csharp.md +9 -0
  59. package/package/corpus/skills/cratis-arc-invoke-command/references/csharp-extensions.md +4 -0
  60. package/package/corpus/skills/cratis-arc-invoke-command/references/csharp.md +2 -1
  61. package/package/corpus/skills/cratis-arc-isolate-tenant/SKILL.md +19 -2
  62. package/package/corpus/skills/cratis-arc-isolate-tenant/references/csharp.md +4 -2
  63. package/package/corpus/skills/cratis-arc-page-query/references/csharp.md +2 -0
  64. package/package/corpus/skills/cratis-arc-react-bind-slice/SKILL.md +33 -36
  65. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-commands.md +18 -3
  66. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-host.md +94 -19
  67. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-identity.md +29 -5
  68. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-instant-feedback.md +81 -0
  69. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-localization.md +80 -0
  70. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-navigation.md +103 -0
  71. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-queries.md +41 -2
  72. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-structure.md +117 -0
  73. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript.md +8 -4
  74. package/package/corpus/skills/cratis-arc-react-separate-view-model/SKILL.md +3 -3
  75. package/package/corpus/skills/cratis-arc-react-separate-view-model/references/typescript.md +27 -6
  76. package/package/corpus/skills/cratis-arc-testing-typescript/references/typescript.md +2 -2
  77. package/package/corpus/skills/cratis-arc-validate-command/references/csharp-rules.md +23 -2
  78. package/package/corpus/skills/cratis-arc-validate-command/references/csharp.md +28 -2
  79. package/package/corpus/skills/cratis-arc-validation-typescript/SKILL.md +1 -0
  80. package/package/corpus/skills/cratis-authproxy-configure/SKILL.md +136 -0
  81. package/package/corpus/skills/cratis-authproxy-configure/references/admission.md +125 -0
  82. package/package/corpus/skills/cratis-authproxy-configure/references/aspire.md +154 -0
  83. package/package/corpus/skills/cratis-authproxy-configure/references/operations.md +122 -0
  84. package/package/corpus/skills/cratis-authproxy-configure/references/services-and-routing.md +114 -0
  85. package/package/corpus/skills/cratis-authproxy-configure/references/sessions-and-logout.md +126 -0
  86. package/package/corpus/skills/cratis-authproxy-configure/references/sign-in-providers.md +116 -0
  87. package/package/corpus/skills/cratis-authproxy-configure/references/tenant-resolution.md +135 -0
  88. package/package/corpus/skills/cratis-choreography-run-workflow/SKILL.md +117 -0
  89. package/package/corpus/skills/cratis-choreography-run-workflow/references/csharp-chronicle.md +164 -0
  90. package/package/corpus/skills/cratis-choreography-run-workflow/references/csharp.md +354 -0
  91. package/package/corpus/skills/cratis-chronicle-cli-operations/SKILL.md +6 -6
  92. package/package/corpus/skills/cratis-chronicle-cli-operations/references/inspection.md +11 -3
  93. package/package/corpus/skills/cratis-chronicle-cli-operations/references/project-tooling.md +50 -0
  94. package/package/corpus/skills/cratis-chronicle-cli-operations/references/recovery-and-comparison.md +17 -3
  95. package/package/corpus/skills/cratis-chronicle-cli-operations/references/setup-and-target.md +8 -2
  96. package/package/corpus/skills/cratis-chronicle-connect-application/references/csharp-services.md +13 -2
  97. package/package/corpus/skills/cratis-chronicle-connect-application/references/csharp.md +12 -0
  98. package/package/corpus/skills/cratis-chronicle-connect-application/references/kotlin.md +2 -0
  99. package/package/corpus/skills/cratis-chronicle-connect-application/references/python.md +2 -2
  100. package/package/corpus/skills/cratis-chronicle-connect-application/references/typescript.md +10 -1
  101. package/package/corpus/skills/cratis-chronicle-constrain-append/SKILL.md +9 -2
  102. package/package/corpus/skills/cratis-chronicle-constrain-append/references/csharp.md +35 -3
  103. package/package/corpus/skills/cratis-chronicle-constrain-append/references/go.md +1 -1
  104. package/package/corpus/skills/cratis-chronicle-constrain-append/references/operations.md +70 -0
  105. package/package/corpus/skills/cratis-chronicle-deploy-kernel/SKILL.md +6 -3
  106. package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/configuration.md +113 -16
  107. package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/container-and-kubernetes.md +293 -0
  108. package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/kernel-options.md +16 -9
  109. package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/network-and-tls.md +60 -7
  110. package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/storage.md +124 -2
  111. package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/upgrade-and-recovery.md +36 -1
  112. package/package/corpus/skills/cratis-chronicle-evolve-event/SKILL.md +12 -0
  113. package/package/corpus/skills/cratis-chronicle-evolve-event/references/csharp.md +2 -2
  114. package/package/corpus/skills/cratis-chronicle-inspect-observer/SKILL.md +15 -5
  115. package/package/corpus/skills/cratis-chronicle-inspect-observer/references/csharp.md +9 -8
  116. package/package/corpus/skills/cratis-chronicle-inspect-observer/references/go.md +2 -2
  117. package/package/corpus/skills/cratis-chronicle-mcp-inspection/SKILL.md +1 -1
  118. package/package/corpus/skills/cratis-chronicle-mcp-inspection/references/deployment.md +1 -1
  119. package/package/corpus/skills/cratis-chronicle-project-view/SKILL.md +2 -2
  120. package/package/corpus/skills/cratis-chronicle-project-view/references/csharp-fluent.md +15 -4
  121. package/package/corpus/skills/cratis-chronicle-project-view/references/csharp-model-bound.md +4 -1
  122. package/package/corpus/skills/cratis-chronicle-project-view/references/csharp-reading.md +5 -2
  123. package/package/corpus/skills/cratis-chronicle-project-view/references/csharp.md +23 -0
  124. package/package/corpus/skills/cratis-chronicle-project-view/references/elixir.md +1 -0
  125. package/package/corpus/skills/cratis-chronicle-project-view/references/go.md +2 -1
  126. package/package/corpus/skills/cratis-chronicle-project-view/references/java.md +3 -1
  127. package/package/corpus/skills/cratis-chronicle-project-view/references/kotlin.md +4 -3
  128. package/package/corpus/skills/cratis-chronicle-project-view/references/typescript.md +3 -1
  129. package/package/corpus/skills/cratis-chronicle-protect-decision/SKILL.md +3 -1
  130. package/package/corpus/skills/cratis-chronicle-protect-decision/references/csharp-scopes.md +41 -4
  131. package/package/corpus/skills/cratis-chronicle-protect-decision/references/csharp.md +22 -4
  132. package/package/corpus/skills/cratis-chronicle-protect-decision/references/elixir.md +7 -0
  133. package/package/corpus/skills/cratis-chronicle-protect-decision/references/go.md +9 -1
  134. package/package/corpus/skills/cratis-chronicle-protect-decision/references/java.md +8 -0
  135. package/package/corpus/skills/cratis-chronicle-protect-decision/references/kotlin.md +9 -0
  136. package/package/corpus/skills/cratis-chronicle-protect-decision/references/typescript.md +7 -0
  137. package/package/corpus/skills/cratis-chronicle-protect-personal-data/SKILL.md +1 -1
  138. package/package/corpus/skills/cratis-chronicle-protect-personal-data/references/csharp.md +28 -3
  139. package/package/corpus/skills/cratis-chronicle-publish-contract/SKILL.md +7 -6
  140. package/package/corpus/skills/cratis-chronicle-publish-contract/references/csharp.md +41 -0
  141. package/package/corpus/skills/cratis-chronicle-publish-contract/references/elixir-integrations.md +3 -3
  142. package/package/corpus/skills/cratis-chronicle-publish-contract/references/webhook-signature-wire-format.md +82 -0
  143. package/package/corpus/skills/cratis-chronicle-react-to-fact/SKILL.md +19 -1
  144. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/csharp-outputs.md +3 -1
  145. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/csharp-pages.md +1 -1
  146. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/csharp.md +37 -4
  147. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/elixir.md +11 -0
  148. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/java.md +2 -1
  149. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/kotlin.md +1 -0
  150. package/package/corpus/skills/cratis-chronicle-record-event/SKILL.md +3 -3
  151. package/package/corpus/skills/cratis-chronicle-record-event/references/csharp-coordination.md +31 -2
  152. package/package/corpus/skills/cratis-chronicle-record-event/references/csharp-history.md +21 -4
  153. package/package/corpus/skills/cratis-chronicle-record-event/references/csharp.md +20 -2
  154. package/package/corpus/skills/cratis-chronicle-record-event/references/go.md +1 -1
  155. package/package/corpus/skills/cratis-chronicle-record-event/references/java.md +1 -1
  156. package/package/corpus/skills/cratis-chronicle-record-event/references/kotlin.md +3 -0
  157. package/package/corpus/skills/cratis-chronicle-reduce-state/SKILL.md +2 -1
  158. package/package/corpus/skills/cratis-chronicle-reduce-state/references/csharp.md +3 -1
  159. package/package/corpus/skills/cratis-chronicle-reduce-state/references/java.md +10 -1
  160. package/package/corpus/skills/cratis-chronicle-reduce-state/references/kotlin.md +10 -1
  161. package/package/corpus/skills/cratis-chronicle-reduce-state/references/typescript.md +27 -5
  162. package/package/corpus/skills/cratis-chronicle-select-client/SKILL.md +18 -0
  163. package/package/corpus/skills/cratis-chronicle-select-client/references/elixir.md +21 -1
  164. package/package/corpus/skills/cratis-chronicle-select-client/references/go.md +13 -0
  165. package/package/corpus/skills/cratis-chronicle-select-client/references/java.md +15 -0
  166. package/package/corpus/skills/cratis-chronicle-select-client/references/kotlin.md +15 -0
  167. package/package/corpus/skills/cratis-chronicle-select-client/references/typescript.md +16 -0
  168. package/package/corpus/skills/cratis-chronicle-web-workbench/SKILL.md +1 -1
  169. package/package/corpus/skills/cratis-ci-pipeline-performance/SKILL.md +4 -3
  170. package/package/corpus/skills/cratis-ci-pipeline-performance/references/publish-pipelines.md +19 -4
  171. package/package/corpus/skills/cratis-code-review/SKILL.md +6 -2
  172. package/package/corpus/skills/cratis-code-review/references/csharp-diagnostics.md +28 -2
  173. package/package/corpus/skills/cratis-code-review/references/csharp.md +4 -4
  174. package/package/corpus/skills/cratis-commits-and-pull-requests/SKILL.md +6 -38
  175. package/package/corpus/skills/cratis-commits-and-pull-requests/references/pr-description.md +2 -0
  176. package/package/corpus/skills/cratis-commits-and-pull-requests/references/pr-labels-and-release.md +5 -4
  177. package/package/corpus/skills/cratis-commits-and-pull-requests/references/workflow-inputs.md +39 -0
  178. package/package/corpus/skills/cratis-components-accessibility/SKILL.md +6 -8
  179. package/package/corpus/skills/cratis-components-accessibility/references/typescript.md +32 -14
  180. package/package/corpus/skills/cratis-components-build-canvas/SKILL.md +4 -3
  181. package/package/corpus/skills/cratis-components-build-canvas/references/typescript-props.md +1 -1
  182. package/package/corpus/skills/cratis-components-build-canvas/references/typescript.md +4 -2
  183. package/package/corpus/skills/cratis-components-choose-control/SKILL.md +13 -7
  184. package/package/corpus/skills/cratis-components-choose-control/references/from-primereact.md +116 -0
  185. package/package/corpus/skills/cratis-components-choose-control/references/menu.md +90 -0
  186. package/package/corpus/skills/cratis-components-choose-control/references/typescript-composition.md +48 -0
  187. package/package/corpus/skills/cratis-components-choose-control/references/typescript.md +2 -2
  188. package/package/corpus/skills/cratis-components-compose-toolbar/SKILL.md +2 -1
  189. package/package/corpus/skills/cratis-components-compose-toolbar/references/floating-toolbar.md +146 -0
  190. package/package/corpus/skills/cratis-components-diagnose-screen/SKILL.md +102 -0
  191. package/package/corpus/skills/cratis-components-display-list/SKILL.md +10 -10
  192. package/package/corpus/skills/cratis-components-display-list/references/typescript-custom-panel.md +74 -0
  193. package/package/corpus/skills/cratis-components-display-list/references/typescript-datatables.md +2 -7
  194. package/package/corpus/skills/cratis-components-display-list/references/typescript.md +3 -2
  195. package/package/corpus/skills/cratis-components-submit-form/SKILL.md +6 -6
  196. package/package/corpus/skills/cratis-components-submit-form/references/typescript-commanddialog.md +21 -1
  197. package/package/corpus/skills/cratis-components-submit-form/references/typescript-commandform.md +72 -2
  198. package/package/corpus/skills/cratis-components-submit-form/references/typescript.md +7 -5
  199. package/package/corpus/skills/cratis-components-theme-application/SKILL.md +17 -15
  200. package/package/corpus/skills/cratis-components-theme-application/references/localization.md +166 -0
  201. package/package/corpus/skills/cratis-components-theme-application/references/typescript.md +18 -14
  202. package/package/corpus/skills/cratis-components-theme-application/references/upgrade-from-previous-major.md +141 -0
  203. package/package/corpus/skills/cratis-engineering-csharp-conventions/SKILL.md +2 -0
  204. package/package/corpus/skills/cratis-engineering-csharp-conventions/references/csharp-domain-philosophy.md +31 -3
  205. package/package/corpus/skills/cratis-engineering-csharp-conventions/references/csharp-fundamentals-helpers.md +119 -0
  206. package/package/corpus/skills/cratis-engineering-csharp-conventions/references/csharp.md +4 -0
  207. package/package/corpus/skills/cratis-fundamentals-concept/references/csharp-serialization.md +72 -1
  208. package/package/corpus/skills/cratis-fundamentals-concept/references/csharp.md +9 -0
  209. package/package/corpus/skills/cratis-fundamentals-concept/references/go.md +2 -1
  210. package/package/corpus/skills/cratis-fundamentals-concept/references/java-json.md +3 -2
  211. package/package/corpus/skills/cratis-fundamentals-concept/references/kotlin-json.md +3 -2
  212. package/package/corpus/skills/cratis-fundamentals-concept/references/typescript-serialization.md +41 -2
  213. package/package/corpus/skills/cratis-fundamentals-name-value/SKILL.md +8 -7
  214. package/package/corpus/skills/cratis-fundamentals-name-value/references/csharp.md +2 -1
  215. package/package/corpus/skills/cratis-fundamentals-type-discovery/SKILL.md +3 -3
  216. package/package/corpus/skills/cratis-fundamentals-type-discovery/references/csharp-diagnostics.md +8 -0
  217. package/package/corpus/skills/cratis-fundamentals-type-discovery/references/csharp.md +2 -2
  218. package/package/corpus/skills/cratis-fundamentals-type-discovery/references/go-dependency-injection.md +3 -0
  219. package/package/corpus/skills/cratis-modeling-design-event-model/SKILL.md +6 -4
  220. package/package/corpus/skills/cratis-modeling-design-event-model/references/command-inventory.md +7 -1
  221. package/package/corpus/skills/cratis-modeling-design-event-model/references/model-first.md +13 -1
  222. package/package/corpus/skills/cratis-modeling-design-event-model/references/review-one-slice.md +6 -0
  223. package/package/corpus/skills/cratis-multi-service-local-orchestration/SKILL.md +6 -6
  224. package/package/corpus/skills/cratis-multi-service-local-orchestration/references/csharp-aspire.md +116 -28
  225. package/package/corpus/skills/cratis-multi-service-local-orchestration/references/docker-compose.md +2 -2
  226. package/package/corpus/skills/cratis-observability/references/chronicle-kernel-export.md +46 -0
  227. package/package/corpus/skills/cratis-orleans-jobs/SKILL.md +4 -2
  228. package/package/corpus/skills/cratis-platform-build-application/SKILL.md +8 -0
  229. package/package/corpus/skills/cratis-platform-build-application/references/cratis-identity.md +71 -0
  230. package/package/corpus/skills/cratis-platform-build-application/references/studio-repository.md +96 -0
  231. package/package/corpus/skills/cratis-platform-deliver-slice/SKILL.md +14 -8
  232. package/package/corpus/skills/cratis-platform-deliver-slice/references/csharp.md +167 -3
  233. package/package/corpus/skills/cratis-platform-deliver-slice/references/eventual-consistency.md +150 -0
  234. package/package/corpus/skills/cratis-platform-deliver-slice/references/typescript.md +14 -1
  235. package/package/corpus/skills/cratis-platform-diagnose-slice/SKILL.md +1 -1
  236. package/package/corpus/skills/cratis-platform-prepare-release-pr/SKILL.md +8 -8
  237. package/package/corpus/skills/cratis-platform-prepare-release-pr/references/product-release-checks.md +16 -2
  238. package/package/corpus/skills/cratis-platform-start-application/SKILL.md +21 -0
  239. package/package/corpus/skills/cratis-platform-start-application/references/csharp.md +77 -3
  240. package/package/corpus/skills/cratis-platform-upgrade-application/SKILL.md +118 -0
  241. package/package/corpus/skills/cratis-platform-upgrade-application/references/csharp.md +117 -0
  242. package/package/corpus/skills/cratis-platform-upgrade-application/references/java.md +53 -0
  243. package/package/corpus/skills/cratis-platform-upgrade-application/references/kotlin.md +53 -0
  244. package/package/corpus/skills/cratis-platform-upgrade-application/references/typescript.md +71 -0
  245. package/package/corpus/skills/cratis-release-notes/SKILL.md +1 -1
  246. package/package/corpus/skills/cratis-release-notes/references/publish-repair.md +6 -3
  247. package/package/corpus/skills/cratis-screenplay-accept-model/references/csharp.md +34 -3
  248. package/package/corpus/skills/cratis-screenplay-accept-model/references/read-the-evidence.md +84 -3
  249. package/package/corpus/skills/cratis-screenplay-declare-slice/SKILL.md +7 -11
  250. package/package/corpus/skills/cratis-screenplay-declare-slice/references/commands.md +8 -4
  251. package/package/corpus/skills/cratis-screenplay-declare-slice/references/projections.md +2 -0
  252. package/package/corpus/skills/cratis-screenplay-declare-slice/references/structure-and-imports.md +29 -1
  253. package/package/corpus/skills/cratis-screenplay-edit-workspace/SKILL.md +2 -1
  254. package/package/corpus/skills/cratis-screenplay-edit-workspace/references/mcp-tools.md +1 -1
  255. package/package/corpus/skills/cratis-screenplay-handoff-slice/references/csharp.md +13 -1
  256. package/package/corpus/skills/cratis-screenplay-model-translation/SKILL.md +1 -1
  257. package/package/corpus/skills/cratis-screenplay-model-translation/references/boundary-diagnostics.md +1 -1
  258. package/package/corpus/skills/cratis-screenplay-onboard-workspace/SKILL.md +30 -51
  259. package/package/corpus/skills/cratis-screenplay-onboard-workspace/references/cli.md +19 -2
  260. package/package/corpus/skills/cratis-screenplay-onboard-workspace/references/smallest-model.md +87 -0
  261. package/package/corpus/skills/cratis-screenplay-onboard-workspace/references/studio.md +5 -0
  262. package/package/corpus/skills/cratis-screenplay-onboard-workspace/references/typescript.md +13 -0
  263. package/package/corpus/skills/cratis-screenplay-onboard-workspace/references/workspace-mcp.md +5 -0
  264. package/package/corpus/skills/cratis-screenplay-specify-outcome/SKILL.md +8 -12
  265. package/package/corpus/skills/cratis-screenplay-specify-outcome/references/running-mcp.md +12 -0
  266. package/package/corpus/skills/cratis-screenplay-specify-outcome/references/scenarios.md +2 -2
  267. package/package/corpus/skills/cratis-specifications-exercise-backend/SKILL.md +2 -0
  268. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-colocated.md +101 -0
  269. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-command-results.md +4 -2
  270. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-decision-reads.md +1 -0
  271. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-events.md +7 -0
  272. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-integration.md +7 -4
  273. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-reactors.md +18 -5
  274. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-read-models.md +4 -2
  275. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp.md +35 -2
  276. package/package/corpus/skills/cratis-specifications-exercise-backend/references/elixir.md +2 -0
  277. package/package/corpus/skills/cratis-specifications-exercise-backend/references/typescript.md +4 -2
  278. package/package/corpus/skills/cratis-specifications-isolate-behavior/SKILL.md +1 -1
  279. package/package/corpus/skills/cratis-specifications-isolate-behavior/references/csharp-running.md +10 -3
  280. package/package/corpus/skills/cratis-specifications-test-application-ui/references/typescript.md +22 -4
  281. package/package/corpus/skills/cratis-specifications-test-typescript-behavior/SKILL.md +2 -1
  282. package/package/corpus/skills/cratis-specifications-test-typescript-behavior/references/typescript.md +40 -0
  283. package/package/corpus/skills/cratis-stage-render-slice/SKILL.md +6 -0
  284. package/package/corpus/skills/cratis-stage-render-slice/references/semantic-conformance.md +64 -0
  285. package/package/profile-catalog.json +15 -0
  286. package/package.json +1 -1
@@ -93,6 +93,9 @@ val results = ops.perform() // or ops.clear() to discard pending entries
93
93
 
94
94
  Import `eventSequences.operations.operations`. For deferred writes use `val unit = store.unitOfWorkManager.begin()`, stage via `log.transactional.append(parcel.raw, weighed)` or `appendMany`, then `unit.commit()` and check `unit.isSuccess`, `getConstraintViolations()`, `getConcurrencyViolations()` and `getAppendErrors()`. Alternatively `unit.rollback()` before completion. Staged success has no assigned position; without a current unit the transactional facade writes immediately. `unitOfWorkManager.current` throws `NoUnitOfWorkHasBeenStarted` when none is active; test `hasCurrent` first. The ordinary log is always immediate.
95
95
 
96
+ - **One thread per unit:** the current unit is tracked per thread. `transactional` stages only on the thread that began the unit; on any other thread, including a coroutine that resumed on another dispatcher thread, it uses that thread's current unit, if there is one, and appends immediately when there is none. Begin, stage, commit and inspect on one thread, for example inside one `runBlocking` block without switching dispatcher.
97
+ - **Atomic per run, not per unit:** `commit()` appends in staging order, one atomic batch per run of consecutive events with the same sequence, source ID and options, one batch after another. A unit that stages for several sources is not atomic across them: an earlier batch stays appended when a later one is rejected, and `isSuccess` is then false. One source alone is not enough: staging for it again after another source, or with different options, starts a new batch. When all-or-nothing matters, stage one unbroken run with the same sequence, source ID and options.
98
+
96
99
  The Spring request filter commits after the chain returns unless already completed. If the HTTP result promises persistence, commit the existing `store.unitOfWorkManager.current` and inspect it **before** sending the response; do not begin a second unit. Collect `log.appendOperations.collect { batch -> batch.forEach { inspect(it.context, it.event, it.result) } }` in a separate coroutine for client instrumentation, not durable delivery.
97
100
 
98
101
  For corrections, imports, reads and seeding see [History and bootstrap](kotlin-history.md).
@@ -37,7 +37,8 @@ Catch-up, retry and replay must compute the same result from the same history. U
37
37
  - **Sequence:** select a named event sequence when the input is not the event log.
38
38
  - **Source store:** route a foreign store's subscribed events through its inbox; do not also select an unrelated sequence.
39
39
  - **Active flag:** disable continuous maintenance when the client should register the definition but not keep a sink current.
40
- - **Passive model:** reconstruct by key on demand when reads are rare or must fold the available history. Follow the SDK's passive declaration; an inactive observer alone does not universally enable passive reads. For a protected decision use `cratis-chronicle-protect-decision`.
40
+ - **Passive model:** reconstruct by key on demand when reads are rare or must fold the available history. Follow the SDK's passive declaration; an inactive observer alone does not universally enable passive reads. A passive read returns current state but does not guard a later append: another writer can append between the read and the write. When the state gates a write, guard the write. Use a reducer decision read only where the SDK offers one and admits this reducer; which reducers qualify differs per SDK, so follow the language reference and that skill. Otherwise guard a history read on the same sequence the append targets, or use a constraint that actually expresses the invariant (`cratis-chronicle-protect-decision`, `cratis-chronicle-constrain-append`).
41
+ - **Several sources, one instance:** not a reducer; its model is always keyed by event source. Build that model as a projection (`cratis-chronicle-project-view`). Chronicle does not apply its redelivery guard to a combined instance, so a repeated batch can be applied twice: keep its updates idempotent. Assign a value the event carries; do not turn a delta into an assignment.
41
42
  - **Bounded fold:** where offered, request a prefix of history for analysis; an event count is not an as-of timestamp.
42
43
  - **Labels:** attach observer tags for organization without changing which events reach the fold.
43
44
  - **Event-tag filter:** admit events matching any configured tag when only a tagged subset contributes. That rule holds on active delivery; check your language reference for on-demand reads.
@@ -90,6 +90,8 @@ public class AccountBalanceReducer : IReducerFor<AccountBalance>
90
90
 
91
91
  Same rules as above, except that methods are instance methods, the class may take constructor dependencies, and a method returning bare `Task` removes the instance. A model built by an `IReducerFor<T>` must not also declare static `Reduce` methods.
92
92
 
93
+ One read model per reducer class. A non-generic class that implements `IReducerFor<>` for two read models, including through a base class, fails default discovery with `TypeMustImplementOnlyOneReducer`; discovery skips generic classes. Analyzer CHR0057 reports the same shape at build time, inherited interfaces included. Split it into one reducer class per read model.
94
+
93
95
  ## Redacted events
94
96
 
95
97
  When an event is redacted, a reducer class that handles its type can also handle `EventRedacted` (`Cratis.Chronicle.Events`) to sanitize the derived state, or return `null` to remove it:
@@ -127,7 +129,7 @@ public record AccountBalance(decimal Balance, int RejectedWithdrawals) { /* Redu
127
129
 
128
130
  For an ordinary typed read use `var balance = await eventStore.ReadModels.GetInstanceById<AccountBalance>("account-1");`. The same call reads a materialized reducer or folds a passive reducer on demand. Handle missing state.
129
131
 
130
- Use it for state read to make a decision (`cratis-chronicle-protect-decision`) or read rarely. It costs an event read per call and does not create a queryable collection. For explicit reconstruction:
132
+ Use it for state that is read rarely or must be current when read. It costs an event read per call and does not create a queryable collection. A passive read does not guard a later append: another writer can append between the read and the write. When the state gates a write, read it as a decision read (`cratis-chronicle-protect-decision`). Check `eventStore.GetDecisionReads().Admit<AccountBalance>()` first and act on `IsAdmitted` and `Reason`. Refusals include a reducer that observes another sequence than the event log, filters its events, is a separate reducer class with a constructor dependency other than `ILogger<T>`, handles more than one generation of an event type, or is asked for a single stream; the list is not exhaustive. On refusal, do not fall back to the unguarded read. Guard a history read only when the append targets the same sequence that read covered, because the concurrency check runs against the sequence being appended to. Otherwise use a constraint, and only one that actually expresses the invariant (`cratis-chronicle-constrain-append`). For explicit reconstruction:
131
133
 
132
134
  ```csharp
133
135
  var reducers = eventStore.Reducers;
@@ -1,5 +1,13 @@
1
1
  # Fold a source's events in Java
2
2
 
3
+ ## Contents
4
+
5
+ - Start and read
6
+ - Configure input and storage
7
+ - Batch instead of per-event handlers
8
+ - Operations and boundaries
9
+ - Definition errors
10
+
3
11
  Use `io.cratis:chronicle`. The example names are illustrative. Put the public types below in separate files in the application's discovery package. `EventType` and `EventContext` are in `io.cratis.chronicle.events`, `ReadModel` and `Passive` in `io.cratis.chronicle.readModels`, and the handler annotations and batch types in `io.cratis.chronicle.observation`.
4
12
 
5
13
  ```java
@@ -42,7 +50,8 @@ SlotState slot = store.getReadModels().getInstanceByKey(SlotState.class, "slot-7
42
50
 
43
51
  ## Configure input and storage
44
52
 
45
- - IDs default to simple class names. Set stable IDs on the reducer and model to survive renames. `@Reducer(eventSequence = "dispatch-input")` overrides the event-log default; a nonempty `@EventSequence("dispatch-input")` on the class takes precedence.
53
+ - IDs default to simple class names. Set stable IDs on the reducer and model to survive renames. `@Reducer(eventSequence = "dispatch-input")` overrides the event-log default; a nonempty `@EventSequence("dispatch-input")` on the class takes precedence. There is no `@EventLog` or `@EventStore` annotation: a reducer that names no sequence already reads the event log.
54
+ - Every handler groups by event source ID. `@ContextKey` has no effect; for a different key use a projection: `@FromEvent(key = …)` on a model-bound projection for a key in the payload, or the key in a projection builder.
46
55
  - `@Tag({"dispatch", "operations"})` labels the reducer without filtering. Repeat `@FilterEventsByTag("confirmed")` with another value to register multiple input tags; `@EventSourceType("slot")` and `@EventStreamType("reservations")` further restrict input. Without these annotations nothing is filtered. **Passive local reads require all configured tags**; use a single tag when the same admission rule must hold on both paths.
47
56
  - Active is the default. Mark `SlotState` with `@Passive` or set `@Reducer(isActive = false)` to register without a sink. The same key lookup on the client hosting that registration fetches matching source history and folds from null. No matching state yields null; a fold failure reaches the caller.
48
57
  - For a bounded passive report use `ReadModelsJavaBridge.getInstances(store.unwrap().getReadModels(), SlotState.class, 100L)`. The bound is on matching events in sequence order **across sources before grouping**, not rows per source. Omit the count for the full result.
@@ -1,5 +1,14 @@
1
1
  # Fold read-model state in Kotlin
2
2
 
3
+ ## Contents
4
+
5
+ - Registration and routing
6
+ - Passive and bounded reads
7
+ - Batch alternative
8
+ - Operations
9
+ - Definition errors
10
+ - Not supported in this SDK
11
+
3
12
  Use the `io.cratis:chronicle` client with a connected event store. Put the event, model and separate reducer in the application's discovered packages. Names are illustrative.
4
13
 
5
14
  ```kotlin
@@ -29,7 +38,7 @@ Use public regular or `suspend` member functions; the first parameter's `@EventT
29
38
 
30
39
  Automatic registration is on by default. Use `options.withArtifactsFrom("example.slots")` to scope discovery, or supply `artifacts = KnownClientArtifacts(SlotReserved::class, ReservationCancelled::class, Slot::class, SlotReducer::class)` in `ChronicleOptions` rather than scan. For a manually wired reducer, with event types registered, call `store.reducers.register(SlotReducer())` from a coroutine; it returns the observation `Job`. Do not also auto-register the reducer. The instance is shared across sources; inject only dependencies safe for concurrent deterministic use. `ChronicleOptions.artifactActivator` creates each discovered reducer once, at registration; replace it to resolve reducers from a dependency container. It is not invoked per delivery.
31
40
 
32
- The observer ID defaults to the reducer class's simple name; the model ID defaults to the model's simple name (override with `@ReadModel(id = "slots")`). Active maintenance reads the event log unless you set `@Reducer(eventSequence = "dispatch")`; a nonempty observation `@EventSequence("dispatch")` takes precedence. All handlers group by event source ID.
41
+ The observer ID defaults to the reducer class's simple name; the model ID defaults to the model's simple name (override with `@ReadModel(id = "slots")`). Active maintenance reads the event log unless you set `@Reducer(eventSequence = "dispatch")`; a nonempty observation `@EventSequence("dispatch")` takes precedence. There is no `@EventLog` or `@EventStore` annotation: a reducer that names no sequence already reads the event log. All handlers group by event source ID. `@ContextKey` has no effect; for a different key use a projection: `@FromEvent(key = …)` on a model-bound projection for a key in the payload, or the key in a projection builder.
33
42
 
34
43
  Apply observation annotations to the reducer class as needed:
35
44
 
@@ -1,18 +1,40 @@
1
1
  # Fold state in a Node server
2
2
 
3
+ ## Contents
4
+
5
+ - Register a separate reducer
6
+ - Configure the definition
7
+ - Fold a batch instead
8
+ - Lifecycle and operations
9
+ - Not supported in this SDK
10
+
3
11
  ## Register a separate reducer
4
12
 
5
- Enable TypeScript's `experimentalDecorators`. Import `reflect-metadata` before decorated modules and load those modules before obtaining the event store. Use a long-lived client with keep-alive enabled. Names below are illustrative.
13
+ Use the project's single decorator mode. Standard decorators are the default: leave `experimentalDecorators` and `emitDecoratorMetadata` unset. In standard mode every serialized member of an event or read model is a public instance field, not an accessor, whose type the client can resolve: prefer an explicit `@field(Type)` from `@cratis/fundamentals`, which works in both modes; a default value the client can infer the type from also works. Constructor parameter properties (`constructor(readonly reservation: string)`) on events and read models require legacy mode. A project in legacy mode enables `experimentalDecorators`; also enable `emitDecoratorMetadata` when member types are to be inferred from emitted metadata. Explicit `@field(Type)` members do not depend on it.
14
+
15
+ Import `reflect-metadata` before decorated modules and load those modules before obtaining the event store. Use a long-lived client with keep-alive enabled. Names below are illustrative.
6
16
 
7
17
  ```ts
8
18
  import 'reflect-metadata';
9
19
  import { ChronicleClient, ChronicleOptions, eventType, handles, reducer, type EventContext } from '@cratis/chronicle';
20
+ import { field } from '@cratis/fundamentals';
10
21
 
11
22
  @eventType('slot-reserved')
12
- class SlotReserved { constructor(readonly reservation: string) {} }
23
+ class SlotReserved {
24
+ @field(String) reservation: string;
25
+ constructor(reservation: string) { this.reservation = reservation; }
26
+ }
27
+
13
28
  @eventType('reservation-ended')
14
- class ReservationEnded { constructor(readonly reservation: string) {} }
15
- class Occupancy { id = ''; reservation = ''; }
29
+ class ReservationEnded {
30
+ @field(String) reservation: string;
31
+ constructor(reservation: string) { this.reservation = reservation; }
32
+ }
33
+
34
+ class Occupancy {
35
+ @field(String) id = '';
36
+ @field(String) reservation = '';
37
+ }
16
38
 
17
39
  @reducer('slot-occupancy', undefined, Occupancy)
18
40
  class SlotOccupancy {
@@ -31,7 +53,7 @@ const store = await client.getEventStore('Scheduling');
31
53
  const occupied = await store.readModels.findInstanceById(Occupancy, 'slot-42'); // null if absent
32
54
  ```
33
55
 
34
- A handler is a prototype method (not an arrow field), named after the event in lower camel case or explicitly bound with `@handles`. Synchronous and promised results work. Treat the payload and state as data, not class instances. The optional third parameter supplies `sequenceNumber` (bigint), `occurred`, `causedBy` and other recorded metadata. Return the whole replacement, the current value to ignore, or an absent result to remove (`undefined` or `null`; prefer `undefined` consistently). A later reservation can create the model again. Throw on an unexpected failure.
56
+ A handler is a prototype method (not an arrow field), named after the event in lower camel case or explicitly bound with `@handles`. Synchronous and promised results work. On event and read-model classes (not the reducer), name each constructor parameter after the field it assigns and keep the constructor safe to call without arguments: the client constructs these types with no arguments and then assigns fields. Treat the payload and state as data, not class instances. The optional third parameter supplies `sequenceNumber` (bigint), `occurred`, `causedBy` and other recorded metadata. Return the whole replacement, the current value to ignore, or `undefined` to remove. Never return `null`: it does not remove the model. Returning `null` passes it as current state to the next handler for the same event source in that delivery. If `null` is still the final result, a live reducer fails that event source instead of deleting the model, and `ReadModelScenario` keeps the null state; normal live delivery then skips the failed source until it recovers. When `undefined` is the final result of a successful delivery, the stored model is removed and a later reservation for the same source can recreate it. Throw on an unexpected failure.
35
57
 
36
58
  The decorator registers both classes for discovery. Without a bound model constructor the identifier falls back to the reducer class name and the SDK registers an open schema. For explicit wiring supply `clientArtifactsProvider` in the options factory with `eventTypes: [SlotReserved, ReservationEnded]`, `reducers: [SlotOccupancy]`, `readModels: [Occupancy]` and the provider's remaining artifact lists; use `discoveryPatterns: []` to avoid scanning. Normal store startup handles discovery and registration (`store.reducers.discover()` and `register()` for explicit lifecycle management).
37
59
 
@@ -24,3 +24,21 @@ Read `references/<language>.md` for the project's SDK (`.csproj` → csharp, Nod
24
24
  - **Wire contracts** — choose these alone for a tool inspecting or encoding protocol messages. A serialize/decode round trip tests the message shape, not kernel acceptance. Where a language has no application client, the contracts are for offline inspection only; send application work to the owning service.
25
25
  - **Test support** — the in-process testing dependency belongs in the specification project only, never in the service; selecting and using it is covered by `cratis-specifications-exercise-backend`.
26
26
  - **Service boundary** — when the calling process has no application SDK or does not own the operation, call the owning service instead of implementing an application client with generated stubs.
27
+ - **Dapr or Wolverine** — no released Chronicle package integrates with either; do not add or assume one. Bridge from the service that owns the events: have the kernel deliver them to an HTTP receiver as a webhook (`cratis-chronicle-publish-contract`), or call the other system from a reactor (`cratis-chronicle-react-to-fact`). In a Marten and Wolverine (Critter Stack) application, both may stay live while Chronicle takes over chosen workloads; bridge them explicitly. To trace what to move, see `cratis-modeling-trace-existing-behavior`.
28
+
29
+ ## What differs from the .NET client
30
+
31
+ No client outside .NET is a full copy of the .NET client. Before committing a feature to another language, confirm it in that language's reference for the feature's skill, then exercise it against the intended kernel in a disposable namespace.
32
+
33
+ | Language | Application client | How artifacts get registered |
34
+ |---|---|---|
35
+ | .NET | Yes | Discovered from the entry assembly, its project references and the package references whose names match the configured prefixes (`Cratis` by default) |
36
+ | TypeScript (Node) | Yes | Class-decorated artifacts in imported modules; importing also covers a read model mapped only on properties with legacy decorators. The client scans files only when run from TypeScript sources, under Vitest or with discovery patterns set; compiled JavaScript gets no scan by default. A standard-decorated read model mapped only on properties is known before an instance is constructed only when it is an exported class in a scanned file, carries a class decorator or is registered explicitly |
37
+ | Kotlin and Java | Yes, one JVM client | Classpath scan, which can be narrowed to named packages |
38
+ | Go | Yes, but not at a stable major release: the API may change and a feature is supported only in its documented shape | Only types the code registers; no package scan, but handler methods are discovered on a registered type |
39
+ | Elixir | Yes | Scan of the modules of the OTP application named to the client; with none named, only modules already loaded |
40
+ | Python | No | Not applicable; see the Python reference |
41
+
42
+ Never assume .NET-style assembly discovery in another language; registration details are in `cratis-chronicle-connect-application`.
43
+
44
+ Aggregate roots are not part of any Chronicle client. They come from Arc's Chronicle integration, and only where that language's reference in `cratis-arc-declare-command` describes them. Everywhere else, follow that language's reference in `cratis-chronicle-protect-decision`: decide from a protected reducer, projection or decision read only where that reference supports it; otherwise read the complete relevant history and guard the append on it, because an ordinary model read does not return the history position a guard needs. Either way, do not re-implement an aggregate base class on top of the client.
@@ -1,8 +1,16 @@
1
1
  # Choose the Chronicle dependency in Mix
2
2
 
3
+ ## Contents
4
+
5
+ - [Service or worker: application client](#service-or-worker-application-client)
6
+ - [OTP host: supervise the same client](#otp-host-supervise-the-same-client)
7
+ - [Protocol tool: contracts only](#protocol-tool-contracts-only)
8
+ - [Upgrading across the module rename](#upgrading-across-the-module-rename)
9
+ - [Not supported in this SDK](#not-supported-in-this-sdk)
10
+
3
11
  ## Service or worker: application client
4
12
 
5
- In the Mix project that owns the events, add `:cratis_chronicle` to `deps/0` in `mix.exs`, using the dependency tuple from its Hex listing. Use an Elixir toolchain satisfying the package's declared requirement. Run `mix deps.get` and `mix compile`. In `mix deps`, expect `:cratis_chronicle_contracts` as a dependency of the client; do not override it. Compilation checks dependency selection, not connectivity.
13
+ In the Mix project that owns the events, add `:cratis_chronicle` to `deps/0` in `mix.exs`, using the dependency tuple from its Hex listing. The client requires Elixir 1.18 or later. Run `mix deps.get` and `mix compile`. In `mix deps`, expect `:cratis_chronicle_contracts` as a dependency of the client; do not override it. Compilation checks dependency selection, not connectivity.
6
14
 
7
15
  ## OTP host: supervise the same client
8
16
 
@@ -47,6 +55,18 @@ message = %EventType{Id: "parcel-scanned", Generation: 1}
47
55
 
48
56
  The match checks local encoding and decoding; it neither opens a connection nor tests kernel acceptance.
49
57
 
58
+ ## Upgrading across the module rename
59
+
60
+ Edge case, upgrades only. The major that moved the client's modules under `Cratis.Chronicle` renamed every module from `Chronicle.` to `Cratis.Chronicle.`. The rename itself needs one change in application code; other changes between majors, in behaviour or defaults, are separate, so read the release notes of every major crossed. For the rename, replace `Chronicle.` with `Cratis.Chronicle.` wherever its own code refers to a client module (`use`, `alias`, `import`, `@behaviour`, type specs, function calls and the testing helpers). Rename bare references to the top-level module too: `alias Chronicle` or `Chronicle` passed as a value has no trailing dot, so that replacement misses it, and it must become `Cratis.Chronicle`.
61
+
62
+ Do not rename anything else. These stay as they were:
63
+
64
+ - the Hex package and OTP application `:cratis_chronicle`, and every `config :cratis_chronicle` key;
65
+ - the Mix task `mix chronicle.discover`;
66
+ - telemetry event names (`[:chronicle, ...]`);
67
+ - event type ids, observer ids and read model names, so stored events and registered observers keep working without a migration;
68
+ - the application's own modules, including ids that default from their names.
69
+
50
70
  ## Not supported in this SDK
51
71
 
52
72
  - A separate combined Arc and Chronicle package: `:cratis_arc` already depends on `:cratis_chronicle`. When Arc owns the command endpoint of an event-sourced application, add `:cratis_arc` instead of declaring `:cratis_chronicle` yourself, and supervise the client child above before `Cratis.Arc.Application`; host setup is in `cratis-arc-host-application`.
@@ -1,5 +1,18 @@
1
1
  # Select the Go dependency by workload
2
2
 
3
+ ## Contents
4
+
5
+ - [Requirements and maturity](#requirements-and-maturity)
6
+ - [Service or worker: application client](#service-or-worker-application-client)
7
+ - [Existing Arc integration: use the host's dependency set](#existing-arc-integration-use-the-hosts-dependency-set)
8
+ - [Protocol tool: use only the required contracts package](#protocol-tool-use-only-the-required-contracts-package)
9
+ - [Not supported in this SDK](#not-supported-in-this-sdk)
10
+
11
+ ## Requirements and maturity
12
+
13
+ - Requires Go 1.26 or later.
14
+ - The client has not reached a stable major release. Its API may change between releases, and a feature is supported only in the shape its reference describes, not everything the .NET client does with the same name. Say so when Go is proposed for a workload, and verify the exact operation the workload needs against the intended kernel before committing to it.
15
+
3
16
  ## Service or worker: application client
4
17
 
5
18
  In the service directory containing `go.mod`, add the client and confirm the selected module:
@@ -1,5 +1,20 @@
1
1
  # Select the JVM client from Java
2
2
 
3
+ ## Contents
4
+
5
+ - [Requirements](#requirements)
6
+ - [Standalone worker](#standalone-worker)
7
+ - [Spring Boot host](#spring-boot-host)
8
+ - [Specification module](#specification-module)
9
+ - [Wire inspection only](#wire-inspection-only)
10
+ - [Not supported in this SDK](#not-supported-in-this-sdk)
11
+
12
+ ## Requirements
13
+
14
+ - Java 17 or later, and `kotlinx-coroutines` 1.10.2 or later on the runtime classpath. The client brings a suitable coroutines version, so a Java project declares nothing for it; the requirement matters only when the build pins an older one.
15
+ - The Spring Boot starter requires Spring Boot 4. Its per-request features need the servlet stack (Spring MVC); they do not apply to WebFlux.
16
+ - `io.cratis:chronicle`, `io.cratis:chronicle-spring-boot-starter` and `io.cratis:chronicle-testing` are released together under one version number. Keep every one the build declares on the same version; never mix versions between them.
17
+
3
18
  ## Standalone worker
4
19
 
5
20
  Resolve `io.cratis:chronicle` from Maven Central. It supplies its matching `chronicle-contracts` dependency; do not select a second contracts version. Specify `io.cratis:chronicle` in the build's dependency catalog and select the latest published artifact. Then declare it in the module that uses it; `libs.cratis.chronicle` is an alias your own catalog defines:
@@ -1,5 +1,20 @@
1
1
  # Select the Chronicle dependency for Kotlin
2
2
 
3
+ ## Contents
4
+
5
+ - [Requirements](#requirements)
6
+ - [Standalone JVM service or worker](#standalone-jvm-service-or-worker)
7
+ - [Existing Spring Boot host](#existing-spring-boot-host)
8
+ - [Specification module](#specification-module)
9
+ - [Protocol tool only](#protocol-tool-only)
10
+ - [Not supported in this SDK](#not-supported-in-this-sdk)
11
+
12
+ ## Requirements
13
+
14
+ - Java 17 or later, and `kotlinx-coroutines` 1.10.2 or later on the runtime classpath. The client brings a suitable coroutines version; the requirement matters only when the build pins an older one.
15
+ - The Spring Boot starter requires Spring Boot 4. Its per-request features need the servlet stack (Spring MVC); they do not apply to WebFlux.
16
+ - `io.cratis:chronicle`, `io.cratis:chronicle-spring-boot-starter` and `io.cratis:chronicle-testing` are released together under one version number. Keep every one the build declares on the same version; never mix versions between them.
17
+
3
18
  ## Standalone JVM service or worker
4
19
 
5
20
  Use a Kotlin/JVM module and Maven Central. Declare `io.cratis:chronicle` in the module that owns the event-store operation. With a Gradle version catalog, define `libs.cratis.chronicle` for that coordinate and use `implementation(libs.cratis.chronicle)`. The client supplies its matching `io.cratis:chronicle-contracts` dependency; do not select a separate contracts version.
@@ -1,5 +1,21 @@
1
1
  # Select the Chronicle dependency for Node
2
2
 
3
+ ## Contents
4
+
5
+ - [Runtime and module requirements](#runtime-and-module-requirements)
6
+ - [Standalone server or worker](#standalone-server-or-worker)
7
+ - [Existing Arc server](#existing-arc-server)
8
+ - [Wire inspection tool only](#wire-inspection-tool-only)
9
+ - [Not supported in this SDK](#not-supported-in-this-sdk)
10
+
11
+ ## Runtime and module requirements
12
+
13
+ - **Node.js 22.19 or later.** On an older runtime, such as Node.js 20, the package fails when it is imported. The package itself declares no `engines` requirement, so pin the runtime in the service yourself.
14
+ - **TypeScript 5.2 or later**, needed for standard decorators.
15
+ - **Module format.** The package ships ES modules only. For a new service, set `"type": "module"` in its `package.json`. An existing CommonJS host need not convert: it can `require()` the package on a Node.js version that supports requiring ES modules.
16
+ - **Module resolution.** With `"moduleResolution": "NodeNext"` also set `"skipLibCheck": true`; without it the compiler reports errors inside the contracts dependency's declaration files. `"moduleResolution": "Bundler"` needs no extra setting.
17
+ - **Imports.** Import application types from the package root, `@cratis/chronicle`. Per-feature sub-paths such as `@cratis/chronicle/events`, `/reactors`, `/reducers`, `/projections`, `/readModels` and `/transactions` export the same types as the root. The testing helpers are the exception: they are exported only from `@cratis/chronicle/testing`.
18
+
3
19
  ## Standalone server or worker
4
20
 
5
21
  In the Node server's package, install `npm install @cratis/chronicle @cratis/fundamentals`. Fundamentals is a peer dependency; let the application SDK resolve its own `@cratis/chronicle.contracts` dependency. Use the SDK's ESM entry point. Names are illustrative.
@@ -20,7 +20,7 @@ If inspection points to a write, identify the exact target and effect, preserve
20
20
 
21
21
  - **Dashboard** — inspect namespace health before drilling into an individual observer or sequence.
22
22
  - **Sequences: query** — choose the sequence, sort results and narrow by event type, source ID, source type, stream type, correlation, tags or occurrence interval to locate an event.
23
- - **Saved queries and folders** — organize, save or delete reusable filters. `User` is private; `Everyone` shares visibility, not editing rights. Only the owner or an administrator may change or delete an item; save a copy to adapt someone else's query. Folder deletion can leave undeletable contents behind.
23
+ - **Saved queries and folders** — organize, save or delete reusable filters. `User` is private; `Everyone` shares visibility, not editing rights. Only the owner or an administrator may change or delete an item; save a copy to adapt someone else's query. The owner is set when the item is first saved: the `sub` claim of the principal as resolved after authentication (Chronicle fills a missing `sub` from the user ID), else the identity name, else `anonymous` — for unauthenticated callers and for authenticated principals with neither, who then all share that owner. A client cannot set it, and saving over an item or an administrator's edit keeps it, so ownership cannot be transferred. Owners are compared exactly, including case and trailing spaces. Deleting a folder selects, before asking for confirmation, each loaded query and stored folder in the current namespace and scope whose raw stored path equals the selected folder's displayed path or starts with it followed by `/`; after confirmation it sends a separate delete for each. Display equivalence alone does not match: deleting `A/B` includes `A/B/` but skips `A//B`. Refused items stay. The tree displays paths with blank segments dropped and segments trimmed, so a deleted folder still shows after refresh while any visible query or folder record in the same namespace and scope displays at or below it; for example, a surviving `A//B` brings `A/B` back.
24
24
  - **Export** — download every event the current query matches, not just the visible page, as one JSON file. Content is unmasked: narrow the query first and treat the file as sensitive.
25
25
  - **Event details / Compare revisions** — inspect stored content and compare raw revisions without modifying history.
26
26
  - **Append** — add a new event only for an intended fact. For an ambiguous append use `cratis-chronicle-record-event`, not revision.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: cratis-ci-pipeline-performance
3
- description: Use when a GitHub Actions workflow in a Cratis repository is slow, waits for runners, wastes runner minutes or keeps failing, rerunning or cancelling, or before adding a cache, shard, path filter, concurrency group, runner label or shared Cratis workflow to speed one up. Also when pull-request CI should run only the .NET tests a change can reach with `cratis affected` (rollout, committed coverage maps, full-run triggers and mapped paths). Not for checking whether an expected run passed (use `cratis-engineering-ci-gates`), application runtime performance (use `cratis-performance-review`) or release labels and notes (use `cratis-platform-prepare-release-pr`).
3
+ description: Use when a Cratis GitHub Actions workflow is slow, waits for runners, wastes runner minutes or keeps failing, rerunning or cancelling, or to stop Publish runs cancelling or dropping releases as merges cluster, or before adding a cache, shard, path filter, concurrency group, runner label or shared Cratis workflow. Also when pull-request CI should run only the .NET tests a change can reach with `cratis affected` (rollout, coverage maps, full-run triggers, mapped paths). Not for whether an expected run passed (use `cratis-engineering-ci-gates`), app runtime speed (use `cratis-performance-review`), release labels and notes (use `cratis-platform-prepare-release-pr`) or recovering a failed or missing release (use `cratis-release-notes`).
4
4
  license: LICENSE
5
5
  ---
6
6
 
@@ -31,7 +31,8 @@ Prefer thin callers of shared actions and workflows. Private repositories use sh
31
31
  | Did this change's run pass; watch it by head SHA | `cratis-engineering-ci-gates` |
32
32
  | The application, not the pipeline, is slow | `cratis-performance-review` |
33
33
  | Release label and publishable pull request description | `cratis-platform-prepare-release-pr` |
34
- | A release ran wrongly or was lost | `cratis-release-notes` |
34
+ | Publish runs cancel or replace each other and drop releases; diagnose and prevent it | This skill |
35
+ | Recover a release that already ran wrongly, failed or went missing | `cratis-release-notes` |
35
36
  | Release assurance | `cratis-governed-release-methodology` |
36
37
 
37
38
  Follow the `github-actions` rule (engineering profile) for timeouts, concurrency,
@@ -132,7 +133,7 @@ The CI mechanisms here are not application SDK APIs. Examples use illustrative n
132
133
  | Control | What, when |
133
134
  | --- | --- |
134
135
  | `concurrency.group` + `cancel-in-progress` | Cancel superseded verification; true only for pull requests |
135
- | `concurrency.queue: max` | Release and publish groups: keep every pending run in order; omit `cancel-in-progress` |
136
+ | `concurrency.queue: max` | Release and publish groups: keep up to 100 pending runs in order; omit `cancel-in-progress` |
136
137
  | `timeout-minutes` | Every job, sized to its tier, so a hang cannot hold a runner for hours |
137
138
  | `needs` + `if: always()` | The required aggregator inspects every direct dependency's result |
138
139
  | `on.<event>.paths` / `paths-ignore` | Only on workflows that are not required checks; required ones skip jobs instead |
@@ -98,10 +98,25 @@ concurrency:
98
98
  base branch (for example `refs/heads/main`). A newer merge's pending run then
99
99
  replaces the older pending one unless `queue: max` is set. Only a `closed` event
100
100
  of an unmerged pull request keeps `refs/pull/N/merge`, a group of its own.
101
- - A replaced pending run is lost work only when that run alone would have released
102
- something. Release tooling that aggregates everything since the last release
103
- loses nothing when a pending run is replaced; such a workflow may keep one
104
- pending slot, with a comment beside the `concurrency` block saying so.
101
+ - A replaced pending run is lost work unless the run that replaces it covers the
102
+ dropped run's full range and makes the same release decision. Only then may a
103
+ workflow keep the single default pending slot, with a comment beside the
104
+ `concurrency` block saying why. Otherwise keep `queue: max`.
105
+ - Existing `cratis/release-action` workflows that set `release-window` keep
106
+ `queue: max`; their pending runs are not interchangeable:
107
+ - A batched run collects the eligible merged pull requests into the default branch on
108
+ first-parent history after the latest stable release tag (or the latest
109
+ stable version tag when there is no stable release), up to and including the
110
+ commit that triggered it.
111
+ - A manual flush releases at once. A merge run that replaces it releases only
112
+ when the oldest included merge has reached the window, or when a `hotfix`
113
+ pull request is included and no `major` one is pending. Publication is
114
+ delayed; the window does not restart.
115
+ - A run whose target is already covered by the latest release reports
116
+ `nothing-pending`. When that tag cannot be reached along first-parent
117
+ history, or there is no tag and that history exceeds 250 commits, the action
118
+ falls back to single pull-request selection, which can release nothing.
119
+ - Use one group shared by every trigger so version claims run one at a time.
105
120
  - Groups are repository-scoped; this is not an organization-wide release lock.
106
121
  - Check the symptom in the report: many cancelled publish runs under one group
107
122
  point at a replaced pending slot.
@@ -121,8 +121,12 @@ Skip this section for platform or library code.
121
121
  - **Commands** (contract; `cratis-arc-declare-command`): the decision
122
122
  lives with the command. A business refusal is returned as a validation result,
123
123
  comes from a validator, or is an error the SDK marks as a validation failure;
124
- any other thrown error becomes an unexpected-error outcome, not a refusal. Data the decision needs is loaded in the command's provide
125
- step, not fetched inline in the handler.
124
+ any other thrown error becomes an unexpected-error outcome, not a refusal.
125
+ By default, data the decision needs arrives before the handler runs: as a
126
+ read-model parameter, as an aggregate the SDK injects, or from the command's
127
+ provide step. A handler may still call services or load state itself; the
128
+ language reference says what that leaves unguarded and which reads are
129
+ findings.
126
130
  - **Validation** (convention; `cratis-arc-validate-command`): validation
127
131
  rejects malformed or disallowed input; it does not make the business
128
132
  decision.
@@ -7,6 +7,7 @@
7
7
  - Chronicle client (CHR)
8
8
  - Specifications (CRSPEC)
9
9
  - Architecture (CRARCH)
10
+ - Editor fixes
10
11
 
11
12
  Severity is the default: E Error, W Warning, I Info. Info never fails a build, even with warnings as errors, so a reviewer reads Info output on changed code.
12
13
 
@@ -58,10 +59,11 @@ Severity is the default: E Error, W Warning, I Info. Info never fails a build, e
58
59
  | `CHR0004` W, `CHR0022` W, `CHR0031` W, `CHR0032` W, `CHR0054` W, `CHR0083` W | Reactors: resolvable parameters, `[OnceOnly]` when returning events, no mutable state, no direct storage, supported return type, no `async void` |
59
60
  | `CHR0006` W, `CHR0036` W, `CHR0051` W, `CHR0058` W, `CHR0059` E, `CHR0060` E, `CHR0065` W | Reducers and self reducers: signatures, no mutable state, nullable current model, discoverable fold |
60
61
  | `CHR0015` E, `CHR0016` E, `CHR0019` E | Projections: no side effects, no imperative code in `Define()`, lambdas only access members |
61
- | `CHR0017` E, `CHR0018` E, `CHR0020` E | Constraints: same purity rules |
62
+ | `CHR0017` E, `CHR0018` E, `CHR0020` E | Constraints: `CHR0017` the constraint's constructor takes `IEventLog` or `ICommandPipeline` (a constraint only declares rules; it never appends or runs a command); `CHR0018` a block-bodied `Define()` holds an imperative statement such as a conditional, loop or assignment as one of its top-level statements (only builder calls belong there); statements nested deeper, for example inside a callback, are not examined; `CHR0020` a property selector passed as an expression, as in `.On<TEvent>(e => e.Email)`, is not written as a plain member-access chain (a call such as `e => e.Email.ToLower()` is never run). The check is on the shape of the text only: it does not verify that the chain starts at the lambda parameter or names a property, so `e => e` and a chain rooted in a captured variable pass. Configuration callbacks such as the one passed to `Unique(...)` are not checked. A clean run of these three does not validate the constraint; read `Define()` |
62
63
  | `CHR0023` W, `CHR0024` W, `CHR0025` I, `CHR0028` W, `CHR0029` W, `CHR0030` W, `CHR0040` W, `CHR0042` W | Mapping: parent key, unmapped property, AutoMap collision, redundant AutoMap or same-name `Set().To()`, empty child collection, duplicate context sets, join overriding a local write |
63
64
  | `CHR0048` W | Clearing a non-nullable projection member is refused when building the projection. Use a nullable member for absence or set the intended value explicitly |
64
- | `CHR0026` W, `CHR0027` E, `CHR0055` E, `CHR0056` E, `CHR0062` I, `CHR0063` W, `CHR0064` E | Keys and streams: redundant `[Key]` on `EventSourceId<T>`, ambiguous stream id, typed filter conflicts, concurrency across event sources, scope stream mismatch, invalid read-model stream |
65
+ | `CHR0026` W, `CHR0027` E, `CHR0055` E, `CHR0056` E, `CHR0064` E | Keys and streams: redundant `[Key]` on `EventSourceId<T>`, ambiguous stream id, typed filter conflicts, invalid read-model stream |
66
+ | `CHR0062` I, `CHR0063` W | Concurrency: `CHR0062` the `Concurrency` dimensions declared on `[EventSource]` or `[EventStream]` are nonempty and omit `ConcurrencyDimensions.EventSourceId`, so the condition spans every event source within the remaining dimensions instead of guarding one (`ConcurrencyDimensions.None` is not reported); `CHR0063` a scope built from an event source definition is passed to a single-route append through the same definition but guards a different stream, reported only when both stream names are compile-time constants |
65
67
  | `CHR0034` E, `CHR0035` E, `CHR0043` W, `CHR0052` E, `CHR0053` E | Compliance: no `[PII]` or `[Encrypted]` on `EventSourceId<T>`, reserved subject property, key redirection carrying PII, not both `[PII]` and `[Encrypted]` |
66
68
  | `CHR0041` W, `CHR0045` W, `CHR0046` W, `CHR0057` W, `CHR0061` E | Inert filters, passive key redirection, one read model per artifact, unambiguous builder ownership |
67
69
  | `CHR0066`–`CHR0076` E, `CHR0077` W, `CHR0078`–`CHR0081` E | Graph elements and views; batch methods and `[Sink]` (`CHR0077`: a batch method matching an event type it does not observe) |
@@ -74,3 +76,27 @@ Ship with `Cratis.Specifications`. `CRSPEC0008` (a fact modifies the shared cont
74
76
  ## Architecture (CRARCH)
75
77
 
76
78
  Only when the project references `Cratis.Architecture.CodeAnalysis`. `CRARCH0012` (`async void`) and `CRARCH0014` (test types in production) are errors; the rest warn: `0001` exception type ends with `Exception`, `0002` built-in exception thrown, `0003` class postfix `Async`, `Helper`, `Impl`, `Manager` or `Service`, `0004` `Features` in a namespace, `0005` regions, `0006` logging not via `[LoggerMessage]`, `0007` `IServiceProvider` injected, `0008` not `is null`, `0009` not string interpolation, `0010` more than 7 constructor dependencies, `0011` more than 400 effective lines, `0013` blocking on async, `0015` static class not ending `Extensions`, `Converters`, `Ids`, `WellKnown` or `Defaults`, `0016` unused interface, `0017` namespace not matching folder, `0018` concrete type injected, `0019` `Async` method postfix, `0020` unhandled async call, `0021` `[Serializable]`, `0022` explicit `private`, `0023` untyped logger category, `0024` `[LoggerMessage]` outside an `internal static partial` `*LogMessages` class, `0025`/`0026` traces and metrics not through Cratis Fundamentals.
79
+
80
+ ## Editor fixes
81
+
82
+ Most diagnostics need a manual change. These offer an editor fix. Some fixes are withheld when they cannot be applied, so a missing fix does not mean the code is right; an offered fix is not proof that the result is correct or compiles. Review the result and compile after applying one.
83
+
84
+ | Ids | The fix |
85
+ | --- | --- |
86
+ | `ARC0010` | Unwraps `Handle()` to a synchronous return |
87
+ | `ARC0011` | Rewrites the role literal to `nameof(<Enum>.<Member>)`. It takes the first matching namespace-level enum in the compilation with a member of that name (nested enums are not searched), writes the unqualified enum name and adds no `using`; check that it chose the intended enum and that the name resolves |
88
+ | `ARC0028` | Moves the inline generation to a `[GeneratedValue]` parameter, one expression at a time (no fix-all) |
89
+ | `ARCCHR0008` | Replaces the data-annotations `[Key]` with the Chronicle `[Key]` |
90
+ | `ARCCHR0010` | Changes the raw `Guid` response identity to `EventSourceId<Guid>` (no fix-all) |
91
+ | `ARCCHR0013`, `ARCCHR0021` | Switches to the event source definition |
92
+ | `ARCCHR0015` | Returns an event or an explicit validation rejection instead of a nullable event (no fix-all) |
93
+ | `ARCCHR0016` | Removes `concurrency: true` |
94
+ | `ARCCHR0019` | Opts the whole read model, partial declarations included, into explicit query selection and marks the methods that qualify as queries with `[Query]`; it adds no marker to fold-shaped `Create` and `Reduce` methods, but it never removes one: a fold that already carries `[Query]` stays an endpoint, so remove that marker by hand. It changes which endpoints exist; review the endpoint diff (no fix-all) |
95
+ | `ARCCHR0031` | Uses `nameof` for the suggested lookup property |
96
+ | `CHR0001`–`CHR0003`, `CHR0005`, `CHR0007` | Adds a bare `[EventType]` and may add a `using`. The namespace it imports is not always the client one; check that the attribute resolves to `Cratis.Chronicle.Events.EventTypeAttribute` and correct the `using` if it does not |
97
+ | `CHR0026` | Removes the redundant `[Key]` and keeps `[Subject]` |
98
+ | `CHR0028`, `CHR0029` | Removes the redundant `.AutoMap()` call or `.Set(...).To(...)` mapping |
99
+ | `CHR0062` | Adds `ConcurrencyDimensions.EventSourceId` to the declared dimensions. Apply it only when the condition should guard one event source; a cross-source condition is a valid choice and stays as written |
100
+ | `CHR0083` | Changes an `async void` reactor handler to return `Task`; not offered for overrides and interface implementations |
101
+ | `CRARCH0008` | Rewrites `== null` to `is null` and `!= null` to `is not null` |
102
+ | `CRARCH0009` | Rewrites a `Format` call with a literal format string to an interpolated string. It replaces the text `{0}`, `{1}`, … wherever it occurs, without parsing the format string: placeholders with an alignment or format specifier are left as they are, and an escaped `{{0}}` has its inner `{0}` replaced too. Check every placeholder and any escaped braces |
@@ -20,7 +20,7 @@ Nothing to install for review: the analyzers arrive with the packages.
20
20
 
21
21
  - `Cratis.Arc.Core` (and so `Cratis.Arc`) brings the `ARC` analyzers; `Cratis.Arc.Chronicle` brings `ARCCHR`; `Cratis.Chronicle` brings `CHR`; `Cratis.Specifications` brings `CRSPEC`.
22
22
  - `CRARCH` runs only where the project references `Cratis.Architecture.CodeAnalysis`.
23
- - Every id with its default severity, grouped by area: [csharp-diagnostics.md](csharp-diagnostics.md).
23
+ - Every id with its default severity, grouped by area, and the ids that offer an editor fix: [csharp-diagnostics.md](csharp-diagnostics.md).
24
24
 
25
25
  ## Code analysis
26
26
 
@@ -60,7 +60,7 @@ public record ReserveSeat(ShowId Show, SeatNumber Seat, GuestName Guest)
60
60
  ```
61
61
 
62
62
  - **Commands.** `[Command]` record with a public `Handle()` (`ARC0002`–`ARC0004`, `ARC0007`). A refusal is returned: a `ValidationResult` (`ValidationResult.Error(message, members)`), or `Result<TValue, ValidationResult>` from `Cratis.Monads`; rules on input go in a `CommandValidator<TCommand>`. An ordinary throw is an exception outcome, not a refusal; only an exception implementing `IValidationFailure` becomes a validation failure. Don't wrap a synchronous result in `Task` (`ARC0010`).
63
- - **Data for the decision** arrives as `Handle()` parameters: a read model resolved by the command's key, or a value returned from `Provide()` (`ARC0005` flags one `Handle()` never takes). A reader or token queried inside `Handle()` is a finding (`ARCCHR0040`, `ARCCHR0028`). A non-nullable read-model parameter means absence rejects (`ARC0006`); make it nullable when absence is a normal outcome.
63
+ - **Data for the decision** usually arrives as `Handle()` parameters: a read model, an `AggregateRoot` rehydrated for the command's event source, or a value returned from `Provide()` (`ARC0005` flags one `Handle()` never takes). `Handle()` may also call services, which stay outside the read guard, or load another aggregate by explicit id through `IAggregateRootFactory`, which guards only its own source. How a read model's key is chosen is under **Selecting the instance**. Under `On`, a raw Chronicle read or `GetDetached` in a command or its validator is a finding (`ARCCHR0028`); the analyzer does not follow helper calls, so check those by hand. Any method marked `[Unprotected("reason")]` silences `ARCCHR0028`, but at runtime only one on `Handle()` or `Provide()` lets raw reads in its body run, as advisory reads that guard nothing; the decision must not rely on them. In a validator the read is still refused. `AllowReads` is a finding even in an `[Unprotected]` body. A `Handle()` parameter of type `IDecisionReads` or `DecisionRead<T>` is a finding (`ARCCHR0040`). Replace a `DecisionRead<T>` with a plain read-model parameter only when that keeps the same key, route, optionality and protection: an application can register its own `DecisionRead<T>` factory, and outside `On` a `[ProtectedDecision]` command can need the token to keep its guard. Keep `IDecisionReads.Get<T>` for a key or stream route no read-model parameter can bind, such as another stream or source, with an `ARCCHR0040` suppression beside it giving a reason and a tracking-feature link. That suppression does not excuse `ARCCHR0028` or a read-protection downgrade. A reader moved into `Provide()` to avoid `ARCCHR0040` is a finding. A non-nullable read-model parameter means absence rejects (`ARC0006`); make it nullable when absence is a normal outcome.
64
64
  - **Exception exposure.** `Cratis:Arc:ExposeExceptionDetails` (`ArcOptions.ExposeExceptionDetails`) defaults to true only in Development; a change that enables it elsewhere blocks. An `IExceptionResponseMapper` returning `ExceptionResponse(statusCode, errorCode)` maps an exception to an HTTP status and error code, still redacted; it is not a refusal.
65
65
  - **Events.** `[EventType]` records (`CHR0021`), no nullable properties (`CHR0012`), no repeated type name as id (`ARCCHR0004`). The id defaults to the type name, so renaming an event without a declared id changes its identity. Reshaping: new shape `[EventType(generation: 2)]`, previous shape kept with `[EventTypeGenerationFor<TCurrent>(1)]`, plus an `EventTypeMigration<TUpgrade, TPrevious>` per step (`CHR0084`). A handler returns events; it never returns a nullable event (`ARCCHR0015`).
66
66
  - **Values.** `ConceptAs<T>` records (`ARC0009`). An event-source identity derives from `EventSourceId<T>`, not `ConceptAs<Guid>`. One `EventSourceId<T>` property is the command's event source; with several, implement `ICanProvideEventSourceId` (`ARCCHR0002`). Use Chronicle's `[Key]`, never the data-annotations one (`ARCCHR0008`), and not on an `EventSourceId<T>` (`CHR0026`). Search for `record \w+\((Guid|string|int|long) Value\)` with no base type and judge each.
@@ -78,9 +78,9 @@ public record ReserveSeat(ShowId Show, SeatNumber Seat, GuestName Guest)
78
78
  - **Downgrades and bypasses, each needing a reason:**
79
79
  - `<CratisReadProtection>Off` or `Measure`.
80
80
  - `[ReadProtection(ReadProtectionMode.Off)]` on a command.
81
- - `[Unprotected("reason")]` on a command, read-model type or parameter. On a method it covers only reads in the body, not parameters (`ARCCHR0034`). A bare `[Unprotected]` compiles, so the reason is the review check.
81
+ - `[Unprotected("reason")]` on a command, read-model type or parameter. On `Handle()` or `Provide()` it covers only reads in the body, not parameters (`ARCCHR0034`). A bare `[Unprotected]` compiles, so the reason is the review check.
82
82
  - Runtime configuration under `Cratis:Arc:ReadProtection`. `MaximumMode` can only lower the mode. `StartupAdmissionCheck` `Off` and `RequireGeneratedMetadata` `false` weaken checks.
83
- - **Selecting the instance.** `[LookUpBy(nameof(Property))]` or `[LookUpBy<TKeyProvider>]` on a read-model parameter, not a manual lookup (`ARCCHR0023`, `ARCCHR0031`).
83
+ - **Selecting the instance.** For an ordinary Chronicle-backed read-model parameter, declare at most one lookup form: `[LookUpBy<TKeyProvider>]` (a key provider, such as the caller); `[LookUpBy(nameof(Property))]` (a named command property); or `[LookUpBy(nameof(sibling), nameof(SiblingModel.Property))]` (a property of another protected read-model parameter in the same `Handle()`, `Provide()` or validator constructor, under `On`). With none, the key is the command's event-source key, except that under `On` a single command property of the model's key type is used instead (several such properties are an error). A declared per-stream model always binds to the command's route and refuses `[LookUpBy]`. Without the Chronicle integration, Arc's own command-key rules apply. A key from another property, the caller or a related model therefore needs binding, not a manual lookup (`ARCCHR0023`, `ARCCHR0031`). The only exception is the reasoned `IDecisionReads.Get<T>` case under **Data for the decision**.
84
84
  - **Explicit decisions.** `[ProtectedDecision]` opts a command into protected reads. Its validators must have a parameterless constructor and be constructed by Arc.
85
85
  - **Appends.** A command never injects `IEventLog` (`ARCCHR0007`). It returns events, or `CompleteStream` to close a stream. When returning is impossible, use `IEventLog.Transactional`. An immediate append is refused under `On` even inside `[Unprotected]` (`ARCCHR0012`).
86
86
 
@@ -66,7 +66,7 @@ With `cratis/release-action`, inspect the decision, then confirm the release and
66
66
  | `already-released` | A release already exists for this commit; check artifact delivery separately |
67
67
  | `batched` | Wait for the window, or a pending `major` is holding a hotfix batch |
68
68
  | `nothing-pending` | No eligible changes to release in the range |
69
- | `no-prerelease-version` | No version for the open pull request |
69
+ | `no-prerelease-version` | Expected for an open, non-draft pull request whose head and base branches are not named after a version; nothing publishes. A version-named head or base branch sets the prerelease version (`cratis-platform-prepare-release-pr`); otherwise a draft gets `<latest release>-pr<number>.<short sha>`, with the latest release read at run time. A pull request event run uses the draft state and head SHA recorded in that event, so a re-run misses a later push or draft change; that needs a new event such as `synchronize`. A branch `push` run does not produce it |
70
70
  | `placeholder-version` | Manual trigger with only the placeholder and no release decision |
71
71
 
72
72
  For label repair and concurrent-tag retries, read [Release labels and publication](references/pr-labels-and-release.md). Route batched or partial publication recovery to `cratis-release-notes`.
@@ -142,13 +142,15 @@ Use `(#n)` only for verified issues fully delivered and authorized to close; nev
142
142
 
143
143
  ### Release labels
144
144
 
145
+ These are the default meanings. The Cratis Go SDKs are still v0.x and label a breaking change `minor`; see [Release labels and publication](references/pr-labels-and-release.md).
146
+
145
147
  - `major` — something a consumer compiles against, runs or relies on breaks; needs a human's explicit confirmation of that release and a human merge, every time.
146
148
  - `minor` — a new capability a consumer can adopt; nothing existing changes.
147
149
  - `patch` — a fix or internal change with identical contracts.
148
150
  - `no-release` — nothing a consumer compiles against, runs or observes changes, such as documentation, CI, tooling or spec-only work; still passes every required check.
149
151
  - Exactly one — set it in the creating command; swap it in one `gh pr edit --remove-label <old> --add-label <new>` so the pull request never carries two or none.
150
- - `hotfix` — in batch mode only, bypasses the window for all eligible pending changes; add beside an intent label. An included `major` blocks automatic hotfix publication: the hotfix merge run fails with `error`, and later non-manual runs can remain `batched`.
151
- - Batched release — nets reverts and excludes `no-release` and Dependabot before considering hotfix; highest intent wins, unlabeled changes add notes but no bump, and multiple descriptions combine by summary and section while keeping whole bullets and issue references.
152
+ - `hotfix` — in batch mode only, bypasses the window for all eligible pending changes; add beside an intent label. While the pending batch holds both a hotfix and a `major`, automatic publication stops: the hotfix's own merge run fails with `error` naming the major pull request, and other automatic runs warn and stay `batched`. A retry re-evaluates the batch and can end differently, for example `nothing-pending`. A manual Publish run with an empty or `0.0.0` version skips the window and this hold, not the other batch checks.
153
+ - Batched release — nets only recognized reverts of earlier pull requests in the batch, and excludes `no-release` and Dependabot before considering hotfix; highest intent wins; an unlabeled change adds notes but no bump, with a warning naming it (if no pending change has an intent, the reason is `no-label` and the batch stays pending); multiple descriptions combine by summary and section while keeping whole bullets and issue references.
152
154
  - Cratis AI corpus — installed guidance is the product: `patch` corrects guidance, `minor` adds guidance or a required step, `no-release` covers tests, evaluations and CI; a release that changes hooks tells consumers to run `cratis ai update`.
153
155
 
154
156
  ### Local checker
@@ -168,41 +170,6 @@ Run `node .cratis/ai/hooks/scripts/cratis-check-pr.mjs` from the repository root
168
170
  - Exit `3` — unchecked: required rules were unavailable and no usable fallback existed.
169
171
  - Rule lookup — fetch from the repository's policy caller; on failure a floating ref can use bundled rules, while a fixed ref generally needs its matching cached rules. The checker refuses a Cratis target with no recognized caller.
170
172
 
171
- ### Policy workflow inputs
172
-
173
- Check the caller's workflow for which inputs its referenced policy supports.
174
-
175
- - `runs-on` — select a different runner when the normal runner cannot run policy.
176
- - `release-intent` — control the `main` release-label gate; use only when the repository deliberately differs.
177
- - `extra-allowed` — allow additional root Markdown file names, comma-separated.
178
- - `extra-allowed-paths` — allow additional documentation directory prefixes, comma-separated.
179
- - `agent-authors` — list agent logins (comma- or newline-separated) to warn when a valid trace is missing on checked pull requests.
180
- - `require-agent-trace` — make that warning a failure for listed authors, regardless of label.
181
-
182
- ### Release-action inputs and outputs
183
-
184
- For workflow maintainers; use the repository's existing publication workflow when delivering a pull request.
185
-
186
- - `github-token` — supply a token when the workflow token cannot read pull requests or write releases with the required scopes.
187
- - `version` — use an explicit version for an authorized manual release instead of deriving it from intent.
188
- - `release-notes` — supply the body for an explicit manual release when no pull request body will be read.
189
- - `tag-prefix` — align version tags with a repository's naming convention.
190
- - `major-labels` — map alternate labels to a breaking release.
191
- - `minor-labels` — map alternate labels to a compatible feature release.
192
- - `patch-labels` — map alternate labels to a fix release.
193
- - `no-release-labels` — map alternate labels to intentional non-publication.
194
- - `release-window` — opt into batching by setting the wait in minutes; use a scheduled trigger and serialize publication across triggers.
195
- - `hotfix-labels` — map alternate labels to bypass the release window.
196
- - `close-resolved-issues` — turn off issue closing when the workflow should only publish; enabled closing requires `issues: write`.
197
- - `should-publish` — gate downstream publication jobs on intent after the release job succeeds.
198
- - `version` (output) — version to publish under.
199
- - `tag` — release tag to verify against the intended commit.
200
- - `prerelease` — select prerelease artifact handling.
201
- - `isolated-for-pull-request` — select pull-request-only publication when indicated.
202
- - `previous-version` — identify the predecessor for release comparison, when known.
203
- - `pull-requests` — inspect the included pull request numbers in a batched decision.
204
- - `reason` — distinguish unexpected non-publication from an intentional skip or a pending batch.
205
-
206
173
  ### Shell guard
207
174
 
208
175
  With a policy caller, the installed shell guard runs the partial preflight on literal `gh pr create` and `gh pr edit` commands:
@@ -226,3 +193,4 @@ With a policy caller, the installed shell guard runs the partial preflight on li
226
193
  - Read [references/commits.md](references/commits.md) when choosing commit boundaries, writing a message, staging, deciding when to commit, or tempted to rewrite history.
227
194
  - Read [references/pr-description.md](references/pr-description.md) when writing or repairing a description, placing issue references, or keeping the notes true to the diff.
228
195
  - Read [references/pr-labels-and-release.md](references/pr-labels-and-release.md) when choosing or changing the release label, handling a `major`, or grouping work into one pull request.
196
+ - Read [references/workflow-inputs.md](references/workflow-inputs.md) when maintaining a policy caller or publication workflow and choosing its inputs or reading its outputs.
@@ -42,6 +42,8 @@ Keep reviewer information out of the release notes. Post it immediately in a pul
42
42
 
43
43
  A product change to a review feature can still be a valid note; a report on reviewing this change is not.
44
44
 
45
+ When you correct a description without its diff, fix only its form: reword claims as the change a consumer observes, move reviewer material to the review comment, and remove template placeholders. Treat the result as unverified and say so when you return it. Before submission, check every claim against the diff as described in Keep the release note true to the diff, and drop any the diff does not support. Never return a body that contains a placeholder for the author to fill in.
46
+
45
47
  ## Links and markup
46
48
 
47
49
  Release notes are read off-repository, so a relative link breaks.