@cratis/pi 8.5.0 → 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 (217) hide show
  1. package/package/corpus/harnesses/copilot/instructions/glossary.instructions.md +5 -3
  2. package/package/corpus/harnesses/copilot/instructions/react.instructions.md +3 -1
  3. package/package/corpus/harnesses/copilot/instructions/reactors.instructions.md +3 -1
  4. package/package/corpus/harnesses/copilot/instructions/specs.csharp.instructions.md +6 -3
  5. package/package/corpus/harnesses/copilot/instructions/vertical-slices.instructions.md +5 -2
  6. package/package/corpus/rules/glossary.md +5 -3
  7. package/package/corpus/rules/react.md +3 -1
  8. package/package/corpus/rules/reactors.md +3 -1
  9. package/package/corpus/rules/specs.csharp.md +6 -3
  10. package/package/corpus/rules/vertical-slices.md +5 -2
  11. package/package/corpus/skills/cratis-application-growth/SKILL.md +1 -2
  12. package/package/corpus/skills/cratis-application-growth/references/csharp.md +0 -2
  13. package/package/corpus/skills/cratis-application-growth/references/move-and-untangle.md +1 -2
  14. package/package/corpus/skills/cratis-application-growth/references/rename-window.md +1 -3
  15. package/package/corpus/skills/cratis-application-growth/references/service-and-delivery.md +3 -2
  16. package/package/corpus/skills/cratis-application-growth/references/stages.md +2 -2
  17. package/package/corpus/skills/cratis-arc-authorize-request/SKILL.md +2 -2
  18. package/package/corpus/skills/cratis-arc-authorize-request/references/authproxy.md +19 -0
  19. package/package/corpus/skills/cratis-arc-authorize-request/references/csharp-query-security.md +15 -0
  20. package/package/corpus/skills/cratis-arc-authorize-request/references/csharp.md +12 -3
  21. package/package/corpus/skills/cratis-arc-declare-command/SKILL.md +2 -0
  22. package/package/corpus/skills/cratis-arc-declare-command/references/csharp-chronicle.md +46 -7
  23. package/package/corpus/skills/cratis-arc-declare-command/references/csharp-controller.md +3 -1
  24. package/package/corpus/skills/cratis-arc-declare-command/references/csharp-history.md +4 -1
  25. package/package/corpus/skills/cratis-arc-declare-command/references/csharp.md +31 -4
  26. package/package/corpus/skills/cratis-arc-declare-command/references/go.md +1 -1
  27. package/package/corpus/skills/cratis-arc-diagnose-live-query/references/csharp.md +24 -2
  28. package/package/corpus/skills/cratis-arc-expose-mcp-operation/references/csharp.md +49 -0
  29. package/package/corpus/skills/cratis-arc-expose-query/SKILL.md +3 -1
  30. package/package/corpus/skills/cratis-arc-expose-query/references/csharp.md +27 -4
  31. package/package/corpus/skills/cratis-arc-generate-proxies/SKILL.md +1 -0
  32. package/package/corpus/skills/cratis-arc-generate-proxies/references/csharp.md +49 -2
  33. package/package/corpus/skills/cratis-arc-generate-proxies/references/typescript.md +9 -0
  34. package/package/corpus/skills/cratis-arc-host-application/SKILL.md +1 -1
  35. package/package/corpus/skills/cratis-arc-host-application/references/csharp-configuration.md +54 -0
  36. package/package/corpus/skills/cratis-arc-host-application/references/csharp-deployment.md +98 -0
  37. package/package/corpus/skills/cratis-arc-host-application/references/csharp-http.md +9 -1
  38. package/package/corpus/skills/cratis-arc-host-application/references/csharp-identity.md +84 -2
  39. package/package/corpus/skills/cratis-arc-host-application/references/csharp.md +2 -0
  40. package/package/corpus/skills/cratis-arc-invoke-command/references/csharp.md +2 -1
  41. package/package/corpus/skills/cratis-arc-isolate-tenant/SKILL.md +18 -1
  42. package/package/corpus/skills/cratis-arc-page-query/references/csharp.md +2 -0
  43. package/package/corpus/skills/cratis-arc-react-bind-slice/SKILL.md +18 -16
  44. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-commands.md +8 -3
  45. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-host.md +84 -16
  46. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-identity.md +22 -2
  47. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-instant-feedback.md +81 -0
  48. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-localization.md +80 -0
  49. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-navigation.md +103 -0
  50. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-queries.md +40 -1
  51. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript-structure.md +117 -0
  52. package/package/corpus/skills/cratis-arc-react-bind-slice/references/typescript.md +7 -3
  53. package/package/corpus/skills/cratis-arc-react-separate-view-model/SKILL.md +3 -3
  54. package/package/corpus/skills/cratis-arc-react-separate-view-model/references/typescript.md +27 -6
  55. package/package/corpus/skills/cratis-arc-validate-command/references/csharp-rules.md +23 -2
  56. package/package/corpus/skills/cratis-arc-validate-command/references/csharp.md +28 -2
  57. package/package/corpus/skills/cratis-authproxy-configure/SKILL.md +136 -0
  58. package/package/corpus/skills/cratis-authproxy-configure/references/admission.md +125 -0
  59. package/package/corpus/skills/cratis-authproxy-configure/references/aspire.md +154 -0
  60. package/package/corpus/skills/cratis-authproxy-configure/references/operations.md +122 -0
  61. package/package/corpus/skills/cratis-authproxy-configure/references/services-and-routing.md +114 -0
  62. package/package/corpus/skills/cratis-authproxy-configure/references/sessions-and-logout.md +126 -0
  63. package/package/corpus/skills/cratis-authproxy-configure/references/sign-in-providers.md +116 -0
  64. package/package/corpus/skills/cratis-authproxy-configure/references/tenant-resolution.md +135 -0
  65. package/package/corpus/skills/cratis-choreography-run-workflow/SKILL.md +117 -0
  66. package/package/corpus/skills/cratis-choreography-run-workflow/references/csharp-chronicle.md +164 -0
  67. package/package/corpus/skills/cratis-choreography-run-workflow/references/csharp.md +354 -0
  68. package/package/corpus/skills/cratis-chronicle-cli-operations/SKILL.md +2 -2
  69. package/package/corpus/skills/cratis-chronicle-cli-operations/references/project-tooling.md +28 -0
  70. package/package/corpus/skills/cratis-chronicle-connect-application/references/csharp-services.md +13 -2
  71. package/package/corpus/skills/cratis-chronicle-connect-application/references/csharp.md +12 -0
  72. package/package/corpus/skills/cratis-chronicle-connect-application/references/kotlin.md +2 -0
  73. package/package/corpus/skills/cratis-chronicle-connect-application/references/typescript.md +10 -1
  74. package/package/corpus/skills/cratis-chronicle-constrain-append/SKILL.md +8 -1
  75. package/package/corpus/skills/cratis-chronicle-constrain-append/references/csharp.md +35 -3
  76. package/package/corpus/skills/cratis-chronicle-constrain-append/references/go.md +1 -1
  77. package/package/corpus/skills/cratis-chronicle-constrain-append/references/operations.md +70 -0
  78. package/package/corpus/skills/cratis-chronicle-deploy-kernel/SKILL.md +2 -0
  79. package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/configuration.md +27 -0
  80. package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/container-and-kubernetes.md +293 -0
  81. package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/kernel-options.md +13 -6
  82. package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/network-and-tls.md +45 -0
  83. package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/storage.md +91 -1
  84. package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/upgrade-and-recovery.md +9 -0
  85. package/package/corpus/skills/cratis-chronicle-evolve-event/SKILL.md +12 -0
  86. package/package/corpus/skills/cratis-chronicle-inspect-observer/SKILL.md +11 -1
  87. package/package/corpus/skills/cratis-chronicle-inspect-observer/references/csharp.md +1 -1
  88. package/package/corpus/skills/cratis-chronicle-project-view/SKILL.md +1 -1
  89. package/package/corpus/skills/cratis-chronicle-project-view/references/csharp-fluent.md +14 -3
  90. package/package/corpus/skills/cratis-chronicle-project-view/references/csharp-model-bound.md +3 -0
  91. package/package/corpus/skills/cratis-chronicle-project-view/references/csharp-reading.md +3 -2
  92. package/package/corpus/skills/cratis-chronicle-project-view/references/csharp.md +23 -0
  93. package/package/corpus/skills/cratis-chronicle-project-view/references/elixir.md +1 -0
  94. package/package/corpus/skills/cratis-chronicle-project-view/references/go.md +2 -1
  95. package/package/corpus/skills/cratis-chronicle-project-view/references/java.md +2 -0
  96. package/package/corpus/skills/cratis-chronicle-project-view/references/kotlin.md +1 -0
  97. package/package/corpus/skills/cratis-chronicle-project-view/references/typescript.md +1 -1
  98. package/package/corpus/skills/cratis-chronicle-protect-decision/SKILL.md +2 -0
  99. package/package/corpus/skills/cratis-chronicle-protect-decision/references/csharp-scopes.md +40 -3
  100. package/package/corpus/skills/cratis-chronicle-protect-decision/references/csharp.md +20 -2
  101. package/package/corpus/skills/cratis-chronicle-protect-decision/references/elixir.md +7 -0
  102. package/package/corpus/skills/cratis-chronicle-protect-decision/references/go.md +9 -1
  103. package/package/corpus/skills/cratis-chronicle-protect-decision/references/java.md +8 -0
  104. package/package/corpus/skills/cratis-chronicle-protect-decision/references/kotlin.md +9 -0
  105. package/package/corpus/skills/cratis-chronicle-protect-decision/references/typescript.md +7 -0
  106. package/package/corpus/skills/cratis-chronicle-protect-personal-data/references/csharp.md +24 -1
  107. package/package/corpus/skills/cratis-chronicle-publish-contract/SKILL.md +1 -1
  108. package/package/corpus/skills/cratis-chronicle-publish-contract/references/csharp.md +41 -0
  109. package/package/corpus/skills/cratis-chronicle-publish-contract/references/webhook-signature-wire-format.md +82 -0
  110. package/package/corpus/skills/cratis-chronicle-react-to-fact/SKILL.md +17 -0
  111. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/csharp-outputs.md +3 -1
  112. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/csharp.md +35 -2
  113. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/elixir.md +11 -0
  114. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/java.md +1 -0
  115. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/kotlin.md +1 -0
  116. package/package/corpus/skills/cratis-chronicle-record-event/SKILL.md +1 -1
  117. package/package/corpus/skills/cratis-chronicle-record-event/references/csharp-coordination.md +31 -2
  118. package/package/corpus/skills/cratis-chronicle-record-event/references/csharp-history.md +21 -4
  119. package/package/corpus/skills/cratis-chronicle-record-event/references/csharp.md +20 -2
  120. package/package/corpus/skills/cratis-chronicle-record-event/references/go.md +1 -1
  121. package/package/corpus/skills/cratis-chronicle-record-event/references/java.md +1 -1
  122. package/package/corpus/skills/cratis-chronicle-record-event/references/kotlin.md +3 -0
  123. package/package/corpus/skills/cratis-chronicle-reduce-state/SKILL.md +2 -1
  124. package/package/corpus/skills/cratis-chronicle-reduce-state/references/csharp.md +3 -1
  125. package/package/corpus/skills/cratis-chronicle-reduce-state/references/java.md +10 -1
  126. package/package/corpus/skills/cratis-chronicle-reduce-state/references/kotlin.md +10 -1
  127. package/package/corpus/skills/cratis-chronicle-reduce-state/references/typescript.md +27 -5
  128. package/package/corpus/skills/cratis-chronicle-select-client/SKILL.md +18 -0
  129. package/package/corpus/skills/cratis-chronicle-select-client/references/elixir.md +21 -1
  130. package/package/corpus/skills/cratis-chronicle-select-client/references/go.md +13 -0
  131. package/package/corpus/skills/cratis-chronicle-select-client/references/java.md +15 -0
  132. package/package/corpus/skills/cratis-chronicle-select-client/references/kotlin.md +15 -0
  133. package/package/corpus/skills/cratis-chronicle-select-client/references/typescript.md +16 -0
  134. package/package/corpus/skills/cratis-code-review/references/csharp-diagnostics.md +28 -2
  135. package/package/corpus/skills/cratis-code-review/references/csharp.md +1 -1
  136. package/package/corpus/skills/cratis-components-accessibility/SKILL.md +6 -8
  137. package/package/corpus/skills/cratis-components-accessibility/references/typescript.md +32 -14
  138. package/package/corpus/skills/cratis-components-build-canvas/SKILL.md +4 -3
  139. package/package/corpus/skills/cratis-components-build-canvas/references/typescript-props.md +1 -1
  140. package/package/corpus/skills/cratis-components-build-canvas/references/typescript.md +4 -2
  141. package/package/corpus/skills/cratis-components-choose-control/SKILL.md +13 -7
  142. package/package/corpus/skills/cratis-components-choose-control/references/from-primereact.md +116 -0
  143. package/package/corpus/skills/cratis-components-choose-control/references/menu.md +90 -0
  144. package/package/corpus/skills/cratis-components-choose-control/references/typescript-composition.md +48 -0
  145. package/package/corpus/skills/cratis-components-choose-control/references/typescript.md +2 -2
  146. package/package/corpus/skills/cratis-components-compose-toolbar/SKILL.md +2 -1
  147. package/package/corpus/skills/cratis-components-compose-toolbar/references/floating-toolbar.md +146 -0
  148. package/package/corpus/skills/cratis-components-diagnose-screen/SKILL.md +102 -0
  149. package/package/corpus/skills/cratis-components-display-list/SKILL.md +10 -10
  150. package/package/corpus/skills/cratis-components-display-list/references/typescript-custom-panel.md +74 -0
  151. package/package/corpus/skills/cratis-components-display-list/references/typescript-datatables.md +2 -7
  152. package/package/corpus/skills/cratis-components-display-list/references/typescript.md +3 -2
  153. package/package/corpus/skills/cratis-components-submit-form/references/typescript-commandform.md +72 -2
  154. package/package/corpus/skills/cratis-components-submit-form/references/typescript.md +5 -3
  155. package/package/corpus/skills/cratis-components-theme-application/SKILL.md +17 -15
  156. package/package/corpus/skills/cratis-components-theme-application/references/localization.md +166 -0
  157. package/package/corpus/skills/cratis-components-theme-application/references/typescript.md +18 -14
  158. package/package/corpus/skills/cratis-components-theme-application/references/upgrade-from-previous-major.md +141 -0
  159. package/package/corpus/skills/cratis-engineering-csharp-conventions/SKILL.md +2 -0
  160. package/package/corpus/skills/cratis-engineering-csharp-conventions/references/csharp-domain-philosophy.md +31 -3
  161. package/package/corpus/skills/cratis-engineering-csharp-conventions/references/csharp-fundamentals-helpers.md +119 -0
  162. package/package/corpus/skills/cratis-engineering-csharp-conventions/references/csharp.md +4 -0
  163. package/package/corpus/skills/cratis-fundamentals-concept/references/csharp-serialization.md +70 -0
  164. package/package/corpus/skills/cratis-fundamentals-concept/references/csharp.md +8 -0
  165. package/package/corpus/skills/cratis-fundamentals-concept/references/go.md +1 -0
  166. package/package/corpus/skills/cratis-fundamentals-concept/references/typescript-serialization.md +33 -0
  167. package/package/corpus/skills/cratis-fundamentals-name-value/references/csharp.md +2 -1
  168. package/package/corpus/skills/cratis-fundamentals-type-discovery/references/csharp-diagnostics.md +5 -0
  169. package/package/corpus/skills/cratis-fundamentals-type-discovery/references/go-dependency-injection.md +3 -0
  170. package/package/corpus/skills/cratis-modeling-design-event-model/SKILL.md +6 -4
  171. package/package/corpus/skills/cratis-modeling-design-event-model/references/command-inventory.md +7 -1
  172. package/package/corpus/skills/cratis-modeling-design-event-model/references/model-first.md +13 -1
  173. package/package/corpus/skills/cratis-modeling-design-event-model/references/review-one-slice.md +6 -0
  174. package/package/corpus/skills/cratis-multi-service-local-orchestration/SKILL.md +6 -6
  175. package/package/corpus/skills/cratis-multi-service-local-orchestration/references/csharp-aspire.md +116 -28
  176. package/package/corpus/skills/cratis-multi-service-local-orchestration/references/docker-compose.md +2 -2
  177. package/package/corpus/skills/cratis-observability/references/chronicle-kernel-export.md +46 -0
  178. package/package/corpus/skills/cratis-orleans-jobs/SKILL.md +4 -2
  179. package/package/corpus/skills/cratis-platform-build-application/SKILL.md +8 -0
  180. package/package/corpus/skills/cratis-platform-build-application/references/cratis-identity.md +71 -0
  181. package/package/corpus/skills/cratis-platform-build-application/references/studio-repository.md +96 -0
  182. package/package/corpus/skills/cratis-platform-deliver-slice/SKILL.md +14 -8
  183. package/package/corpus/skills/cratis-platform-deliver-slice/references/csharp.md +167 -3
  184. package/package/corpus/skills/cratis-platform-deliver-slice/references/eventual-consistency.md +150 -0
  185. package/package/corpus/skills/cratis-platform-diagnose-slice/SKILL.md +1 -1
  186. package/package/corpus/skills/cratis-platform-start-application/SKILL.md +21 -0
  187. package/package/corpus/skills/cratis-platform-start-application/references/csharp.md +77 -3
  188. package/package/corpus/skills/cratis-platform-upgrade-application/SKILL.md +118 -0
  189. package/package/corpus/skills/cratis-platform-upgrade-application/references/csharp.md +117 -0
  190. package/package/corpus/skills/cratis-platform-upgrade-application/references/java.md +53 -0
  191. package/package/corpus/skills/cratis-platform-upgrade-application/references/kotlin.md +53 -0
  192. package/package/corpus/skills/cratis-platform-upgrade-application/references/typescript.md +71 -0
  193. package/package/corpus/skills/cratis-screenplay-accept-model/references/csharp.md +29 -0
  194. package/package/corpus/skills/cratis-screenplay-accept-model/references/read-the-evidence.md +82 -1
  195. package/package/corpus/skills/cratis-screenplay-declare-slice/SKILL.md +1 -1
  196. package/package/corpus/skills/cratis-screenplay-declare-slice/references/structure-and-imports.md +10 -0
  197. package/package/corpus/skills/cratis-screenplay-onboard-workspace/SKILL.md +5 -4
  198. package/package/corpus/skills/cratis-screenplay-onboard-workspace/references/cli.md +19 -2
  199. package/package/corpus/skills/cratis-screenplay-onboard-workspace/references/smallest-model.md +87 -0
  200. package/package/corpus/skills/cratis-screenplay-onboard-workspace/references/typescript.md +13 -0
  201. package/package/corpus/skills/cratis-screenplay-onboard-workspace/references/workspace-mcp.md +5 -0
  202. package/package/corpus/skills/cratis-specifications-exercise-backend/SKILL.md +2 -0
  203. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-colocated.md +101 -0
  204. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-command-results.md +3 -1
  205. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-decision-reads.md +1 -0
  206. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-events.md +1 -0
  207. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-integration.md +4 -2
  208. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-reactors.md +3 -3
  209. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp.md +34 -1
  210. package/package/corpus/skills/cratis-specifications-exercise-backend/references/elixir.md +2 -0
  211. package/package/corpus/skills/cratis-specifications-isolate-behavior/SKILL.md +1 -1
  212. package/package/corpus/skills/cratis-specifications-isolate-behavior/references/csharp-running.md +10 -3
  213. package/package/corpus/skills/cratis-specifications-test-application-ui/references/typescript.md +22 -4
  214. package/package/corpus/skills/cratis-specifications-test-typescript-behavior/SKILL.md +2 -1
  215. package/package/corpus/skills/cratis-specifications-test-typescript-behavior/references/typescript.md +40 -0
  216. package/package/profile-catalog.json +15 -0
  217. package/package.json +1 -1
