@cratis/pi 7.34.1 → 7.36.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 (229) hide show
  1. package/package/corpus/agents/security-reviewer.md +1 -0
  2. package/package/corpus/agents/spec-writer.md +1 -1
  3. package/package/corpus/harnesses/pi/extensions/shared/rules.ts +3 -1
  4. package/package/corpus/hooks/scripts/cratis-nuget-pins.txt +7 -6
  5. package/package/corpus/hooks/scripts/cratis-release-notes-reviewed.cjs +7 -6
  6. package/package/corpus/hooks/scripts/cratis-store-mutations.json +7 -3
  7. package/package/corpus/product-sync.json +896 -0
  8. package/package/corpus/prompts/add-business-rule.prompt.md +1 -1
  9. package/package/corpus/prompts/ship-changes.prompt.md +2 -2
  10. package/package/corpus/rules/ai-distribution.md +31 -3
  11. package/package/corpus/rules/application-profile.md +2 -1
  12. package/package/corpus/rules/components.md +66 -7
  13. package/package/corpus/rules/concepts.md +11 -3
  14. package/package/corpus/rules/csharp.md +3 -1
  15. package/package/corpus/rules/dialogs.md +9 -0
  16. package/package/corpus/rules/efcore.md +1 -1
  17. package/package/corpus/rules/elixir.md +49 -0
  18. package/package/corpus/rules/framework.md +5 -3
  19. package/package/corpus/rules/general.md +1 -0
  20. package/package/corpus/rules/glossary.md +4 -4
  21. package/package/corpus/rules/go-engineering.md +60 -0
  22. package/package/corpus/rules/go.md +115 -0
  23. package/package/corpus/rules/java.md +5 -2
  24. package/package/corpus/rules/kotlin.md +7 -5
  25. package/package/corpus/rules/orleans.md +65 -9
  26. package/package/corpus/rules/profiles.md +43 -6
  27. package/package/corpus/rules/pull-requests.md +3 -3
  28. package/package/corpus/rules/react.md +8 -1
  29. package/package/corpus/rules/reactors.md +27 -3
  30. package/package/corpus/rules/specs.csharp.md +11 -4
  31. package/package/corpus/rules/specs.scenarios.csharp.md +35 -4
  32. package/package/corpus/rules/specs.typescript.md +2 -1
  33. package/package/corpus/rules/storybook.md +1 -1
  34. package/package/corpus/rules/typescript.md +1 -1
  35. package/package/corpus/rules/vertical-slices.md +37 -5
  36. package/package/corpus/skills/cratis-application-react-specifications/SKILL.md +4 -2
  37. package/package/corpus/skills/cratis-application-slice-specifications/SKILL.md +18 -8
  38. package/package/corpus/skills/cratis-application-slice-specifications/references/query-and-decision-scenarios.md +65 -0
  39. package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/SKILL.md +53 -57
  40. package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/authentication.md +38 -42
  41. package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/authorization.md +18 -7
  42. package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/authproxy.md +30 -0
  43. package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/frontend.md +12 -9
  44. package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/local-development.md +9 -9
  45. package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/observable-emission-guards.md +8 -5
  46. package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/tenancy.md +20 -4
  47. package/package/corpus/skills/cratis-arc-command/SKILL.md +32 -10
  48. package/package/corpus/skills/cratis-arc-command/references/command-result.md +12 -5
  49. package/package/corpus/skills/cratis-arc-command/references/decisions-and-routing.md +95 -0
  50. package/package/corpus/skills/cratis-arc-command/references/generated-values.md +3 -2
  51. package/package/corpus/skills/cratis-arc-command/references/handler-shapes.md +8 -8
  52. package/package/corpus/skills/cratis-arc-command/references/proxy-generation.md +22 -3
  53. package/package/corpus/skills/cratis-arc-command/references/read-model-injection.md +13 -1
  54. package/package/corpus/skills/cratis-arc-command-execution/SKILL.md +19 -9
  55. package/package/corpus/skills/cratis-arc-command-kotlin/SKILL.md +44 -18
  56. package/package/corpus/skills/cratis-arc-command-kotlin/references/read-model-naming.md +29 -0
  57. package/package/corpus/skills/cratis-arc-command-operation/SKILL.md +10 -9
  58. package/package/corpus/skills/cratis-arc-command-operation/references/execution-and-recovery.md +2 -2
  59. package/package/corpus/skills/cratis-arc-command-operation/references/testing.md +4 -3
  60. package/package/corpus/skills/cratis-arc-command-typescript/SKILL.md +42 -22
  61. package/package/corpus/skills/cratis-arc-command-typescript/references/chronicle-events.md +36 -5
  62. package/package/corpus/skills/cratis-arc-command-typescript/references/command-operations.md +114 -0
  63. package/package/corpus/skills/cratis-arc-command-typescript/references/hosting-and-storage.md +37 -16
  64. package/package/corpus/skills/cratis-arc-command-typescript/references/identity-and-introspection.md +88 -0
  65. package/package/corpus/skills/cratis-arc-command-typescript/references/observability-and-host-scopes.md +25 -0
  66. package/package/corpus/skills/cratis-arc-command-typescript/references/proxy-generation.md +35 -4
  67. package/package/corpus/skills/cratis-arc-command-typescript/references/slice-layout.md +11 -0
  68. package/package/corpus/skills/cratis-arc-command-typescript/verification.json +8 -1
  69. package/package/corpus/skills/cratis-arc-command-validation/SKILL.md +49 -19
  70. package/package/corpus/skills/cratis-arc-ef-core-migration/SKILL.md +12 -6
  71. package/package/corpus/skills/cratis-arc-go/SKILL.md +148 -0
  72. package/package/corpus/skills/cratis-arc-go/references/queries.md +80 -0
  73. package/package/corpus/skills/cratis-arc-hosting/SKILL.md +96 -0
  74. package/package/corpus/skills/cratis-arc-hosting/references/integrations-and-publish.md +80 -0
  75. package/package/corpus/skills/cratis-arc-identity-and-tenancy-kotlin/SKILL.md +137 -0
  76. package/package/corpus/skills/cratis-arc-observable-query-http/SKILL.md +20 -2
  77. package/package/corpus/skills/cratis-arc-query-kotlin/SKILL.md +26 -6
  78. package/package/corpus/skills/cratis-arc-query-paging/SKILL.md +25 -20
  79. package/package/corpus/skills/cratis-arc-query-typescript/SKILL.md +32 -6
  80. package/package/corpus/skills/cratis-arc-query-typescript/references/storage-observation-and-compliance.md +66 -0
  81. package/package/corpus/skills/cratis-arc-query-typescript/verification.json +5 -1
  82. package/package/corpus/skills/cratis-arc-react-page/SKILL.md +24 -13
  83. package/package/corpus/skills/cratis-arc-react-page/references/data-page.md +20 -10
  84. package/package/corpus/skills/cratis-arc-react-page/references/data-tables.md +17 -3
  85. package/package/corpus/skills/cratis-arc-react-page/references/dialogs.md +14 -3
  86. package/package/corpus/skills/cratis-arc-react-page/references/from-screenplay.md +6 -1
  87. package/package/corpus/skills/cratis-arc-react-page/references/provenance.md +1 -1
  88. package/package/corpus/skills/cratis-arc-react-page/references/queries-and-commands.md +11 -1
  89. package/package/corpus/skills/cratis-arc-react-page/verification.json +6 -1
  90. package/package/corpus/skills/cratis-arc-spring-data-kotlin/SKILL.md +163 -0
  91. package/package/corpus/skills/cratis-arc-testing-kotlin/SKILL.md +131 -0
  92. package/package/corpus/skills/cratis-arc-validation-kotlin/SKILL.md +44 -11
  93. package/package/corpus/skills/cratis-arc-validation-typescript/SKILL.md +5 -3
  94. package/package/corpus/skills/cratis-chronicle-cli-operations/SKILL.md +79 -25
  95. package/package/corpus/skills/cratis-chronicle-cli-operations/references/command-effects.md +57 -0
  96. package/package/corpus/skills/cratis-chronicle-client-dotnet/SKILL.md +87 -99
  97. package/package/corpus/skills/cratis-chronicle-client-dotnet/references/additional-surfaces.md +65 -0
  98. package/package/corpus/skills/cratis-chronicle-client-dotnet/references/client-construction.md +42 -0
  99. package/package/corpus/skills/cratis-chronicle-client-dotnet/references/compatibility-check.md +12 -0
  100. package/package/corpus/skills/cratis-chronicle-client-dotnet/references/discovery.md +43 -19
  101. package/package/corpus/skills/cratis-chronicle-client-dotnet/references/hosting.md +29 -1
  102. package/package/corpus/skills/cratis-chronicle-client-elixir/SKILL.md +158 -162
  103. package/package/corpus/skills/cratis-chronicle-client-elixir/references/append-api.md +36 -15
  104. package/package/corpus/skills/cratis-chronicle-client-elixir/references/compliance.md +32 -0
  105. package/package/corpus/skills/cratis-chronicle-client-elixir/references/connections.md +56 -0
  106. package/package/corpus/skills/cratis-chronicle-client-elixir/references/event-sources.md +64 -0
  107. package/package/corpus/skills/cratis-chronicle-client-elixir/references/pitfalls.md +25 -0
  108. package/package/corpus/skills/cratis-chronicle-client-elixir/references/projections.md +48 -0
  109. package/package/corpus/skills/cratis-chronicle-client-elixir/references/upgrading.md +34 -0
  110. package/package/corpus/skills/cratis-chronicle-client-elixir/references/variants.md +13 -5
  111. package/package/corpus/skills/cratis-chronicle-client-elixir/verification.json +23 -0
  112. package/package/corpus/skills/cratis-chronicle-client-go/SKILL.md +162 -0
  113. package/package/corpus/skills/cratis-chronicle-client-go/references/projections.md +73 -0
  114. package/package/corpus/skills/cratis-chronicle-client-kotlin/SKILL.md +87 -88
  115. package/package/corpus/skills/cratis-chronicle-client-kotlin/references/connection-lifecycle.md +13 -0
  116. package/package/corpus/skills/cratis-chronicle-client-kotlin/references/discovery-and-registration.md +14 -4
  117. package/package/corpus/skills/cratis-chronicle-client-kotlin/references/event-sources.md +65 -0
  118. package/package/corpus/skills/cratis-chronicle-client-kotlin/references/options.md +29 -0
  119. package/package/corpus/skills/cratis-chronicle-client-kotlin/references/spring-boot.md +13 -0
  120. package/package/corpus/skills/cratis-chronicle-client-kotlin/references/variants.md +5 -4
  121. package/package/corpus/skills/cratis-chronicle-client-typescript/SKILL.md +165 -156
  122. package/package/corpus/skills/cratis-chronicle-client-typescript/references/read-models-and-projections.md +54 -11
  123. package/package/corpus/skills/cratis-chronicle-client-typescript/references/testing.md +126 -0
  124. package/package/corpus/skills/cratis-chronicle-client-typescript/references/variants.md +3 -5
  125. package/package/corpus/skills/cratis-chronicle-client-typescript/verification.json +19 -0
  126. package/package/corpus/skills/cratis-chronicle-compliance/SKILL.md +36 -13
  127. package/package/corpus/skills/cratis-chronicle-decision-reads/SKILL.md +110 -0
  128. package/package/corpus/skills/cratis-chronicle-decision-reads/references/admission-and-ownership.md +57 -0
  129. package/package/corpus/skills/cratis-chronicle-decision-reads/verification.json +12 -0
  130. package/package/corpus/skills/cratis-chronicle-event-constraints/SKILL.md +58 -19
  131. package/package/corpus/skills/cratis-chronicle-event-constraints/references/closing-streams.md +73 -0
  132. package/package/corpus/skills/cratis-chronicle-event-modeling/SKILL.md +32 -3
  133. package/package/corpus/skills/cratis-chronicle-event-specifications/SKILL.md +18 -5
  134. package/package/corpus/skills/cratis-chronicle-event-type-migration/SKILL.md +32 -2
  135. package/package/corpus/skills/cratis-chronicle-hosting/SKILL.md +134 -0
  136. package/package/corpus/skills/cratis-chronicle-hosting/references/operations.md +89 -0
  137. package/package/corpus/skills/cratis-chronicle-hosting/verification.json +14 -0
  138. package/package/corpus/skills/cratis-chronicle-mcp-inspection/SKILL.md +93 -66
  139. package/package/corpus/skills/cratis-chronicle-mcp-inspection/references/blocked-tools.md +21 -7
  140. package/package/corpus/skills/cratis-chronicle-mcp-inspection/references/deployment.md +77 -0
  141. package/package/corpus/skills/cratis-chronicle-mcp-inspection/references/observational-tools.md +46 -4
  142. package/package/corpus/skills/cratis-chronicle-multi-tenancy/SKILL.md +15 -1
  143. package/package/corpus/skills/cratis-chronicle-projection/SKILL.md +44 -10
  144. package/package/corpus/skills/cratis-chronicle-projection/references/fluent-builder.md +7 -1
  145. package/package/corpus/skills/cratis-chronicle-projection/references/model-bound-attributes.md +8 -0
  146. package/package/corpus/skills/cratis-chronicle-reactor/SKILL.md +85 -105
  147. package/package/corpus/skills/cratis-chronicle-reactor/references/specifications.md +20 -1
  148. package/package/corpus/skills/cratis-chronicle-read-model/SKILL.md +2 -2
  149. package/package/corpus/skills/cratis-chronicle-read-model/references/queries.md +35 -16
  150. package/package/corpus/skills/cratis-chronicle-read-model-specifications/SKILL.md +15 -3
  151. package/package/corpus/skills/cratis-chronicle-reducer/SKILL.md +23 -4
  152. package/package/corpus/skills/cratis-chronicle-web-workbench/SKILL.md +40 -15
  153. package/package/corpus/skills/cratis-cli-terminal-workbench/SKILL.md +20 -6
  154. package/package/corpus/skills/cratis-code-review/SKILL.md +25 -3
  155. package/package/corpus/skills/cratis-components-accessibility/SKILL.md +20 -4
  156. package/package/corpus/skills/cratis-components-schema-editor/SKILL.md +40 -28
  157. package/package/corpus/skills/cratis-components-schema-editor/references/tree-layout.md +62 -0
  158. package/package/corpus/skills/cratis-components-schema-editor/verification.json +14 -0
  159. package/package/corpus/skills/cratis-components-stepper-command-dialog/SKILL.md +16 -8
  160. package/package/corpus/skills/cratis-components-styling/SKILL.md +57 -20
  161. package/package/corpus/skills/cratis-components-styling/verification.json +13 -0
  162. package/package/corpus/skills/cratis-components-toolbar/SKILL.md +37 -7
  163. package/package/corpus/skills/cratis-components-toolbar/verification.json +12 -0
  164. package/package/corpus/skills/cratis-engineering-csharp-conventions/SKILL.md +6 -0
  165. package/package/corpus/skills/cratis-engineering-csharp-conventions/references/exceptions-logging-and-di.md +5 -3
  166. package/package/corpus/skills/cratis-fundamentals-concept/SKILL.md +19 -6
  167. package/package/corpus/skills/cratis-fundamentals-concept/references/typescript-concepts.md +97 -0
  168. package/package/corpus/skills/cratis-fundamentals-concept/verification.json +4 -1
  169. package/package/corpus/skills/cratis-fundamentals-concept-go/SKILL.md +112 -0
  170. package/package/corpus/skills/cratis-fundamentals-type-discovery/SKILL.md +54 -17
  171. package/package/corpus/skills/cratis-fundamentals-type-discovery/verification.json +14 -0
  172. package/package/corpus/skills/cratis-lens-browser-extension/SKILL.md +55 -28
  173. package/package/corpus/skills/cratis-performance-review/SKILL.md +5 -2
  174. package/package/corpus/skills/cratis-release-notes/SKILL.md +3 -1
  175. package/package/corpus/skills/cratis-screenplay-automations-and-translations/SKILL.md +5 -4
  176. package/package/corpus/skills/cratis-screenplay-command-surface/SKILL.md +7 -11
  177. package/package/corpus/skills/cratis-screenplay-command-surface/references/compliance.md +26 -6
  178. package/package/corpus/skills/cratis-screenplay-command-surface/references/enum-numbers.md +4 -2
  179. package/package/corpus/skills/cratis-screenplay-command-surface/references/generated-values-and-responses.md +4 -1
  180. package/package/corpus/skills/cratis-screenplay-command-surface/verification.json +7 -1
  181. package/package/corpus/skills/cratis-screenplay-event-modeling/SKILL.md +3 -2
  182. package/package/corpus/skills/cratis-screenplay-event-modeling/references/parsed-not-runnable.md +6 -2
  183. package/package/corpus/skills/cratis-screenplay-legacy-extraction/SKILL.md +1 -0
  184. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/generate-notes.md +34 -4
  185. package/package/corpus/skills/cratis-screenplay-model-authoring/SKILL.md +17 -24
  186. package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md +1 -1
  187. package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-loop.md +19 -2
  188. package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-tools.md +11 -3
  189. package/package/corpus/skills/cratis-screenplay-model-authoring/references/property-links.md +90 -4
  190. package/package/corpus/skills/cratis-screenplay-model-authoring/verification.json +19 -2
  191. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/gap-fill-handoff.md +3 -1
  192. package/package/corpus/skills/cratis-screenplay-scenario-coverage/SKILL.md +3 -1
  193. package/package/corpus/skills/cratis-screenplay-specifications/references/examples-and-routes.md +48 -0
  194. package/package/corpus/skills/cratis-screenplay-specifications/verification.json +3 -1
  195. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +4 -2
  196. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/streams-example.md +5 -4
  197. package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +8 -6
  198. package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet-example.md +8 -2
  199. package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostics.md +4 -2
  200. package/package/corpus/skills/cratis-screenplay-toolchain/references/doc-contradictions.md +7 -1
  201. package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-subset.md +24 -11
  202. package/package/corpus/skills/cratis-screenplay-toolchain/references/renderable-subset.md +10 -4
  203. package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.json +1543 -131
  204. package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.version +1 -1
  205. package/package/corpus/skills/cratis-screenplay-toolchain/references/verdicts.md +9 -3
  206. package/package/corpus/skills/cratis-screenplay-toolchain/references/versions.md +23 -7
  207. package/package/corpus/skills/cratis-screenplay-toolchain/verification.json +1 -1
  208. package/package/corpus/skills/cratis-screenplay-ui-composition/SKILL.md +2 -0
  209. package/package/corpus/skills/cratis-screenplay-ui-composition/references/screen-composition-contract.md +27 -9
  210. package/package/corpus/skills/cratis-security-review/SKILL.md +9 -3
  211. package/package/corpus/skills/cratis-security-review/references/arc-boundaries.md +59 -0
  212. package/package/corpus/skills/cratis-specification-by-example/SKILL.md +7 -0
  213. package/package/corpus/skills/cratis-specifications-csharp/SKILL.md +43 -11
  214. package/package/corpus/skills/cratis-specifications-csharp/references/application-scenarios.md +16 -4
  215. package/package/corpus/skills/cratis-specifications-csharp/references/csharp-patterns.md +18 -5
  216. package/package/corpus/skills/cratis-specifications-csharp/references/integration-specs.md +21 -0
  217. package/package/corpus/skills/cratis-specifications-csharp/references/shared-lifecycle.md +34 -0
  218. package/package/corpus/skills/cratis-specifications-csharp/verification.json +13 -0
  219. package/package/corpus/skills/cratis-specifications-typescript/SKILL.md +14 -5
  220. package/package/corpus/skills/cratis-specifications-typescript/verification.json +12 -0
  221. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/SKILL.md +8 -2
  222. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/admission.md +6 -3
  223. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/rendered-application.md +10 -1
  224. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/scene-runtime.md +75 -0
  225. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/verification.json +5 -0
  226. package/package/corpus/skills/cratis-studio-mcp-safety-guidance/SKILL.md +14 -1
  227. package/package/profile-catalog.json +68 -1
  228. package/package.json +1 -1
  229. package/src/index.ts +3 -1
