@cratis/pi 8.0.2 → 8.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (490) hide show
  1. package/package/corpus/harnesses/copilot/instructions/ai-distribution.instructions.md +9 -102
  2. package/package/corpus/harnesses/copilot/instructions/authoring-skills.instructions.md +3 -5
  3. package/package/corpus/harnesses/copilot/instructions/browser.instructions.md +8 -49
  4. package/package/corpus/harnesses/copilot/instructions/code-health.instructions.md +1 -1
  5. package/package/corpus/harnesses/copilot/instructions/code-quality.csharp.instructions.md +3 -84
  6. package/package/corpus/harnesses/copilot/instructions/code-quality.instructions.md +6 -51
  7. package/package/corpus/harnesses/copilot/instructions/code-quality.typescript.instructions.md +4 -81
  8. package/package/corpus/harnesses/copilot/instructions/codescene.instructions.md +5 -54
  9. package/package/corpus/harnesses/copilot/instructions/components.instructions.md +1 -1
  10. package/package/corpus/harnesses/copilot/instructions/cratis-folder-is-configuration.instructions.md +5 -22
  11. package/package/corpus/harnesses/copilot/instructions/csharp.instructions.md +7 -315
  12. package/package/corpus/harnesses/copilot/instructions/dialogs.instructions.md +1 -1
  13. package/package/corpus/harnesses/copilot/instructions/discoverability.instructions.md +3 -25
  14. package/package/corpus/harnesses/copilot/instructions/documentation-structure-and-formatting.instructions.md +5 -151
  15. package/package/corpus/harnesses/copilot/instructions/documentation.instructions.md +5 -104
  16. package/package/corpus/harnesses/copilot/instructions/editing-cratis-docs.instructions.md +5 -63
  17. package/package/corpus/harnesses/copilot/instructions/efcore.instructions.md +8 -55
  18. package/package/corpus/harnesses/copilot/instructions/efcore.specs.instructions.md +3 -33
  19. package/package/corpus/harnesses/copilot/instructions/elixir.instructions.md +6 -79
  20. package/package/corpus/harnesses/copilot/instructions/exit-codes-and-wrappers.instructions.md +4 -27
  21. package/package/corpus/harnesses/copilot/instructions/framework-dotnet.instructions.md +4 -6
  22. package/package/corpus/harnesses/copilot/instructions/framework.instructions.md +0 -2
  23. package/package/corpus/harnesses/copilot/instructions/frontend-quality.instructions.md +0 -1
  24. package/package/corpus/harnesses/copilot/instructions/frontend-testing.instructions.md +1 -1
  25. package/package/corpus/harnesses/copilot/instructions/github-actions.instructions.md +7 -138
  26. package/package/corpus/harnesses/copilot/instructions/glossary.instructions.md +19 -19
  27. package/package/corpus/harnesses/copilot/instructions/go-engineering.instructions.md +1 -4
  28. package/package/corpus/harnesses/copilot/instructions/go.instructions.md +2 -7
  29. package/package/corpus/harnesses/copilot/instructions/guards-and-fuses.instructions.md +5 -6
  30. package/package/corpus/harnesses/copilot/instructions/java.instructions.md +7 -129
  31. package/package/corpus/harnesses/copilot/instructions/kotlin.instructions.md +8 -165
  32. package/package/corpus/harnesses/copilot/instructions/local-work-artifacts.instructions.md +4 -1
  33. package/package/corpus/harnesses/copilot/instructions/orleans.instructions.md +5 -98
  34. package/package/corpus/harnesses/copilot/instructions/profiles.instructions.md +9 -63
  35. package/package/corpus/harnesses/copilot/instructions/scripting.instructions.md +1 -1
  36. package/package/corpus/harnesses/copilot/instructions/specs.csharp.instructions.md +8 -148
  37. package/package/corpus/harnesses/copilot/instructions/specs.elixir.instructions.md +4 -37
  38. package/package/corpus/harnesses/copilot/instructions/specs.typescript.instructions.md +3 -1
  39. package/package/corpus/harnesses/copilot/instructions/storybook.instructions.md +7 -70
  40. package/package/corpus/harnesses/copilot/instructions/typescript.instructions.md +8 -98
  41. package/package/corpus/harnesses/copilot/instructions/writing-correct-examples.instructions.md +3 -47
  42. package/package/corpus/harnesses/copilot/instructions/writing-cratis-docs.instructions.md +3 -65
  43. package/package/corpus/hooks/README.md +16 -8
  44. package/package/corpus/hooks/scripts/cratis-cleanup-worktrees.sh +109 -6
  45. package/package/corpus/hooks/scripts/cratis-guard-shell-writes.sh +1 -1
  46. package/package/corpus/hooks/scripts/quality-gates.json +3 -5
  47. package/package/corpus/rules/ai-distribution.md +9 -102
  48. package/package/corpus/rules/authoring-skills.md +3 -5
  49. package/package/corpus/rules/browser.md +8 -49
  50. package/package/corpus/rules/code-health-policy.txt +4 -24
  51. package/package/corpus/rules/code-health.md +1 -1
  52. package/package/corpus/rules/code-quality.csharp.md +3 -84
  53. package/package/corpus/rules/code-quality.md +6 -51
  54. package/package/corpus/rules/code-quality.typescript.md +4 -81
  55. package/package/corpus/rules/codescene.md +5 -54
  56. package/package/corpus/rules/components.md +1 -1
  57. package/package/corpus/rules/cratis-folder-is-configuration.md +5 -22
  58. package/package/corpus/rules/csharp.md +7 -315
  59. package/package/corpus/rules/dialogs.md +1 -1
  60. package/package/corpus/rules/discoverability.md +3 -25
  61. package/package/corpus/rules/documentation-structure-and-formatting.md +5 -151
  62. package/package/corpus/rules/documentation.md +5 -104
  63. package/package/corpus/rules/editing-cratis-docs.md +5 -63
  64. package/package/corpus/rules/efcore.md +8 -55
  65. package/package/corpus/rules/efcore.specs.md +3 -33
  66. package/package/corpus/rules/elixir.md +6 -79
  67. package/package/corpus/rules/exit-codes-and-wrappers.md +4 -27
  68. package/package/corpus/rules/framework-dotnet.md +4 -6
  69. package/package/corpus/rules/framework.md +0 -2
  70. package/package/corpus/rules/frontend-quality.md +0 -1
  71. package/package/corpus/rules/frontend-testing.md +1 -1
  72. package/package/corpus/rules/general.md +2 -2
  73. package/package/corpus/rules/github-actions.md +7 -138
  74. package/package/corpus/rules/glossary.md +19 -19
  75. package/package/corpus/rules/go-engineering.md +1 -4
  76. package/package/corpus/rules/go.md +2 -7
  77. package/package/corpus/rules/guards-and-fuses.md +5 -6
  78. package/package/corpus/rules/java.md +7 -129
  79. package/package/corpus/rules/kotlin.md +8 -165
  80. package/package/corpus/rules/local-work-artifacts.md +4 -1
  81. package/package/corpus/rules/orleans.md +5 -98
  82. package/package/corpus/rules/profiles.md +9 -63
  83. package/package/corpus/rules/scripting.md +1 -1
  84. package/package/corpus/rules/specs.csharp.md +8 -148
  85. package/package/corpus/rules/specs.elixir.md +4 -37
  86. package/package/corpus/rules/specs.typescript.md +3 -1
  87. package/package/corpus/rules/storybook.md +7 -70
  88. package/package/corpus/rules/typescript.md +8 -98
  89. package/package/corpus/rules/writing-correct-examples.md +3 -47
  90. package/package/corpus/rules/writing-cratis-docs.md +3 -65
  91. package/package/corpus/skills/cratis-application-growth/SKILL.md +7 -54
  92. package/package/corpus/skills/cratis-application-growth/references/move-and-untangle.md +49 -0
  93. package/package/corpus/skills/cratis-application-growth/references/rename-window.md +12 -14
  94. package/package/corpus/skills/cratis-application-growth/references/stages.md +2 -2
  95. package/package/corpus/skills/cratis-arc-authorize-request/SKILL.md +2 -2
  96. package/package/corpus/skills/cratis-arc-authorize-request/references/csharp.md +3 -3
  97. package/package/corpus/skills/cratis-arc-authorize-request/references/kotlin.md +2 -2
  98. package/package/corpus/skills/cratis-arc-code-analysis-typescript/SKILL.md +10 -43
  99. package/package/corpus/skills/cratis-arc-code-analysis-typescript/references/rule-fixes.md +40 -0
  100. package/package/corpus/skills/cratis-arc-connect-storage/SKILL.md +1 -1
  101. package/package/corpus/skills/cratis-arc-connect-storage/references/csharp.md +1 -1
  102. package/package/corpus/skills/cratis-arc-declare-command/references/csharp.md +4 -4
  103. package/package/corpus/skills/cratis-arc-declare-command/references/go.md +1 -1
  104. package/package/corpus/skills/cratis-arc-declare-command/references/kotlin.md +6 -7
  105. package/package/corpus/skills/cratis-arc-declare-operation/SKILL.md +2 -8
  106. package/package/corpus/skills/cratis-arc-declare-operation/references/csharp.md +1 -1
  107. package/package/corpus/skills/cratis-arc-diagnose-live-query/SKILL.md +1 -1
  108. package/package/corpus/skills/cratis-arc-diagnose-live-query/references/csharp.md +1 -1
  109. package/package/corpus/skills/cratis-arc-expose-mcp-operation/SKILL.md +6 -12
  110. package/package/corpus/skills/cratis-arc-expose-mcp-operation/references/custom-exposure-and-audit.md +4 -0
  111. package/package/corpus/skills/cratis-arc-expose-query/SKILL.md +2 -2
  112. package/package/corpus/skills/cratis-arc-expose-query/references/csharp.md +11 -4
  113. package/package/corpus/skills/cratis-arc-expose-query/references/typescript.md +1 -1
  114. package/package/corpus/skills/cratis-arc-generate-proxies/SKILL.md +2 -2
  115. package/package/corpus/skills/cratis-arc-generate-proxies/references/csharp.md +1 -1
  116. package/package/corpus/skills/cratis-arc-generate-proxies/references/go.md +19 -2
  117. package/package/corpus/skills/cratis-arc-generate-proxies/references/typescript.md +1 -1
  118. package/package/corpus/skills/cratis-arc-host-application/SKILL.md +1 -1
  119. package/package/corpus/skills/cratis-arc-host-application/references/csharp.md +1 -2
  120. package/package/corpus/skills/cratis-arc-host-application/references/elixir.md +2 -2
  121. package/package/corpus/skills/cratis-arc-host-application/references/go.md +5 -1
  122. package/package/corpus/skills/cratis-arc-host-application/references/java.md +1 -1
  123. package/package/corpus/skills/cratis-arc-host-application/references/kotlin.md +1 -1
  124. package/package/corpus/skills/cratis-arc-host-application/references/typescript.md +1 -1
  125. package/package/corpus/skills/cratis-arc-identity-and-tenancy-kotlin/SKILL.md +4 -7
  126. package/package/corpus/skills/cratis-arc-invoke-command/SKILL.md +1 -1
  127. package/package/corpus/skills/cratis-arc-invoke-command/references/csharp.md +4 -4
  128. package/package/corpus/skills/cratis-arc-invoke-command/references/typescript.md +1 -1
  129. package/package/corpus/skills/cratis-arc-isolate-tenant/SKILL.md +2 -2
  130. package/package/corpus/skills/cratis-arc-isolate-tenant/references/csharp.md +2 -2
  131. package/package/corpus/skills/cratis-arc-isolate-tenant/references/elixir.md +1 -1
  132. package/package/corpus/skills/cratis-arc-isolate-tenant/references/java.md +1 -1
  133. package/package/corpus/skills/cratis-arc-isolate-tenant/references/kotlin.md +1 -1
  134. package/package/corpus/skills/cratis-arc-isolate-tenant/references/typescript.md +4 -2
  135. package/package/corpus/skills/cratis-arc-migrate-relational-schema/SKILL.md +6 -6
  136. package/package/corpus/skills/cratis-arc-page-query/SKILL.md +3 -3
  137. package/package/corpus/skills/cratis-arc-page-query/references/csharp.md +10 -6
  138. package/package/corpus/skills/cratis-arc-page-query/references/elixir.md +2 -2
  139. package/package/corpus/skills/cratis-arc-page-query/references/java.md +1 -1
  140. package/package/corpus/skills/cratis-arc-page-query/references/kotlin.md +1 -1
  141. package/package/corpus/skills/cratis-arc-react-bind-slice/SKILL.md +2 -2
  142. package/package/corpus/skills/cratis-arc-react-bind-slice/references/csharp.md +1 -1
  143. package/package/corpus/skills/cratis-arc-react-bind-slice/references/kotlin.md +1 -1
  144. package/package/corpus/skills/cratis-arc-react-separate-view-model/SKILL.md +7 -3
  145. package/package/corpus/skills/cratis-arc-react-separate-view-model/references/react-routing-and-messaging.md +1 -1
  146. package/package/corpus/skills/cratis-arc-select-backend-sdk/SKILL.md +2 -2
  147. package/package/corpus/skills/cratis-arc-select-backend-sdk/references/elixir.md +2 -4
  148. package/package/corpus/skills/cratis-arc-select-backend-sdk/references/go.md +2 -2
  149. package/package/corpus/skills/cratis-arc-select-backend-sdk/references/java.md +1 -1
  150. package/package/corpus/skills/cratis-arc-select-backend-sdk/references/kotlin.md +2 -2
  151. package/package/corpus/skills/cratis-arc-select-backend-sdk/references/typescript.md +1 -3
  152. package/package/corpus/skills/cratis-arc-spring-data-kotlin/SKILL.md +13 -51
  153. package/package/corpus/skills/cratis-arc-spring-data-kotlin/references/read-model-naming.md +9 -1
  154. package/package/corpus/skills/cratis-arc-spring-data-kotlin/references/storage-boundaries.md +40 -0
  155. package/package/corpus/skills/cratis-arc-storage-typescript/SKILL.md +19 -64
  156. package/package/corpus/skills/cratis-arc-storage-typescript/references/drizzle.md +62 -0
  157. package/package/corpus/skills/cratis-arc-tenancy-typescript/SKILL.md +24 -55
  158. package/package/corpus/skills/cratis-arc-tenancy-typescript/references/tenant-selection.md +49 -0
  159. package/package/corpus/skills/cratis-arc-testing-kotlin/SKILL.md +13 -31
  160. package/package/corpus/skills/cratis-arc-testing-kotlin/references/jvm-scenario-variants.md +25 -0
  161. package/package/corpus/skills/cratis-arc-testing-typescript/SKILL.md +24 -62
  162. package/package/corpus/skills/cratis-arc-testing-typescript/references/hosts-and-runners.md +51 -0
  163. package/package/corpus/skills/cratis-arc-validate-command/SKILL.md +4 -4
  164. package/package/corpus/skills/cratis-arc-validate-command/references/csharp.md +10 -12
  165. package/package/corpus/skills/cratis-arc-validate-command/references/elixir.md +16 -3
  166. package/package/corpus/skills/cratis-arc-validate-command/references/go.md +19 -2
  167. package/package/corpus/skills/cratis-arc-validate-command/references/java.md +20 -7
  168. package/package/corpus/skills/cratis-arc-validate-command/references/kotlin.md +22 -2
  169. package/package/corpus/skills/cratis-arc-validate-command/references/python.md +8 -2
  170. package/package/corpus/skills/cratis-arc-validate-command/references/typescript.md +22 -2
  171. package/package/corpus/skills/cratis-arc-validation-kotlin/SKILL.md +22 -248
  172. package/package/corpus/skills/cratis-arc-validation-kotlin/references/feature-filters.md +55 -0
  173. package/package/corpus/skills/cratis-arc-validation-kotlin/references/model-validation.md +72 -0
  174. package/package/corpus/skills/cratis-arc-validation-kotlin/references/server-validators.md +86 -0
  175. package/package/corpus/skills/cratis-arc-validation-typescript/SKILL.md +27 -275
  176. package/package/corpus/skills/cratis-arc-validation-typescript/references/models-and-queries.md +63 -0
  177. package/package/corpus/skills/cratis-arc-validation-typescript/references/rules-and-checks.md +46 -0
  178. package/package/corpus/skills/cratis-arc-validation-typescript/references/server-decisions.md +114 -0
  179. package/package/corpus/skills/cratis-chronicle-cli-operations/SKILL.md +15 -255
  180. package/package/corpus/skills/cratis-chronicle-cli-operations/references/command-effects.md +13 -6
  181. package/package/corpus/skills/cratis-chronicle-cli-operations/references/inspection.md +75 -0
  182. package/package/corpus/skills/cratis-chronicle-cli-operations/references/project-tooling.md +78 -13
  183. package/package/corpus/skills/cratis-chronicle-cli-operations/references/recovery-and-comparison.md +16 -14
  184. package/package/corpus/skills/cratis-chronicle-connect-application/SKILL.md +1 -1
  185. package/package/corpus/skills/cratis-chronicle-connect-application/references/csharp.md +10 -6
  186. package/package/corpus/skills/cratis-chronicle-connect-application/references/elixir.md +1 -1
  187. package/package/corpus/skills/cratis-chronicle-constrain-append/SKILL.md +2 -2
  188. package/package/corpus/skills/cratis-chronicle-constrain-append/references/csharp.md +8 -8
  189. package/package/corpus/skills/cratis-chronicle-deploy-kernel/SKILL.md +10 -8
  190. package/package/corpus/skills/cratis-chronicle-deploy-kernel/references/storage.md +8 -4
  191. package/package/corpus/skills/cratis-chronicle-evolve-event/SKILL.md +4 -4
  192. package/package/corpus/skills/cratis-chronicle-evolve-event/references/csharp.md +2 -2
  193. package/package/corpus/skills/cratis-chronicle-evolve-event/references/deployed-readers.md +21 -8
  194. package/package/corpus/skills/cratis-chronicle-evolve-event/references/elixir.md +1 -1
  195. package/package/corpus/skills/cratis-chronicle-inspect-observer/SKILL.md +1 -1
  196. package/package/corpus/skills/cratis-chronicle-inspect-observer/references/csharp.md +5 -7
  197. package/package/corpus/skills/cratis-chronicle-inspect-observer/references/elixir.md +3 -3
  198. package/package/corpus/skills/cratis-chronicle-mcp-inspection/SKILL.md +10 -80
  199. package/package/corpus/skills/cratis-chronicle-mcp-inspection/references/blocked-tools.md +2 -2
  200. package/package/corpus/skills/cratis-chronicle-mcp-inspection/references/deployment.md +9 -24
  201. package/package/corpus/skills/cratis-chronicle-mcp-inspection/references/observational-tools.md +10 -0
  202. package/package/corpus/skills/cratis-chronicle-project-view/SKILL.md +2 -2
  203. package/package/corpus/skills/cratis-chronicle-project-view/references/csharp.md +7 -6
  204. package/package/corpus/skills/cratis-chronicle-project-view/references/elixir.md +2 -2
  205. package/package/corpus/skills/cratis-chronicle-project-view/references/go.md +6 -0
  206. package/package/corpus/skills/cratis-chronicle-project-view/references/java.md +6 -0
  207. package/package/corpus/skills/cratis-chronicle-project-view/references/kotlin.md +6 -0
  208. package/package/corpus/skills/cratis-chronicle-project-view/references/typescript.md +11 -5
  209. package/package/corpus/skills/cratis-chronicle-protect-decision/SKILL.md +2 -2
  210. package/package/corpus/skills/cratis-chronicle-protect-decision/references/csharp.md +4 -4
  211. package/package/corpus/skills/cratis-chronicle-protect-decision/references/elixir.md +2 -2
  212. package/package/corpus/skills/cratis-chronicle-protect-decision/references/go.md +3 -1
  213. package/package/corpus/skills/cratis-chronicle-protect-personal-data/SKILL.md +1 -1
  214. package/package/corpus/skills/cratis-chronicle-protect-personal-data/references/csharp.md +1 -1
  215. package/package/corpus/skills/cratis-chronicle-publish-contract/SKILL.md +1 -1
  216. package/package/corpus/skills/cratis-chronicle-publish-contract/references/csharp.md +51 -40
  217. package/package/corpus/skills/cratis-chronicle-publish-contract/references/elixir.md +1 -1
  218. package/package/corpus/skills/cratis-chronicle-react-to-fact/SKILL.md +1 -1
  219. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/{occurrences.md → csharp-occurrences.md} +2 -2
  220. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/csharp.md +5 -6
  221. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/go.md +1 -1
  222. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/java.md +1 -1
  223. package/package/corpus/skills/cratis-chronicle-react-to-fact/references/kotlin.md +1 -1
  224. package/package/corpus/skills/cratis-chronicle-record-event/SKILL.md +1 -1
  225. package/package/corpus/skills/cratis-chronicle-record-event/references/csharp.md +21 -19
  226. package/package/corpus/skills/cratis-chronicle-record-event/references/elixir.md +3 -3
  227. package/package/corpus/skills/cratis-chronicle-record-event/references/go.md +1 -1
  228. package/package/corpus/skills/cratis-chronicle-record-event/references/java.md +3 -4
  229. package/package/corpus/skills/cratis-chronicle-record-event/references/kotlin.md +3 -4
  230. package/package/corpus/skills/cratis-chronicle-record-event/references/typescript.md +2 -2
  231. package/package/corpus/skills/cratis-chronicle-reduce-state/SKILL.md +1 -1
  232. package/package/corpus/skills/cratis-chronicle-reduce-state/references/csharp.md +7 -2
  233. package/package/corpus/skills/cratis-chronicle-reduce-state/references/typescript.md +1 -1
  234. package/package/corpus/skills/cratis-chronicle-select-client/SKILL.md +4 -4
  235. package/package/corpus/skills/cratis-chronicle-select-client/references/csharp.md +3 -3
  236. package/package/corpus/skills/cratis-chronicle-select-client/references/elixir.md +2 -6
  237. package/package/corpus/skills/cratis-chronicle-select-client/references/go.md +2 -2
  238. package/package/corpus/skills/cratis-chronicle-select-client/references/java.md +1 -1
  239. package/package/corpus/skills/cratis-chronicle-select-client/references/kotlin.md +1 -5
  240. package/package/corpus/skills/cratis-chronicle-select-client/references/python.md +3 -3
  241. package/package/corpus/skills/cratis-chronicle-select-client/references/typescript.md +2 -2
  242. package/package/corpus/skills/cratis-chronicle-web-workbench/SKILL.md +12 -201
  243. package/package/corpus/skills/cratis-chronicle-web-workbench/references/hosting.md +67 -0
  244. package/package/corpus/skills/cratis-chronicle-web-workbench/references/operations.md +88 -0
  245. package/package/corpus/skills/cratis-ci-pipeline-performance/SKILL.md +8 -4
  246. package/package/corpus/skills/cratis-ci-pipeline-performance/references/build-once-and-shard.md +13 -11
  247. package/package/corpus/skills/cratis-ci-pipeline-performance/references/caching.md +2 -2
  248. package/package/corpus/skills/cratis-ci-pipeline-performance/references/flaky-and-hung-jobs.md +6 -4
  249. package/package/corpus/skills/cratis-ci-pipeline-performance/references/required-checks-and-path-filters.md +20 -61
  250. package/package/corpus/skills/cratis-ci-pipeline-performance/references/security-and-pinning.md +1 -1
  251. package/package/corpus/skills/cratis-cli-terminal-workbench/SKILL.md +15 -26
  252. package/package/corpus/skills/cratis-code-review/SKILL.md +7 -6
  253. package/package/corpus/skills/cratis-commits-and-pull-requests/SKILL.md +1 -1
  254. package/package/corpus/skills/cratis-commits-and-pull-requests/references/pr-description.md +1 -1
  255. package/package/corpus/skills/cratis-components-accessibility/SKILL.md +14 -206
  256. package/package/corpus/skills/cratis-components-accessibility/references/control-labels.md +29 -0
  257. package/package/corpus/skills/cratis-components-accessibility/references/focus-and-announcements.md +8 -0
  258. package/package/corpus/skills/cratis-components-build-canvas/SKILL.md +7 -7
  259. package/package/corpus/skills/cratis-components-build-canvas/references/pixi-items.md +1 -1
  260. package/package/corpus/skills/cratis-components-choose-control/SKILL.md +7 -8
  261. package/package/corpus/skills/cratis-components-choose-control/references/collections.md +2 -2
  262. package/package/corpus/skills/cratis-components-choose-control/references/inputs.md +1 -1
  263. package/package/corpus/skills/cratis-components-compose-toolbar/SKILL.md +22 -27
  264. package/package/corpus/skills/cratis-components-compose-toolbar/references/contributed-tools.md +5 -0
  265. package/package/corpus/skills/cratis-components-coordinate-feedback/SKILL.md +19 -25
  266. package/package/corpus/skills/cratis-components-display-list/SKILL.md +26 -19
  267. package/package/corpus/skills/cratis-components-display-list/references/server-query.md +3 -3
  268. package/package/corpus/skills/cratis-components-edit-schema-data/SKILL.md +15 -12
  269. package/package/corpus/skills/cratis-components-edit-schema-data/references/controlled-editor.md +3 -3
  270. package/package/corpus/skills/cratis-components-explore-data/SKILL.md +7 -7
  271. package/package/corpus/skills/cratis-components-host-chat/SKILL.md +7 -7
  272. package/package/corpus/skills/cratis-components-submit-form/SKILL.md +9 -15
  273. package/package/corpus/skills/cratis-components-submit-form/references/confirmation.md +5 -5
  274. package/package/corpus/skills/cratis-components-submit-form/references/wizard.md +3 -3
  275. package/package/corpus/skills/cratis-components-theme-application/SKILL.md +7 -51
  276. package/package/corpus/skills/cratis-components-theme-application/references/palette.md +49 -0
  277. package/package/corpus/skills/cratis-components-theme-application/references/renderer-adapters.md +4 -2
  278. package/package/corpus/skills/cratis-content-length/SKILL.md +34 -46
  279. package/package/corpus/skills/cratis-content-length/references/length-evidence.md +26 -127
  280. package/package/corpus/skills/cratis-developer-marketing/SKILL.md +15 -27
  281. package/package/corpus/skills/cratis-developer-marketing/references/measurement.md +3 -19
  282. package/package/corpus/skills/cratis-developer-marketing/references/playbook-evidence.md +29 -224
  283. package/package/corpus/skills/cratis-discoverability/SKILL.md +11 -4
  284. package/package/corpus/skills/cratis-discoverability/references/package-metadata.md +2 -2
  285. package/package/corpus/skills/cratis-documentation-writing/SKILL.md +4 -3
  286. package/package/corpus/skills/cratis-engineering-ci-gates/SKILL.md +13 -129
  287. package/package/corpus/skills/cratis-engineering-ci-gates/references/gate-operation.md +132 -0
  288. package/package/corpus/skills/cratis-engineering-consolidation-guard/SKILL.md +11 -100
  289. package/package/corpus/skills/cratis-engineering-consolidation-guard/references/ci-required-check.md +55 -40
  290. package/package/corpus/skills/cratis-engineering-consolidation-guard/references/source-verification.md +68 -0
  291. package/package/corpus/skills/cratis-engineering-consolidation-guard/references/verification-details.md +38 -0
  292. package/package/corpus/skills/cratis-engineering-csharp-conventions/SKILL.md +14 -65
  293. package/package/corpus/skills/cratis-engineering-csharp-conventions/references/exceptions-logging-and-di.md +40 -174
  294. package/package/corpus/skills/cratis-engineering-decision-record/SKILL.md +8 -52
  295. package/package/corpus/skills/cratis-engineering-decision-record/references/decision-pitfalls.md +29 -0
  296. package/package/corpus/skills/cratis-engineering-decision-record/references/decision-scope.md +20 -0
  297. package/package/corpus/skills/cratis-engineering-decision-record/references/record-format.md +3 -4
  298. package/package/corpus/skills/cratis-engineering-docs-authoring/SKILL.md +7 -12
  299. package/package/corpus/skills/cratis-engineering-docs-authoring/references/site-format.md +5 -4
  300. package/package/corpus/skills/cratis-engineering-effect-boundaries/SKILL.md +6 -40
  301. package/package/corpus/skills/cratis-engineering-effect-boundaries/references/failure-archetypes.md +18 -151
  302. package/package/corpus/skills/cratis-engineering-inherited-work/SKILL.md +5 -21
  303. package/package/corpus/skills/cratis-engineering-inherited-work/references/continue-inherited-work.md +19 -0
  304. package/package/corpus/skills/cratis-engineering-issue-design-note/SKILL.md +3 -66
  305. package/package/corpus/skills/cratis-engineering-issue-design-note/references/design-note-format.md +68 -0
  306. package/package/corpus/skills/cratis-engineering-issue-hygiene/SKILL.md +2 -84
  307. package/package/corpus/skills/cratis-engineering-issue-hygiene/references/issue-disposition.md +87 -0
  308. package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/SKILL.md +15 -263
  309. package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/dependency-map.md +3 -3
  310. package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/docker-images.md +28 -6
  311. package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/dotnet-nuget.md +18 -14
  312. package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/helper-runbook.md +231 -0
  313. package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/other-environments.md +2 -3
  314. package/package/corpus/skills/cratis-engineering-local-cross-repo-verification/references/worked-examples.md +62 -77
  315. package/package/corpus/skills/cratis-engineering-post-mortem/SKILL.md +6 -39
  316. package/package/corpus/skills/cratis-engineering-post-mortem/references/proportionate-follow-up.md +36 -0
  317. package/package/corpus/skills/cratis-engineering-regression-cluster/SKILL.md +4 -4
  318. package/package/corpus/skills/cratis-engineering-release-trains/SKILL.md +8 -134
  319. package/package/corpus/skills/cratis-engineering-release-trains/references/candidate-assembly.md +139 -0
  320. package/package/corpus/skills/cratis-engineering-review-rounds/SKILL.md +3 -100
  321. package/package/corpus/skills/cratis-engineering-review-rounds/references/round-handoffs.md +109 -0
  322. package/package/corpus/skills/cratis-environments-and-secrets/SKILL.md +1 -5
  323. package/package/corpus/skills/cratis-environments-and-secrets/references/environment-file.md +1 -3
  324. package/package/corpus/skills/cratis-event-model-diagram/SKILL.md +11 -116
  325. package/package/corpus/skills/cratis-event-model-diagram/references/frame-patterns.md +93 -0
  326. package/package/corpus/skills/cratis-fundamentals-concept-go/SKILL.md +4 -15
  327. package/package/corpus/skills/cratis-fundamentals-name-value/SKILL.md +8 -8
  328. package/package/corpus/skills/cratis-fundamentals-name-value/references/csharp.md +4 -4
  329. package/package/corpus/skills/cratis-fundamentals-name-value/references/elixir.md +1 -1
  330. package/package/corpus/skills/cratis-fundamentals-name-value/references/go.md +1 -1
  331. package/package/corpus/skills/cratis-fundamentals-name-value/references/java.md +5 -5
  332. package/package/corpus/skills/cratis-fundamentals-name-value/references/kotlin.md +15 -2
  333. package/package/corpus/skills/cratis-fundamentals-name-value/references/python.md +1 -1
  334. package/package/corpus/skills/cratis-fundamentals-name-value/references/typescript.md +1 -1
  335. package/package/corpus/skills/cratis-fundamentals-telemetry/SKILL.md +10 -27
  336. package/package/corpus/skills/cratis-fundamentals-telemetry/references/otlp-export.md +16 -0
  337. package/package/corpus/skills/cratis-fundamentals-type-discovery/SKILL.md +26 -188
  338. package/package/corpus/skills/cratis-fundamentals-type-discovery/references/diagnostics.md +14 -0
  339. package/package/corpus/skills/cratis-governed-release-methodology/SKILL.md +7 -5
  340. package/package/corpus/skills/cratis-lens-browser-extension/SKILL.md +23 -157
  341. package/package/corpus/skills/cratis-lens-browser-extension/references/troubleshooting.md +139 -0
  342. package/package/corpus/skills/cratis-llm-friendly-documentation/SKILL.md +7 -5
  343. package/package/corpus/skills/cratis-modeling-design-event-model/SKILL.md +2 -4
  344. package/package/corpus/skills/cratis-modeling-design-event-model/references/model-first.md +7 -0
  345. package/package/corpus/skills/cratis-modeling-discover-timeline/SKILL.md +2 -2
  346. package/package/corpus/skills/cratis-modeling-discover-timeline/references/group-and-document-intake.md +1 -1
  347. package/package/corpus/skills/cratis-modeling-review-event-model/SKILL.md +2 -2
  348. package/package/corpus/skills/cratis-modeling-review-event-model/references/implementation-findings.md +2 -2
  349. package/package/corpus/skills/cratis-modeling-trace-existing-behavior/SKILL.md +5 -23
  350. package/package/corpus/skills/cratis-modeling-trace-existing-behavior/references/compare-evidence.md +20 -0
  351. package/package/corpus/skills/cratis-modeling-trace-existing-behavior/references/recovery-inputs.md +3 -3
  352. package/package/corpus/skills/cratis-multi-service-local-orchestration/SKILL.md +8 -63
  353. package/package/corpus/skills/cratis-multi-service-local-orchestration/references/aspire.md +52 -0
  354. package/package/corpus/skills/cratis-observability/SKILL.md +1 -1
  355. package/package/corpus/skills/cratis-observability/references/arc-and-chronicle-signals.md +9 -23
  356. package/package/corpus/skills/cratis-observability/references/chronicle-kernel-export.md +3 -14
  357. package/package/corpus/skills/cratis-observability/references/csharp.md +4 -6
  358. package/package/corpus/skills/cratis-observability/references/elixir.md +1 -1
  359. package/package/corpus/skills/cratis-observability/references/troubleshooting.md +4 -5
  360. package/package/corpus/skills/cratis-onboarding-runtime/SKILL.md +1 -4
  361. package/package/corpus/skills/cratis-onboarding-runtime/references/default-offering.md +0 -3
  362. package/package/corpus/skills/cratis-onboarding-runtime/references/sign-up-review.md +0 -4
  363. package/package/corpus/skills/cratis-orchestration-lanes/SKILL.md +7 -49
  364. package/package/corpus/skills/cratis-orchestration-lanes/references/escalation.md +22 -0
  365. package/package/corpus/skills/cratis-orchestration-lanes/references/inbox-and-handover.md +4 -4
  366. package/package/corpus/skills/cratis-orchestration-lanes/references/placeholders.md +1 -1
  367. package/package/corpus/skills/cratis-orchestration-lanes/references/roles.md +12 -0
  368. package/package/corpus/skills/cratis-orchestration-lanes/references/roll-call.md +12 -0
  369. package/package/corpus/skills/cratis-orchestration-lanes/references/worktrees.md +11 -0
  370. package/package/corpus/skills/cratis-orchestration-merge-gates/SKILL.md +14 -13
  371. package/package/corpus/skills/cratis-orchestration-merge-gates/references/merge-queue.md +51 -26
  372. package/package/corpus/skills/cratis-orchestration-merge-gates/references/unattended-guards.md +8 -14
  373. package/package/corpus/skills/cratis-orleans-jobs/SKILL.md +9 -65
  374. package/package/corpus/skills/cratis-orleans-jobs/references/activation-callbacks.md +5 -0
  375. package/package/corpus/skills/cratis-orleans-jobs/references/lifecycle-and-placement.md +11 -7
  376. package/package/corpus/skills/cratis-orleans-jobs/references/state-machines.md +1 -1
  377. package/package/corpus/skills/cratis-orleans-jobs/references/step-planning.md +27 -0
  378. package/package/corpus/skills/cratis-orleans-jobs/references/storage-and-options.md +35 -0
  379. package/package/corpus/skills/cratis-performance-review/SKILL.md +6 -76
  380. package/package/corpus/skills/cratis-performance-review/references/review-checklist.md +79 -0
  381. package/package/corpus/skills/cratis-platform-configure-environment/SKILL.md +19 -16
  382. package/package/corpus/skills/cratis-platform-contribute-change/SKILL.md +2 -2
  383. package/package/corpus/skills/cratis-platform-deliver-slice/SKILL.md +5 -5
  384. package/package/corpus/skills/cratis-platform-deliver-slice/references/coordinate-slices.md +1 -1
  385. package/package/corpus/skills/cratis-platform-diagnose-slice/SKILL.md +2 -3
  386. package/package/corpus/skills/cratis-platform-prepare-release-pr/SKILL.md +2 -2
  387. package/package/corpus/skills/cratis-platform-start-application/SKILL.md +10 -8
  388. package/package/corpus/skills/cratis-platform-start-application/references/csharp.md +6 -6
  389. package/package/corpus/skills/cratis-platform-start-application/references/java.md +4 -4
  390. package/package/corpus/skills/cratis-platform-start-application/references/kotlin.md +4 -4
  391. package/package/corpus/skills/cratis-platform-verify-service-handoff/SKILL.md +3 -3
  392. package/package/corpus/skills/cratis-release-notes/SKILL.md +9 -133
  393. package/package/corpus/skills/cratis-release-notes/references/channel-guidance.md +59 -0
  394. package/package/corpus/skills/cratis-release-notes/references/publish-repair.md +64 -0
  395. package/package/corpus/skills/cratis-rtk/SKILL.md +12 -18
  396. package/package/corpus/skills/cratis-screenplay-accept-model/SKILL.md +3 -3
  397. package/package/corpus/skills/cratis-screenplay-accept-model/references/capability-consumption.md +1 -1
  398. package/package/corpus/skills/cratis-screenplay-accept-model/references/coverage-obligations.md +1 -1
  399. package/package/corpus/skills/cratis-screenplay-authentication-and-onboarding/SKILL.md +25 -59
  400. package/package/corpus/skills/cratis-screenplay-authentication-and-onboarding/references/onboarding-directives.md +11 -10
  401. package/package/corpus/skills/cratis-screenplay-author-extension/SKILL.md +9 -6
  402. package/package/corpus/skills/cratis-screenplay-author-extension/references/consume.md +3 -3
  403. package/package/corpus/skills/cratis-screenplay-author-extension/references/stage-candidate.md +8 -0
  404. package/package/corpus/skills/cratis-screenplay-availability/SKILL.md +20 -167
  405. package/package/corpus/skills/cratis-screenplay-availability/references/complete-example.md +23 -47
  406. package/package/corpus/skills/cratis-screenplay-availability/references/review-checks.md +9 -10
  407. package/package/corpus/skills/cratis-screenplay-availability/references/runtime-ownership.md +26 -23
  408. package/package/corpus/skills/cratis-screenplay-declare-slice/SKILL.md +6 -14
  409. package/package/corpus/skills/cratis-screenplay-declare-slice/references/projection-replay.md +2 -2
  410. package/package/corpus/skills/cratis-screenplay-declare-slice/references/read-identity.md +1 -1
  411. package/package/corpus/skills/cratis-screenplay-edit-workspace/SKILL.md +7 -9
  412. package/package/corpus/skills/cratis-screenplay-edit-workspace/references/model-notes.md +1 -1
  413. package/package/corpus/skills/cratis-screenplay-handoff-slice/SKILL.md +10 -14
  414. package/package/corpus/skills/cratis-screenplay-model-automation/SKILL.md +1 -1
  415. package/package/corpus/skills/cratis-screenplay-model-automation/references/reaction-boundaries.md +1 -1
  416. package/package/corpus/skills/cratis-screenplay-model-interaction/SKILL.md +6 -31
  417. package/package/corpus/skills/cratis-screenplay-model-interaction/references/shell-and-data.md +22 -0
  418. package/package/corpus/skills/cratis-screenplay-model-translation/SKILL.md +5 -5
  419. package/package/corpus/skills/cratis-screenplay-onboard-workspace/SKILL.md +5 -5
  420. package/package/corpus/skills/cratis-screenplay-onboard-workspace/references/version-migration.md +4 -4
  421. package/package/corpus/skills/cratis-screenplay-recover-intent/SKILL.md +2 -2
  422. package/package/corpus/skills/cratis-screenplay-recover-intent/references/csharp.md +2 -2
  423. package/package/corpus/skills/cratis-screenplay-recover-intent/references/ground-truth-benchmark.md +1 -1
  424. package/package/corpus/skills/cratis-screenplay-specify-outcome/SKILL.md +4 -75
  425. package/package/corpus/skills/cratis-screenplay-specify-outcome/references/host-body-execution.md +0 -2
  426. package/package/corpus/skills/cratis-screenplay-specify-outcome/references/observable-result.md +85 -1
  427. package/package/corpus/skills/cratis-screenplay-specify-outcome/references/query-rejections.md +1 -1
  428. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +15 -133
  429. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/boundaries.md +5 -5
  430. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/chronicle-boundaries.md +4 -12
  431. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/consistency-and-concurrency.md +28 -57
  432. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/evolution-example.md +4 -5
  433. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/evolution.md +13 -20
  434. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/multi-service-models.md +1 -1
  435. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/neighbouring-skills.md +1 -1
  436. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/read-model-keys.md +3 -5
  437. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/stream-id-rules.md +2 -0
  438. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/stream-patterns.md +5 -5
  439. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/streams-example.md +82 -71
  440. package/package/corpus/skills/cratis-security-review/SKILL.md +4 -73
  441. package/package/corpus/skills/cratis-security-review/references/arc-boundaries.md +24 -13
  442. package/package/corpus/skills/cratis-security-review/references/review-checklist.md +74 -0
  443. package/package/corpus/skills/cratis-session-handoff/SKILL.md +7 -32
  444. package/package/corpus/skills/cratis-session-handoff/references/handoff-template.md +2 -2
  445. package/package/corpus/skills/cratis-session-handoff/references/session-hygiene.md +20 -0
  446. package/package/corpus/skills/cratis-showrunner-herald/SKILL.md +9 -17
  447. package/package/corpus/skills/cratis-showrunner-herald/references/options.md +2 -2
  448. package/package/corpus/skills/cratis-showrunner-herald/references/templates-and-images.md +16 -10
  449. package/package/corpus/skills/cratis-social-feed-post/SKILL.md +9 -162
  450. package/package/corpus/skills/cratis-social-feed-post/references/asset-and-formatting.md +37 -0
  451. package/package/corpus/skills/cratis-social-feed-post/references/editorial-checks.md +40 -0
  452. package/package/corpus/skills/cratis-social-feed-post/references/engagement-evidence.md +39 -150
  453. package/package/corpus/skills/cratis-social-feed-post/references/linkedin-media.md +24 -0
  454. package/package/corpus/skills/cratis-social-feed-post/references/other-channels.md +23 -0
  455. package/package/corpus/skills/cratis-specifications-exercise-backend/SKILL.md +5 -5
  456. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-command-results.md +2 -2
  457. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp-query-scenario.md +13 -5
  458. package/package/corpus/skills/cratis-specifications-exercise-backend/references/csharp.md +7 -4
  459. package/package/corpus/skills/cratis-specifications-exercise-backend/references/elixir.md +1 -1
  460. package/package/corpus/skills/cratis-specifications-exercise-backend/references/go.md +20 -4
  461. package/package/corpus/skills/cratis-specifications-exercise-backend/references/typescript.md +1 -1
  462. package/package/corpus/skills/cratis-specifications-isolate-behavior/SKILL.md +2 -2
  463. package/package/corpus/skills/cratis-specifications-observe-ui/SKILL.md +5 -5
  464. package/package/corpus/skills/cratis-specifications-test-application-ui/SKILL.md +2 -2
  465. package/package/corpus/skills/cratis-specifications-test-application-ui/references/typescript-command-results.md +2 -2
  466. package/package/corpus/skills/cratis-specifications-test-typescript-behavior/SKILL.md +2 -2
  467. package/package/corpus/skills/cratis-stage-render-slice/SKILL.md +10 -9
  468. package/package/corpus/skills/cratis-stage-run-sandbox/SKILL.md +3 -3
  469. package/package/corpus/skills/cratis-stage-run-sandbox/references/semantic-spec-runner.md +7 -6
  470. package/package/corpus/skills/cratis-studio-mcp-safety-guidance/SKILL.md +4 -6
  471. package/package/corpus/skills/cratis-technical-examples/SKILL.md +10 -106
  472. package/package/corpus/skills/cratis-technical-examples/references/csharp-package-checks.md +1 -1
  473. package/package/corpus/skills/cratis-technical-examples/references/source-and-format.md +42 -0
  474. package/package/corpus/skills/cratis-technical-examples/references/typescript-package-checks.md +2 -2
  475. package/package/corpus/skills/cratis-technical-examples/references/verification-scope.md +37 -0
  476. package/package/corpus/skills/cratis-ux-review/SKILL.md +8 -40
  477. package/package/corpus/skills/cratis-ux-review/references/capture-contract.md +24 -0
  478. package/package/corpus/skills/cratis-ux-review/references/checklist.md +1 -1
  479. package/package/corpus/skills/cratis-ux-review/references/report-template.md +2 -1
  480. package/package/corpus/skills/cratis-writing-voice-and-cadence/SKILL.md +19 -132
  481. package/package/corpus/skills/cratis-writing-voice-and-cadence/references/ai-tells.md +24 -97
  482. package/package/corpus/skills/cratis-writing-voice-and-cadence/references/author-and-batch.md +23 -0
  483. package/package/corpus/skills/cratis-writing-voice-and-cadence/references/documentation-evidence.md +25 -0
  484. package/package/corpus/skills/cratis-writing-voice-and-cadence/references/interpretation.md +17 -0
  485. package/package/corpus/skills/cratis-writing-voice-and-cadence/references/stock-constructions.md +23 -0
  486. package/package/corpus/skills/cratis-writing-voice-and-cadence/references/voice-guidance.md +8 -29
  487. package/package.json +1 -1
  488. /package/package/corpus/skills/cratis-chronicle-protect-decision/references/{standalone.md → csharp-standalone.md} +0 -0
  489. /package/package/corpus/skills/cratis-engineering-post-mortem/references/{examples/silent-backup-failure.md → silent-backup-failure.md} +0 -0
  490. /package/package/corpus/skills/cratis-engineering-post-mortem/references/{examples/unintended-release-regression.md → unintended-release-regression.md} +0 -0
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  name: cratis-arc-testing-typescript
3
- description: Use when writing specs for an Arc Node.js server with @cratis/arc.testing, choosing between a direct handle() call and a pipeline scenario or testing routes and authentication. Not for React specs or framework-package tests.
3
+ description: Use when writing specs for an Arc Node.js server with @cratis/arc.testing, choosing between a direct handle() call and a pipeline scenario or testing routes and authentication. Not for choosing where to put validation rules (use cratis-arc-validation-typescript).
4
4
  license: MIT