@@ -0,0 +1,118 @@
1
+ ---
2
+ name: cratis-platform-upgrade-application
3
+ description: Use when moving an existing Cratis application to newer Cratis packages, tools or images, or when a build or run breaks after such an update. Not for upgrading the Chronicle kernel itself (`cratis-chronicle-deploy-kernel`) or scaffolding a new application (`cratis-platform-start-application`).
4
+ ---
5
+
6
+ # Move an application to newer Cratis packages, tools and images
7
+
8
+ ## Contents
9
+
10
+ - How Cratis versions relate
11
+ - Default path
12
+ - What kind of change a step is
13
+ - Product-specific steps
14
+ - When a build or run breaks after an update
15
+ - Keep it current
16
+ - Avoid
17
+ - References
18
+
19
+ Read `references/<language>.md` for the application's backend (`.csproj` → csharp, `build.gradle.kts` with `*.kt` → kotlin, with `*.java` → java, Node server `package.json` → typescript); only the project's languages are installed. `references/typescript.md` also covers the `@cratis/*` packages of a React frontend.
20
+
21
+ ## How Cratis versions relate
22
+
23
+ - **Each product has its own version line.** Arc, Chronicle, Fundamentals, Components, Specifications, AuthProxy, the CLI and the templates are numbered independently. Equal numbers across products mean nothing, and unequal numbers are not a mismatch.
24
+ - **Packages of one product move together.** All packages published by one product carry that product's release number: keep them on one version. A shared name prefix does not make packages one product. Arc publishes its NuGet packages and its frontend npm packages under the same number; Arc for Node and Arc for the JVM are separate products, each with its own number. Kotlin and Java are not two release lines: both use the same Arc Gradle plugin and the same `io.cratis:cratis` dependency.
25
+ - **Arc and Chronicle on .NET are paired by the `Cratis` package.** It brings an Arc release and a Chronicle client that fit each other. Default to that pair. Any other Arc and Chronicle combination is unverified, not known to work or to fail.
26
+ - **The .NET Chronicle client has the kernel's version number.** Each kernel build is verified to serve the contracts of earlier minors of its major, within the compatibility range that major declares. A client newer than the kernel is not certified by that verification, and across a major nothing is guaranteed. None of this exempts a pair at run time: the client asks the kernel to compare contracts when it connects, by default, and an incompatible pair is refused.
27
+ - **Other Chronicle clients (TypeScript, Kotlin and Java, Elixir) have their own numbers.** A client's major says nothing about the kernel major. There is no table that pairs client releases with kernels: client and kernel compare contracts at run time, and an incompatible pair is refused. Where the refusal shows depends on the client: most fail the connection, the Elixir client connects and then rejects the append.
28
+ - **Frontend packages float unless locked.** A scaffold writes caret ranges for `@cratis/*`, so an install without a lockfile moves within the major. `@cratis/components` declares the Arc range and the React major it accepts as peer dependencies.
29
+ - **A scaffold is not pinned until you check it.** A .NET scaffold is meant to end up on concrete package versions, but a post-creation step that failed can leave a floating version behind: inspect the generated `.csproj`. A Kotlin or Java scaffold asks for the latest release, which Gradle resolves and then reuses from its cache for a while, until you pin plugin and dependency.
30
+
31
+ ## Default path
32
+
33
+ Work on a branch. Names and paths are illustrative.
34
+
35
+ 1. **Baseline.** Make build, specs and the application's smoke check pass on the current versions, and record the versions in use: Cratis packages, kernel image, AuthProxy image, CLI.
36
+ 2. **Plan every boundary.** For each product, list the majors between the current and the target version and read that product's upgrade notes for each one, in order. Read the release notes too when only a minor changes: a default can change inside a major. Classify each step with the table below before changing anything.
37
+ 3. **Decide the kernel order.** If the change raises the .NET Chronicle client, no environment may run a kernel older than that client: within a major, upgrade the kernel first; across a major, move kernel and clients together unless the upgrade notes state that the boundary keeps the wire contract. For any other client, test the new client release against the kernel version each environment runs. The kernel upgrade itself is `cratis-chronicle-deploy-kernel`, `references/upgrade-and-recovery.md`.
38
+ 4. **Do the steps that come before the bump.** Some product-specific steps (next section) run on the current release. Entered from the major directly before it, a Components major starts with an import migration that is applied and verified while the old package is still installed. On a direct jump across more than one major the migrator does not run on the old package: make the preparatory import edits by hand, and run the migrator only after the target is installed. Do these, repeat the baseline checks and keep the result as a checkpoint: source, manifest and lockfile together.
39
+ 5. **Raise every Cratis package in one change.** Backend: all packages of each product to one release, with `Cratis` deciding the Arc and Chronicle pair on .NET. Frontend: every `@cratis/*` package, in releases whose declared peer ranges accept each other, then install and commit the lockfile. Details are in the language reference.
40
+ 6. **Rebuild the backend and regenerate the proxies.** Run the generation the backend is configured with; do not assume a build did it. A .NET build generates only when the project sets a proxy output path and generation is not switched off. A Gradle build generates only when proxy generation is enabled and an output directory is configured. A Node backend runs its generation script as a step of its own. Fix callers, never generated files.
41
+ 7. **Apply the remaining product-specific steps** for each boundary you listed, **then build the frontend.** A frontend that crossed a Components major is not expected to build before its provider, stylesheet and source changes for the target release are in. Type-check and build against the regenerated proxies.
42
+ 8. **Verify.** Run the specs. Start the application against the local kernel and run its smoke check: one command, the event it appends, the read model, and the screen that shows it.
43
+ 9. **Gate the deployment.** Before the new application version meets a deployed kernel, check it with `cratis chronicle check-release` (`cratis-chronicle-cli-operations`, `references/recovery-and-comparison.md`). Deploy with pinned package versions, the committed lockfile and a pinned kernel image.
44
+ 10. **Update the tools.** Update the `cratis` CLI the way it was installed: `cratis update` upgrades a .NET tool and a Homebrew installation on macOS; on Linux, upgrade a Homebrew installation with Homebrew itself, and replace a native binary by installing the .NET tool. Then run `cratis ai update` in the repository (`cratis-chronicle-cli-operations`, `references/project-tooling.md`). Newer templates change the next scaffold; they never change this application.
45
+
46
+ Alternatives:
47
+
48
+ - **One product at a time** wins when several products cross a major in the same upgrade: finish and verify one product before starting the next, so a failure has one cause. Within one product still raise all its packages together.
49
+ - **Stay on the current major and take only minors** when a boundary needs work you cannot schedule now. Check the release notes for changed defaults all the same.
50
+
51
+ ## What kind of change a step is
52
+
53
+ | Kind | What it touches | What it needs |
54
+ | --- | --- | --- |
55
+ | Compile-time | An API your code calls | Code edits. Crossing several majors, fix the accumulated errors against the target version and do not build at each intermediate one, unless a migration guide sets a checkpoint on the current or an intermediate release. When the guide documents a direct path across several majors, follow it |
56
+ | Changed default | Behaviour of unchanged code or configuration | A decision per default: adopt it, or set the previous value explicitly. Most fail nothing at build time, so read the notes; a few, such as Arc's read protection, do surface as a build or spec failure |
57
+ | Stored state | Data already written | A backup you have restored from, a rehearsal on a copy of the data, and every intermediate step in order: skipping a release does not skip its data change |
58
+ | Wire | The contract between kernel and clients | Kernel and clients moved in the stated order |
59
+ | Cluster | Kernel nodes of two versions in one cluster | Nodes replaced one at a time only when the kernel's upgrade notes confirm that the two releases can share a cluster; otherwise every node stopped, then all started on the new version |
60
+ | Configuration | Settings, endpoints, deployment | Settings edited in every environment |
61
+
62
+ Compile-time and changed-default steps belong to the application. Stored-state, wire and cluster steps belong to the kernel upgrade; this skill only schedules them.
63
+
64
+ ## Product-specific steps
65
+
66
+ | Product | Where the steps are |
67
+ | --- | --- |
68
+ | Chronicle kernel: order, backup, rollout, majors | `cratis-chronicle-deploy-kernel`, `references/upgrade-and-recovery.md` |
69
+ | Chronicle kernel that holds unique constraint claims | `cratis-chronicle-constrain-append`, `references/operations.md` |
70
+ | Arc on .NET: defaults that changed | `references/csharp.md` in this skill |
71
+ | Components across the major that stopped rendering through PrimeReact | `cratis-components-theme-application`, `references/upgrade-from-previous-major.md` |
72
+ | Specifications across a major | `cratis-specifications-isolate-behavior`, `references/csharp-running.md` |
73
+ | AuthProxy | Read both its upgrade notes and the release notes of every version you cross: a change to what an unchanged configuration does can be described in only one of them. Settings are in `cratis-authproxy-configure` |
74
+
75
+ Arc's upgrade notes describe the C# host. For a Kotlin, Java, TypeScript or Go backend, establish from that backend's own reference which behaviour applies; never copy a .NET registration or setting to another host.
76
+
77
+ ## When a build or run breaks after an update
78
+
79
+ | Symptom | Likely cause | Do |
80
+ | --- | --- | --- |
81
+ | Restore reports a package downgrade or a version conflict | One package of a product was raised alone, or a pin on a Chronicle package is below what another package in the graph requires | Put all packages of the product on one release; raise or remove the pin, since a pin cannot lower a required dependency |
82
+ | Install warns about unmet peer dependencies | `@cratis/components` and the Arc, Fundamentals or React packages are out of step, or a Components renderer adapter is not on exactly the version of `@cratis/components` | Select releases whose declared peer ranges accept each other (`references/typescript.md`); the newest Arc can be above what the Components release accepts |
83
+ | Frontend type errors in files that import generated proxies | Proxies are stale, or their shape changed with the new Arc | Run the backend's proxy generation (step 6), then fix the callers |
84
+ | The application cannot connect to the kernel, or an append is rejected, with an incompatibility error | Client and kernel are on contracts that do not fit | Compare client and kernel versions; apply the kernel order in step 3 |
85
+ | The local run fails though no code changed | The scaffold's compose file runs `cratis/chronicle:latest-development` and pulls it on every start, so the local kernel moves while the packages stay pinned | Raise the Cratis packages to a release that fits the pulled kernel, or replace the tag with the development image of the kernel version you deploy (`<version>-development`) |
86
+ | Requests that worked now return 401, or discovery returns 401 or 404, outside development | Arc's secure defaults | `references/csharp.md`, "Secure defaults" |
87
+ | A command that takes a read model is refused at startup, at first use or when another change raced it | Read protection is enforced by default | `references/csharp.md`, "Read protection" |
88
+ | A Kotlin or Java build changed overnight | The build still resolves the latest release | `references/kotlin.md` or `references/java.md` |
89
+
90
+ If the cause is not here, compare the baseline versions from step 1 with what is installed now, then follow `cratis-platform-diagnose-slice` for a missing or stale outcome.
91
+
92
+ ## Keep it current
93
+
94
+ Small, frequent upgrades cross one boundary at a time. Automate them:
95
+
96
+ - A scheduled job raises every Cratis package to the newest set of releases whose declared dependencies and peer ranges accept each other, product by product, never one package of a product alone and never each package to its own latest.
97
+ - Restore and build are the gate; add the specs when they are fast enough. A failed gate stops the change before it is committed.
98
+ - The job never crosses a major on its own when the application needs code or configuration changes for it; cap the major and upgrade it deliberately.
99
+ - Kernel and AuthProxy images are upgraded by a person or a reviewed change, never by a floating tag.
100
+
101
+ ## Avoid
102
+
103
+ - Raising one Cratis package alone, or one package of a product ahead of the others.
104
+ - Choosing versions so that numbers look aligned across products.
105
+ - Deploying a .NET Chronicle client that is newer than the kernel it meets, or any other client untested against that kernel.
106
+ - Floating versions in a shared environment: `latest` image tags, caret ranges without a lockfile, `latest.release` in Gradle.
107
+ - Building at every intermediate major to fix compile errors when no migration guide asks for that checkpoint.
108
+ - Raising a package before the migration step that must run on the old release.
109
+ - Skipping the upgrade notes of a major you only pass through.
110
+ - Editing generated proxies to make the frontend compile.
111
+ - Switching a deployed host to the development environment to get old defaults back.
112
+
113
+ ## References
114
+
115
+ - `references/csharp.md`: read when the backend is .NET — supported runtimes, keeping versions in one place, and the Arc defaults that changed.
116
+ - `references/typescript.md`: read when the application has a React frontend or a Node backend — ranges, lockfile, peer dependencies and the Chronicle client's own version line.
117
+ - `references/kotlin.md`: read when the backend is Kotlin — replacing the floating versions and upgrading the plugin and the dependency together.
118
+ - `references/java.md`: read when the backend is Java — the same for a Java project.
@@ -0,0 +1,117 @@
1
+ # Upgrade Cratis packages in a .NET application
2
+
3
+ ## Contents
4
+
5
+ - Supported runtimes
6
+ - Keep versions in one place
7
+ - Raise the packages
8
+ - Arc defaults that changed
9
+ - Secure defaults
10
+ - Read protection
11
+ - Generated identifiers
12
+ - MCP
13
+ - Verify
14
+
15
+ Names and paths in examples are illustrative.
16
+
17
+ ## Supported runtimes
18
+
19
+ The current Arc, Chronicle, Fundamentals and Specifications packages target .NET 10 and .NET 11. They do not support .NET 8 or .NET 9: an application on an older runtime moves its runtime first, verifies, and upgrades Cratis in a second change. A new scaffold targets .NET 11, and the `cratis` CLI installed as a .NET tool needs the .NET 11 runtime together with the ASP.NET Core runtime of the same version.
20
+
21
+ ## Keep versions in one place
22
+
23
+ Default: central package management in `Directory.Packages.props`, with transitive pinning, so every project in the solution moves together and a central version also applies to a package that only arrives transitively. Such a pin can raise a package. It cannot lower one below what another package requires: restore reports a downgrade instead.
24
+
25
+ ```xml
26
+ <Project>
27
+ <PropertyGroup>
28
+ <ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
29
+ <CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
30
+ </PropertyGroup>
31
+ <ItemGroup>
32
+ <PackageVersion Include="Cratis" Version="{arc-release}" />
33
+ <PackageVersion Include="Cratis.Arc.MongoDB" Version="{arc-release}" />
34
+ <PackageVersion Include="Cratis.Chronicle.Testing" Version="{chronicle-release}" />
35
+ <PackageVersion Include="Cratis.Specifications.XUnit.v3" Version="{specifications-release}" />
36
+ </ItemGroup>
37
+ </Project>
38
+ ```
39
+
40
+ Replace each `{...}` placeholder with a concrete version; never leave a floating one. Inspect a freshly scaffolded `.csproj` too: a post-creation step that failed can leave a floating version in it. A single-project scaffold keeps its versions in the `.csproj`; that is fine until there is a second project.
41
+
42
+ ## Raise the packages
43
+
44
+ Packages form groups that share one release number. Raise a whole group or none of it:
45
+
46
+ | Group | Packages |
47
+ | --- | --- |
48
+ | Arc | `Cratis`, `Cratis.Testing`, `Cratis.Arc` and every `Cratis.Arc.*` |
49
+ | Chronicle | Every `Cratis.Chronicle.*`, and `Cratis.Chronicle` itself |
50
+ | Fundamentals | `Cratis.Fundamentals` and the packages released with it |
51
+ | Specifications | `Cratis.Specifications` and its adapter package |
52
+
53
+ 1. Raise the Arc group. `Cratis` brings Arc, the Chronicle client with its ASP.NET Core integration, Swagger and the proxy generator, in versions that fit each other.
54
+ 2. Put the Chronicle packages you reference directly (testing, Aspire) on the Chronicle client release that `Cratis` brings. That pair is the default. To use another Chronicle release, read the declared dependencies of both `Cratis` and the Chronicle package (Chronicle's testing package declares its own Arc requirement), go below neither, and verify the scenarios afterwards. A pin below a version the graph requires makes restore report a downgrade.
55
+ 3. Raise the remaining groups.
56
+ 4. `dotnet restore`, then `dotnet build` the solution. Read the resolved Chronicle client version from the restore result: it decides which kernel the application may meet (kernel order in the skill's default path).
57
+
58
+ `dotnet list package --outdated` shows what is behind; it does not know the groups, so do not take its list one package at a time.
59
+
60
+ ## Arc defaults that changed
61
+
62
+ Arc's upgrade notes are organised by what the application relies on. Check each row; skip the rows that do not apply.
63
+
64
+ | The application relies on | What changed | Section |
65
+ | --- | --- | --- |
66
+ | Identity from forwarded headers set by an ingress, or anonymous access to discovery endpoints on a deployed host | Forwarded identity headers are not trusted, and discovery requires authentication outside development | Secure defaults |
67
+ | Commands, validators or `Provide` that take a read model, without a declared read-protection mode | Read protection is on, with strict key coverage | Read protection |
68
+ | Identifiers created inside `Handle`, or the removed identity-source API in command specs | Generation moves to a server-owned `Handle` parameter that specs pin by name | Generated identifiers |
69
+ | Arc's MCP endpoint | Renamed APIs, and the capabilities port is gated without extra configuration | MCP |
70
+
71
+ ## Secure defaults
72
+
73
+ - **Forwarded identity headers.** The host ignores the forwarded identity headers until it is told to trust them. Without trust they authenticate nobody: endpoints that need a user answer 401 unless another authentication scheme authenticates the caller. An ASP.NET Core host that registers the forwarded-identity handler logs a warning at every startup that names the setting. First confirm that every request reaches the host through an ingress that strips caller-supplied identity headers and sets its own; only then set `Cratis:Arc:TrustForwardedIdentityHeaders` to `true`. If the host is reachable without that ingress, leave it off and configure an authentication scheme that validates the caller. The setting and the ingress are in `cratis-arc-host-application`, `references/csharp-identity.md`, and `cratis-authproxy-configure`.
74
+ - **Discovery endpoints** (the command and query catalogs and identity discovery; not command or query invocation and not `/.cratis/me`). In development they stay anonymous. Outside development an anonymous request gets 401; when the host has no way to authenticate callers the endpoints are not mapped at all and answer 404. Default: leave the setting unset and make deployed tools authenticate. If no deployed tool reads discovery, turn it off. Allow anonymous discovery only as a deliberate, explicit choice. Settings are in `cratis-arc-host-application`, `references/csharp-configuration.md`.
75
+
76
+ Check both in the environment you deploy, through the real ingress. Never switch a deployed host to the development environment to restore the old behaviour.
77
+
78
+ ## Read protection
79
+
80
+ The project property `CratisReadProtection` has three values:
81
+
82
+ | Value | Effect |
83
+ | --- | --- |
84
+ | `On` | Enforces: guarded reads are fresh, the append is refused when what the command read has changed, and a read-model parameter that cannot be guarded is refused |
85
+ | `Measure` | Reports what `On` would have refused; enforces nothing |
86
+ | `Off` | No protection: an injected read model is a plain read |
87
+
88
+ An application that never declared a mode used to run as `Off` and now runs as `On`. A declared mode, on the project or on a command, is kept.
89
+
90
+ Default when upgrading:
91
+
92
+ 1. Set `<CratisReadProtection>Measure</CratisReadProtection>` in each project and run the specs and a realistic workload.
93
+ 2. Fix what it reports: give each read its lookup key, and mark a read that is deliberately advisory.
94
+ 3. Remove the property, or set it to `On`.
95
+
96
+ Alternative: set `Off` explicitly to keep the previous behaviour when the upgrade must ship before the adoption work. Treat it as a dated debt, not as a setting.
97
+
98
+ Two things change with the default and are easy to miss:
99
+
100
+ - **Key coverage is strict.** A command without generated read-model key metadata fails at startup instead of falling back to reflection, and a composite key part without an accessor throws. Enable the Arc source generator or register the accessors; the opt-outs are for runtimes that allow dynamic code.
101
+ - **Command specs.** Replacing or mocking the read-model reader no longer gives a protected read its state; the model can arrive as `null`. Arrange the state through the command scenario's own `Given`.
102
+
103
+ How to select keys, mark advisory reads and read the measurement: `cratis-chronicle-protect-decision`, `references/csharp.md`. Scenario setup: `cratis-specifications-exercise-backend`, `references/csharp-command-results.md`. Runtime policy keys: `cratis-arc-host-application`, `references/csharp-configuration.md`.
104
+
105
+ ## Generated identifiers
106
+
107
+ A handler that creates a server-owned identifier inside `Handle` still works, but a spec cannot control the value, and the identity-source API that specs used to queue identities is removed. Move the generation to a `[GeneratedValue]` parameter of `Handle`; scenarios pin the value by the parameter's name. Set an explicit name on the attribute when pins must survive a rename of the parameter. An analyzer reports the generation patterns it recognises (a concept created or wrapped directly in `Handle`, not raw primitives, helpers outside `Handle` or nested functions) and offers a fix, so also search by hand. The fix does not update direct callers of the handler. The pattern is in `cratis-arc-declare-command`, `references/csharp.md`.
108
+
109
+ ## MCP
110
+
111
+ Applies only to a host that exposes Arc's MCP endpoint. Some registration and type names changed, with obsolete forwarders for part of them: build with warnings visible and replace every obsolete call now. With no explicit endpoint selection, Arc gates every route on the capabilities port except the OAuth protected-resource metadata route, which stays anonymous so clients can find out how to authenticate. A health or readiness probe on that port now needs a verified caller. Move probes to another port, or select the gated endpoints explicitly. Details: `cratis-arc-expose-mcp-operation`, `references/csharp.md`.
112
+
113
+ ## Verify
114
+
115
+ - Build with analyzers enabled and no suppressed obsolete warnings.
116
+ - Run the specs of every command that takes a read model.
117
+ - On a deployed-like host, through the ingress: an authenticated request succeeds, a request that bypasses the ingress with its own identity headers is refused, and discovery answers as decided.
@@ -0,0 +1,53 @@
1
+ # Upgrade Cratis in a Java application
2
+
3
+ ## Contents
4
+
5
+ - The scaffold floats
6
+ - Pin
7
+ - Upgrade
8
+ - What does not carry over from .NET
9
+ - Verify
10
+
11
+ Names and paths in examples are illustrative.
12
+
13
+ ## The scaffold floats
14
+
15
+ A scaffolded `build.gradle.kts` requests the Arc Gradle plugin `io.cratis.arc` and the dependency `io.cratis:cratis` as `latest.release`. Gradle resolves them when it builds and caches the answer for up to 24 hours by default, so the same commit can build against a newer Cratis release the next day. `io.cratis:cratis` is one dependency that brings Arc, its Spring Boot wiring and the Chronicle integration.
16
+
17
+ ## Pin
18
+
19
+ Do this before the first shared build, not at the first upgrade.
20
+
21
+ Default: replace both `latest.release` values with the exact release you tested. Plugin and dependency are released together under one number: use the same release for both. Kotlin and Java projects use the same plugin and the same dependency, so one release number serves both.
22
+
23
+ ```kotlin
24
+ plugins {
25
+ id("io.cratis.arc") version "<release>"
26
+ }
27
+
28
+ dependencies {
29
+ implementation("io.cratis:cratis:<release>")
30
+ }
31
+ ```
32
+
33
+ Alternative for the dependency only: keep `latest.release` on `io.cratis:cratis` and enable Gradle dependency locking, with the lock state committed; an upgrade is then a deliberate rewrite of the lock state. Project dependency locking does not fix the plugin version, so write the plugin version explicitly in either case. The two can then drift apart: change the plugin version and rewrite the lock state in the same change, and check that the locked `io.cratis:cratis` version equals the plugin version.
34
+
35
+ ## Upgrade
36
+
37
+ 1. Change plugin and dependency to the new release in one edit. With a locked floating dependency, change the plugin version and rewrite the lock state together, then confirm both resolve to the same release.
38
+ 2. Keep the scaffold's `dependencyManagement` block, including both coroutines entries. If startup fails with a `NoSuchMethodError` from a coroutines class after the upgrade, that block is missing or behind what the new release is built with (`cratis-platform-start-application`, `references/java.md`).
39
+ 3. Run `./gradlew build`. It compiles and runs the Arc processor. It regenerates the proxies only when proxy generation is enabled and a proxy output directory is configured in the `cratisArc` block, as the scaffold does; otherwise the proxies are stale after the build. With `latest.release` still in place, `./gradlew build --refresh-dependencies` picks up a new release without waiting for the cache.
40
+ 4. Raise the frontend's `@cratis/*` packages (`references/typescript.md` when installed), then build the frontend against the regenerated proxies.
41
+ 5. Inspect what was resolved before choosing versions for production: `./gradlew dependencies --configuration runtimeClasspath`.
42
+
43
+ ## What does not carry over from .NET
44
+
45
+ - The Chronicle client for Kotlin and Java has its own version line. Its number says nothing about the kernel it fits, and no table pairs client releases with kernels. Client and kernel compare contracts at connect; an incompatible pair fails the connection. Test the release against the kernel version each environment runs.
46
+ - No verified Arc and Chronicle pairing is published for the JVM. Use the Chronicle client that `io.cratis:cratis` brings; do not set its version yourself.
47
+ - Arc's upgrade notes describe the C# host. Establish the behaviour of the Java backend from `cratis-arc-host-application`, `references/java.md`; never copy a .NET registration, property or diagnostic.
48
+
49
+ ## Verify
50
+
51
+ - `./gradlew build` passes twice in a row with the same resolved versions.
52
+ - The application starts against the local kernel and connects.
53
+ - The smoke check passes: one command, the event it appends, the read model, the screen.
@@ -0,0 +1,53 @@
1
+ # Upgrade Cratis in a Kotlin application
2
+
3
+ ## Contents
4
+
5
+ - The scaffold floats
6
+ - Pin
7
+ - Upgrade
8
+ - What does not carry over from .NET
9
+ - Verify
10
+
11
+ Names and paths in examples are illustrative.
12
+
13
+ ## The scaffold floats
14
+
15
+ A scaffolded `build.gradle.kts` requests the Arc Gradle plugin `io.cratis.arc` and the dependency `io.cratis:cratis` as `latest.release`. Gradle resolves them when it builds and caches the answer for up to 24 hours by default, so the same commit can build against a newer Cratis release the next day. `io.cratis:cratis` is one dependency that brings Arc, its Spring Boot wiring and the Chronicle integration.
16
+
17
+ ## Pin
18
+
19
+ Do this before the first shared build, not at the first upgrade.
20
+
21
+ Default: replace both `latest.release` values with the exact release you tested. Plugin and dependency are released together under one number: use the same release for both. Kotlin and Java projects use the same plugin and the same dependency, so one release number serves both.
22
+
23
+ ```kotlin
24
+ plugins {
25
+ id("io.cratis.arc") version "<release>"
26
+ }
27
+
28
+ dependencies {
29
+ implementation("io.cratis:cratis:<release>")
30
+ }
31
+ ```
32
+
33
+ Alternative for the dependency only: keep `latest.release` on `io.cratis:cratis` and enable Gradle dependency locking, with the lock state committed; an upgrade is then a deliberate rewrite of the lock state. Project dependency locking does not fix the plugin version, so write the plugin version explicitly in either case. The two can then drift apart: change the plugin version and rewrite the lock state in the same change, and check that the locked `io.cratis:cratis` version equals the plugin version.
34
+
35
+ ## Upgrade
36
+
37
+ 1. Change plugin and dependency to the new release in one edit. With a locked floating dependency, change the plugin version and rewrite the lock state together, then confirm both resolve to the same release.
38
+ 2. Keep the scaffold's `dependencyManagement` block, including both coroutines entries. If startup fails with a `NoSuchMethodError` from a coroutines class after the upgrade, that block is missing or behind what the new release is built with (`cratis-platform-start-application`, `references/kotlin.md`).
39
+ 3. Run `./gradlew build`. It compiles and runs the Arc processor. It regenerates the proxies only when proxy generation is enabled and a proxy output directory is configured in the `cratisArc` block, as the scaffold does; otherwise the proxies are stale after the build. With `latest.release` still in place, `./gradlew build --refresh-dependencies` picks up a new release without waiting for the cache.
40
+ 4. Raise the frontend's `@cratis/*` packages (`references/typescript.md` when installed), then build the frontend against the regenerated proxies.
41
+ 5. Inspect what was resolved before choosing versions for production: `./gradlew dependencies --configuration runtimeClasspath`.
42
+
43
+ ## What does not carry over from .NET
44
+
45
+ - The Chronicle client for Kotlin and Java has its own version line. Its number says nothing about the kernel it fits, and no table pairs client releases with kernels. Client and kernel compare contracts at connect; an incompatible pair fails the connection. Test the release against the kernel version each environment runs.
46
+ - No verified Arc and Chronicle pairing is published for the JVM. Use the Chronicle client that `io.cratis:cratis` brings; do not set its version yourself.
47
+ - Arc's upgrade notes describe the C# host. Establish the behaviour of the Kotlin backend from `cratis-arc-host-application`, `references/kotlin.md`; never copy a .NET registration, property or diagnostic.
48
+
49
+ ## Verify
50
+
51
+ - `./gradlew build` passes twice in a row with the same resolved versions.
52
+ - The application starts against the local kernel and connects.
53
+ - The smoke check passes: one command, the event it appends, the read model, the screen.
@@ -0,0 +1,71 @@
1
+ # Upgrade `@cratis/*` packages in a frontend or a Node backend
2
+
3
+ ## Contents
4
+
5
+ - Ranges and the lockfile
6
+ - Raise the packages
7
+ - Peer dependencies
8
+ - Crossing a Components major
9
+ - Node backend and Chronicle client
10
+ - Verify
11
+
12
+ Names and paths in examples are illustrative.
13
+
14
+ ## Ranges and the lockfile
15
+
16
+ A scaffold writes caret ranges for every `@cratis/*` package. A caret range admits every later release of the same major, so an install without a lockfile can pick up a newer release than the one you tested, independently of the versions the backend is pinned to.
17
+
18
+ - Commit the lockfile. It is the pin.
19
+ - In CI and in image builds, install from the lockfile and fail when it does not match the manifest (`yarn install --immutable`, `pnpm install --frozen-lockfile`, `npm ci`).
20
+ - Raise versions only in a deliberate upgrade change that contains manifest and lockfile together.
21
+
22
+ ## Raise the packages
23
+
24
+ Packages form groups that share one release number. Raise a whole group or none of it:
25
+
26
+ | Group | Packages |
27
+ | --- | --- |
28
+ | Arc frontend | `@cratis/arc`, `@cratis/arc.react`, `@cratis/arc.react.mvvm`, `@cratis/arc.vite`, `@cratis/eslint-plugin-arc` |
29
+ | Components | `@cratis/components`, every installed renderer adapter (`@cratis/components.primereact`, `@cratis/components.primereact10`, `@cratis/components.mui`, `@cratis/components.designsystemet`), `@cratis/components.conformance`, `@cratis/eslint-plugin-components` |
30
+ | Fundamentals | `@cratis/fundamentals`, `@cratis/eslint-config` |
31
+ | Arc for Node (backend) | `@cratis/platform`, `@cratis/arc.core`, the host adapter (`@cratis/arc.express`, `@cratis/arc.fastify`, `@cratis/arc.hono`), storage (`@cratis/arc.mongodb`, `@cratis/arc.drizzle`), `@cratis/arc.chronicle`, `@cratis/arc.testing`, `@cratis/arc.proxygenerator`, `@cratis/eslint-plugin-arc-core` |
32
+
33
+ The package name does not tell the group: the Arc frontend packages and the Arc for Node packages both start with `@cratis/arc`, yet they are two products with unrelated release numbers. Never align one with the other.
34
+
35
+ 1. When Components crosses a major, do its pre-upgrade step first ("Crossing a Components major").
36
+ 2. Raise the Arc frontend group. With a .NET backend, use the release of the backend's Arc packages: Arc publishes its NuGet packages and these npm packages under the same number, and the generated proxies are written by the backend's release.
37
+ 3. Raise Fundamentals and Components, choosing releases whose peer ranges accept the Arc release (next section).
38
+ 4. Install, and read every warning.
39
+ 5. Run the backend's proxy generation. A .NET build generates only when the project sets a proxy output path and generation is not switched off; a Gradle build generates only when proxy generation is enabled and an output directory is configured; a Node backend runs its generation script explicitly.
40
+ 6. When Components crossed a major, apply its changes for the new major ("Crossing a Components major"). Then type-check, lint and build the frontend.
41
+ 7. Commit manifest and lockfile together.
42
+
43
+ ## Peer dependencies
44
+
45
+ `@cratis/components` declares as peer dependencies the range of `@cratis/arc` and `@cratis/arc.react` it works with, a `@cratis/fundamentals` range, and the React major it requires. The Arc React package accepts a wider React range than Components does, so Components decides the React major. Each renderer adapter and the conformance package declare a peer on exactly the `@cratis/components` version they were released with: they move with it, to the same version, in the same change.
46
+
47
+ A peer warning at install means two groups are out of step; it is not noise. Read the `peerDependencies` of the Components version you install and select releases that every range accepts. The ranges have an upper bound as well: the newest Arc can be above what the Components release accepts, and then the fix is a newer Components or an older Arc, not a higher number everywhere. Never silence the warning with an override or a resolution: that hides an untested combination.
48
+
49
+ ## Crossing a Components major
50
+
51
+ A Components major is not a version bump: imports, provider setup, styling selectors and some callbacks can change. Follow Components' migration guide, and use its migrator instead of editing every usage by hand. When the guide documents a direct path across more than one major, follow that path; do not adopt the major in between.
52
+
53
+ - The migrator is a separate command-line package. Launch it with the package manager's one-off runner, bounded to the version range the migration guide gives; never add it to the application's dependencies and never run `latest`.
54
+ - Each command is safe to run again. Resolve every diagnostic and every marker it leaves in the code before continuing.
55
+ - Some commands run before the package is raised and some after. Coming from the major directly before the target, the import migration runs first, on the old release: apply it, pass lint, type check, specs and build on the old release, and save that state (source, manifest and lockfile) before raising anything. The remaining commands produce source for the new major and run after the bump.
56
+ - The migrator refuses an installed version outside the majors it supports. On the direct path from an older major, no command runs on the old release: make the preparatory import changes by hand, and run every command, the import migration included, only after the new major is installed.
57
+ - After the bump, update the provider setup and the stylesheet imports and make the source changes the guide lists before expecting the frontend to build. A failing build between the bump and those changes is expected, not a defect.
58
+
59
+ Order, commands and what changes by hand: `cratis-components-theme-application`, `references/upgrade-from-previous-major.md`.
60
+
61
+ ## Node backend and Chronicle client
62
+
63
+ - Raise the Arc for Node group as one release. `@cratis/platform` brings Arc for Node and the Chronicle client `@cratis/chronicle`; it requests the client as a caret range, so the lockfile decides which client release runs.
64
+ - `@cratis/chronicle` has its own version line: its number says nothing about the kernel it fits, and no table pairs client releases with kernels. Client and kernel compare contracts at connect, and an incompatible pair fails the connection. Test the locked client release against the kernel version each environment runs before deploying.
65
+ - Arc's upgrade notes describe the C# host. For a Node backend, establish the behaviour from `cratis-arc-host-application`, `references/typescript.md`; never copy a .NET setting.
66
+
67
+ ## Verify
68
+
69
+ - A clean install from the lockfile produces no peer warning.
70
+ - Type check, lint and production build pass against freshly generated proxies.
71
+ - The application's smoke check passes in the browser: one command, and the screen that shows its result.
@@ -9,6 +9,7 @@
9
9
  - Project the agent allowlist
10
10
  - Check generated values against their rules
11
11
  - Run one specification
12
+ - Honour the declared gate (edge case)
12
13
 
13
14
  Use these in-process APIs only when a .NET tool or test must compute acceptance evidence itself. The Screenplay CLI remains the default; it runs the same comparison, baseline check and manifest export. Use `Cratis.Screenplay`; scoped validation also requires `Cratis.Screenplay.Mcp`. Names in the examples are illustrative.
14
15
 
@@ -122,3 +123,31 @@ Three neighbouring checks in `Cratis.Screenplay.Semantics` answer different ques
122
123
  ## Run one specification
123
124
 
124
125
  `new SemanticSpecificationRunner().Run(compilation, specificationId)` (namespace `Cratis.Screenplay.Semantics.Execution`) runs one specification in the reference evaluator against a bound `SemanticCompilation` (a workspace's `Compilation.Value`) and returns `Passed`, `Execution` and `Failures`. It does not select, count or classify `unsupported` scenarios or plan issues; gate acceptance on `screenplay test --format json`.
126
+
127
+ ## Honour the declared gate (edge case)
128
+
129
+ The default is the CLI: a host takes its source evidence from the unscoped text run of `screenplay <root>` and its exit code, and runs `screenplay <root> --format json` when it needs the resolved `gate`, the `refusal` and the source diagnostics as data. The JSON run leaves out the screen visual file check, so it does not replace the text run as source evidence. Neither run accepts the revision; the owner does. Use the gate API in `Cratis.Screenplay.Validation` only when a .NET host runs its own checks in process and must apply `screenplay.json` with the same root search and precedence as the CLIs. Never re-implement either.
130
+
131
+ ```csharp
132
+ using Cratis.Screenplay.Validation;
133
+
134
+ var root = ValidationGateRoot.Resolve(target);
135
+ var read = noGateFile
136
+ ? new ValidationGateReadResult(root, Path.Combine(root, "screenplay.json"), null, null)
137
+ : ScreenplayValidationGate.Read(root);
138
+ var resolution = ValidationGateResolver.Resolve(read, commandLine, noGateFile);
139
+ if (resolution.Failure is { } failure)
140
+ {
141
+ Console.Error.WriteLine($"{failure.Path}({failure.Line},{failure.Column}): {failure.Kind}: {failure.Reason}");
142
+ return invalidInput;
143
+ }
144
+
145
+ var gate = resolution.Gate!;
146
+ ```
147
+
148
+ - `ValidationGateRoot.Resolve(target)` takes a model folder or a file and returns the gate root; with no `screenplay.json` or `.screenplay/` to find, it returns the starting folder.
149
+ - `ScreenplayValidationGate.Read(root)` only reads. An absent file gives a null `Declaration` and a null `Failure`; a refused file gives a `Failure` whose `Kind` is `ValidationGateFailureKind.Invalid` or `Unreadable`. Treat a failure as invalid input with the host's own exit code, never as an absent file.
150
+ - `commandLine` is a `DeclaredValidationGate` holding only what the user passed explicitly: `Checks`, `WarningsAsErrors`, `Scope` and `OpenQuestions` are all nullable, and null means omitted. An omitted flag must stay null, not `false`, or it overrides a file's `warningsAsErrors: true`.
151
+ - Validate each check selection with `CompletenessChecks.TryParse` (namespace `Cratis.Screenplay.Completeness`) before resolving; an unrecognized selection makes `Resolve` throw `InvalidValidationGateSelection`.
152
+ - When bypassing the file, do not read it: build a `ValidationGateReadResult` with the root, the file path, a null declaration and a null failure, then resolve with `noGateFile: true`. That is how both CLIs ignore the file, including a refused one.
153
+ - The `EffectiveValidationGate` has `ModelRoot`, `GateFilePath`, and `Checks`, `WarningsAsErrors`, `Scope` and `OpenQuestions`, each with a `Value` and a `Source` (`CommandLine`, `File` or `Default`). `Checks.Value` holds expanded check names. The gate only states what to check: the host still runs the checks and decides the exit code.
@@ -1,16 +1,97 @@
1
1
  # Read the acceptance evidence
2
2
 
3
+ ## Contents
4
+
5
+ - Declared gate
6
+ - Source gate report
7
+ - Specification report
8
+ - Diff
9
+ - Release baseline
10
+ - Target admission
11
+
3
12
  How to read each report the default path produces. Each one proves only what it says.
4
13
 
5
14
  ## Declared gate
6
15
 
7
16
  A `screenplay.json` at the model root declares the default gate for both CLIs:
8
17
 
18
+ ```json
19
+ {
20
+ "validation": {
21
+ "checks": ["field-origins", "query-keys", "navigation"],
22
+ "warningsAsErrors": true,
23
+ "openQuestions": "fail"
24
+ }
25
+ }
26
+ ```
27
+
28
+ - A `$schema` member is optional and left out here; point it at the published Screenplay v1 gate schema (`screenplay-v1.schema.json`, linked from the Screenplay tool documentation) so editors validate the file while it is written. The tools apply the same strict shape whether or not it is present.
29
+ - Every `validation` member is optional. A missing file or member keeps the default: no opt-in completeness checks, warnings do not fail, no scope, open questions not evaluated. The checks that are on by default, such as `PLAY0533`, still run.
30
+
9
31
  - `validation.checks` — completeness check names, codes or `all` (one item each; comma-separated items are invalid). `all` grows as the tool adds checks; an explicit list pins membership.
10
32
  - `validation.warningsAsErrors` — `true` makes warnings fail. Omitting the flag on the command line does not turn it off.
11
33
  - `validation.scope` — default reported scope.
12
34
  - `validation.openQuestions` — `report` or `fail`.
13
- - Precedence: each explicit option replaces only its own setting, and any `--check` replaces the file's list. An invalid or unreadable file refuses with exit `2`; it is never treated as missing. People author this file; no tool writes it.
35
+ - Precedence: each explicit option replaces only its own setting, and any `--check` replaces the file's list.
36
+ - Refusal: malformed JSON, a duplicate member, an unknown member or check name, or a wrong type is an invalid file; a directory, symbolic link or unreadable file at that path is an unreadable one. Either refuses the run (`screenplay` exits `2`, `cratis screenplay validate` exits `1`), names the path, line and column, and is never treated as missing. `--no-gate-file` is the only bypass.
37
+ - People author this file; no tool writes it.
38
+
39
+ Which file applies: the gate root is the nearest folder, at or above the target folder (for a file target, its parent), that holds `screenplay.json` or a `.screenplay/` folder. The search includes the first folder that holds `.git` and never goes above it. If nothing matches, the starting folder is the root and the defaults apply. A model nested inside another model therefore keeps its own gate, and never inherits the outer one. Imports do not affect the search, and finding a gate does not change which files are compiled. `--print-gate` shows the root and file path that were chosen.
40
+
41
+ ## Source gate report
42
+
43
+ The two CLIs resolve the same gate settings but do not always reach the same verdict, and they report differently. Read each with its own contract. The unscoped text run of `screenplay <root>` stays the default source evidence: the JSON forms below are for hosts that need structured output, not a replacement for it. Neither is acceptance; the owner decides.
44
+
45
+ ### `screenplay <root> --format json`
46
+
47
+ Standard output holds exactly one JSON document:
48
+
49
+ - `gate` — the effective gate: `modelRoot`, `gateFilePath`, and `checks`, `warningsAsErrors`, `scope` and `openQuestions`, each with `value` and `source` (`commandLine`, `file` or `default`). `checks.value` lists the expanded check names, so `all` appears as its members. `gateFilePath` is where the file would be, also when none exists; `source` tells whether a file supplied a value.
50
+ - `diagnostics` — the reported diagnostics.
51
+ - `openQuestions` — the open-question outcome, `null` when open questions were not evaluated.
52
+ - `refusal` — `null` when the requested gate completed; set when it did not. A refused gate file gives `gate: null` and a refusal with `kind` (`invalid` or `unreadable`), `path`, `line`, `column` and `reason`. Any other refusal (invalid arguments, a missing path, an unknown scope, unreadable model notes) has only `kind` and `reason`.
53
+ - `exitCode` — the same value as the process exit code.
54
+ - `filesCompiled` — the number of documents compiled. `0` gives no source-validation evidence, even with `exitCode` `0`: either the folder holds no `.play` file, or the run was refused, possibly after compiling. Other parts of the gate, such as open questions, can still have been evaluated.
55
+
56
+ Branch on `exitCode` and `refusal` first. A refusal means the requested gate did not complete; it does not say whether compilation ran. An unknown scope is refused after compiling and its results are discarded (`diagnostics` empty, `filesCompiled` reported as `0`), while unreadable model notes give a refusal next to the completed source diagnostics. So with a refusal, never read `diagnostics`, empty or not, as the gate result. `--print-gate` always prints text and never this document, even with `--format json`.
57
+
58
+ This document is not interchangeable with the text run. The unscoped text run also checks the visual files that screens reference and reports them as diagnostics; the JSON run leaves that check out. A model can therefore pass `--format json` under `--warnaserror` while the unscoped text run fails. A scoped text run reports only the diagnostics selected for the scope, and that selection does not include the visual file findings. So take the source evidence from the unscoped text run, and use the JSON document to read the gate, the refusal and the source diagnostics. Neither run accepts the revision; that stays the owner's decision.
59
+
60
+ ### `cratis screenplay validate <root> -o json`
61
+
62
+ Check the exit code first. Standard output holds a summary only in some runs: a plain source failure (exit `5` with no declared gate, checks, scope, open questions or target) writes to standard error only, and an input refused before validation starts (a refused `screenplay.json`, a missing path, an unknown scope) never writes one. Unreadable model notes are different: validation has already run, so the run can exit `1` and still write a summary with `valid` `false`. So tolerate empty standard output, and never read a summary without its exit code. When there is a summary, it reports counts, not the diagnostics themselves; the diagnostics stay on standard error. Optional summary members with no value are left out, not written as `null`. The `gate` object is the exception: `scope.value` and `openQuestions.value` are written as `null` when unset.
63
+
64
+ - `valid` — whether validation passed.
65
+ - `errors` and `warnings` — counts of the reported diagnostics.
66
+ - `checks` — the selected completeness check names.
67
+ - `completenessStatus` — `ran`, `skipped` or `not requested`, about the opt-in checks only. `not requested` means no opt-in check was selected; the checks that are on by default (such as `PLAY0533`) still run once the source compiles without errors. `skipped` means checks were selected but source errors stopped them from running; `completenessNote` then says why and is otherwise absent. A `skipped` run with no completeness findings proves nothing about completeness: fix the errors and run again.
68
+ - `gate` — the same effective gate object as above. With `--print-gate`, `-o json` prints only this object.
69
+ - `openQuestions` — the open-question outcome; absent when open questions were not evaluated.
70
+
71
+ With persisted identities (`.screenplay/identities.json`), a folder target is opened as that workspace: validation compiles the documents the workspace admits, `--executable` binds with its application and document identities, and identity state that cannot be opened refuses with exit `1`. A single `.play` file target is compiled and bound without the catalog beside it, so its source and binding result says nothing about the persisted identities. Open-question evaluation is the exception: when the gate selects a mode, it reads the model notes and can load the persisted identities even for a file target. Validate the model root.
72
+
73
+ ### Exit codes of the two source gates
74
+
75
+ The two tools use different codes for the same condition. Never read one tool's exit code with the other tool's table.
76
+
77
+ | Condition | `screenplay` | `cratis screenplay validate` |
78
+ | --- | --- | --- |
79
+ | Clean | `0` | `0` |
80
+ | Errors, promoted warnings, or open questions in `fail` mode | `1` | `5` |
81
+ | With `--executable`: the model does not bind, or the target reports error diagnostics | not checked by this command | `5` |
82
+ | Unknown `--check` name | `2` | `5` |
83
+ | Unknown option | `2` | `5` |
84
+ | Invalid `--open-questions` value | `2` | `5` |
85
+ | Refused `screenplay.json` | `2` | `1` |
86
+ | Missing path, not a `.play` file, or unknown or ambiguous scope | `2` | `1` |
87
+ | Unreadable model notes while open questions are evaluated | `2` | `1`, or `5` when validation already failed |
88
+ | No `.play` file in the folder | text, no scope: `0` with a notice. `--format json`: `0` with `filesCompiled` `0` and no notice. Neither is evidence. A scope or an open-question mode can still refuse or fail the run | `1` |
89
+ | `--executable` when `screenplay.json` declares a `scope` | does not apply | `1` |
90
+ | `--executable` together with `--scope` on the command line | does not apply | `-1` (usage error; a POSIX shell shows `255`) |
91
+ | Option without its value | `2` | `-1` (usage error; a POSIX shell shows `255`) |
92
+ | Unexpected failure | not defined | `10` |
93
+
94
+ So `1` means "the model has defects" from `screenplay` and "the input was refused" from `cratis screenplay validate`. `--print-gate` exits `0` from both when the gate resolves, even if the model is broken.
14
95
 
15
96
  ## Specification report
16
97
 
@@ -89,7 +89,7 @@ module Parking
89
89
  - `identifier` names the event source; `for id` appends there. `generated` lets the system create it; `returns id` hands it back.
90
90
  - `produces` maps every required event property; nothing is copied by name. A projection does copy same-named properties, so only `id` needs a line.
91
91
  - The store holds one active permit per plate across event sources until revoked; a read-then-decide check would race.
92
- - The list query is `observable` because read models are eventually consistent.
92
+ - The list query is `observable` because the screen's own commands change it and the read model follows the append; a one-off lookup such as `PermitById` or a report stays a snapshot. After-write behavior: `cratis-platform-deliver-slice`, `references/eventual-consistency.md`.
93
93
 
94
94
  ## How it behaves at runtime
95
95
 
@@ -140,6 +140,16 @@ metadata empty
140
140
 
141
141
  A block whose first line is `item` is a list; otherwise it is an object. `none` is an empty list and `empty` is an object without members.
142
142
 
143
+ A header without an inline value must open an indented block or end in `none` or `empty`. A bare header with nothing under it is an error, not an empty value: `PLAY0291` where a structured value is expected, such as a member inside a block, and the surrounding construct's own error elsewhere (`PLAY0044` for a bare line under `produces`).
144
+
145
+ An empty list, an object without members and `null` are three different values; write the one the target type accepts.
146
+
147
+ | Line | Value |
148
+ | --- | --- |
149
+ | `tags none` | An empty list. |
150
+ | `metadata empty` | An object without members. |
151
+ | `note = null` | Explicitly assigns `null`; does not omit the member. |
152
+
143
153
  ## Seed data and named examples
144
154
 
145
155
  `seed` at the application root lists starting facts grouped by event source. It is operational metadata, not behavior in the executable model. Stage replay-checks each group before appending anything, warns and omits the entire group on refusal, and skips a source that already has events.