@@ -18,7 +18,7 @@ removing one becomes a single-file change.
18
18
 
19
19
  | Package | Version | Purpose |
20
20
  | --- | --- | --- |
21
- | `Cratis.Fundamentals` | `7.19.2` | `IInstancesOf<T>`, `IImplementationsOf<T>`, `[Singleton]`, `[Scoped]`, `[IgnoreConvention]`, the convention bindings |
21
+ | `Cratis.Fundamentals` | `7.23.0` | `IInstancesOf<T>`, `IImplementationsOf<T>`, `ITypes`, convention bindings and the bundled `Cratis.Fundamentals.TypeDiscovery.Generator` |
22
22
 
23
23
  Reverify against the Cratis Fundamentals repository before claiming support for
24
24
  another version.
@@ -47,15 +47,31 @@ registered implementation:
47
47
 
48
48
  ## Step 1 — Confirm the implementations are discoverable
49
49
 
50
- `IInstancesOf<T>` finds types by convention across the loaded assemblies. The
51
- requirements are only:
52
-
53
- - Each implementation is a non-abstract, non-interface class. Discovery reads each assembly's `DefinedTypes` and filters only on `!IsInterface && !IsAbstract`, so an `internal` class is discovered too; `public` is a convention for a type meant to be reached from another assembly, not a discovery requirement. Instances are resolved from the service provider (`GetService(type)`), so each implementation must be registered as itself — `AddSelfBindings()` does that for every concrete, non-static, non-`Exception` class whose constructor is resolvable (visibility is not a criterion), honoring `[Singleton]`/`[Scoped]`/`[IgnoreConvention]`.
54
- - It implements the interface directly, not through a layer that hides it.
55
- - `T` is an interface or abstract class — the interface is declared
56
- `where T : class`.
57
-
58
- No assembly attribute and no registration call is needed.
50
+ Discovery normally uses compile-time generated providers, not a walk of
51
+ `DefinedTypes`. Reflection is the fallback when no generated providers exist.
52
+
53
+ - Use concrete, non-generic implementations. Generated contract maps exclude
54
+ open-generic implementors. An assembly's own provider can include its internal
55
+ types; references emitted from another assembly require public types.
56
+ - `T` is an interface or abstract class (`where T : class`).
57
+ - Instances resolve by concrete type, so each implementation needs a self-binding.
58
+ `AddSelfBindings()` honors `[Singleton]`, `[Scoped]`, and `[IgnoreConvention]`;
59
+ it excludes static/abstract/interface/exception types, System/Microsoft
60
+ namespaces, and classes with primitive or record-typed constructor parameters.
61
+ `IFoo → Foo` bindings require matching names in the same namespace and exactly
62
+ one implementation; they do not replace self-bindings for a discovered set.
63
+
64
+ The host must call `services.AddTypeDiscovery()` to register `ITypes`,
65
+ `IInstancesOf<>`, and `IImplementationsOf<>`, plus the convention binding setup.
66
+ Arc's `AddCratisArc` does this (verified at Arc v22.75.0); a plain host must do it.
67
+ No per-implementation registration is needed when self-binding applies.
68
+
69
+ The Fundamentals NuGet package carries the generator as an analyzer. A project
70
+ reference does **not** carry it: reference the generator explicitly, otherwise
71
+ only Fundamentals' own provider may contribute. A captured `ITypes` universe
72
+ never gains late-loaded assemblies. `AddTypeDiscovery()` reuses the default
73
+ universe while the provider set is unchanged; a later call rebuilds it if new
74
+ providers registered, without changing earlier consumers.
59
75
 