5
5
  ---
6
6
 
7
7
  # Specify an Arc Node.js server with `@cratis/arc.testing`
8
8
 
9
- A spec that calls `handle()` directly skips binding, authorization, validators,
10
- services and the result envelope. The scenarios run the real Arc pipeline
9
+ Start with a direct `handle()` call for a pure decision. It skips binding,
10
+ authorization, validators, services and the result envelope. The scenarios run the real Arc pipeline
11
11
  in-process, with no network listener, so a spec can prove what Arc enforces.
12
12
  `@cratis/arc.testing` is runner-neutral; the samples use Vitest (describe/it
13
13
  with `given`), and `node:test` works too.
@@ -30,14 +30,18 @@ rules Arc enforces. Use the `cratis-chronicle-select-client` skill (in `cratis/c
30
30
 
31
31
  ## CommandScenario
32
32
 
33
+ This excerpt assumes the slice’s `ArchiveTask` command.
34
+
33
35
  ```typescript
34
36
  import { CommandScenario } from '@cratis/arc.testing';
35
37
 
36
- const scenario = CommandScenario.for(ArchiveTask); // plus validators, other artifacts
37
- // scenario.services.addSingleton(Token, fake); // before the first call
38
- const result = await scenario.execute({ id: 't-1' });
39
- result.shouldBeSuccessful();
40
- await scenario.dispose();
38
+ const scenario = CommandScenario.for(ArchiveTask);
39
+ try {
40
+ const result = await scenario.execute({ id: 't-1' });
41
+ result.shouldBeSuccessful();
42
+ } finally {
43
+ await scenario.dispose();
44
+ }
41
45
  ```
42
46
 
43
47
  - `CommandScenario.for(Command, ...artifacts)` takes the command and every
@@ -72,6 +76,7 @@ other spec notices. Cover nobody, somebody without the role, and somebody with
72
76
  it:
73
77
 
74
78
  ```typescript
79
+ const viewer = { id: 'bea', roles: ['Viewer'], isAuthenticated: true };
75
80
  const planner = { id: 'ada', roles: ['Planner'], isAuthenticated: true };
76
81
  (await scenario.execute({ id: 't-1' })).shouldNotBeAuthorized(); // anonymous
77
82
  (await scenario.withContext({ principal: viewer }).execute({ id: 't-1' })).shouldNotBeAuthorized();
@@ -80,71 +85,28 @@ const planner = { id: 'ada', roles: ['Planner'], isAuthenticated: true };
80
85
 
81
86
  ## QueryScenario and ObservableQueryScenario
82
87
 
83
- `QueryScenario(Model, 'method', ...artifacts)` then `perform(args, options)`
88
+ `QueryScenario.for(Model, 'method', ...artifacts)` then `perform(args, options)`
84
89
  returns the `QueryResult` (paging and sorting included); `withContext` sets the
85
90
  caller. `ObservableQueryScenario` opens the query through the real observable
86
- pipeline: `collect(count, timeoutMs = 5000, args = {}, options?)` waits for up to
91
+ pipeline: `collect(count)` waits for up to
87
92
  `count` emissions or fails at the deadline, and closes the subscription either
88
- way. Dispose each scenario. A streaming query a scenario cannot drive throws
89
- `StreamingQueryNotSupportedError`.
90
-
91
- ## ArcScenario: routes, hosts and authentication
92
-
93
- `new ArcScenario({ commands: [...], queries: [...], ... })` accepts the same
94
- registrations as `ArcServer`, plus default context fields and per-call
95
- overrides. It delegates to a real server:
96
-
97
- | Method | Runs |
98
- | --- | --- |
99
- | `executeCommand(name, input, context?)` | the direct command pipeline |
100
- | `validateCommand(name, input, context?)` | authorization and validation only |
101
- | `performQuery(name, input, context?, options?)` | the direct query pipeline |
102
- | `handle(request)` | the full HTTP pipeline, authenticating with the configured handlers |
103
-
104
- Direct calls use the context you supply; `handle` authenticates from its
105
- handlers. `shouldHaveRuleFailure(result, { reason, member?, severity?,
106
- correlationId? })` checks a rule failure and throws when the only failure is
107
- `dependencyUnavailable`.
108
-
109
- ## Share a context with `given`
110
-
111
- ```typescript
112
- export class a_task_registration {
113
- tasks = new Tasks();
114
- scenario = CommandScenario.for(RegisterTask, RegisterTaskValidator);
115
- constructor() { this.scenario.services.addSingleton(Tasks, this.tasks); }
116
- }
117
- describe('when registering a task', given(a_task_registration, context => { /* ... */ }));
118
- ```
119
-
120
- Layout: `for_<Subject>/when_<action>/<case>.ts`, with shared setup in a `given/`
121
- folder next to it; `discover()` skips both. With Vitest or Vite, the transform must
122
- lower standard decorators with `useDefineForClassFields: true`, or decorators
123
- silently do nothing in specs.
124
-
125
- ## With `node:test`
126
-
127
- ```typescript
128
- import { test, after } from 'node:test';
129
- const scenario = CommandScenario.for(ArchiveTask);
130
- after(async () => { await scenario.dispose(); });
131
- test('archiving executes the handler', async () => {
132
- (await scenario.execute({ id: 't-1' })).shouldBeSuccessful();
133
- });
134
- ```
93
+ way. Pass a timeout in milliseconds, argument object and query options only
94
+ when needed. Dispose each scenario. `QueryScenario` rejects a streaming query
95
+ with `StreamingQueryNotSupportedError`; use `ObservableQueryScenario` instead.
135
96
 
136
- Compile with the standard decorator configuration first; Node's type stripping
137
- does not transform decorators.
97
+ Read [hosts and runners](references/hosts-and-runners.md) when testing HTTP authentication or routing with `ArcScenario`, sharing Vitest fixtures, or using `node:test`.
138
98
 
139
- ## Pitfalls
99
+ ## Verify
140
100
 
141
101
  - A scenario with fakes proves your code against the fake, not a real provider
142
102
  or database; keep integration specs for storage.
143
103
  - `withContext({ tenantId })` proves the code uses the tenant it is given, not
144
- your resolver or storage mapping (`cratis-arc-tenancy-typescript`).
104
+ your resolver or storage mapping (`cratis-arc-tenancy-typescript`). Run HTTP
105
+ tests for authentication and tenant selection, not direct calls.
145
106
  - Forgetting a validator in `for(...)` means its rules never run.
146
107
 
147
108
  ## Route near misses
148
109
 
149
- - Writing the command or query itself: [declare the command](../cratis-arc-declare-command/references/typescript.md) and [cratis-arc-expose-query](../cratis-arc-expose-query/references/typescript.md). The rule vocabulary is in [cratis-arc-validation-typescript](../cratis-arc-validation-typescript/SKILL.md).
110
+ - Command and query definitions: `cratis-arc-declare-command` and
111
+ `cratis-arc-expose-query`. Rule vocabulary: `cratis-arc-validation-typescript`.
150
112
  - Specification naming and fixtures in general: `cratis-specifications-isolate-behavior` in `cratis/specifications/dotnet`.
@@ -0,0 +1,51 @@
1
+ # Test routes and configure a runner
2
+
3
+ ## ArcScenario: routes, hosts and authentication
4
+
5
+ `new ArcScenario(options)` accepts the same registrations as `ArcServer`.
6
+ Use the optional second constructor argument for trusted direct-call defaults,
7
+ and override those defaults per direct call. It delegates to a real server:
8
+
9
+ | Method | Runs |
10
+ | --- | --- |
11
+ | `executeCommand(name, input, context?)` | the direct command pipeline |
12
+ | `validateCommand(name, input, context?)` | authorization and validation only |
13
+ | `performQuery(name, input, context?, options?)` | the direct query pipeline |
14
+ | `observeQuery(name, input, context?, options?)` | opens a live query; close the returned session |
15
+ | `handle(request)` | the full HTTP pipeline, authenticating with the configured handlers |
16
+
17
+ Direct calls use the context you supply; `handle` authenticates from its
18
+ handlers. Import `shouldHaveRuleFailure` from `@cratis/arc.testing` to assert a rule on a
19
+ plain result. Pass `reason` and, when relevant, `member`, `severity`, or
20
+ `correlationId`. A missing dependency does not establish that a rule ran.
21
+ Dispose the scenario after the spec.
22
+
23
+ ## Share a context with `given`
24
+
25
+ ```typescript
26
+ export class a_task_registration {
27
+ tasks = new Tasks();
28
+ scenario = CommandScenario.for(RegisterTask, RegisterTaskValidator);
29
+ constructor() { this.scenario.services.addSingleton(Tasks, this.tasks); }
30
+ }
31
+ describe('when registering a task', given(a_task_registration, context => { /* ... */ }));
32
+ ```
33
+
34
+ Layout: `for_<Subject>/when_<action>/<case>.ts`, with shared setup in a `given/`
35
+ folder next to it; `discover()` skips both. With Vitest or Vite, the transform must
36
+ lower standard decorators with `useDefineForClassFields: true`, or decorators
37
+ silently do nothing in specs.
38
+
39
+ ## With `node:test`
40
+
41
+ ```typescript
42
+ import { test, after } from 'node:test';
43
+ const scenario = CommandScenario.for(ArchiveTask);
44
+ after(async () => { await scenario.dispose(); });
45
+ test('archiving executes the handler', async () => {
46
+ (await scenario.execute({ id: 't-1' })).shouldBeSuccessful();
47
+ });
48
+ ```
49
+
50
+ Compile with the standard decorator configuration first; Node's type stripping
51
+ does not transform decorators.
@@ -1,18 +1,18 @@
1
1
  ---
2
2
  name: cratis-arc-validate-command
3
- description: Use when a developer needs an Arc command to reject invalid input or refuse a business rule before its handler runs. Not for uniqueness across writers.
3
+ description: Use when a developer needs an Arc command to reject invalid input or refuse a business rule before its handler runs. Not for uniqueness across writers (use cratis-chronicle-constrain-append).
4
4
  compatibility: Requires an Arc backend with the command already declared.
5
5
  ---
6
6
 
7
7
  # Validate a command before it runs
8
8
 
9
- Attach each rule to the field it checks, in a validator that belongs to the command (`cratis-arc-declare-command` skill in `cratis/arc`). The pipeline runs blocking validation before the handler, so a rejected command changes nothing. A separate validate request gives early feedback; it is not needed to enforce the rule.
9
+ Attach each rule to the field it checks, in a validator that belongs to the command (`cratis-arc-declare-command` skill in `cratis/arc`). The pipeline runs blocking validation before the handler, so a rejection at that stage never runs the handler. A separate validate request gives early feedback; it is not needed to enforce the rule.
10
10
 
11
11
  Choose by what the rule needs:
12
12
 
13
13
  - **Only the input:** a field rule. This is the default.
14
- - **Current state, to refuse with a message:** let the validator take the decision model, and check both that it exists and that it relates to the entity being changed.
15
- - **An answer that must still hold when the event is appended:** a protected model parameter (`cratis-chronicle-protect-decision` skill in `cratis/chronicle`), not a database lookup.
14
+ - **Current state, to refuse with a message:** use the host’s supported server-side rule and state access. Check that state exists and belongs to the entity being changed.
15
+ - **An answer that must still hold when the event is appended:** choose a supported guarded append (see `cratis-chronicle-protect-decision`), not a preflight database lookup. Use an append constraint for uniqueness across writers.
16
16
 
17
17
  ## Read the reference for the host
18
18
 
@@ -2,36 +2,34 @@
2
2
 
3
3
  Prerequisite: `Cratis.Arc`; validators use FluentValidation.
4
4
 
5
- Use a command validator for the registration rule below on a plain string. To require a nonempty value wherever `AuthorName` is itself validated, put `public class AuthorNameValidator : ConceptValidator<AuthorName> { public AuthorNameValidator() => RuleFor(name => name.Value).NotEmpty(); }` next to `AuthorName`. Import `Cratis.Arc.Validation` and `FluentValidation`. `AuthorName` contributes only supported literal, unconditional rules to generated clients; see the C# reference in `cratis-arc-generate-proxies` for the extractable families.
6
-
7
- Add the validator beside `RegisterAuthor` in `Features/Authors/Registration/RegisterAuthor.cs`. Arc discovers `CommandValidator<RegisterAuthor>`; no dependency injection registration is necessary. Keep the file's existing namespace declaration; add the validator class below the command. Add `using Cratis.Arc.Commands;` for the base class and `using FluentValidation;` for the rule extensions unless those namespaces are already in scope.
5
+ Add the validator beside the existing `RegisterAuthor` command in its feature slice. Arc discovers `CommandValidator<RegisterAuthor>`; no dependency injection registration is necessary. Keep the file's existing namespace declaration; add the validator class below the command. Add `using Cratis.Arc.Commands;` for the base class and `using FluentValidation;` for the rule extensions unless those namespaces are already in scope.
8
6
 
9
7
  ```csharp
10
8
  public class RegisterAuthorValidator : CommandValidator<RegisterAuthor>
11
9
  {
12
10
  public RegisterAuthorValidator()
13
11
  {
14
- RuleFor(command => command.Name).NotEmpty().WithMessage("Name is required");
12
+ RuleFor(command => command.Name).NotEmpty();
15
13
  }
16
14
  }
17
15
  ```
18
16
 
19
17
  The execute pipeline applies blocking validation before `Handle`. A separate `/validate` request can provide early feedback, but is not needed to enforce the rule. For a one-off wiring check, execute registration with an empty name. Expect `IsValid` and `IsSuccess` to be false, `ValidationResults` to identify the name member, and no event to be appended. With `Aster`, expect success and one registration.
20
18
 
21
- Refuse with a message → request the decision model in the validator. Need the state to build the event → take it as a `Handle` parameter. An eligible Chronicle decision read guards the append only under **effective `On`**. Resolve the command first: `[Unprotected]` forces `Off`; otherwise use its read-protection declaration, then the assembly's, then `Off`. Chronicle defaults the unset project property `CratisReadProtection` to `On`. Cap the resolved mode at `Cratis:Arc:ReadProtection:MaximumMode`; consult `ReadProtection:MaximumMode` only if the namespaced key is absent. In a committed-path test, advance the protected state after validation but before append. Expect a concurrency refusal and no event from the stale decision; a passing validator test alone cannot prove that guard.
19
+ Refuse with a message → request the decision model in the validator. Need the state to build the event → take it as a `Handle` parameter. An eligible Chronicle decision read guards the append only under **effective `On`**. Resolve the command first: `[Unprotected]` forces `Off`; otherwise use its read-protection declaration, then the assembly's, then `Off`. Projects importing `Cratis.Arc.Chronicle` build properties default the unset `CratisReadProtection` to `On`. Cap the resolved mode at `Cratis:Arc:ReadProtection:MaximumMode`; consult `ReadProtection:MaximumMode` only if the namespaced key is absent. In a committed-path test, advance the protected state after validation but before append. Expect a concurrency refusal and no event from the stale decision; a passing validator test alone cannot prove that guard.
22
20
 
23
21
  For a relationship rule, take the related model as a typed validator constructor parameter (for example, `[LookUpBy(nameof(CancelReservation.ReservationId))] Reservation? reservation`, from `Cratis.Arc.Commands`). Check both existence and the relationship to the entity being changed. Nullable allows an absent instance; it doesn't turn an invalid key into a valid one. For a committed spec of this relationship rule, supply an existing reservation for a different book: the command must still be rejected.
24
22
 
25
- ## When a warning may pass
26
-
27
- - **A warning is allowed to pass:** Arc filters it out of `ValidationResults`; do not expect it alongside a successful result. To block even confirmed warnings, put `[BlockOnValidationSeverity(ValidationResultSeverity.Warning)]` on the command. Import `Cratis.Arc.Commands.ModelBound` and `Cratis.Arc.Validation`.
28
-
29
23
  ## Avoid
30
24
 
31
25
  - Do not throw from `Handle` for a missing field; attach the rule to that field.
32
26
  - Do not register a validator per rule. Add registration-specific rules to the existing validator.
33
27
  - Do not substitute a database lookup for a protected model parameter. For uniqueness across writers use an append constraint.
34
28
 
29
+ ## Reuse a value rule
30
+
31
+ To require a nonempty value wherever `AuthorName` is itself validated, put `public class AuthorNameValidator : ConceptValidator<AuthorName> { public AuthorNameValidator() => RuleFor(name => name.Value).NotEmpty(); }` next to `AuthorName`. Import `Cratis.Arc.Validation` and `FluentValidation`. `AuthorName` contributes only supported literal, unconditional rules to generated clients; see the C# reference in `cratis-arc-generate-proxies` for the extractable families.
32
+
35
33
  ## Where each kind of check belongs
36
34
 
37
35
  | Check | Place |
@@ -52,8 +50,8 @@ A result blocks when its severity is greater than the allowed threshold, and an
52
50
 
53
51
  - Without a declared policy only `Error` blocks.
54
52
  - `X-Allowed-Severity` is capped at `Warning` on model-bound HTTP endpoints, so a client cannot waive errors by sending `3`. Relaxing that takes an explicit command or host setting.
55
- - The effective threshold is the stricter of the declared policy and the caller's request: a caller can ask for more blocking, never less.
56
- - A command under read protection `On` has an `Error` floor even without `[BlockOnValidationSeverity]`: `Error` and `Unknown` always block.
53
+ - The command or assembly can declare a blocking floor. To block confirmed warnings, add `[BlockOnValidationSeverity(ValidationResultSeverity.Warning)]` to the command. Import `Cratis.Arc.Commands.ModelBound` and `Cratis.Arc.Validation`. A caller cannot weaken this floor.
54
+ - Without an explicit command or assembly severity policy, **declared** read protection `On` supplies an `Error` floor even if the runtime protection cap is lower. With that floor, `Error` and `Unknown` block.
57
55
 
58
56
  ## Read models as validator inputs
59
57
 
@@ -65,4 +63,4 @@ For explicitly protected validators outside `On`, use the "Validators outside On
65
63
 
66
64
  `[property: ExplicitOffset]` on a `DateTimeOffset` or `DateTime` command property refuses a JSON instant without an offset or `Z`. It does not apply to route or query-string values, and `DateOnly` has no offset to require.
67
65
 
68
- Authorization is checked before a malformed body is reported, so a refused caller gets 403 rather than a binding error. Member paths in results are camel-cased per segment and keep array indices, such as `lines[2].quantity`; pass them through unchanged for field feedback.
66
+ Authorization takes precedence in the response, so a caller refused by authorization gets a denial rather than a binding error. Member paths in results are camel-cased per segment and keep array indices, such as `lines[2].quantity`; pass them through unchanged for field feedback.
@@ -1,5 +1,18 @@
1
- # Reject invalid input before the write
1
+ # Elixir: reject invalid input before the write
2
2
 
3
- Put input constraints on the command schema, e.g. `field :name, :string, required: true, min_length: 2`. For cross-field rules return `{:error, Cratis.Arc.Validation.error(message, [:name])}` from `validate/2` on failure and `:ok` on success. Exercise the actual pipeline and inspect the member path before checking that nothing was appended.
3
+ Add the literal constraint inside the existing command schema:
4
4
 
5
- A unique name is a store constraint, not a preflight lookup: declare a Chronicle uniqueness constraint and handle `constraintViolation` on conflict. `X-Allowed-Severity` is a command setting, not permission to bypass authorization or weaken query admission.
5
+ ```elixir
6
+ field :name, :string, required: true
7
+ ```
8
+
9
+ Choose `validate/2` when the rule needs more than a field declaration. Return
10
+ `:ok` or `{:error, Cratis.Arc.Validation.error(message, [:name])}`; the callback
11
+ runs after declarative checks. Unlike command severity, query admission and
12
+ authorization are not controlled by `X-Allowed-Severity`.
13
+
14
+ Execute an empty name through Arc. Expect 400 with `isValid: false`, a finding
15
+ for `name`, and no append. If the finding is missing, check the rule is on the
16
+ command’s schema and the request reached validation rather than failing binding
17
+ or authorization. A valid name should reach the handler. Use an append
18
+ constraint for a unique name and handle `constraintViolation` on conflict.
@@ -1,3 +1,20 @@
1
- # Reject invalid input before the write
1
+ # Go: reject invalid input before the write
2
2
 
3
- Attach custom rules with `commands.WithValidator` in the command's registration; model tags supply declarative field rules. For a string, `validate:"required"` rejects both the empty string and whitespace-only input without a custom validator. Do not assume a validator function is discovered just because its parameter has the command type. Return findings that identify the input member. Call the pipeline with a bad value and inspect both the Go error and the result: ordinary validation can refuse with no Go error. Assert the field and zero writes; let a valid value reach the handler.
3
+ Start with a top-level required tag on the existing field:
4
+
5
+ ```go
6
+ Name string `json:"name" validate:"required"`
7
+ ```
8
+
9
+ For strings this rejects empty and whitespace-only input. A supplied `0` or
10
+ `false` is not empty. Use a command’s `Validate(context.Context)
11
+ ([]validation.Result, error)` method for rules that need more than a tag. The
12
+ registered type must have that method in its method set; a value registration
13
+ will not pick up a pointer receiver. Use `commands.WithValidator` when a rule
14
+ belongs to the registration rather than the model.
15
+
16
+ Execute a blank name through the pipeline. Assert a finding for wire member
17
+ `name` and no write, not just a nil Go error: ordinary validation can refuse
18
+ without a Go error. If there is no finding, check the registered method set and
19
+ whether the command opted out of model validation. Execute a valid name and
20
+ verify one write.
@@ -1,14 +1,27 @@
1
- # Reject invalid input before the write
1
+ # Java: reject invalid input before the write
2
2
 
3
- For synchronous Java validation implement `BlockingCommandValidator<CreateTask>`. Return `CreateTask.class` from `getCommandType()` and implement `List<ValidationResult> validate(CreateTask command, CommandContext context)`. Return `List.of(ValidationResult.error("Title is required", List.of("title")))` for a null or blank title and `List.of()` for valid input. Spring collects `CommandValidator<?>`, not bare blocking validators. Expose the adapter from a Spring configuration class:
3
+ For a literal field check, add a top-level class beside the existing command.
4
+ The Arc compiler discovers it through the generated module:
4
5
 
5
6
  ```java
6
- @Bean
7
- CommandValidator<CreateTask> createTaskValidator() {
8
- return new BlockingCommandValidatorAdapter<>(new CreateTaskValidator());
7
+ import io.cratis.arc.validation.FluentModelValidator;
8
+
9
+ public final class CreateTaskRules extends FluentModelValidator<CreateTask> {
10
+ public CreateTaskRules() {
11
+ super(CreateTask.class);
12
+ ruleFor("title").notEmpty();
13
+ }
9
14
  }
10
15
  ```
11
16
 
12
- Import `CommandValidator` from `io.cratis.arc.commands` and `BlockingCommandValidatorAdapter` from `io.cratis.arc.java`. Submit a blank title through the Spring-hosted pipeline; assert the `title` finding and zero handler calls. Submit a valid title and assert one call.
17
+ Choose `BlockingCommandValidator<CreateTask>` for a synchronous server-only
18
+ rule. Implement `getCommandType()` and `validate(CreateTask, CommandContext)`;
19
+ return a `List<ValidationResult>` with a member path on refusal. Spring collects
20
+ `CommandValidator<?>`, so expose it with `new BlockingCommandValidatorAdapter<>(validator)`
21
+ from an `@Bean`. Import the blocking interface and adapter from
22
+ `io.cratis.arc.java`, the command SPI from `io.cratis.arc.commands`, and
23
+ `ValidationResult` from `io.cratis.arc.results`.
13
24
 
14
- For fluent model rules extend `FluentModelValidator<CreateTask>` and call `super(CreateTask.class)` followed by `ruleFor("title").notEmpty().maxLength(80)` in the Java constructor. Run the registered rule on a real input to catch a misspelled field name.
25
+ Run the pipeline with a blank title. Expect a `title` finding and no handler
26
+ effect. If absent, check the generated module for a fluent rule or the adapter
27
+ bean for an imperative rule. A valid title should reach the handler once.
@@ -1,3 +1,23 @@
1
- # Reject invalid input before the write
1
+ # Kotlin: reject invalid input before the write
2
2
 
3
- Register a Spring component implementing `CommandValidator<CreateTask>`. Set `commandType` to `CreateTask::class.java` and implement `override suspend fun validate(command: CreateTask, context: CommandContext): List<ValidationResult>`. Return `listOf(ValidationResult.error("Title is required", listOf("title")))` for a blank title, `emptyList()` otherwise. Use the rule builder for reusable field rules. Enforce uniqueness or expected version at the guarded append, not by performing a racy query in a field validator.
3
+ For a literal field check, add a top-level rule class beside the existing
4
+ command. The Arc compiler discovers it through the generated module:
5
+
6
+ ```kotlin
7
+ import io.cratis.arc.validation.FluentModelValidator
8
+
9
+ class CreateTaskRules : FluentModelValidator<CreateTask>(CreateTask::class.java) {
10
+ init {
11
+ ruleFor("title").notEmpty()
12
+ }
13
+ }
14
+ ```
15
+
16
+ Choose a Spring `CommandValidator<CreateTask>` bean for a server-only rule that
17
+ needs services or an imperative decision. Read `cratis-arc-validation-kotlin`
18
+ for its suspending signature and result factories.
19
+
20
+ Run the command pipeline with a blank title. Verify the `title` finding and no
21
+ handler effect; then run a valid title and check the expected effect. If the
22
+ field rule is missing, verify that the generated module registers the class and
23
+ that the selected member is public and readable.
@@ -1,3 +1,9 @@
1
- # Python caller
1
+ # Python: consume a command validation result over HTTP
2
2
 
3
- Submit to the server validation endpoint and inspect field findings; client checks do not replace server validation.
3
+ There is no released Arc application SDK for Python. Use the existing HTTP
4
+ contract of the service that owns the command. If it exposes a validation
5
+ endpoint, send the same authorized payload there for early field feedback.
6
+ Treat an invalid result as a refusal; inspect its wire member paths. A valid
7
+ preflight result is not a write. Submit to the execute endpoint separately and
8
+ handle rejection there too. If no validation endpoint is exposed, rely on the
9
+ execute contract rather than duplicating server rules as a guard.
@@ -1,3 +1,23 @@
1
- # Reject invalid input before the write
1
+ # TypeScript: reject invalid input before the write
2
2
 
3
- Register a `@validator(RegisterTask)` class extending `CommandValidator<RegisterTask>`. In its constructor call `super()` then declare `this.ruleFor(command => command.title).notEmpty()` (and `maxLength` for the field's bound). Keep the rule on the real command property so callers receive the right member path. Execute an invalid payload through Arc, inspect the field and reason in the findings and verify no handler work occurred. Do not assert only a message or only an HTTP status.
3
+ Put an exported validator beside the existing `RegisterTask`:
4
+
5
+ ```typescript
6
+ import { CommandValidator, validator } from '@cratis/arc.core';
7
+
8
+ @validator(RegisterTask)
9
+ export class RegisterTaskValidator extends CommandValidator<RegisterTask> {
10
+ constructor() {
11
+ super();
12
+ this.ruleFor(command => command.title).notEmpty();
13
+ }
14
+ }
15
+ ```
16
+
17
+ Use the slice’s artifact discovery, or register the command and validator with
18
+ `builder.add(RegisterTask, RegisterTaskValidator)` when registering explicitly.
19
+ Execute an empty title through Arc and assert a finding with member `title`,
20
+ reason `rule`, and no handler effect. If absent, check the validator is
21
+ registered for the exact model class. Execute a valid title and verify the
22
+ expected effect. See `cratis-arc-validation-typescript` when a rule needs
23
+ services, stored state, or query arguments.