@cratis/pi 7.75.0 → 7.76.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 (70) hide show
  1. package/package/corpus/harnesses/copilot/instructions/vertical-slices.instructions.md +6 -4
  2. package/package/corpus/product-sync.json +14 -14
  3. package/package/corpus/rules/vertical-slices.md +6 -4
  4. package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/authorization.md +9 -0
  5. package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/observable-emission-guards.md +12 -3
  6. package/package/corpus/skills/cratis-arc-command/references/decisions-and-routing.md +11 -0
  7. package/package/corpus/skills/cratis-arc-command-execution/SKILL.md +3 -0
  8. package/package/corpus/skills/cratis-arc-command-execution/references/occurrence-commands.md +78 -0
  9. package/package/corpus/skills/cratis-arc-command-validation/SKILL.md +10 -36
  10. package/package/corpus/skills/cratis-arc-command-validation/references/input-binding.md +49 -0
  11. package/package/corpus/skills/cratis-arc-command-validation/references/read-model-resolution.md +25 -0
  12. package/package/corpus/skills/cratis-arc-command-validation/references/validation-severity.md +21 -0
  13. package/package/corpus/skills/cratis-arc-ef-core-migration/SKILL.md +7 -1
  14. package/package/corpus/skills/cratis-arc-hosting/SKILL.md +3 -0
  15. package/package/corpus/skills/cratis-arc-hosting/references/connection-resolution.md +61 -0
  16. package/package/corpus/skills/cratis-arc-query-paging/SKILL.md +4 -2
  17. package/package/corpus/skills/cratis-arc-react-page/references/queries-and-commands.md +14 -1
  18. package/package/corpus/skills/cratis-chronicle-client-dotnet/SKILL.md +5 -0
  19. package/package/corpus/skills/cratis-chronicle-client-dotnet/references/immediate-append-refusal.md +40 -0
  20. package/package/corpus/skills/cratis-chronicle-client-dotnet/references/lifecycle.md +4 -0
  21. package/package/corpus/skills/cratis-chronicle-client-dotnet/references/occurrences.md +89 -0
  22. package/package/corpus/skills/cratis-chronicle-client-dotnet/references/pinned-generation-delivery.md +33 -3
  23. package/package/corpus/skills/cratis-chronicle-decision-reads/SKILL.md +5 -2
  24. package/package/corpus/skills/cratis-chronicle-decision-reads/references/admission-and-ownership.md +18 -1
  25. package/package/corpus/skills/cratis-chronicle-event-type-migration/references/pinned-generations.md +6 -0
  26. package/package/corpus/skills/cratis-chronicle-hosting/SKILL.md +3 -0
  27. package/package/corpus/skills/cratis-chronicle-hosting/references/operations.md +26 -0
  28. package/package/corpus/skills/cratis-chronicle-hosting/references/storage-resolution.md +55 -0
  29. package/package/corpus/skills/cratis-chronicle-multi-tenancy/SKILL.md +3 -0
  30. package/package/corpus/skills/cratis-chronicle-multi-tenancy/references/remove-namespace.md +38 -0
  31. package/package/corpus/skills/cratis-chronicle-projection/references/definition-changes.md +26 -0
  32. package/package/corpus/skills/cratis-chronicle-projection/references/model-bound-attributes.md +8 -0
  33. package/package/corpus/skills/cratis-chronicle-reactor/SKILL.md +5 -22
  34. package/package/corpus/skills/cratis-chronicle-reactor/references/starting-and-replaying.md +33 -0
  35. package/package/corpus/skills/cratis-chronicle-read-model/SKILL.md +9 -2
  36. package/package/corpus/skills/cratis-chronicle-read-model/references/queries.md +9 -4
  37. package/package/corpus/skills/cratis-chronicle-reducer/SKILL.md +4 -0
  38. package/package/corpus/skills/cratis-multi-service-architecture/SKILL.md +9 -3
  39. package/package/corpus/skills/cratis-performance-review/SKILL.md +4 -1
  40. package/package/corpus/skills/cratis-screenplay-automations-and-translations/SKILL.md +2 -2
  41. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/realization-and-gap-fill.md +10 -2
  42. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/SKILL.md +9 -9
  43. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/atomic-batches-and-source-mappings.md +2 -2
  44. package/package/corpus/skills/cratis-screenplay-model-authoring/SKILL.md +11 -11
  45. package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-tools.md +9 -0
  46. package/package/corpus/skills/cratis-screenplay-model-authoring/references/model-notes.md +41 -23
  47. package/package/corpus/skills/cratis-screenplay-model-authoring/verification.json +8 -3
  48. package/package/corpus/skills/cratis-screenplay-projections/SKILL.md +19 -12
  49. package/package/corpus/skills/cratis-screenplay-projections/references/pdl-grammar.md +37 -2
  50. package/package/corpus/skills/cratis-screenplay-projections/verification.json +11 -0
  51. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +37 -40
  52. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/gap-fill-handoff.md +3 -2
  53. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/renderability-gate.md +1 -1
  54. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/verification.json +4 -2
  55. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/coverage-matrix.md +9 -0
  56. package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +13 -30
  57. package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostics.md +39 -6
  58. package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-subset.md +5 -2
  59. package/package/corpus/skills/cratis-screenplay-toolchain/references/language-admission.md +15 -5
  60. package/package/corpus/skills/cratis-screenplay-toolchain/references/renderable-subset.md +7 -4
  61. package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.json +12 -1
  62. package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.version +1 -1
  63. package/package/corpus/skills/cratis-screenplay-toolchain/verification.json +9 -2
  64. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/SKILL.md +38 -56
  65. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/admission.md +23 -13
  66. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/date-comparisons.md +44 -0
  67. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/rendered-application.md +8 -2
  68. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/sandbox-and-specrunner.md +59 -8
  69. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/verification.json +7 -3
  70. package/package.json +1 -1