60
76
  ## Step 2 — Choose the lifetime with an attribute
61
77
 
@@ -106,10 +122,14 @@ public class ReportFormatters(IInstancesOf<IReportFormatter> formatters) : IRepo
106
122
 
107
123
  `IInstancesOf<T>` implements `IEnumerable<T>`, so LINQ works on it directly.
108
124
 
109
- **It resolves an instance from the service provider on every enumeration**, not
110
- once at construction. That is what makes a scoped or transient implementation
111
- behave correctly, and it is why materializing with `.ToArray()` is worth doing
112
- only when you genuinely need a stable snapshot within one operation.
125
+ **The type set is fixed at construction; instances resolve on every enumeration**
126
+ through the service provider captured by `InstancesOf<T>`. The consumer's scope
127
+ therefore matters: the singleton above is safe only when no implementation is
128
+ scoped. A singleton captures the root provider and would make a scoped
129
+ implementation captive or fail scope validation. Use a scoped or transient
130
+ consumer resolved inside a scope when any implementation is scoped; follow the
131
+ lifetime rule in `csharp.md`. Materialize with `.ToArray()` only when one operation
132
+ needs a stable instance snapshot.
113
133
 
114
134
  ## Step 4 — Delete the dead registrations
115
135
 
@@ -130,9 +150,21 @@ relying on a registration for a different reason.
130
150
 
131
151
  - **`[Singleton]` does not resolve.** The using directive is
132
152
  `Cratis.DependencyInjection`, not `Cratis`.
