@cratis/pi 7.14.1 → 7.14.3

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 (197) hide show
  1. package/package/corpus/agents/security-reviewer.md +2 -1
  2. package/package/corpus/rules/concepts.md +13 -7
  3. package/package/corpus/rules/glossary.md +2 -1
  4. package/package/corpus/rules/vertical-slices.md +5 -4
  5. package/package/corpus/skills/cratis-application-slice-conformance/SKILL.md +11 -2
  6. package/package/corpus/skills/cratis-application-slice-conformance/references/build-prompts.md +8 -0
  7. package/package/corpus/skills/cratis-application-slice-conformance/references/checklists.md +10 -6
  8. package/package/corpus/skills/cratis-application-slice-specifications/SKILL.md +1 -1
  9. package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/SKILL.md +11 -7
  10. package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/authentication.md +12 -2
  11. package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/authorization.md +16 -1
  12. package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/frontend.md +7 -0
  13. package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/observable-emission-guards.md +9 -0
  14. package/package/corpus/skills/cratis-arc-command/SKILL.md +24 -16
  15. package/package/corpus/skills/cratis-arc-command/references/command-result.md +7 -0
  16. package/package/corpus/skills/cratis-arc-command/references/handler-shapes.md +10 -3
  17. package/package/corpus/skills/cratis-arc-command-execution/SKILL.md +1 -1
  18. package/package/corpus/skills/cratis-arc-command-operation/SKILL.md +5 -1
  19. package/package/corpus/skills/cratis-arc-command-operation/references/execution-and-recovery.md +12 -0
  20. package/package/corpus/skills/cratis-arc-command-operation/references/testing.md +10 -3
  21. package/package/corpus/skills/cratis-arc-command-typescript/SKILL.md +20 -116
  22. package/package/corpus/skills/cratis-arc-command-typescript/references/chronicle-events.md +11 -8
  23. package/package/corpus/skills/cratis-arc-command-typescript/references/command-specifications.md +63 -0
  24. package/package/corpus/skills/cratis-arc-command-typescript/references/hosting-and-storage.md +10 -0
  25. package/package/corpus/skills/cratis-arc-command-typescript/references/proxy-generation.md +38 -0
  26. package/package/corpus/skills/cratis-arc-command-typescript/references/slice-layout.md +19 -0
  27. package/package/corpus/skills/cratis-arc-command-typescript/verification.json +1 -1
  28. package/package/corpus/skills/cratis-arc-command-validation/SKILL.md +1 -1
  29. package/package/corpus/skills/cratis-arc-query-paging/SKILL.md +11 -10
  30. package/package/corpus/skills/cratis-arc-react-page/SKILL.md +30 -19
  31. package/package/corpus/skills/cratis-arc-react-page/references/data-page.md +11 -0
  32. package/package/corpus/skills/cratis-arc-react-page/references/data-tables.md +10 -0
  33. package/package/corpus/skills/cratis-arc-react-page/references/dialogs.md +12 -10
  34. package/package/corpus/skills/cratis-arc-react-page/references/from-screenplay.md +10 -0
  35. package/package/corpus/skills/cratis-arc-react-page/references/mvvm.md +11 -0
  36. package/package/corpus/skills/cratis-arc-react-page/references/queries-and-commands.md +7 -0
  37. package/package/corpus/skills/cratis-chronicle-client-dotnet/SKILL.md +58 -122
  38. package/package/corpus/skills/cratis-chronicle-client-dotnet/references/compatibility-check.md +26 -0
  39. package/package/corpus/skills/cratis-chronicle-client-dotnet/references/discovery.md +22 -0
  40. package/package/corpus/skills/cratis-chronicle-client-dotnet/references/hosting.md +31 -0
  41. package/package/corpus/skills/cratis-chronicle-client-elixir/SKILL.md +52 -131
  42. package/package/corpus/skills/cratis-chronicle-client-elixir/references/append-api.md +19 -0
  43. package/package/corpus/skills/cratis-chronicle-client-elixir/references/variants.md +73 -0
  44. package/package/corpus/skills/cratis-chronicle-client-kotlin/SKILL.md +29 -232
  45. package/package/corpus/skills/cratis-chronicle-client-kotlin/references/connection-lifecycle.md +20 -0
  46. package/package/corpus/skills/cratis-chronicle-client-kotlin/references/discovery-and-registration.md +44 -0
  47. package/package/corpus/skills/cratis-chronicle-client-kotlin/references/java-api.md +33 -0
  48. package/package/corpus/skills/cratis-chronicle-client-kotlin/references/spring-boot.md +54 -0
  49. package/package/corpus/skills/cratis-chronicle-client-kotlin/references/variants.md +77 -0
  50. package/package/corpus/skills/cratis-chronicle-client-typescript/SKILL.md +26 -102
  51. package/package/corpus/skills/cratis-chronicle-client-typescript/references/read-models-and-projections.md +23 -0
  52. package/package/corpus/skills/cratis-chronicle-client-typescript/references/variants.md +63 -0
  53. package/package/corpus/skills/cratis-chronicle-compliance/SKILL.md +11 -2
  54. package/package/corpus/skills/cratis-chronicle-event-modeling/SKILL.md +2 -2
  55. package/package/corpus/skills/cratis-chronicle-event-type-migration/SKILL.md +13 -13
  56. package/package/corpus/skills/cratis-chronicle-mcp-inspection/SKILL.md +1 -1
  57. package/package/corpus/skills/cratis-chronicle-projection/SKILL.md +13 -4
  58. package/package/corpus/skills/cratis-chronicle-projection/references/fluent-builder.md +10 -0
  59. package/package/corpus/skills/cratis-chronicle-projection/references/model-bound-attributes.md +14 -6
  60. package/package/corpus/skills/cratis-chronicle-projection/references/variants.md +9 -0
  61. package/package/corpus/skills/cratis-chronicle-reactor/SKILL.md +7 -49
  62. package/package/corpus/skills/cratis-chronicle-reactor/references/domain-failures.md +19 -0
  63. package/package/corpus/skills/cratis-chronicle-reactor/references/specifications.md +33 -0
  64. package/package/corpus/skills/cratis-chronicle-read-model/SKILL.md +2 -2
  65. package/package/corpus/skills/cratis-chronicle-read-model/references/queries.md +11 -0
  66. package/package/corpus/skills/cratis-chronicle-read-model-specifications/SKILL.md +1 -0
  67. package/package/corpus/skills/cratis-chronicle-reducer/SKILL.md +1 -1
  68. package/package/corpus/skills/cratis-chronicle-web-workbench/SKILL.md +24 -24
  69. package/package/corpus/skills/cratis-content-length/SKILL.md +1 -1
  70. package/package/corpus/skills/cratis-content-length/references/length-evidence.md +12 -0
  71. package/package/corpus/skills/cratis-developer-marketing/SKILL.md +19 -19
  72. package/package/corpus/skills/cratis-developer-marketing/references/measurement.md +10 -0
  73. package/package/corpus/skills/cratis-developer-marketing/references/playbook-evidence.md +10 -0
  74. package/package/corpus/skills/cratis-engineering-csharp-conventions/SKILL.md +5 -0
  75. package/package/corpus/skills/cratis-engineering-csharp-conventions/references/code-style.md +15 -0
  76. package/package/corpus/skills/cratis-engineering-csharp-conventions/references/exceptions-logging-and-di.md +9 -4
  77. package/package/corpus/skills/cratis-engineering-decision-record/SKILL.md +1 -2
  78. package/package/corpus/skills/cratis-engineering-decision-record/references/record-format.md +8 -0
  79. package/package/corpus/skills/cratis-engineering-docs-authoring/SKILL.md +1 -2
  80. package/package/corpus/skills/cratis-engineering-effect-boundaries/references/failure-archetypes.md +10 -0
  81. package/package/corpus/skills/cratis-fundamentals-concept/SKILL.md +4 -4
  82. package/package/corpus/skills/cratis-fundamentals-type-discovery/SKILL.md +1 -1
  83. package/package/corpus/skills/cratis-lens-browser-extension/SKILL.md +18 -18
  84. package/package/corpus/skills/cratis-performance-review/SKILL.md +1 -1
  85. package/package/corpus/skills/cratis-release-notes/SKILL.md +1 -0
  86. package/package/corpus/skills/cratis-screenplay-automations-and-translations/SKILL.md +29 -4
  87. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/automation-patterns.md +16 -4
  88. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/effects-and-idempotency.md +4 -15
  89. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/todo-list-example.md +6 -2
  90. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/translation-patterns.md +1 -6
  91. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/SKILL.md +45 -245
  92. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/capture-map-and-example.md +42 -0
  93. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/complete-examples.md +155 -0
  94. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/specifying-triggers-and-clock.md +27 -0
  95. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/trigger-reads-example.md +21 -0
  96. package/package/corpus/skills/cratis-screenplay-command-surface/SKILL.md +70 -221
  97. package/package/corpus/skills/cratis-screenplay-command-surface/references/context.md +10 -0
  98. package/package/corpus/skills/cratis-screenplay-command-surface/references/generated-values-and-responses.md +51 -0
  99. package/package/corpus/skills/cratis-screenplay-command-surface/references/inline-events.md +62 -0
  100. package/package/corpus/skills/cratis-screenplay-command-surface/references/policy-persona-seed.md +46 -0
  101. package/package/corpus/skills/cratis-screenplay-command-surface/references/validate-rules.md +36 -0
  102. package/package/corpus/skills/cratis-screenplay-command-surface/verification.json +11 -11
  103. package/package/corpus/skills/cratis-screenplay-discovery/SKILL.md +10 -3
  104. package/package/corpus/skills/cratis-screenplay-discovery/references/facilitation.md +1 -6
  105. package/package/corpus/skills/cratis-screenplay-discovery/references/human-workshop.md +13 -0
  106. package/package/corpus/skills/cratis-screenplay-discovery/references/personas-and-causes.md +8 -0
  107. package/package/corpus/skills/cratis-screenplay-discovery/references/plotting-and-handoff.md +11 -0
  108. package/package/corpus/skills/cratis-screenplay-discovery/references/storming-loop.md +7 -0
  109. package/package/corpus/skills/cratis-screenplay-event-modeling/SKILL.md +75 -198
  110. package/package/corpus/skills/cratis-screenplay-event-modeling/references/file-layout.md +89 -0
  111. package/package/corpus/skills/cratis-screenplay-event-modeling/references/naming-primitives.md +26 -0
  112. package/package/corpus/skills/cratis-screenplay-event-modeling/references/nine-steps.md +14 -1
  113. package/package/corpus/skills/cratis-screenplay-event-modeling/references/parsed-not-runnable.md +8 -0
  114. package/package/corpus/skills/cratis-screenplay-event-modeling/references/provenance.md +10 -0
  115. package/package/corpus/skills/cratis-screenplay-event-modeling/references/slice-type-rules.md +12 -0
  116. package/package/corpus/skills/cratis-screenplay-event-modeling/verification.json +12 -6
  117. package/package/corpus/skills/cratis-screenplay-legacy-extraction/SKILL.md +5 -6
  118. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/candidate-inventory.md +11 -0
  119. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/prologue-safety.md +8 -0
  120. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/side-car-migration.md +11 -0
  121. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/ui-observation.md +1 -1
  122. package/package/corpus/skills/cratis-screenplay-model-authoring/SKILL.md +33 -10
  123. package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md +8 -0
  124. package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-loop.md +13 -17
  125. package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-tools.md +11 -0
  126. package/package/corpus/skills/cratis-screenplay-model-review/SKILL.md +9 -9
  127. package/package/corpus/skills/cratis-screenplay-model-review/references/business-questions.md +9 -0
  128. package/package/corpus/skills/cratis-screenplay-model-review/references/checklist.md +16 -1
  129. package/package/corpus/skills/cratis-screenplay-model-review/references/report-template.md +9 -0
  130. package/package/corpus/skills/cratis-screenplay-model-review/references/worked-example.md +9 -0
  131. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/SKILL.md +17 -8
  132. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/handoff-template.md +8 -0
  133. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/identity-and-edits.md +1 -6
  134. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/phases.md +19 -0
  135. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/safety.md +1 -1
  136. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/verdicts-and-modes.md +11 -1
  137. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/vocabulary-map.md +2 -2
  138. package/package/corpus/skills/cratis-screenplay-projections/SKILL.md +3 -4
  139. package/package/corpus/skills/cratis-screenplay-projections/references/pdl-grammar.md +8 -0
  140. package/package/corpus/skills/cratis-screenplay-read-surface/SKILL.md +2 -2
  141. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +3 -3
  142. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/gap-fill-handoff.md +1 -1
  143. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/renderability-gate.md +1 -1
  144. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/worked-example.md +8 -0
  145. package/package/corpus/skills/cratis-screenplay-scenario-coverage/SKILL.md +10 -10
  146. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/coverage-matrix.md +8 -0
  147. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/invoicing-dues-example.md +4 -0
  148. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-catalogue.md +17 -0
  149. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-examples.md +10 -0
  150. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-workshop.md +11 -0
  151. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/view-and-story-specs.md +12 -0
  152. package/package/corpus/skills/cratis-screenplay-slice-design/SKILL.md +2 -2
  153. package/package/corpus/skills/cratis-screenplay-slice-design/references/command-inventory.md +7 -0
  154. package/package/corpus/skills/cratis-screenplay-slice-design/references/field-lineage.md +8 -0
  155. package/package/corpus/skills/cratis-screenplay-slice-design/references/read-model-design.md +16 -0
  156. package/package/corpus/skills/cratis-screenplay-slice-design/references/slicing.md +10 -0
  157. package/package/corpus/skills/cratis-screenplay-specifications/SKILL.md +52 -360
  158. package/package/corpus/skills/cratis-screenplay-specifications/references/actions-beyond-commands.md +34 -0
  159. package/package/corpus/skills/cratis-screenplay-specifications/references/concept-rules.md +77 -0
  160. package/package/corpus/skills/cratis-screenplay-specifications/references/generated-fixtures.md +39 -0
  161. package/package/corpus/skills/cratis-screenplay-specifications/references/reactions-and-cascades.md +72 -0
  162. package/package/corpus/skills/cratis-screenplay-specifications/references/worked-example.md +110 -0
  163. package/package/corpus/skills/cratis-screenplay-specifications/verification.json +6 -6
  164. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +23 -3
  165. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/boundaries.md +13 -0
  166. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/chronicle-boundaries.md +3 -3
  167. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/consistency-and-concurrency.md +16 -20
  168. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/stream-patterns.md +16 -0
  169. package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +13 -7
  170. package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostics.md +10 -0
  171. package/package/corpus/skills/cratis-screenplay-toolchain/references/doc-contradictions.md +1 -1
  172. package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-subset.md +12 -2
  173. package/package/corpus/skills/cratis-screenplay-toolchain/references/generated-responses-example.md +1 -1
  174. package/package/corpus/skills/cratis-screenplay-toolchain/references/provenance.md +2 -2
  175. package/package/corpus/skills/cratis-screenplay-toolchain/references/renderable-subset.md +1 -1
  176. package/package/corpus/skills/cratis-screenplay-toolchain/references/traps.md +1 -1
  177. package/package/corpus/skills/cratis-screenplay-toolchain/references/verdicts.md +10 -0
  178. package/package/corpus/skills/cratis-screenplay-toolchain/references/versions.md +15 -5
  179. package/package/corpus/skills/cratis-screenplay-ui-composition/SKILL.md +11 -13
  180. package/package/corpus/skills/cratis-screenplay-ui-composition/references/flow-review.md +1 -1
  181. package/package/corpus/skills/cratis-security-review/SKILL.md +13 -8
  182. package/package/corpus/skills/cratis-social-feed-post/SKILL.md +10 -10
  183. package/package/corpus/skills/cratis-social-feed-post/references/engagement-evidence.md +12 -0
  184. package/package/corpus/skills/cratis-specifications-csharp/SKILL.md +13 -2
  185. package/package/corpus/skills/cratis-specifications-csharp/references/application-scenarios.md +10 -10
  186. package/package/corpus/skills/cratis-specifications-csharp/references/csharp-patterns.md +10 -0
  187. package/package/corpus/skills/cratis-specifications-csharp/references/integration-specs.md +9 -0
  188. package/package/corpus/skills/cratis-specifications-typescript/SKILL.md +1 -2
  189. package/package/corpus/skills/cratis-specifications-typescript/references/typescript-patterns.md +11 -1
  190. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/SKILL.md +30 -21
  191. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/admission.md +9 -0
  192. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/render-example.md +5 -0
  193. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/sandbox-and-specrunner.md +2 -4
  194. package/package/corpus/skills/cratis-studio-mcp-safety-guidance/SKILL.md +2 -2
  195. package/package/corpus/skills/cratis-writing-voice-and-cadence/SKILL.md +39 -39
  196. package/package/corpus/skills/cratis-writing-voice-and-cadence/references/ai-tells.md +10 -0
  197. package/package.json +1 -1