@@ -0,0 +1,44 @@
1
+ <!-- Copyright (c) Cratis. All rights reserved. -->
2
+ <!-- Licensed under the MIT license. See LICENSE file in the project root for full license information. -->
3
+
4
+ # Rendering Date and DateTime comparisons
5
+
6
+ Requires Stage 4.141.0 to render ESM v26 comparisons; older renderers refuse them
7
+ with `STAGE-ESM-046`. Check `cratis --version` and its bundled Stage before rendering;
8
+ a newer standalone Screenplay does not upgrade the CLI renderer.
9
+
10
+ The Cratis renderer emits comparisons in command `require`, `produces when` and
11
+ command/property validation rules. Date compares calendar days with `DateOnly`;
12
+ DateTime compares UTC instants with `DateTimeOffset` at tick precision, not text
13
+ or millisecond precision. Absence passes validation rules. Date predicates are
14
+ server-side `.Must` rules; no client-side date comparator is extracted.
15
+
16
+ Every compared DateTime command property carries Arc's `ExplicitOffset` marker:
17
+ input without an offset or `Z` is rejected. A compared DateTime concept binds as
18
+ `DateTimeOffset` and converts back to the concept in events, rules and responses.
19
+ That workaround cannot preserve every shape. `STAGE-ESM-046` names the property for:
20
+
21
+ - a compared DateTime concept carrying compliance;
22
+ - an optional compared DateTime concept;
23
+ - a compared DateTime property whose name is not camel case.
24
+
25
+ Keep compliance and optionality: these are gaps, not reasons to change the model.
26
+ Date comparisons from protected-read operands are not rendered. Reaction date
27
+ conditions are not admitted by the language. Legacy engines retain `-046`.
28
+
29
+ ## Input and expectation differences
30
+
31
+ With a named authorization policy, an unauthorized caller sending an unbindable
32
+ date body receives Validation rather than 403: Arc binds the body before Stage's
33
+ named policy evaluates. Test this boundary; do not claim identical denial ordering.
34
+ Rendered DateTime `then` expectations compare instants, while reference expectations
35
+ remain ordinal text comparisons; the binder requires expected event values to match
36
+ the produced spelling.
37
+
38
+ ## Verify
39
+
40
+ Run `cratis render <root> --name <App> --destination <out>`, then build and test the
41
+ rendered project in Debug, in separate bounded calls. Admission/publication, build
42
+ and specification outcomes are separate results. Check valid offset inputs,
43
+ offset-less rejections and calendar-day/UTC-instant boundaries; retain any typed
44
+ refusal rather than replacing the comparison with text ordering.
@@ -15,6 +15,10 @@ image, Cratis Components, Scene, Fundamentals, Vite and React). The pins belong
15
15
  renderer: read them from the rendered `.csproj`, `docker-compose.yml` and `package.json`, never
16
16
  from this skill. Moving them is a renderer change, so a re-render
17
17
  under a newer Stage is how they change; never bump a managed file.
18
+ Requires Stage 4.144.0 for backend pins derived at build time from Stage's central
19
+ package versions and shared frontend pins following Stage's frontend manifest;
20
+ older renderers use separately maintained scaffold pins. Regeneration updates
21
+ existing applications; it does not float dependencies in an already rendered app.
18
22
 
19
23
  | Item | Value |
20
24
  | --- | --- |