133
- - **An implementation is silently absent from the set.** Its assembly is not
134
- loaded at the point of enumeration, it is not `public`, it is abstract, or it
135
- carries `[IgnoreConvention]`.
153
+ - **An implementation is silently absent from the set.** Its assembly did not
154
+ contribute a generated provider before the universe was built, or its type is
155
+ abstract, generic, or inaccessible to the emitted provider. Inspect
156
+ `ITypes.DiscoveryMode` (`Unknown`, `Generated`, `Reflected`, or `Explicit`) and
157
+ `ITypes.Assemblies`; ask `TypeDiscoveryDiagnostics.FindMissingContributors(types)`
158
+ for referenced assembly names that did not contribute (it loads nothing and
159
+ may also report libraries with no discoverable types). The reflection fallback
160
+ includes package assemblies by prefix: `Cratis` by default, configurable through
161
+ `PackageReferencedAssemblies.Instance.AddAssemblyPrefixesToInclude(...)` before
162
+ discovery.
163
+ - **Discovery dependencies cannot resolve.** The plain host omitted
164
+ `services.AddTypeDiscovery()`.
165
+ - **Enumeration yields null.** The concrete type was discovered but not registered
166
+ as itself, for example because `[IgnoreConvention]` or a self-binding exclusion
167
+ skipped it. `InstancesOf<T>` uses `GetService(type)`, not `GetRequiredService`.
136
168
  - **An implementation is a new instance every time it is touched.** It has no
137
169
  lifetime attribute, so the convention made it transient. That is correct
138
170
  behavior for the convention and usually the wrong intent — add `[Singleton]`.
@@ -150,3 +182,8 @@ the affected behavior. The non-vacuity check matters here: assert the **count**
150
182
  of discovered implementations, not just that iterating them threw nothing. A
151
183
  fan-out over an empty set passes every assertion that only says "nothing went
152
184
  wrong".
185
+
186
+ Assert the expected `ITypes.DiscoveryMode` and contributing assembly names too.
187
+ For startup diagnostics, collect EventSource `Cratis.Fundamentals.TypeDiscovery`
188
+ with `dotnet-trace`: it reports universe construction and warns when only
189
+ Fundamentals contributed.
@@ -0,0 +1,14 @@
1
+ {
2
+ "skill": "cratis-fundamentals-type-discovery",
3
+ "input": "Wire a discovered set of implementations and diagnose missing types or incorrect scopes.",
4
+ "fixtures": [],
5
+ "assertions": [
6
+ { "kind": "skill-contains", "value": "concrete, non-generic implementations" },
7
+ { "kind": "skill-contains", "value": "services.AddTypeDiscovery()" },
8
+ { "kind": "skill-contains", "value": "TypeDiscoveryDiagnostics.FindMissingContributors(types)" },
9
+ { "kind": "skill-contains", "value": "type set is fixed at construction" },
10
+ { "kind": "skill-contains", "value": "singleton captures the root provider" },
11
+ { "kind": "skill-contains", "value": "Enumeration yields null" },
12
+ { "kind": "skill-contains", "value": "a later call rebuilds it" }
13
+ ]
14
+ }
@@ -19,10 +19,15 @@ the developer points it at. Nothing in it is production tooling.
19
19
 
20
20
  | Source | Version | Purpose |
21
21
  | --- | --- | --- |
22
- | `Cratis/Lens` `Source/` | manifest `1.0.0`, repository `HEAD` `3ee4882` (the repo has no release tag beyond `v0.0.1`) | The extension itself |
23
- | `Cratis.Arc.Core` | `22.16.0` | The `/.cratis/*` endpoints, the forwarded-identity contract, and the tenancy header Lens depends on |
22
+ | `Cratis/Lens` `Source/` | `v0.0.1`, manifest `1.0.0` | The extension itself; no newer release |
23
+ | `Cratis.Arc.Core` | `22.75.0` | The `/.cratis/*` endpoints, the forwarded-identity contract, and the tenancy header Lens depends on |
24
24
 
