@cratis/pi 7.137.1 → 7.138.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.
- package/package/corpus/harnesses/copilot/instructions/glossary.instructions.md +4 -0
- package/package/corpus/product-sync.json +1 -0
- package/package/corpus/rules/glossary.md +4 -0
- package/package/corpus/skills/cratis-arc-neo4j/LICENSE +2 -0
- package/package/corpus/skills/cratis-arc-neo4j/SKILL.md +166 -0
- package/package/corpus/skills/cratis-arc-neo4j/references/connection-resolution-and-single-mode.md +51 -0
- package/package/corpus/skills/cratis-chronicle-client-elixir/SKILL.md +12 -1
- package/package/corpus/skills/cratis-chronicle-client-elixir/references/graphs.md +123 -0
- package/package/corpus/skills/cratis-chronicle-projection/SKILL.md +18 -1
- package/package/corpus/skills/cratis-chronicle-projection/references/graph-projections.md +159 -0
- package/package/corpus/skills/cratis-screenplay-projections/SKILL.md +15 -2
- package/package/corpus/skills/cratis-screenplay-projections/references/graphs.md +150 -0
- package/package/corpus/skills/cratis-screenplay-specifications/SKILL.md +25 -23
- package/package/corpus/skills/cratis-screenplay-specifications/references/graph-steps.md +90 -0
- package/package/corpus/skills/cratis-screenplay-specifications/references/vocabulary.md +6 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.json +7212 -1834
- package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.version +1 -1
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/SKILL.md +2 -0
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/graphs.md +52 -0
- package/package/profile-catalog.json +1 -0
- package/package.json +1 -1
package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract.version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
5.
|
|
1
|
+
5.7.0
|
|
@@ -171,6 +171,8 @@ rendering a model with generated values. Case tables and whole numbers:
|
|
|
171
171
|
[case tables and whole numbers](references/case-tables-and-whole-numbers.md).
|
|
172
172
|
Gap-fill `[ProtectedDecision]`/`DecisionRead<T>` use still needs admission and
|
|
173
173
|
unit-of-work enrollment.
|
|
174
|
+
Read [graph rendering](references/graphs.md) when a model declares a `graph`, a graph
|
|
175
|
+
projection or graph specifications: what renders, the Neo4j wiring and the `STAGE-ESM-062`–`-067` refusals.
|
|
174
176
|
|
|
175
177
|
## What it emits
|
|
176
178
|
|
|
@@ -0,0 +1,52 @@
|
|
|
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
|
+
# Graph rendering
|
|
5
|
+
|
|
6
|
+
Requires Stage 4.222.0, which renders against Chronicle 19.129.0 and Arc 22.168.0. An older
|
|
7
|
+
Stage, or a Stage pinned to an older Chronicle, refuses every graph construct with `STAGE-ESM-063`.
|
|
8
|
+
|
|
9
|
+
## What renders
|
|
10
|
+
|
|
11
|
+
A Screenplay `graph` and its `projection ... => graph` become Chronicle's model-bound graph
|
|
12
|
+
types under `Graphs/<GraphName>/`:
|
|
13
|
+
|
|
14
|
+
| Modeled | Rendered |
|
|
15
|
+
| --- | --- |
|
|
16
|
+
| `node Person` | `record Person` marked `[Graph("<GraphName>")]`, `[Node]`, `[NoAutoMap]` |
|
|
17
|
+
| node `key` | the record's `[Key]` parameter; a key concept that is an event-source identity renders as the primitive it holds |
|
|
18
|
+
| `from E key <value>` | `[FromEvent<E>]` |
|
|
19
|
+
| `remove with E key <value> [detach]` | `[RemovedWith<E>]`, `Detach = true` for `detach` |
|
|
20
|
+
| `edge MEMBER_OF source A target B` | `record MemberOf` marked `[Edge("MEMBER_OF")]` with `[Source<A>]` and `[Target<B>]` keys |
|
|
21
|
+
| edge `from` / `remove with` | `[EdgeFrom<E>(...)]` / `[EdgeRemovedWith<E>(...)]` |
|
|
22
|
+
| `identified by p` | `p` is the edge's `[Key]`; every handler passes `identity:` |
|
|
23
|
+
| mappings and counters | `[SetFrom<E>]`, `[SetFromContext<E>]`, `[SetValue<E>]`, `[AddFrom<E>]`, `[SubtractFrom<E>]`, `[Increment<E>]`, `[Decrement<E>]` |
|
|
24
|
+
| `then graph` | a specification over Chronicle's `GraphScenario` that appends the events and asserts each node and edge |
|
|
25
|
+
|
|
26
|
+
A model that declares a graph also gets Neo4j wiring: `WithNeo4j()` in `Program.cs`, a
|
|
27
|
+
`Cratis.Arc.Neo4j` package reference, a `Cratis:Neo4j` section in `appsettings.json`
|
|
28
|
+
(`PasswordSecret: NEO4J_PASSWORD`, never the value) and a development Neo4j service in
|
|
29
|
+
`docker-compose.yml` that refuses to start without `NEO4J_PASSWORD`. Development uses
|
|
30
|
+
`DatabaseMode: Single` because Neo4j Community Edition has one user database; production keeps the
|
|
31
|
+
per-namespace default.
|
|
32
|
+
|
|
33
|
+
Stage's specification executor runs `given graph` and `then graph` with Screenplay's reference
|
|
34
|
+
graph runner and reports them with slice kind `Graph`.
|
|
35
|
+
|
|
36
|
+
## What is refused
|
|
37
|
+
|
|
38
|
+
| Code | Meaning | Fix |
|
|
39
|
+
| --- | --- | --- |
|
|
40
|
+
| `STAGE-ESM-063` | The pinned Chronicle client has no graph API | Upgrade Stage / the CLI bundle |
|
|
41
|
+
| `STAGE-ESM-062` | A construct the model-bound API cannot express: a non-PascalCase label, two elements rendering to one record, an undeclared edge identity, a factor (`add x by a * b`), `clear`, a non-text/boolean/whole-number literal, a key not read from an event property, the event source or a literal, one event handled twice by an element, or one element built by two projections | Reshape the model; never drop the construct |
|
|
42
|
+
| `STAGE-ESM-064` | A graph specification `GraphScenario` cannot express. A `given graph` seed is omitted as a degradation warning (`STAGE-DEGRADE-002`) and fails a `Strict` plan | Express the setup as appended events |
|
|
43
|
+
| `STAGE-ESM-065` | Non-blocking note: the live runtime (Play) does not project graphs | Verify with the specification executor |
|
|
44
|
+
| `STAGE-ESM-066` | A scoped plan leaves out the application's graphs | Render with the application scope |
|
|
45
|
+
| `STAGE-ESM-067` | The legacy syntax path met a graph construct | Use the executable semantic model path |
|
|
46
|
+
|
|
47
|
+
## Pitfall
|
|
48
|
+
|
|
49
|
+
Edge `[Source<>]`/`[Target<>]` keys use the node key's concept type. That satisfies Chronicle's
|
|
50
|
+
`CHR0024` when node keys are event-source identities; an edge between nodes keyed by another
|
|
51
|
+
concept can still be refused by `CHR0024` in the rendered build. Build the rendered application
|
|
52
|
+
before accepting a graph render.
|