@@ -36,8 +40,10 @@ Consequences: `[ProtectedDecision]` (`Cratis.Arc.Chronicle.ReadModels`) and
36
40
  in the scaffold's package set, as is `[ExecuteCommandsAsSystem]`. This is API
37
41
  availability, not Stage emission or runtime protection: gap-fill must opt into
38
42
  the protected command profile and enroll an admitted projection/key read in the
39
- active unit of work. The Cratis C# renderer does not turn `.play` `reads`/`require` into protected decisions;
40
- semantic Host/executor support is separate from generated-application protection.
43
+ active unit of work. Requires Stage 4.138.0 for Cratis C# rendering of admitted
44
+ `.play` protected reads as Arc read protection; older renderers refuse them with
45
+ `STAGE-ESM-044`, as do shapes the renderer cannot preserve. Semantic Host/executor
46
+ support is separate from generated-application protection.
41
47
  Hand-written scope that needs a newer dependency can raise its version through
42
48
  `Customizations/Dependencies.props` (explicit `Version`, imported last; central management
43
49
  is off), but any override must be proven with a restore and build. The compose file binds local ports `27017` and
@@ -5,6 +5,7 @@
5
5
  - The sandbox: a partial, disposable runtime
6
6
  - Protected command reads
7
7
  - Date comparisons (v26)
8
+ - Implementation bodies and authored occurrence
8
9
  - Refusals shared by both engines
9
10
  - The specification runner
10
11
  - Choosing between them
@@ -124,10 +125,20 @@ execution. This includes reaction-invoked commands, even a specification expecti
124
125
  rejection: the outcome is `Unsupported`, before seeding facts, not a passing refusal.
125
126
  Do not change modeled severity to get an executable result.
126
127
 
127
- The semantic Host faults the session on **any outside append** to its event log,
128
- even an unrelated one, before committing an accepted command. This interim guard
129
- is stricter than the reference's dependency-scoped decide/commit conflicts; do not
130
- claim full reference conflict parity or generated-application protection.
128
+ Requires Stage 4.142.0 for decide/commit against outside facts; older Hosts fault
129
+ on any outside append. The Host decides on the session world, reads the outside
130
+ suffix and commits against the extended world. A later fact matching a protected
131
+ read's key and event contracts causes a concurrency conflict without faulting the
132
+ session; unrelated facts remain for commit-time constraints and projections.
133
+ Outside facts do not fire reactions again. Refusals retain their outcome.
134
+
135
+ The root/reaction batch uses one guarded write against the durable pre-batch tail,
136
+ even for a successful empty batch. A definitive guard loss may retry the same
137
+ decision, preserving generated values, only when settlement invoked no commands.
138
+ An invocation or eight unsuccessful attempts returns a conflict. An unknown write
139
+ outcome or unreadable/unsupported outside history faults the session, never retries
140
+ as success. Legacy custom appenders without these capabilities retain conservative
141
+ checks. These are Host guarantees, not generated-application evidence.
131
142
 
132
143
  ## Date comparisons (v26)
133
144
 
@@ -136,14 +147,54 @@ The semantic Host and specification executor compare `Date` as calendar days and
136
147
  `DateTime` as UTC ticks in `require`, `produces when` and validation rules, including
137
148
  through concepts. A participating `DateTime` input without an offset or `Z` rejects
138
149
  with Validation after authorization and before any rule. `then` stays ordinal. The
139
- renderer, legacy engines and default sandbox engine refuse these comparisons with
140
- `STAGE-ESM-046`, naming the property; no date validators or artifacts are emitted.
150
+ Cratis renderer renders these comparisons from Stage 4.141.0; older renderers and
151
+ legacy engines refuse `STAGE-ESM-046`. Read [date comparisons](date-comparisons.md)
152
+ when checking remaining renderer refusals and input-binding differences.
141
153
 
142
154
  One ordering differs from the reference: the reference checks authorization, then
143
155
  offsets, then opaque C# validation, so an offset-less DateTime beside opaque
144
156
  validation is a Validation rejection there. The specification executor refuses opaque