25
- > Re-verified at the versions above by **symbol and signature**: every type, attribute and member this skill names exists at that tag, and the public surface it describes is unchanged since the previous verification (Chronicle 16.45.x / Arc 22.10.4 — the Chronicle 16→18 client diff is converters, options and doc comments; no type was removed or renamed). Behavior claims were verified at the earlier tag unless a section says otherwise.
25
+ Behavior was read at Lens `v0.0.1` and `main`; the Source diff is metadata/build
26
+ packaging only. The release predates the previously verified `3ee4882` commit.
27
+ Arc evidence: [ArcOptions.cs:61–80](https://github.com/Cratis/Arc/blob/v22.75.0/Source/DotNET/Arc.Core/ArcOptions.cs#L61-L80),
28
+ [MicrosoftIdentityPlatformAuthenticationHandler.cs:28–40](https://github.com/Cratis/Arc/blob/v22.75.0/Source/DotNET/Arc.Core/Identity/MicrosoftIdentityPlatformAuthenticationHandler.cs#L28-L40),
29
+ [IntrospectionOptions.cs](https://github.com/Cratis/Arc/blob/v22.75.0/Source/DotNET/Arc.Core/Introspection/IntrospectionOptions.cs)
30
+ and [DiscoveryExposure.cs:102–138](https://github.com/Cratis/Arc/blob/v22.75.0/Source/DotNET/Arc.Core/Introspection/DiscoveryExposure.cs#L102-L138).
26
31
 
27
32
  ⚠️ **There is no published store listing.** Nothing in the Lens repository links
28
33
  a Chrome Web Store, Edge Add-ons, AMO, or App Store entry — the only store URLs
@@ -60,6 +65,10 @@ Developer Tools", which is stale.
60
65
  Chrome after each rebuild. `yarn ci` runs `typecheck`, `test` and `build` — the
61
66
  same three the pull-request workflow runs. There is no lint script.
62
67
 
68
+ On `main`, `yarn build-package` runs `scripts/build-package.js` and writes zip
69
+ packages into repo-root `dist/`; the manifest description changed, but the name
70
+ is still **Cratis Lens**. At `v0.0.1` the script instead zips to `lens-extension.zip`.
71
+
63
72
  The code uses the `chrome.*` namespace throughout with no polyfill. The release
64
73
  workflow also packages for Edge, Firefox and Safari, but no cross-browser
65
74
  behavior is tested; treat Chromium as the supported target.
@@ -67,34 +76,46 @@ behavior is tested; treat Chromium as the supported target.
67
76
  ## What the Arc application must already provide
68
77
 
69
78
  Lens is not self-contained. It reads endpoints Arc maps for itself, and it sends
70
- headers Arc's shipped identity handler already reads. **No NuGet package,
71
- middleware, `Program.cs` change, or configuration key exists for "Lens support"
72
- — nothing in either repository names one.**
79
+ headers Arc's shipped identity handler reads only after host opt-in. There is no
80
+ Lens-specific package or middleware. For local impersonation, the development
81
+ host must set `Cratis:Arc:TrustForwardedIdentityHeaders=true` (default **false**).
82
+ Never enable this on an exposed application without a trusted ingress that
83
+ strips client-supplied identity headers.
73
84
 
74
85
  | Route | Mapped by | Lens uses it for |
75
86
  | --- | --- | --- |
76
- | `GET /.cratis/commands` | `MapIntrospectionEndpoints`, `AllowAnonymous` | The Commands tree |
77
- | `GET /.cratis/queries` | `MapIntrospectionEndpoints`, `AllowAnonymous` | The Queries tree |
78
- | `GET /.cratis/users` | every `ICanProvideUsers`, `AllowAnonymous` | The importable user roster |
79
- | `GET /.cratis/tenants` | every `ICanProvideTenants`, `AllowAnonymous` | The importable tenant list |
87
+ | `GET /.cratis/commands` | `MapIntrospectionEndpoints`, discovery access policy | The Commands tree |
88
+ | `GET /.cratis/queries` | `MapIntrospectionEndpoints`, discovery access policy | The Queries tree |
89
+ | `GET /.cratis/users` | every `ICanProvideUsers`, identity discovery policy | The importable user roster |
90
+ | `GET /.cratis/tenants` | every `ICanProvideTenants`, identity discovery policy | The importable tenant list |
80
91
  | `GET /.cratis/identity-details/schema` | the identity endpoint mapper | The schema-driven editor for a user's `identityDetails` |
81
92
 
82
- `MapIntrospectionEndpoints` is called from Arc's own application startup, so the
83
- two introspection routes exist without being asked for. The user and tenant
93
+ At Arc v22.75.0 discovery is anonymous by default **only in Development**.
94
+ Against a deployed host Lens needs the user signed in; hosts unable to authenticate
95
+ omit those routes (404). `Introspection.Enabled` controls catalogs and
96
+ `IdentityDiscovery` the roster/tenant/schema routes. Forwarded identity switching
97
+ also needs the explicit host-wide `TrustForwardedIdentityHeaders` opt-in, only
98
+ behind a header-stripping ingress. Source:
99
+ [secure defaults](https://github.com/Cratis/Arc/blob/v22.75.0/Documentation/upgrading/secure-defaults.mdx).
100
+ `MapIntrospectionEndpoints` runs during Arc activation, subject to these settings. The user and tenant
84
101
  routes return whatever the application implements — with **no implementation
85
102
  registered they return an empty list**, and Lens treats a `404` on either as
86
103
  "empty", not "broken". Users and tenants can also be created by hand in Lens's
87
104
  Settings, so an application that provides neither still works.
88
105
 
89
- ⚠️ `/.cratis/users` and `/.cratis/tenants` are mapped `AllowAnonymous` and
90
- **unconditionally**. Register `ICanProvideUsers`/`ICanProvideTenants` only for a
91
- development environment and return fixtures — see
92
- `cratis-arc-authentication-authorization-and-identity`.
106
+ At Arc `22.75.0`, all five discovery routes are anonymous by default only in
107
+ **Development**. Elsewhere they require authentication, or are not mapped when
108
+ the host cannot enforce it. `Cratis:Arc:Introspection` options `Enabled` and
109
+ `IdentityDiscovery` control mapping; `RequireAuthentication` and `Roles` control
110
+ access. Register development user/tenant providers with fixtures, not production
111
+ rosters — see `cratis-arc-authentication-authorization-and-identity`.
93
112
 
94
113
  ### Identity
95
114
 
96
- Lens sends exactly the three forwarded client-principal headers Arc's shipped
97
- handler reads:
115
+ Lens sends exactly three forwarded client-principal headers. Arc ignores them
116
+ and treats the request as anonymous unless
117
+ `Cratis:Arc:TrustForwardedIdentityHeaders=true`; a default Arc app therefore
118
+ does not honor Lens identity switching:
98
119
 
99
120
  ```text
100
121
  X-MS-CLIENT-PRINCIPAL-ID
@@ -157,10 +178,11 @@ Pick both on the **Context** tab. Two things then happen, in this order:
157
178
  2. It deletes the Arc identity cookie `.cratis-identity` on the detected base URL
158
179
  and page origins, then reloads every open tab on those origins.
159
180
 
160
- Step 2 is the one that matters. Headers alone do not change who you are once Arc
161
- has issued its identity cookie; the application keeps presenting the identity it
162
- was first given. Dropping the cookie and reloading is what makes the switch take
163
- effect.
181
+ At Arc v22.75.0 the backend neither reads nor writes that legacy identity
182
+ cookie. Lens still deletes it for older hosts; reloading clears the frontend's
183
+ in-memory identity and asks `/.cratis/me` again. Header-based switching requires
184
+ the host-wide trust opt-in and a suitable development/ingress boundary; the
185
+ extension cannot turn unsigned headers into authenticated credentials.
164
186
 
165
187
  The rules are scoped, deliberately. When a page origin is known the condition is
166
188
  `{ urlFilter: '*', initiatorDomains: [<page host>] }`; otherwise it is
@@ -184,7 +206,7 @@ query is always `GET`, with `{name}` segments in the route substituted from the
184
206
  path-parameter inputs and the same context headers.
185
207
 
186
208
  ⚠️ **The schema-driven payload form does not receive a schema from
187
- Arc `22.16.0`.** Lens reads an optional property named `schema` off each introspection
209
+ Arc `22.75.0`.** Lens reads an optional property named `schema` off each introspection
188
210
  item, and falls back to trying `/.cratis/types/{type}`, `/.cratis/schema/{type}`,
189
211
  `/.cratis/schemas/{type}` and `/.cratis/types?type={type}` in turn. Arc names the
190
212
  property **`payloadSchema`** on a command and **`argumentsSchema`** on a query,
@@ -206,9 +228,12 @@ unwrapped from the first of `data`, `result`, `items`, `results`, `value`,
206
228
 
207
229
  ⚠️ **The two introspection fetches send no headers and no credentials**, while
208
230
  the Settings user/tenant refresh does send both. So an application that puts
209
- authorization in front of `/.cratis/commands` breaks the Commands and Queries
210
- tabs while Settings keeps working — which reads as a mysterious partial failure.
211
- Leave those two routes anonymous.
231
+ authentication in front of `/.cratis/commands` and `/.cratis/queries` breaks
232
+ those tabs while Settings may keep working. This is the default outside
233
+ Development at Arc `22.75.0`. Run the app in **Development**, or knowingly set
234
+ `Cratis:Arc:Introspection:RequireAuthentication=false` on an isolated development
235
+ host; do not weaken production discovery for Lens.
236
+ Evidence: [Lens introspection.ts:100–131](https://github.com/Cratis/Lens/blob/v0.0.1/Source/arc/introspection.ts#L100-L131).
212
237
 
213
238
  Queries are path-parameter GETs only: no query-string arguments, no paging or
214
239
  sorting inputs, and no observable subscription from the popup.
@@ -222,8 +247,10 @@ it does not, the panel reports no data. Nothing else in Lens depends on it.
222
247
  ## Verify
223
248
 
224
249
  - `yarn ci` is clean, and Chrome loaded `Source/dist` without errors.
225
- - The application answers `/.cratis/commands` and `/.cratis/queries`
226
- anonymously.
250
+ - The development application answers `/.cratis/commands` and `/.cratis/queries`
251
+ anonymously under its deliberate discovery exposure policy.
252
+ - The isolated development host enables `Cratis:Arc:TrustForwardedIdentityHeaders`;
253
+ without it, Lens's forwarded identity remains anonymous.
227
254
  - Tenancy resolves from the header and the header is named
228
255
  `x-cratis-tenant-id`.
229
256
  - Opening the popup on the app's tab enables the Commands tab — that is the
@@ -21,10 +21,13 @@ storage and replay cost that never goes away.
21
21
  | Package | Version | Purpose |
22
22
  | --- | --- | --- |
23
23
  | `Cratis.Chronicle` | `18.3.0` | Observers, projections, reducers, reactors, replay |
24
- | `Cratis.Arc.Core` | `22.16.0` | Query return shapes and server-side paging |
24
+ | `Cratis.Arc.Core` | `22.75.0` | Query return shapes and server-side paging |
25
25
  | `@cratis/components` | `4.26.2` | `DataTable` paging surface |
26
26
 
27
- > Re-verified at the versions above by **symbol and signature**: every type, attribute and member this skill names exists at that tag, and the public surface it describes is unchanged since the previous verification (Chronicle 16.45.x / Arc 22.10.4 — the Chronicle 16→18 client diff is converters, options and doc comments; no type was removed or renamed). Behavior claims were verified at the earlier tag unless a section says otherwise.
27
+ > Arc query/paging surface rechecked at v22.75.0; Arc depends on Chronicle
28
+ > 19.39.1. Separate Chronicle verification remains version-qualified. Paged
29
+ > MongoDB observations now re-read page and total on each change; see the
30
+ > read-model query reference for the distinction from unpaged retained sets.
28
31
 
29
32
  Reverify against the owning product repository before asserting a framework
30
33
  behavior this file does not already state.
@@ -53,7 +53,9 @@ one to add weight.
53
53
  `(part of #n)` for anything that stays open (in repositories released by
54
54
  `cratis/release-action`, `(#n)` is what closes the issue), never `Closes`, `Fixes` or
55
55
  `Refs` before a number (also in bold or a link), and no issue reference
56
- inside an HTML comment, which still closes the issue; and absolute
56
+ inside an HTML comment (release-action removes comments before publishing,
57
+ so the issue is silently not closed; a body that is only a comment counts as
58
+ empty and GitHub generates the notes); and absolute
57
59
  `https://` links only. Sections are in
58
60
  a fixed order (Added, Changed, Fixed, Removed, Security, Deprecated); within
59
61
  a section, put changes requiring action first, then new capabilities and
@@ -58,8 +58,9 @@ sends again.
58
58
  - A reaction cascade is not one transaction: earlier accepted facts stay when a later invoked
59
59
  command rejects (Screenplay `reactions.md`). Design each step to be retried on its own.
60
60
  - Replay and recovery redelivery are different. Chronicle `[OnceOnly]` skips replays (rewind,
61
- redaction, revision) only; a recovered failed partition redelivers the event as a normal
62
- observation. A receipt keyed by `ReactorDelivery.Id` identifies the retry. Name both.
61
+ redaction, revision) only, not ordinary catch-up, repeated same-source events or crash
62
+ redelivery. Recovery runs the handler normally. It is not a per-source run limit or
63
+ deduplication. A receipt keyed by `ReactorDelivery.Id` identifies the retry. Name both.
63
64
 
64
65
  ## Capture data-protection traps
65
66
  A field left out of `map` still passes through the capture's working record: omission is not
@@ -73,7 +74,7 @@ even when it blocks binding. Never record bearer tokens, magic links or signed U
73
74
  ## Verified product sources
74
75
  Current pins: toolchain `references/versions.md`. Language claims were re-read at Screenplay v4.139.0,
75
76
  renderer claims at Stage v4.73.1 (no Automation, Translate, reaction or capture: `STAGE-ESM-024`), the
76
- runtime facts at Arc v22.72.0 and Chronicle v19.50.0. Older reads kept as history:
77
+ runtime facts at Arc v22.72.0 and Chronicle v19.50.1. Older reads kept as history:
77
78
 
78
79
  | Package | Version | Used for |
79
80
  | --- | --- | --- |
@@ -81,7 +82,7 @@ runtime facts at Arc v22.72.0 and Chronicle v19.50.0. Older reads kept as histor
81
82
  | cratis CLI | v3.28.3 | bundled Screenplay 4.66.0 and Stage 4.24.2 (before 3.28.2: 4.60.1, which gave PLAY0268 on v6 constructs and a false PLAY0285 on cascades, cli#242) |
82
83
  | Stage | v4.24.2 | admitted ESM v1 to v4; rendered no Automation or Translate slice |
83
84
  | Arc | v22.72.0 (read; v22.50.5 earlier) | `ExecuteCommandsAsSystemAttribute` (since v20.56.0); mixed events-and-commands reactor returns (since v22.72.0) |
84
- | Chronicle | v19.50.0 (read; v19.32.0 earlier) | `OnceOnlyAttribute`, `ReactorDelivery` and `Documentation/reactors/delivery-identity.mdx` |
85
+ | Chronicle | v19.50.1 (read; v19.32.0 earlier) | `OnceOnlyAttribute`, `ReactorDelivery`, `Documentation/code-analysis/CHR0022.mdx` and `Documentation/reactors/delivery-identity.mdx` |
85
86
 
86
87
  Read `references/versions.md` in `cratis-screenplay-toolchain` when selecting a tool or checking the full version and capability pins. Reverify before claiming
87
88
  another version behaves the same.
@@ -26,14 +26,13 @@ source is the single flow model.
26
26
 
27
27
  ## Verified product sources
28
28
 
29
- Current pins: toolchain `references/versions.md`; the claims here were read at 4.139.0 and at
30
- the older tags below (provenance). Compilation checks syntax and
31
- model consistency, not reference execution.
29
+ Pins: toolchain `references/versions.md`; sources below. Compilation is not execution.
32
30
 
33
31
  - `4.31.0`: original examples and executable boundaries; main `fd18129`: inline events, repairs, canonical `optional`.
34
32
  - `4.66.0` (`c89198b`): `handler`, code attachments, `persona` and compliance binding (`Semantics/SemanticModelBinder*.cs`, `Diagnostics/DiagnosticCodes.cs`).
35
33
  - `4.68.0` (`79801bf`): generated-value/response rule probes (ESM v7).
36
- - `4.127.0`: identity and compliance guidance (`identity.md`, `context.md`, `concepts.md`, `purposes.md`, `events.md`, `diagnostics.md`).
34
+ - `4.127.0`: identity and compliance syntax (`identity.md`, `context.md`, `concepts.md`, `purposes.md`, `events.md`, `diagnostics.md`).
35
+ - `4.141.0`: v13 compliance admission; rechecked at `4.142.0`: `references/compliance.md`.
37
36
 
38
37
  "Parses" and "runs" are different claims. The executable profile, and what
39
38
  each construct binds to, is in the `cratis-screenplay-model-authoring` language
@@ -58,13 +57,10 @@ concept InvoiceStatus : Enum
58
57
  The seven primitives are `Uuid`, `String`, `Int`, `Decimal`, `Bool`, `Date` and
59
58
  `DateTime`. `Enum` is **not** one of them — it is a separate concept kind, which
60
59
  is why the compiler says *expected … or Enum* rather than listing it among them.
61
- Use bare `pii` for personal data (`personal` is the same marker) and `secret`
62
- for operational secrets. **Compliance is inherited** from concepts, including
63
- nested uses. Either marker blocks executable binding with PLAY0268; keep the
64
- protection. `pii personal` is redundant and warns PLAY0653. Legacy `@pii`,
65
- `sensitive` and `@sensitive` remain accepted with PLAY0565 information and a repair.
66
- Read [compliance and purposes](references/compliance.md) for reasons, special/criminal
67
- qualifiers, secret scopes, provider mappings, purpose declarations and coverage checks.
60
+ Use bare `pii` (`personal` alias) and `secret` on concepts; **Compliance is inherited**.
61
+ Keep protection even when a compiler or renderer refuses it. Read
62
+ [compliance and purposes](references/compliance.md) for ESM v13, binder-only refusals,
63
+ consumer ceilings, marker repairs, reasons, scopes and provider limits.
68
64
 
69
65
  **Identifiers cannot be personal data or secrets.** PLAY0515 is a source error
70
66
  for command identifiers, typed `for` destinations, event-source identities,
@@ -10,8 +10,9 @@
10
10
  - Declare the use separately
11
11
  - Identify the person, not the stream
12
12
 
13
- Authority: Screenplay v4.127.0 `concepts.md`, `purposes.md`, `events.md` and
14
- `diagnostics.md`; decision 0041. These declarations do not establish lawful
13
+ Authority: Screenplay v4.142.0 `concepts.md`, `events.md`,
14
+ `Semantics/SemanticModelBinder.Compliance.cs` and `SemanticModelValidator.Compliance.cs`;
15
+ processing-purpose guidance retains v4.127.0 evidence; decisions 0041 and 0068. These declarations do not establish lawful
15
16
  processing or enforce retention. Check provider support separately.
16
17
 
17
18
  ## Classify the value on its concept
@@ -60,9 +61,26 @@ new event generation.
60
61
 
61
62
  C# provider mapping: `pii` → `[PII]`; `secret` → `[Encrypted]` + `[NotAudited]`;
62
63
  `pii secret` → `[PII]` only (Chronicle refuses `[PII]` with `[Encrypted]`, CHR0053).
63
- This mapping is not admission: either marker, including qualifiers and scopes,
64
- still blocks executable binding with PLAY0268. Subject lineage is a different
65
- role, described below.
64
+ Standalone Screenplay 4.142.0 binds optional concept `compliance` as ESM v13
65
+ (first released in 4.141.0), carrying markers, qualifiers and scopes. It applies
66
+ through command, event, read-model,
67
+ composite and response type references, including collection elements. Bare `pii`
68
+ writes `{"personal":{}}`; `secret scope namespace` writes
69
+ `{"secret":{"scope":"namespace"}}`. With both markers, personal protection
70
+ wins and no secret scope is stored; reasons stay report-only PLAY0270.
71
+ Unmarked models keep their exact executable bytes and revision. The reference
72
+ evaluator runs marked models with unchanged outcomes but tests neither encryption
73
+ nor erasure. Consumers must explicitly admit v13 and realize the protection;
74
+ CLI 3.53.1 bundles Screenplay 4.137.0, which refuses markers; standalone Stage
75
+ 4.76.0 admits only through v12 (Stage#345 tracks v13 admission). Never remove protection to fit either tool.
76
+
77
+ Enum and identity concepts still refuse PLAY0268 at binding only (identity means
78
+ event-source/stream identity); source validation alone cannot report this binder diagnostic.
79
+ It also refuses an event combining personal values or explicitly
80
+ `secret scope subject` values with an explicit event-property `subject` mark,
81
+ including nested composite and collection uses: subject lineage is not admitted.
82
+ In v13 the personal-data subject is the event source. Remove a mark only when that
83
+ source truly is the intended subject, not merely to pass binding.
66
84
 
67
85
  ## Recover classification from C# with Arc 22.70.0
68
86
 
@@ -83,7 +101,9 @@ none of SP0061 to SP0063, so the CLI shows none of them; check the generator pac
83
101
  Set `ScreenplayOptions.AuthoringOnlyConstructs = true` (CLI adapter flag
84
102
  `--authoring-only-constructs`) to state `secret scope namespace` or
85
103
  `secret scope global` in the concept body. Subject stays implicit. Scope
86
- is syntax-only: it raises no ESM version and grants no executable admission.
104
+ was syntax-only on this generator's compiler. With standalone 4.142.0,
105
+ protected concepts instead select ESM v13; this does not upgrade the generator
106
+ or the CLI bundle.
87
107
  `pii secret` gets no scope because the providers ignore it.
88
108
  - A property or positional constructor parameter marked `[PII]` on a non-concept
89
109
  type reports SP0062 (Information); the marking is not stated and no concept
@@ -83,11 +83,13 @@ names; numbers are neither alternative fixture values nor flags.
83
83
  Consumers must **explicitly admit v12**. CLI 3.53.1 and Stage 4.73.1 both bundle
84
84
  Screenplay 4.137.0: `cratis render`/Stage do not admit v12 yet. A model with
85
85
  non-positional numbers compiles and binds with standalone Screenplay >= 4.139.0,
86
- but does not render through that CLI. Do not remove its pins to pass rendering;
86
+ but does not render through that CLI. Standalone Stage 4.76.0 is the first Stage that admits v12 and
87
+ renders explicit numbers as `Member = N` (sparse and negative, `-0` as 0; unnumbered enums keep declaration
88
+ order), but no cli release bundles it yet. Do not remove its pins to pass rendering;
87
89
  report the consumer gap. See toolchain `references/versions.md`.
88
90
 
89
91
  Sources checked at `v4.139.0`: `Documentation/screenplay/concepts.md`,
90
92
  `interoperability.md`, `diagnostics.md`, `mcp/authoring-tools.md`, decision 0065,
91
93
  `Semantics/Versions.cs`, `SemanticModelValidator.EnumMemberNumbers.cs` and the
92
94
  source-backed `EnumMemberNumbersCorpus.V12` (under `Source/DotNET/`). Consumer
93
- pins: CLI `v3.53.1:Directory.Packages.props`, Stage `v4.73.1:Directory.Packages.props`.
95
+ pins: CLI `v3.53.1:Directory.Packages.props`, Stage `v4.73.1:Directory.Packages.props`; Stage `v4.76.0` release notes (#296).
@@ -4,7 +4,10 @@ A `generated` command property and `returns` response bind and reference-execute
4
4
  as ESM v7 (checked at 4.68.0). Current pins:
5
5
  `cratis-screenplay-toolchain/references/versions.md`. CLI#261 is closed: CLI now admits v7
6
6
  to Stage planning, and the 4.137.0 compiler in CLI 3.53.1 binds it. Stage 4.73.1 still refuses
7
- generated values and responses with STAGE-ESM-028/029 (Stage#175), as the historical CLI 3.41.0 corpus did. Do not turn this into a blanket compiler
7
+ generated values and responses with STAGE-ESM-028/029 (Stage#175), as the historical CLI 3.41.0 corpus did.
8
+ Standalone Stage 4.74.0 and later render server-generated UUID-concept values and scalar or named
9
+ responses (read at `v4.76.0`), but no cli release bundles them yet, so `cratis render` through cli 3.53.1 still
10
+ refuses. Screenplay 4.139.0 has only `generated` / `generated identifier`; no `generate` strategy form exists. Do not turn this into a blanket compiler
8
11
  refusal or promise a render from binding alone. Preserve the contract for gap-fill
9
12
  where admission refuses. Historical rules below were read at 4.68.0. Complete compiled example:
10
13
  `cratis-screenplay-toolchain` `references/generated-responses-example.md`.
@@ -4,7 +4,13 @@
4
4
  "fixtures": [],
5
5
  "assertions": [
6
6
  { "kind": "play-compiles" },
7
- { "kind": "skill-contains", "value": "PLAY0653" },
7
+ { "kind": "skill-contains", "value": "optional concept `compliance` as ESM v13", "file": "references/compliance.md" },
8
+ { "kind": "skill-contains", "value": "PLAY0268 at binding only", "file": "references/compliance.md" },
9
+ { "kind": "skill-contains", "value": "reasons stay report-only PLAY0270", "file": "references/compliance.md" },
10
+ { "kind": "skill-contains", "value": "Stage#345", "file": "references/compliance.md" },
11
+ { "kind": "skill-contains", "value": "CLI 3.53.1 bundles Screenplay 4.137.0", "file": "references/compliance.md" },
12
+ { "kind": "skill-contains", "value": "Enum and identity", "file": "references/compliance.md" },
13
+ { "kind": "skill-contains", "value": "PLAY0653", "file": "references/compliance.md" },
8
14
  { "kind": "skill-contains", "value": "personal` is an alias of `pii", "file": "references/compliance.md" },
9
15
  { "kind": "skill-contains", "value": "report-only (PLAY0270)", "file": "references/compliance.md" },
10
16
  { "kind": "skill-contains", "value": "--check purposes", "file": "references/compliance.md" },
@@ -135,8 +135,9 @@ What binds depends on **which tool** you ask, so name the tool and its version:
135
135
  protected against stale state. A reaction trigger's `reads` that only `invokes` is
136
136
  report-only intent (`PLAY0270`); one that `produces` directly fails binding (`PLAY0268`).
137
137
  - `persona` declarations are report-only and never block; bare `pii` and `secret`
138
- concepts do block binding (`PLAY0268`). Keep them anyway: the classification is
139
- part of the model. Report the block.
138
+ concepts bind as ESM v13 on standalone 4.142.0 (since 4.141.0), but still block the pinned CLI.
139
+ Enum/identity compliance and protected events with explicit subject marks remain
140
+ refused (PLAY0268); see command-surface `references/compliance.md`. Keep protection.
140
141
  - Generated values/responses bind and reference-execute as v7; sources, streams
141
142
  and command/specification routes as v8; reaction `runs as` identity as v10;
142
143
  qualifying Double literals lower exactly as v11 and non-positional enum numbers
@@ -4,6 +4,8 @@ Checked at Screenplay v4.139.0: `SemanticModelBinder.cs`, `Versions.cs`,
4
4
  `Documentation/screenplay/{commands,operations,event-sources,reactions,tool,interoperability}.md`.
5
5
  The binder selects v8 for event routes, v10 for declared reaction identity, v11 for retained
6
6
  exact-lowered Double-mode literals and v12 for non-positional enum numbers.
7
+ Compliance checked against 4.142.0 `SemanticModelBinder.Compliance.cs` and
8
+ `SemanticModelValidator.Compliance.cs`; it selects v13 (first released in 4.141.0).
7
9
  Pins and consumer boundaries: toolchain `references/versions.md`.
8
10
 
9
11
  ## Which ESM version a model needs
@@ -17,15 +19,17 @@ Pins and consumer boundaries: toolchain `references/versions.md`.
17
19
  - v9 for public-event contracts; v10 for reaction `runs as system` identity.
18
20
  - v11 for exact lowering of qualifying Double-mode number literals; v12 for non-positional
19
21
  enum member numbers (`cratis-screenplay-command-surface` `references/enum-numbers.md`).
22
+ - v13 for concept `pii`/`personal` and `secret`, personal qualifiers and secret scopes.
23
+ Reasons remain report-only PLAY0270; binding proves neither encryption nor erasure.
20
24
  - Operations/systems, the exact numeric **source mode** (`numbers exact`) and refusal/redelivery
21
25
  remain unadmitted (PLAY0268). Version allocation is not inferred from an older planning decision.
22
26
 
23
27
  ## Dispositions to keep apart
24
28
 
25
- | Construct | Standalone disposition (checked at v4.125.0; v4.139.0 unchanged for these rows) |
29
+ | Construct | Standalone disposition (v4.125.0/v4.139.0 evidence; compliance updated at v4.141.0) |
26
30
  | --- | --- |
27
31
  | `persona`, domain/authentication metadata | Report-only; unknown named policies remain source defects |
28
- | Compliance concepts | Bare `pii`/`secret` (4.127.0); binding still refuses PLAY0268, never remove protection |
32
+ | Compliance concepts | Bare `pii`/`personal` and `secret`, qualifiers and scope bind as v13 (4.142.0 checked); enum/identity compliance and events combining personal or explicitly subject-scoped secret values with an explicit `subject` mark refuse PLAY0268 at binding only. CLI 3.53.1's 4.137.0 bundle still refuses markers; Stage 4.76.0 admits only through v12 (Stage#345). Never remove protection |
29
33
  | Identity details / processing purposes / event subject | Report-only metadata (4.127.0); executable detail reads refuse PLAY0268, not source declaration errors |
30
34
  | Composite stream ids | v8 routing; complete named parts/canonical comparisons, PLAY0515 refuses protected keys/sources; not a legacy text split |
31
35
  | Command reads/concurrency | Legacy unprotected decisions, PLAY0271 |
@@ -44,6 +44,7 @@ at the versions named in each row (CLI 3.53.1 bundles Prologue
44
44
  | --- | --- |
45
45
  | `generate` options, no default-file certainty (stdout when `--file` is absent), spec-project exclusion by name, `CLI0005/0009/0014-0017` | cli `v3.28.2:Source/Cli/Commands/Screenplay/{GenerateScreenplayCommand,GenerateScreenplaySettings,ScreenplayProjectSelection,ScreenplayDiagnosticCodes}.cs` |
46
46
  | `SP0016` (rule in code, computed message, `When`/`Unless` written as unconditional), `SP0024` (source did not compile) | Arc `v22.50.5:Source/DotNET/Screenplay/ScreenplayDiagnosticCodes.cs`, `Documentation/backend/csharp/generating-a-screenplay.md` |
47
+ | Enum number preservation (SP0067–SP0069) and response-read/mutation proof | Arc `v22.76.0:Source/DotNET/Screenplay/Emission/Concepts/ConceptSyntaxBuilder.cs`, `Analysis/Types/{ConceptRegistry,FlagsEnumUses}.cs`, `Analysis/Specifications/SpecificationReturnValues.cs`; `references/generate-notes.md` |
47
48
  | Non-default secret scope in authoring mode, SP0061–SP0063, self-check contract on compiler upgrades | Arc `v22.70.0:Documentation/backend/csharp/generating-a-screenplay.md`, `Source/DotNET/Screenplay/Verification/ExpectedBindingDiagnostics.cs`; `references/generate-notes.md` |
48
49
  | `prologue start` is an interactive wizard that writes `cratis-prologue.json`; `interpret --no-llm` never creates a chat client; a local `llm.enabled` setting wins over the global CLI configuration; the provider is announced before evidence is sent (cli#241, closed) | cli `v3.53.1:Source/Cli/Commands/Prologue/{StartPrologueCommand,InterpretPrologueSettings,InterpretPrologueCommand,LlmOptionsResolver}.cs`, `Documentation/reference/prologue.md` |
49
50
  | `generate` and `conform` evaluate the project with MSBuild (design-time build; may run project targets and write `obj/`); `conform` exit 0/1/2, structural only | cli `v3.53.1:Documentation/reference/screenplay.md`, `Source/Cli/Commands/Screenplay/ConformScreenplayCommand.cs` |
@@ -7,6 +7,7 @@
7
7
  - Coverage (what a provider reads)
8
8
  - Diagnostics are the loss list
9
9
  - Arc recovery and authoring-only options
10
+ - Arc 22.76.0 enum and response recovery
10
11
  - Arc 22.70.0 compliance recovery
11
12
  - Generated-document self-check on compiler upgrades
12
13
  - Reading the output cheaply
@@ -16,7 +17,7 @@ cratis-screenplay-toolchain `references/versions.md`; behaviour from the cratis
16
17
  (`v3.28.2:Source/Cli/Commands/Screenplay/`; the generate files are unchanged since `v3.27.1`), Arc `v22.50.5`
17
18
  (`Documentation/backend/csharp/generating-a-screenplay.md`,
18
19
  `Source/DotNET/Screenplay/ScreenplayDiagnosticCodes.cs`), Screenplay.Generation `v0.18.0` and
19
- Screenplay.CritterStack `v0.24.0`. Version-specific capability facts belong in cratis-screenplay-toolchain
20
+ Screenplay.CritterStack `v0.24.0` (the versions cli 3.53.1 bundles). Later releases exist (Generation 0.18.1 preserves compiler warnings, including on successful generation; CritterStack 0.26.0 adds enum concepts, command-to-event production links and the `MixedSliceKindsSplit` and `ProductionLinkOmitted` diagnostics); do not claim them for `cratis screenplay generate` until a cli bundles them. Version-specific capability facts belong in cratis-screenplay-toolchain
20
21
  `references/versions.md`.
21
22
 
22
23
  For the current standalone compiler and CLI bundle, use the toolchain's
@@ -75,7 +76,7 @@ cratis screenplay generate <solution|project|folder> \
75
76
  | Provider | Reads | Does not read |
76
77
  |---|---|---|
77
78
  | Arc | commands, events, concepts, read models, projections, reducers, reactors, constraints, declarative FluentValidation rules, authorization policies, `produces` from constants and input paths, Chronicle integration specs as given/when/then, `.tsx` beside a slice as `screen` + `data via query` | handler bodies, rules written in code, computed messages (`SP0016`), screen bodies, captures, personas, seeds, `@sensitive`. A rule held to `When`/`Unless` is written down as if unconditional and `SP0016` names the condition: read the diagnostic, do not trust the declaration |
78
- | Marten / Critter Stack (preview) | aggregates, snapshots, HTTP and message handlers, document operations, queries, outgoing and delayed messages, saga facts | saga lifecycle, policies, middleware bodies, runtime tenancy, upcasting; unbounded extension code is reported by presence only |
79
+ | Marten / Critter Stack (preview; an independent optional adapter built on the neutral Screenplay.Generation SDK, not affiliated with JasperFx: review every `GEN`/`MARTEN`/`WOLVERINE` diagnostic by hand) | aggregates, snapshots, HTTP and message handlers, document operations, queries, outgoing and delayed messages, saga facts | saga lifecycle, policies, middleware bodies, runtime tenancy, upcasting; unbounded extension code is reported by presence only |
79
80
  | any non-.NET stack | nothing | use Prologue and targeted reads |
80
81
 
81
82
  ## Diagnostics are the loss list
@@ -123,6 +124,34 @@ Handler/reaction bodies, unresolved conditions and unproven origins still need
123
124
  source review. Do not infer generation/evolution/absence-assertion coverage from
124
125
  a package upgrade; read diagnostics and reconcile each recovered scenario.
125
126
 
127
+ ## Arc 22.76.0 enum and response recovery
128
+
129
+ Source-verified at Arc `v22.76.0:Source/DotNET/Screenplay/Emission/Concepts/ConceptSyntaxBuilder.cs`,
130
+ `Analysis/Types/{ConceptRegistry,FlagsEnumUses}.cs`, `Analysis/EnumConstants.cs`,
131
+ `Analysis/Specifications/SpecificationReturnValues.cs`, and
132
+ `Documentation/backend/csharp/generating-a-screenplay.md`. Arc 22.76.0 takes
133
+ Screenplay 4.139.0, not 4.141.0. The CLI bundles an older generator; see the
134
+ central toolchain `references/versions.md` rather than assuming parity.
135
+
136
+ Every enum member now emits its stored integer, including positional members.
137
+ Sparse, negative and reordered values preserve identity when representable as int32
138
+ and permitted by `MaximumExecutableModelVersion` (non-positional values need v12).
139
+ SP0068 warns when numbers fall back together to positions because of the range or
140
+ cap, and on dropped emitted-name collisions: do not treat that output as preserving
141
+ stored identity. SP0069 reports aliases sharing a number; the ordinal-first member
142
+ used by scenario constant resolution is kept. SP0067 reports `[Flags]` enums with
143
+ unnamed combinations and names the property uses; named members still emit, but
144
+ unnamed combinations cannot become scenario values. Read every warning as a loss.
145
+
146
+ Since 22.75.2, `result!` and `in` arguments remain reads for recovered `then returns`.
147
+ Writes through any member/element of the executed result (assignment, increment,
148
+ decrement, `ref`/`out`, including null-conditional chains) or aliases of the result
149
+ or non-string reference values reached through it withhold the response assertion.
150
+ This includes variables/fields/initializers, foreach/pattern variables,
151
+ returned/yielded/lambda values and conditional/coalescing/tuple/collection flows.
152
+ Mutation through ordinary method calls is not analyzed. Inspect reported scenarios;
153
+ never infer a response contract from a post-execution mutation.
154
+
126
155
  ## Arc 22.70.0 compliance recovery
127
156
 
128
157
  A concept with both `[Encrypted]` and `[NotAudited]` becomes `secret`.
@@ -136,8 +165,9 @@ without adding `secret`; an existing `pii` classification remains.
136
165
  `namespace` scope: the document instead implies Subject scope. Global behaves
137
166
  the same way. Set `ScreenplayOptions.AuthoringOnlyConstructs = true` (CLI
138
167
  adapter option `--authoring-only-constructs`) to emit `secret scope namespace`
139
- or `secret scope global` in the concept body. Scope is syntax-only and does
140
- not raise the ESM version; it does not make protected concepts executable.
168
+ or `secret scope global` in the concept body. This was syntax-only on that
169
+ compiler; standalone 4.142.0 admits concept compliance as ESM v13 (since 4.141.0).
170
+ That upgrade does not change the older generator or CLI bundle.
141
171
  - A concept also marked `[PII]` becomes `pii secret`, with no emitted scope:
142
172
  the C# providers render only `[PII]`; Chronicle rejects `[PII]` combined with
143
173
  `[Encrypted]`. Do not add a scope the provider ignores.