@@ -45,7 +45,8 @@ Your responsibility is to perform a structured **security review** of all change
45
45
 
46
46
  ### Sensitive Data Exposure
47
47
 
48
- - [ ] No passwords, secrets, API keys, tokens stored in event properties or read models
48
+ - [ ] Credentials used for authentication (passwords, bearer/session tokens) are never stored; keep a hash or a reference
49
+ - [ ] Operational secrets the system must retain (third-party API key, a company's bank account number) are stored only as `[Encrypted]` + `[NotAudited]` concepts, never in a read model returned to clients in plaintext
49
50
  - [ ] No PII (email, phone, national ID, etc.) returned to clients that did not provide it
50
51
  - [ ] Query results are scoped to the requesting tenant/user — never return all-tenant data in a paged list
51
52
 
@@ -39,15 +39,20 @@ does not need a `ConceptAs<T>` wrapper.
39
39
  - `NotSet` or `Empty` is optional domain policy. Add one only when the backing
40
40
  value is impossible or explicitly reserved in that domain. Do not assume
41
41
  empty string, zero, or `Guid.Empty` is universally invalid.
42
- - Mark a concept that holds **personal data** `[PII]` and one that holds a
43
- **secret** `[NotAudited]`. Both markings travel with the type, so marking it
42
+ - Mark a concept that holds **personal data** `[PII]` alone, and one that holds an
43
+ **operational secret** (API key, token, password, a company's bank account
44
+ number) `[Encrypted]` (`Cratis.Chronicle.ProtectedValues`, Chronicle 19.32.0+)
45
+ **plus** `[NotAudited]`. The markings travel with the type, so marking it
44
46
  once covers every command and event that uses it - which is the point of
45
47
  having the concept. A command's property values are written to the causation
46
48
  chain of every event it appends, so an unmarked `ApiKey` or `AccessToken`
47
- concept reaches the event log in the clear and stays there. The two are not
48
- interchangeable: `[PII]` also encrypts and enrolls the value in erasure, which
49
- is wrong for a password, and `[NotAudited]` does nothing for an erasure
50
- request, which is wrong for a name.
49
+ concept reaches the event log in the clear and stays there. `[Encrypted]`
50
+ protects the value at rest on the event; `[NotAudited]` keeps the command
51
+ input off the causation chain - either alone leaves a gap. `[PII]` already
52
+ encrypts, enrolls the value in erasure and withholds it from the chain, so
53
+ never combine it with `[Encrypted]` (analyzer `CHR0053`). The two kinds are
54
+ not interchangeable: `[PII]` is wrong for a password because it enrolls it in
55
+ erasure, and `[Encrypted]` does not erase a name.
51
56
 
52
57
  ```csharp
53
58
  public record AuthorName(string Value) : ConceptAs<string>(Value)
@@ -77,7 +82,8 @@ public record AuthorId(Guid Value) : EventSourceId<Guid>(Value)
77
82
  `EventSourceId<T>` property does not select the stream.
78
83
  - Do not put `[Key]` or `[Subject]` on an `EventSourceId<T>`-derived member;
79
84
  Chronicle analyzer `CHR0026` reports it.
80
- - Do not put `[PII]` on an event-source ID; analyzer `CHR0034` rejects it.
85
+ - Do not put `[PII]` or `[Encrypted]` on an event-source ID; analyzers `CHR0034`
86
+ and `CHR0052` reject them.
81
87
  Sensitive natural identifiers use a random surrogate stream ID and a separate
82
88
  compliance-managed value.
83
89
  - `EventSourceId.Unspecified` is the untyped string-backed sentinel. Typed empty
@@ -51,7 +51,8 @@ One precise line per load-bearing term, so the same word means the same thing ev
51
51
 
52
52
  - **Subject / `[Subject]`** — the natural person a piece of PII belongs to (for GDPR erasure); defaults to the `EventSourceId<T>` identity.
53
53
  - **`[PII]`** — marks an inherently personal value so Chronicle can manage/erase it.
54
- - **`[NotAudited]`** — an **Arc** marking (`Cratis.Arc.Chronicle.Commands`, not a Chronicle type) for a value that is secret but *not* personal data (password, token, API key), so it is never written to the causation chain. Withholds only; it does not encrypt or enroll the value in erasure the way Chronicle's `[PII]` does.
54
+ - **`[NotAudited]`** — an **Arc** marking (`Cratis.Arc.Chronicle.Commands`, not a Chronicle type) for a value that is secret but *not* personal data (password, token, API key), so it is never written to the causation chain. Withholds only; it does not encrypt the value, so pair it with `[Encrypted]` for an operational secret. It never enrolls a value in erasure the way Chronicle's `[PII]` does.
55
+ - **`[Encrypted]`** — a Chronicle marking (`Cratis.Chronicle.ProtectedValues`, Chronicle 19.32.0+) that encrypts an **operational secret** (API key, token, a company's bank account number) at rest on the event, without erasure. It does not keep a command input off the causation chain, so a secret gets `[Encrypted]` **plus** `[NotAudited]`. Never combine it with `[PII]` (`CHR0053`); never put it on an event source id (`CHR0052`).
55
56
  - **`[OnceOnly]`** — marks a reactor handler (or the whole reactor class) as non-replayable: Chronicle skips it for every event arriving as part of a **replay** — observer rewind, redaction, revision. Replay-exclusion only, not exactly-once and not per-event-source deduplication; recovering a failed partition re-delivers the event as an ordinary observation and the handler runs again. Use a `ReactorDelivery` receipt for that case.
56
57
  - **Namespace / tenant** — Chronicle isolates tenants by **namespace**; each namespace has its own events, observers, and read models.
57
58
 
@@ -105,18 +105,19 @@ for the versioned boundary and supported alternatives.
105
105
 
106
106
  A command's **property values** are recorded on the causation of every event it appends, alongside the command's name, so an event says not only which command produced it but what that command was asked to do. The causation is written into the event log and stays there for as long as the events do — a value recorded there cannot be taken back out by changing code.
107
107
 
108
- Two markings keep a value off the chain, and both are honored on the property, the declaring type, the positional record parameter, **and the property's type**:
108
+ Two markings keep a value off the chain (`[PII]` from Chronicle, `[NotAudited]` from Arc), and both are honored on the property, the declaring type, the positional record parameter, **and the property's type**:
109
109
 
110
110
  | Marking | For | Also does |
111
111
  | --- | --- | --- |
112
112
  | `[PII]` | personal data | encrypts it in the event, enrolls it in erasure |
113
- | `[NotAudited]` | a secret that is not personal data — password, token, API key, card number | nothing else; it only withholds |
113
+ | `[NotAudited]` | a secret that is not personal data — a password or token given as a command input, an API key, a card number | nothing else; it only withholds. A credential (password, token) is never put on an event: store a hash or a reference. A secret the system must retain on an event is also `[Encrypted]` |
114
114
 
115
- They are **not interchangeable**: `[PII]` on a password would encrypt it and enroll it in GDPR erasure, which is wrong; `[NotAudited]` on a name does nothing for an erasure request, which is also wrong.
115
+ They are **not interchangeable**: `[PII]` on a password would encrypt it and enroll it in GDPR erasure, which is wrong; `[NotAudited]` on a name does nothing for an erasure request, which is also wrong. An operational secret the system retains on an event (a third-party API key, a company's bank account number) needs **both** `[Encrypted]` (`Cratis.Chronicle.ProtectedValues`, Chronicle 19.32.0+; at rest, no erasure) and `[NotAudited]` (off the chain); either alone leaves a gap. A credential used for authentication is never retained: the command marks it `[NotAudited]` and the event carries only a hash or a reference. Never combine `[PII]` with `[Encrypted]` (`CHR0053`), and neither goes on an event source id (`CHR0034`, `CHR0052`).
116
116
 
117
117
  **Prefer marking the concept**, exactly as with `[PII]` — mark `ApiKey` once and every command taking one is covered:
118
118
 
119
119
  ```csharp
120
+ [Encrypted]
120
121
  [NotAudited]
121
122
  public record ApiKey(string Value) : ConceptAs<string>(Value);
122
123
  ```
@@ -332,7 +333,7 @@ public Task AuthorRegistered(AuthorRegistered @event, EventContext context) => .
332
333
  **[contract]** Chronicle encrypts `[PII]`-marked values per subject; decryption is transparent to observers and queries (read models injected into a `CommandValidator<T>` or `Handle()` decrypt transparently under the command's resolved subject before validation/handler logic runs).
333
334
 
334
335
  - Prefer **concept-level `[PII]`** (on the `ConceptAs<T>` type) so the marker travels everywhere automatically; use property-level `[PII]` only when a value is personal in one event context but not everywhere.
335
- - `[PII]` also keeps the value **off the causation chain** when it is a command property — see [Causation](#causation--what-a-command-records-contract). A secret that is not personal data needs `[NotAudited]` instead; `[PII]` is the wrong tool for a password.
336
+ - `[PII]` also keeps the value **off the causation chain** when it is a command property — see [Causation](#causation--what-a-command-records-contract). A retained operational secret that is not personal data needs `[Encrypted]` plus `[NotAudited]` instead; `[PII]` is the wrong tool for it, and a password is never retained at all (store a hash).
336
337
  - **`[PII]` is found at any nesting depth, and may mark a whole value object.** A `[PII]` concept inside a value object is encrypted where it sits (siblings stay readable). Marking the **value object type** (or a property typed as one) with `[PII]` classifies every value it holds — Chronicle pushes the marker down to the individual values, so the document keeps its shape and each value is separately encrypted rather than fused into one blob.
337
338
  - Projection-backed read models inherit PII lineage automatically — don't add `[PII]` to their properties. Reducer-backed models: a `[PII]`-concept-typed property is detected automatically; add property-level `[PII]` only for a primitive/non-PII-concept property populated from PII source data.
338
339
  - ⚠️ **`[PII]` cannot be applied to `EventSourceId`/`EventSourceId<T>`** — Chronicle throws `PIINotSupportedOnEventSourceId` at runtime because the identifier is the encryption-key lookup. If the identifier itself is sensitive, use a random `Guid`-backed surrogate as the event source id and store the sensitive value in a `[PII]` property.
@@ -26,6 +26,15 @@ other infrastructure. Change behaviour in the model first, never in managed outp
26
26
  (`cratis-application-slice-specifications`); the render workflow itself
27
27
  (`cratis-screenplay-render-and-gap-fill`).
28
28
 
29
+ ## Startup verification for Automation and Translation
30
+
31
+ - **Real startup participation.** A `ReactorScenario` bypasses observer registration, so it
32
+ cannot show that the application subscribes the reactor. Verify, through the repository's
33
+ integration route or a startup check, that the real application discovers the intended
34
+ reactor (its assembly is scanned, per the repository's discovery convention), that it observes
35
+ the intended event store and event sequence, and that a trigger event delivered there reaches
36
+ it. Report this apart from the in-process specifications.
37
+
29
38
  ## Verified product sources
30
39
 
31
40
  This skill is a method: it names no API of its own. Product facts it relies on are pinned
@@ -169,8 +178,8 @@ contract is implemented in code, and no specification lacks an executable equiva
169
178
  - `references/contract-and-precedence.md` - sources, precedence, conflicting evidence.
170
179
  - `references/build-prompts.md` - standing instructions, mandatory build flow, loop prompt, result packet, learning candidates.
171
180
  - `references/checklists.md` - State Change, State View, Automation final checklists; Chronicle runtime guarantees; evidence.
172
- - `references/worked-example.md` - a marina slice reconciled and re-delivered, with the report.
173
- - `references/provenance.md` - sources and attribution.
181
+ - `references/worked-example.md` - a marina slice reconciled and re-delivered, with the report. Read when you need an example of reconciliation, delta delivery, or the final report.
182
+ - `references/provenance.md` - sources and attribution. Read when checking source attribution or adaptation history.
174
183
 
175
184
  ## Lineage
176
185
 
@@ -1,5 +1,13 @@
1
1
  # Slice build prompts
2
2
 
3
+ ## Contents
4
+
5
+ - 1. Standing project instructions
6
+ - 2. Build a slice: the mandatory flow
7
+ - 3. One slice per iteration (loop prompt)
8
+ - 4. Result packet
9
+ - 5. Learning candidates
10
+
3
11
  Standing instructions for an implementer, or an unattended loop, that builds one slice at a
4
12
  time from its contract. Paste or reference them in the brief; they restate rules already in
5
13
  `SKILL.md` as an operating procedure. Adapted from Martin Dilger and Nebulit GmbH's build kit (see
@@ -1,5 +1,14 @@
1
1
  # Final checklists
2
2
 
3
+ ## Contents
4
+
5
+ - Contract reconciliation
6
+ - State Change
7
+ - State View
8
+ - Automation and Translation
9
+ - Chronicle runtime guarantees
10
+ - Evidence
11
+
3
12
  Reconcile in both directions with each list. Moved here from the render workflow; it gives
4
13
  the renderer no right to browse managed output or implement rejected semantics.
5
14
 
@@ -79,12 +88,7 @@ the renderer no right to browse managed output or implement rejected semantics.
79
88
  specification.
80
89
  - A failed handling is not swallowed: failure behavior follows `cratis-chronicle-reactor`
81
90
  (failure and quarantine), never a catch that continues.
82
- - **Real startup participation.** A `ReactorScenario` bypasses observer registration, so it
83
- cannot show that the application subscribes the reactor. Verify, through the repository's
84
- integration route or a startup check, that the real application discovers the intended
85
- reactor (its assembly is scanned, per the repository's discovery convention), that it observes
86
- the intended event store and event sequence, and that a trigger event delivered there reaches
87
- it. Report this apart from the in-process specifications.
91
+ See "Startup verification for Automation and Translation" in SKILL.md.
88
92
 
89
93
  ## Chronicle runtime guarantees
90
94
  Follow the owning corpus skill. Verify the actual namespace, subject, constraint scope,
@@ -262,7 +262,7 @@ single append is `0`, never `1`.
262
262
  ## Lineage
263
263
 
264
264
  Step 0, repeat execution and rule isolation are adapted in our own words from
265
- ideas recorded in `references/provenance.md`.
265
+ ideas recorded in `references/provenance.md`. Read `references/provenance.md` when checking attribution or the origin of Step 0, repeat-execution coverage, and rule isolation.
266
266
 
267
267
  ## What breaks
268
268
 
@@ -43,7 +43,7 @@ is the trust boundary. But it means:
43
43
  the application itself to validate a token, that is ordinary ASP.NET Core
44
44
  authentication you configure yourself.
45
45
 
46
- Today the default is that a plain `builder.AddCratis()` host registers the
46
+ At `22.41.1` the default is that a plain `builder.AddCratis()` host registers the
47
47
  unsigned-header scheme as its **default** authentication scheme, so any caller who
48
48
  can reach it can forge a principal for every authorized command and query (open
49
49
  Arc#2946). Run it only behind that ingress; otherwise use `AddCratisArc()` and
@@ -97,7 +97,7 @@ does its own 401/403. There is no public constant for the identity routes — th
97
97
  are string literals in the endpoint mapper.
98
98
 
99
99
  ⚠️ **A fallback policy does not protect an endpoint that is explicitly anonymous**,
100
- and the word "development" is not an environment check. Today the default is that
100
+ and the word "development" is not an environment check. At `22.41.1` the default is that
101
101
  these routes are public and expose your command, query, user and tenant surface;
102
102
  the exposure is tracked in open Arc#2834. To change it:
103
103
 
@@ -119,7 +119,7 @@ is `Lax`, `Path` is `/`.
119
119
 
120
120
  ⚠️ A non-`HttpOnly` cookie the browser can read is a cookie the user can edit.
121
121
  Treat everything in it as a **display** input. Never let it decide anything the
122
- server has not already decided. Today the default is that `/.cratis/me` returns
122
+ server has not already decided. At `22.41.1` the default is that `/.cratis/me` returns
123
123
  whatever a presented `.cratis-identity` cookie decodes to *before* it looks at the
124
124
  authenticated principal, so a client can make it report any identity or roles
125
125
  (open Arc#2939). Commands and queries authorize on the request principal and are
@@ -205,7 +205,7 @@ closed — the latter denies every observable query in the process. The principa
205
205
  from `ObservableQueryEmissionContext.Principal`, never from ambient accessors or
206
206
  `IHttpContextAccessor`; the guard is constructed per emission, so keep it cheap and
207
207
  cache in a singleton. Guards do not protect the HTTP snapshot path. Read
208
- [observable emission guards](references/observable-emission-guards.md).
208
+ [observable emission guards](references/observable-emission-guards.md) when implementing or reviewing revocation of an observable-query subscription.
209
209
 
210
210
  ### Validators are not an authorization boundary
211
211
 
@@ -238,14 +238,18 @@ the claim Arc reserves, and the ASP.NET Core scheme variant.
238
238
 
239
239
  ## Tenancy
240
240
 
241
+ Anything that must be isolated per tenant has to enforce that isolation itself,
242
+ downstream of resolution. Never treat a resolved tenant id as an authorization
243
+ decision.
244
+
241
245
  `Cratis.Arc.Tenancy` resolves a tenant per request. The default resolver is
242
246
  **header-based** on `x-cratis-tenant-id`; `TenantResolverType` also offers
243
247
  `Query`, `Claim`, `Development`, `Subdomain` and `Fixed`, configured through
244
248
  `ArcOptions.Tenancy` or the `Use*Tenancy` extension methods.
245
249
 
246
250
  `ITenantIdAccessor.Current` gives the current `TenantId`, which is
247
- `TenantId.NotSet` (`"[NotSet]"`) when nothing resolved. See
248
- [tenancy](references/tenancy.md) for the exact defaults and each resolver's
251
+ `TenantId.NotSet` (`"[NotSet]"`) when nothing resolved. Read
252
+ [tenancy](references/tenancy.md) when selecting or configuring a tenant resolver, or handling an unresolved tenant; it gives the exact defaults and each resolver's
249
253
  behavior.
250
254
 
251
255
  Arc tenancy is request-scoped tenant *resolution*. It is not Chronicle's tenant
@@ -284,7 +288,7 @@ filter.
284
288
  `Arc.React.MVVM` has **no** identity hook. It registers `IIdentityProvider` in
285
289
  its container so a view model can constructor-inject it; that is all.
286
290
 
287
- See [frontend](references/frontend.md) for the exact exported shapes.
291
+ Read [frontend](references/frontend.md) when consuming identity in React or injecting it into a view model; it gives the exact exported shapes.
288
292
 
289
293
  ## Local development
290
294
 
@@ -1,5 +1,15 @@
1
1
  # Authentication
2
2
 
3
+ ## Contents
4
+
5
+ - The contract
6
+ - The Microsoft Identity Platform handler
7
+ - The reserved claim
8
+ - ASP.NET Core hosting
9
+ - Forwarded headers, ingress requirements and protected introspection
10
+ - What is not here
11
+ - The security boundary, stated plainly
12
+
3
13
  Verified against `Cratis.Arc.Core` and `Cratis.Arc` `22.41.1`. Types are in
4
14
  `Cratis.Arc.Authentication` and `Cratis.Arc.Identity`.
5
15
 
@@ -124,7 +134,7 @@ whose `SchemeName` is `"MicrosoftIdentityPlatform"`. `builder.AddCratis()` (the
124
134
  `Cratis` package) calls this for you and makes it the **default** authentication
125
135
  scheme; `AddCratisArc()` from `Cratis.Arc` does not register it.
126
136
 
127
- ⚠️ Today the default is that a plain `builder.AddCratis()` host trusts the unsigned
137
+ ⚠️ At `22.41.1` the default is that a plain `builder.AddCratis()` host trusts the unsigned
128
138
  `x-ms-client-principal*` headers from **any caller that can reach it** — it is safe
129
139
  only behind the ingress described below (tracked as open Arc#2946). If the host is
130
140
  not behind such an ingress, do not use this scheme: configure a credential-validating
@@ -149,7 +159,7 @@ Arc applies that rule to one place itself: the protected introspection catalogs
149
159
  | `Roles` | `null` | Comma-separated, any one grants access; needs `RequireAuthentication: true` and no empty entries |
150
160
  | `TrustForwardedIdentityHeaders` | `false` | Accepts identity from the unsigned forwarded headers for the protected catalog; needs `Enabled` and `RequireAuthentication` |
151
161
 
152
- Today the default is that the catalogs are public, and with
162
+ At `22.41.1` the default is that the catalogs are public, and with
153
163
  `RequireAuthentication: true` the forwarded headers are **ignored** for them until
154
164
  you set `TrustForwardedIdentityHeaders: true`: the built-in
155
165
  `MicrosoftIdentityPlatformAuthenticationHandler` returns
@@ -1,5 +1,20 @@
1
1
  # Authorization
2
2
 
3
+ ## Contents
4
+
5
+ - Versions differ — check the one you run
6
+ - Attributes
7
+ - Composition and precedence
8
+ - Named policies
9
+ - Guests and anonymous policies
10
+ - Evaluation order
11
+ - Baselines: two separate mechanisms
12
+ - Default access by hosting model
13
+ - The filters and results
14
+ - Direct calls bypass authorization
15
+ - The principal and system actors
16
+ - Protected decisions and validators
17
+
3
18
  Verified against `Cratis.Arc.Core` and `Cratis.Arc` `22.41.1`. Everything below
4
19
  describes that version and is in `Cratis.Arc.Authorization` unless stated.
5
20
 
@@ -127,7 +142,7 @@ opt-in:
127
142
  - Only a declaration made **entirely** of opted-in policies, with no roles and no
128
143
  schemes, can evaluate guests. Roles and schemes always require authentication.
129
144
 
130
- ⚠️ The opt-in governs Arc's pipeline verdict only. Today the HTTP layer can reject
145
+ ⚠️ The opt-in governs Arc's pipeline verdict only. At `22.41.1` the HTTP layer can reject
131
146
  a guest before the policy runs: a Core host with any authentication handler, or an
132
147
  ASP.NET Core `FallbackPolicy` that requires authentication, returns 401 first
133
148
  (tracked in Cratis/Arc#2948). Test guest endpoints through the real HTTP host.
@@ -1,5 +1,12 @@
1
1
  # Frontend identity
2
2
 
3
+ ## Contents
4
+
5
+ - `@cratis/arc/identity`
6
+ - `@cratis/arc.react/identity`
7
+ - `RequireRole`
8
+ - MVVM
9
+
3
10
  Verified against `@cratis/arc` and `@cratis/arc.react` `22.41.1`.
4
11
 
5
12
  ## `@cratis/arc/identity`
@@ -1,5 +1,14 @@
1
1
  # Observable query emission guards
2
2
 
3
+ ## Contents
4
+
5
+ - The opt-in
6
+ - Verdicts
7
+ - The context
8
+ - Fail closed, and its blast radius
9
+ - Cost
10
+ - What a guard does not protect
11
+
3
12
  Verified against `Cratis.Arc.Core` `22.41.1` (`Cratis.Arc.Queries`).
4
13
 
5
14
  Authorization for an observable query runs **once, when the subscription is
@@ -11,6 +11,17 @@ Arc discovers it, runs authorization and validation, calls `Handle()`, and turns
11
11
  whatever `Handle()` returns into events, server-executed operations, a response,
12
12
  or a combination.
13
13
 
14
+ - An accepted `.play` model under the model root covers the behavior, or the
15
+ repository is opted in (the root holds a committed `.play` file (`git ls-tree -r --name-only HEAD` lists a `.play` file there, narrowed to `-- <root>` when a root is configured), or the project set
16
+ `mcpServers.screenplay.root` in `.cratis/ai.json`; an empty directory, install
17
+ output, an uncommitted `.play` draft or a `.play` file outside the root does not count; master definition:
18
+ `cratis-screenplay-modeling-lifecycle`): change the model first with
19
+ `cratis-screenplay-event-modeling`. If the Screenplay skills are not installed,
20
+ say so and do not author `.play` from memory.
21
+ Edit code here only for infrastructure, clients, adapters, Screenplay code
22
+ attachments, or gap-fill scope (`cratis-screenplay-render-and-gap-fill`);
23
+ never edit Stage-managed output.
24
+
14
25
  ## Verified product sources
15
26
 
16
27
  | Package | Version | Purpose |
@@ -94,9 +105,13 @@ the *declared* return type must name `ICommandOperation`/`CommandOperations`
94
105
  | `Result<TEvent, ValidationResult>` | Success appends the event; failure becomes a validation failure |
95
106
  | `Task<T>` / `ValueTask<T>` of any of the above | Awaited first, then dispatched |
96
107
 
97
- See [handler shapes](references/handler-shapes.md) for the dispatch order, the
108
+ When choosing a return shape or diagnosing dispatch failures, read [handler shapes](references/handler-shapes.md) for the dispatch order, the
98
109
  tuple rule, and the exact failure modes.
99
110
 
111
+ ⚠️ **An unregistered event type is not an error.** No handler claims it, so it
112
+ silently becomes the HTTP response body instead of being appended. A command
113
+ that "runs fine" but appends nothing is almost always a missing `[EventType]`.
114
+
100
115
  For immediate inline side effects chosen by the command, prefer returning an
101
116
  operation rather than calling the service inside `Handle()`. Arc executes the
102
117
  work and selects optional compensation from the commit facts. Direct service
@@ -217,7 +232,10 @@ property is added.
217
232
  | Marking | Use for | Effect |
218
233
  | --- | --- | --- |
219
234
  | `[PII]` (Chronicle) | personal data | encrypted in the event and enrolled in erasure; already withheld from causation |
220
- | `[NotAudited]` (Arc Chronicle) | a secret that is not personal data — password, token, API key | withheld from causation, nothing else |
235
+ | `[Encrypted]` (Chronicle, `Cratis.Chronicle.ProtectedValues`, 19.32.0+) | an operational secret the system retains — a third-party API key, a company's bank account number | encrypted at rest on the event, no erasure; does not withhold it from causation |
236
+ | `[NotAudited]` (Arc Chronicle) | the same operational secret, and any credential given as a command input | withheld from causation, nothing else |
237
+
238
+ A retained operational secret needs **both** `[Encrypted]` and `[NotAudited]`; either alone leaves a gap. A credential used for authentication (password, token) is marked `[NotAudited]` on the command and reaches an event only as a hash or a reference, never encrypted. Never combine `[PII]` with `[Encrypted]` (`CHR0053`).
221
239
 
222
240
  ```csharp
223
241
  [Command]
@@ -254,7 +272,7 @@ either way, so the reading is all a reviewer has to go on.
254
272
 
255
273
  `dotnet build` runs the generator after the build, and only when
256
274
  `CratisProxiesOutputPath` is set. Output folders mirror the C# namespace, not the
257
- file path. See [proxy generation](references/proxy-generation.md) for the full
275
+ file path. When configuring proxy generation or diagnosing missing or stale output, read [proxy generation](references/proxy-generation.md) for the full
258
276
  set of MSBuild knobs and the common failures.
259
277
 
260
278
  ## The generated client contract
@@ -275,15 +293,15 @@ whatever renders it:
275
293
  | `setInitialValuesFromCurrentValues()` | Rebaselines onto the current values |
276
294
  | `revertChanges()` / `clear()` | Restore the baseline / reset everything |
277
295
 
278
- Branch on the specific flag, not only on `isSuccess`. The exact `CommandResult`
296
+ Read `references/command-result.md` when branching on a command result or matching validation failures to fields. Branch on the specific flag, not only on `isSuccess`. The exact `CommandResult`
279
297
  and `ValidationResult` shapes are in
280
298
  [command result](references/command-result.md) — in particular, a validation
281
299
  failure carries `members: string[]` (camelCased) and a numeric `severity`, not a
282
300
  `propertyName` string.
283
301
 
284
302
  `validateClientSide()` runs only the rules the generator could extract, so it can
285
- pass where `execute()` still fails validation — see
286
- [proxy generation](references/proxy-generation.md) for the exact extractable set.
303
+ pass where `execute()` still fails validation — read
304
+ [proxy generation](references/proxy-generation.md) when checking which validation rules are extractable.
287
305
 
288
306
  Binding this proxy into a React component — the generated `use()` hook and the
289
307
  Cratis Components command dialog and form fields — belongs to the Arc React and
@@ -299,16 +317,6 @@ Components guidance, not to this skill.
299
317
  - Append-time uniqueness or concurrency constraints: the Chronicle event
300
318
  constraints guidance.
301
319
  - Choosing the concept or identity type for a value: `cratis-fundamentals-concept`.
302
- - An accepted `.play` model under the model root covers the behavior, or the
303
- repository is opted in (the root holds a committed `.play` file (`git ls-tree -r --name-only HEAD` lists a `.play` file there, narrowed to `-- <root>` when a root is configured), or the project set
304
- `mcpServers.screenplay.root` in `.cratis/ai.json`; an empty directory, install
305
- output, an uncommitted `.play` draft or a `.play` file outside the root does not count; master definition:
306
- `cratis-screenplay-modeling-lifecycle`): change the model first with
307
- `cratis-screenplay-event-modeling`. If the Screenplay skills are not installed,
308
- say so and do not author `.play` from memory.
309
- Edit code here only for infrastructure, clients, adapters, Screenplay code
310
- attachments, or gap-fill scope (`cratis-screenplay-render-and-gap-fill`);
311
- never edit Stage-managed output.
312
320
 
313
321
  ## Verify
314
322
 
@@ -1,5 +1,12 @@
1
1
  # CommandResult and ValidationResult
2
2
 
3
+ ## Contents
4
+
5
+ - Server side
6
+ - Severity filtering
7
+ - Client side
8
+ - Executing with a severity
9
+
3
10
  Verified against `Cratis.Arc.Core` `22.16.0` and `@cratis/arc` `22.16.0`.
4
11
 
5
12
  ## Server side
@@ -1,5 +1,14 @@
1
1
  # Handler shapes and how Arc dispatches them
2
2
 
3
+ ## Contents
4
+
5
+ - The pipeline around `Handle`
6
+ - Dispatch
7
+ - What claims an event
8
+ - The tuple rule
9
+ - Cross-stream appends
10
+ - Failure shapes
11
+
3
12
  Verified against `Cratis.Arc.Core` and `Cratis.Arc.Chronicle` `22.16.0` with
4
13
  `Cratis.Chronicle` `18.3.0`. Operation dispatch additions are verified against
5
14
  Arc **v22.48.1**, `CommandPipeline` and `CommandOperationExecution`.
@@ -72,9 +81,7 @@ type registry knows it.
72
81
  | `EventForEventSourceId` | single wrapper handler | the wrapper's own id |
73
82
  | A collection containing at least one `EventForEventSourceId`, every other element being a registered event | wrapper-collection handler | each wrapper to its own id, each plain event to the command's |
74
83
 
75
- ⚠️ **An unregistered event type is not an error.** No handler claims it, so it
76
- silently becomes the HTTP response body instead of being appended. A command
77
- that "runs fine" but appends nothing is almost always a missing `[EventType]`.
84
+ See "Choose the return shape" in SKILL.md.
78
85
 
79
86
  An empty collection statically typed as `IEnumerable<EventForEventSourceId>` is
80
87
  still recognised and appends nothing, rather than being serialized as the
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: cratis-arc-command-execution
3
- description: Execute an existing Cratis Arc command from backend code through ICommandPipeline — the scopeless and scoped overloads, the typed Execute<TResult>, the pre-flight Validate, validation severity filtering, and how to read CommandResult. Use when a reactor, background job, scheduled task, or backend service must run a command without an HTTP request. Do not use to define a command.
3
+ description: Execute an existing Cratis Arc command from backend code through ICommandPipeline — the scopeless and scoped overloads, the typed generic Execute, the pre-flight Validate, validation severity filtering, and how to read CommandResult. Use when a reactor, background job, scheduled task, or backend service must run a command without an HTTP request. Do not use to define a command.
4
4
  license: MIT
5
5
  ---
6
6
 
@@ -103,7 +103,7 @@ operation-handler or response-value-handler registration is needed.
103
103
  public/internal operation types and accessible non-generic containing types.
104
104
 
105
105
  Omit `Compensate()` when there is no meaningful reversal; Arc does not invent
106
- one. Full contract: [execution and recovery](references/execution-and-recovery.md).
106
+ one. Read [execution and recovery](references/execution-and-recovery.md) when checking declaration contracts, execution ordering, recovery observations, cancellation, or custom-scope compatibility.
107
107
 
108
108
  ## Return one, none, or many
109
109
 
@@ -223,6 +223,10 @@ See the [custom-scope checklist](references/execution-and-recovery.md#supported-
223
223
 
224
224
  ## Observe and test on the backend
225
225
 
226
+ Use `Cratis.Specifications.XUnit`, NSubstitute, and matching Arc packages in a
227
+ separate spec project. Keep standalone and Chronicle scenarios in separate
228
+ projects: Chronicle's discovered scenario extender changes the test environment.
229
+
226
230
  Backend `CommandResult.Recovery` and `OperationOutcomes` describe recovery and
227
231
  entered invocations. Both are excluded from HTTP JSON and the TypeScript result.
228
232
  `Completed` recovery means callbacks returned, not that external history was
@@ -1,5 +1,17 @@
1
1
  # Operation execution and recovery reference
2
2
 
3
+ ## Contents
4
+
5
+ - Declaration contract
6
+ - Returned values
7
+ - Nine-step ordering
8
+ - Commit and recovery
9
+ - Backend observations
10
+ - Optional failure context
11
+ - Cancellation and budget
12
+ - Supported scopes
13
+ - Troubleshooting
14
+
3
15
  Verified at **Arc v22.48.1** against the
4
16
  [product reference](https://github.com/Cratis/Arc/blob/v22.48.1/Documentation/backend/csharp/commands/operations/reference.md)
5
17
  and `Source/DotNET/Arc.Core/Commands/`. Types below are in
@@ -1,11 +1,18 @@
1
1
  # Specify decisions, adapters, and pipeline composition
2
2
 
3
+ ## Contents
4
+
5
+ - Decision: direct Handle
6
+ - Adapter: direct Execute and Compensate
7
+ - Composition: forward failure and reverse compensation
8
+ - Chronicle: a real commit rejection
9
+ - Extend the failure coverage
10
+ - Migrate an existing service-backed Handle
11
+
3
12
  Verified at **Arc v22.48.1**. These class excerpts follow the product's
4
13
  [standalone lesson](https://github.com/Cratis/Arc/blob/v22.48.1/Documentation/backend/csharp/testing/command-operations.md)
5
14
  and [Chronicle rejection lesson](https://github.com/Cratis/Arc/blob/v22.48.1/Documentation/backend/csharp/testing/command-operations-with-chronicle.md).
6
- Use `Cratis.Specifications.XUnit`, NSubstitute, and matching Arc packages in a
7
- separate spec project. Keep standalone and Chronicle scenarios in separate
8
- projects: Chronicle's discovered scenario extender changes the test environment.
15
+ See "Observe and test on the backend" in SKILL.md.
9
16
 
10
17
  The standalone examples reuse `ReservationId`, `SeatId`, `ISeatReservations`,
11
18
  `ReserveSeat`, `BookSeat`, `SeatReservation`, and `BookSeats` from the