145
- validation at run admission and the Host refuses it before authorization, so both Stage
146
- paths report `Unsupported`, which never counts as a pass.
157
+ validation when reached at specification admission and the Host refuses a command
158
+ that reaches it before authorization, so both Stage paths report `Unsupported`,
159
+ which never counts as a pass.
160
+
161
+ ## Implementation bodies and authored occurrence
162
+
163
+ Requires Stage 4.145.0 for reach-scoped reducer and validation refusals; older semantic
164
+ engines refuse unrelated behavior when any such body exists. Neither Host nor executor
165
+ runs these bodies. `STAGE-IMPL-003` names the reached owner and RequirementId:
166
+
167
+ - command under test and commands invoked by reactions reach command validation;
168
+ - command input and query argument types reach concept rules through composites,
169
+ collections and optionals;
170
+ - given, appended or produced events reach reducer transitions; read-model assertions
171
+ and queries reach the corresponding reducer too;
172
+ - potential reaction effects are included without evaluating guards, including effects
173
+ of an action expected to be refused.
174
+
175
+ Unrelated commands, queries and specifications remain admitted. Reducer refusals use
176
+ Projection capability; validation refusals use Command. This does not relax live-world
177
+ history rebuilding or renderer admission, nor described-handler `STAGE-IMPL-002`.
178
+
179
+ Requires Stage 4.141.1 for authored occurrence in event-reaction specifications; older
180
+ executors refuse clocks beside reactions. Independent command, append and named-redelivery
181
+ specifications accept `given clock` at or after the Unix epoch in whole milliseconds.
182
+ Offset-bearing source clocks normalize to UTC; the same instant reaches direct/cascading
183
+ productions, invocation arguments, invoked commands and refusal productions. Redelivery
184
+ uses the scenario clock, not the given event's timestamp.
185
+
186
+ No authored clock means no reaction occurrence: a reached production using
187
+ `$context.occurred` rejects with `Reaction '<name>' uses $context, which needs the scenario's 'given clock'.`;
188
+ an invocation argument instead rejects as unresolved in its declared root scope.
189
+ A false `where` skips evaluation; the executor never invents wall time. The fixture
190
+ supplies time, not audit identity: `$eventSourceId`/`$eventContext.eventSourceId` and
191
+ `$context.causedBy.*` remain `STAGE-ESM-013`, even under `runs as system`.
192
+
193
+ Clock/application/startup/shutdown triggers and `when clock`/trigger/capture actions
194
+ remain `STAGE-ESM-024`. **A clock fixture is not a scheduler.** Generated backend
195
+ occurrence mappings use `EventContext.Occurred`, but context-dependent generated
196
+ reaction specs retain `-011`; generated append/redelivery clock fixtures retain `-024`.
197
+ Rendered clock fixtures remain command-only.
147
198
 
148
199
  ## Refusals shared by both engines
149
200
 
@@ -19,12 +19,16 @@
19
19
  { "kind": "skill-contains", "value": "**Render never builds, tests or runs**" },
20
20
  { "kind": "skill-contains", "value": "`[ProtectedDecision]`" },
21
21
  { "kind": "skill-contains", "value": "`Customizations/`" },
22
- { "kind": "skill-contains", "value": "`Stage__Runtime__Engine=semantic`" },
23
- { "kind": "skill-contains", "value": "`--engine semantic`" },
22
+ { "kind": "skill-contains", "value": "`Stage__Runtime__Engine=semantic`", "file": "references/sandbox-and-specrunner.md" },
23
+ { "kind": "skill-contains", "value": "`--engine semantic`", "file": "references/sandbox-and-specrunner.md" },
24
24
  { "kind": "skill-contains", "value": "Requires Cratis CLI 3.64.0 for `--engine`", "file": "references/sandbox-and-specrunner.md" },
25
25
  { "kind": "skill-contains", "value": "the environment setting below", "file": "references/sandbox-and-specrunner.md" },
26
26
  { "kind": "skill-contains", "value": "fresh in-memory Chronicle log per specification", "file": "references/sandbox-and-specrunner.md" },
27
- { "kind": "skill-contains", "value": "exact ESM v1–v21 and v23–v27 pairs" },
27
+ { "kind": "skill-contains", "value": "exact ESM v1–v27 pairs" },
28
+ { "kind": "skill-contains", "value": "Requires Stage 4.141.0", "file": "references/date-comparisons.md" },
29
+ { "kind": "skill-contains", "value": "Requires Stage 4.142.0", "file": "references/sandbox-and-specrunner.md" },
30
+ { "kind": "skill-contains", "value": "STAGE-IMPL-003", "file": "references/sandbox-and-specrunner.md" },
31
+ { "kind": "skill-contains", "value": "Requires Stage 4.146.0" },
28
32
  { "kind": "skill-contains", "value": "STAGE-ESM-044" },
29
33
  { "kind": "skill-contains", "value": "STAGE-IMPL-002" },
30
34
  { "kind": "skill-contains", "value": "all-Proven rules permit unpinned rendered", "file": "references/admission.md" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cratis/pi",
3
- "version": "7.75.0",
3
+ "version": "7.76.0",
4
4
  "description": "Configuration-aware Cratis AI integration for Pi",
5
5
  "type": "module",
6
6
  "files": [