@cratis/pi 7.49.0 → 7.50.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 (86) hide show
  1. package/package/corpus/agents/screenplay-modeler.md +5 -2
  2. package/package/corpus/agents/screenplay-reviewer.md +1 -0
  3. package/package/corpus/harnesses/copilot/instructions/react.instructions.md +1 -0
  4. package/package/corpus/hooks/README.md +23 -0
  5. package/package/corpus/hooks/scripts/cratis-pattern-scan.sh +1 -1
  6. package/package/corpus/hooks/scripts/cratis-patterns.json +8 -0
  7. package/package/corpus/hooks/scripts/cratis-quality-gate.sh +6 -0
  8. package/package/corpus/hooks/scripts/cratis-slice-scope-report.sh +54 -0
  9. package/package/corpus/rules/react.md +1 -0
  10. package/package/corpus/skills/cratis-application-slice-conformance/references/build-prompts.md +9 -1
  11. package/package/corpus/skills/cratis-application-slice-conformance/references/checklists.md +4 -1
  12. package/package/corpus/skills/cratis-application-slice-conformance/references/provenance.md +3 -0
  13. package/package/corpus/skills/cratis-application-slice-specifications/LICENSE +4 -0
  14. package/package/corpus/skills/cratis-application-slice-specifications/references/provenance.md +9 -0
  15. package/package/corpus/skills/cratis-application-slice-specifications/references/query-and-decision-scenarios.md +8 -0
  16. package/package/corpus/skills/cratis-arc-react-page/LICENSE +4 -0
  17. package/package/corpus/skills/cratis-arc-react-page/references/from-screenplay.md +6 -0
  18. package/package/corpus/skills/cratis-arc-react-page/references/provenance.md +9 -0
  19. package/package/corpus/skills/cratis-chronicle-event-modeling/SKILL.md +12 -1
  20. package/package/corpus/skills/cratis-chronicle-reactor/LICENSE +4 -0
  21. package/package/corpus/skills/cratis-chronicle-reactor/references/provenance.md +10 -0
  22. package/package/corpus/skills/cratis-chronicle-reactor/references/slice-delivery-checklist.md +33 -0
  23. package/package/corpus/skills/cratis-chronicle-reactor/references/specifications.md +17 -1
  24. package/package/corpus/skills/cratis-event-model-diagram/LICENSE +5 -0
  25. package/package/corpus/skills/cratis-event-model-diagram/SKILL.md +6 -1
  26. package/package/corpus/skills/cratis-event-model-diagram/references/provenance.md +9 -0
  27. package/package/corpus/skills/cratis-screenplay-automations-and-translations/LICENSE +5 -0
  28. package/package/corpus/skills/cratis-screenplay-automations-and-translations/SKILL.md +2 -2
  29. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/automation-patterns.md +24 -0
  30. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/integration-contracts.md +19 -0
  31. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/provenance.md +10 -0
  32. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/realization-and-gap-fill.md +1 -1
  33. package/package/corpus/skills/cratis-screenplay-discovery/SKILL.md +10 -12
  34. package/package/corpus/skills/cratis-screenplay-discovery/references/divergent-sweep.md +9 -0
  35. package/package/corpus/skills/cratis-screenplay-discovery/references/document-intake.md +123 -0
  36. package/package/corpus/skills/cratis-screenplay-discovery/references/domain-analysis-template.md +1 -12
  37. package/package/corpus/skills/cratis-screenplay-discovery/references/event-naming.md +49 -0
  38. package/package/corpus/skills/cratis-screenplay-discovery/references/facilitation.md +2 -0
  39. package/package/corpus/skills/cratis-screenplay-discovery/references/human-workshop.md +26 -1
  40. package/package/corpus/skills/cratis-screenplay-discovery/references/plotting-and-handoff.md +17 -0
  41. package/package/corpus/skills/cratis-screenplay-discovery/references/provenance.md +5 -1
  42. package/package/corpus/skills/cratis-screenplay-event-modeling/references/nine-steps.md +7 -3
  43. package/package/corpus/skills/cratis-screenplay-event-modeling/references/provenance.md +2 -0
  44. package/package/corpus/skills/cratis-screenplay-legacy-extraction/SKILL.md +50 -79
  45. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/evidence-table-template.md +39 -4
  46. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/expert-verification.md +15 -1
  47. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/intent-example.md +31 -7
  48. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/interview-findings.md +8 -2
  49. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/loss-report-template.md +4 -0
  50. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/provenance.md +8 -2
  51. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/re-entry-and-passes.md +102 -3
  52. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/side-car-migration.md +3 -1
  53. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/signal-to-intent.md +29 -0
  54. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/ui-observation.md +2 -1
  55. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/verified-sources.md +20 -0
  56. package/package/corpus/skills/cratis-screenplay-model-review/SKILL.md +27 -54
  57. package/package/corpus/skills/cratis-screenplay-model-review/references/baseline-comparison.md +9 -0
  58. package/package/corpus/skills/cratis-screenplay-model-review/references/business-questions.md +6 -1
  59. package/package/corpus/skills/cratis-screenplay-model-review/references/checklist.md +1 -1
  60. package/package/corpus/skills/cratis-screenplay-model-review/references/mode-compliance.md +5 -0
  61. package/package/corpus/skills/cratis-screenplay-model-review/references/model-inventory-report.md +48 -11
  62. package/package/corpus/skills/cratis-screenplay-model-review/references/provenance.md +5 -2
  63. package/package/corpus/skills/cratis-screenplay-model-review/references/quick-self-check.md +20 -0
  64. package/package/corpus/skills/cratis-screenplay-model-review/references/stressor-analysis.md +22 -10
  65. package/package/corpus/skills/cratis-screenplay-model-review/references/verified-sources.md +15 -0
  66. package/package/corpus/skills/cratis-screenplay-model-review/references/walkthrough.md +135 -0
  67. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/LICENSE +5 -0
  68. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/core-rules-digest.md +7 -0
  69. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/per-turn-protocol.md +6 -2
  70. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/phases.md +16 -1
  71. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/provenance.md +21 -0
  72. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +1 -0
  73. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/drift-and-fallback-record.md +7 -30
  74. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/hand-written-changes.md +150 -0
  75. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/provenance.md +2 -2
  76. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/provenance.md +1 -0
  77. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-catalogue.md +17 -0
  78. package/package/corpus/skills/cratis-screenplay-slice-design/references/command-inventory.md +6 -0
  79. package/package/corpus/skills/cratis-screenplay-slice-design/references/field-lineage.md +9 -1
  80. package/package/corpus/skills/cratis-screenplay-slice-design/references/provenance.md +6 -0
  81. package/package/corpus/skills/cratis-screenplay-slice-design/references/read-model-design.md +23 -6
  82. package/package/corpus/skills/cratis-screenplay-slice-design/references/review-questions.md +4 -0
  83. package/package/corpus/skills/cratis-screenplay-slice-design/references/slicing.md +69 -0
  84. package/package/corpus/skills/cratis-screenplay-slice-design/references/worked-example.md +4 -1
  85. package/package/corpus/skills/cratis-screenplay-toolchain/references/screenplay-contract-exceptions.json +0 -7
  86. package/package.json +1 -1
@@ -35,3 +35,8 @@ This skill also adapts material from agentic-engineer by Martin Dilger and Nebul
35
35
  (https://github.com/Nebulit-GmbH/agentic-engineer, commit 07b0f30648d663cb588d7e2c7aa031af9dfc21f2;
36
36
  https://nebulit.de), used with the explicit consent of Martin Dilger and Nebulit GmbH. The adapted
37
37
  material remains credited to Martin Dilger and Nebulit GmbH.
38
+
39
+ This skill also adapts material from the Eventmodelers Build-Kits skills by Martin Dilger and
40
+ Nebulit GmbH (https://github.com/Nebulit-GmbH/Eventmodelers-Build-Kits; https://nebulit.de), used
41
+ with the explicit consent of Martin Dilger and Nebulit GmbH. The adapted material remains credited
42
+ to Martin Dilger and Nebulit GmbH.
@@ -103,6 +103,12 @@ does not belong on the timeline. The anti-patterns below are what skipping this
103
103
  - **UI-interaction events.** `ButtonClicked` is UI state; model it only if the business cares.
104
104
  - **Technical events.** `ApiCalled` describes machinery; find the business outcome underneath.
105
105
  - **Recomputed events.** A value that changes whenever its source data changes is a read-model field.
106
+ - **Generic structure.** `SubmitForm` with `content`, or a record of `fields` and `entries`, says
107
+ nothing about the business. Model one real flow with real values: `ReportHullDamage` ->
108
+ `HullDamageReported` with berth `A-12` and "Scratched starboard bow, about 40 cm". The exception
109
+ is a platform that is itself the product: its own facts (`FormTemplatePublished`) are the
110
+ business. Brownfield generic engines are read the same way
111
+ (`cratis-screenplay-legacy-extraction`).
106
112
 
107
113
  ## Structural shapes (candidates)
108
114
  Check these only when the model's wiring is visible; a count over the threshold is a prompt to
@@ -123,6 +129,7 @@ for modelers. The full signal, consequence and fix per shape is in
123
129
 
124
130
  ## Quick self-check
125
131
  - [ ] Every event is past tense and a business fact.
132
+ - [ ] The model follows one real flow with real values, not a generic structure.
126
133
  - [ ] Every command is imperative intent, not a data load.
127
134
  - [ ] Every read model is named for its data.
128
135
  - [ ] No event carries a value that is only recomputed from other events.
@@ -21,10 +21,14 @@ owning session records both. Parallel overwrites of one STATE.md are never allow
21
21
  2. **Connect once.** Discover the model root, tool versions and MCP capabilities on the first
22
22
  turn. Rediscover only when the model root, tool, version or configuration changes, or a call fails
23
23
  (including a credentials refusal; `cratis-screenplay-model-authoring` `references/mcp-loop.md`).
24
- Sub-skills do not rediscover what the session already knows.
24
+ Sub-skills do not rediscover what the session already knows. A delegated agent inherits none
25
+ of this session's state, so its brief carries the discovered model root, mode, source
26
+ identity, tool versions, MCP capabilities and the addresses it must read, and says it need not
27
+ rediscover them. It rediscovers only on the triggers above.
25
28
  3. **Resolve the scope.** An address named in the brief (declaration address, feature, slice)
26
29
  wins over a name inferred from prose. Read STATE.md and recompute the source identity before
27
- trusting recorded verdicts.
30
+ trusting recorded verdicts. A slice under delivery is read-only unless the brief names it
31
+ (`phases.md` "Slices under delivery").
28
32
  4. **Mark it started** (owning session): set `Active: <scope> by <agent> since <time>` in
29
33
  STATE.md before the work. A stale value on resume means an interrupted run.
30
34
  5. **Run the matched phase skill; never substitute raw tool calls for it.** MCP operations and
@@ -70,7 +70,12 @@ phase, a decision important enough that a later reader could misread the model (
70
70
  - **Carry-forward**: slices with commands (reachable, authorized origins), events, read models with
71
71
  projections and queries, screens, reactions and captures, consistency decisions, slice dependencies.
72
72
  - **Gate**: V1 clean after the batch; every command has a reachable, authorized origin; every screen
73
- data need is served by a read model; every field has a known origin.
73
+ data need is served by a read model; every field has a known origin; every persona's Does line
74
+ reaches a screen or form `action` for that decision and every Reads line has a screen whose
75
+ `data` shows it. A persona with neither is missing screens (add them) or is not part of this
76
+ scope (revise its Does/Reads in discovery, or record why). A read-only persona is legitimate.
77
+ The opt-in `personas` check (`PLAY0574`, `PLAY0575`) proves gate reachability, not screen
78
+ reachability, so this walk stays manual.
74
79
  - **Skip when**: no reactions, schedules or outside facts are in scope (automations); event-source
75
80
  identity, destinations, constraints, stored-state decisions, retries and persisted-contract
76
81
  evolution are absent or already verified and unchanged (streams). Command count is not the criterion.
@@ -154,6 +159,16 @@ No other phase is skipped. P3-P5 scale to the change but always run for semantic
154
159
  | Executable or render request on an accepted model | P7 / P8 | P9 |
155
160
  | Question from a running Chronicle system | read-only `cratis-chronicle-cli-operations` | update the model at P2 if needed |
156
161
 
162
+ **Slices under delivery.** Where a delivery plan exists (the `cratis-screenplay-delivery-planning`
163
+ status block), check a slice's planning status before changing it. A `todo` slice changes through
164
+ the entry points above. A slice that is `in progress`, `blocked` or `done` is read-only for
165
+ modeling unless the request names it. Naming it is the approval for exactly those declarations
166
+ and nothing wider. Otherwise do the rest of the request, return an edit request naming the slice,
167
+ its status and the intended change, and open the packet's report with that part as NOT done. The
168
+ reason: someone is building against the slice as it stands. Changing a `done` slice reopens its
169
+ delivery: tell the plan owner, and expect conformance (`cratis-application-slice-conformance`) and
170
+ the affected specifications to rerun.
171
+
157
172
  ## Resume mid-workflow
158
173
  1. Read STATE.md only, not old transcripts.
159
174
  2. Recompute the source identity and compare. If it moved, rerun V1 and re-orient before trusting
@@ -1,5 +1,14 @@
1
1
  # Provenance and licences
2
2
 
3
+ ## Contents
4
+
5
+ - Shared template for sibling skills (copy this header; replace the tables)
6
+ - 1. Adapted from MIT sources
7
+ - 2. Adapted closely (Martin Dilger and Nebulit GmbH)
8
+ - Eventmodelers Build-Kits
9
+ - Not adopted from agentic-engineer (rejected, with reasons)
10
+ - 3. Method lineage
11
+
3
12
  ## Shared template for sibling skills (copy this header; replace the tables)
4
13
 
5
14
  Every new Screenplay method skill keeps a `references/provenance.md` shaped like this one. Three
@@ -56,6 +65,18 @@ by Martin Dilger and Nebulit GmbH (https://nebulit.de), used with the explicit c
56
65
  | `.claude/skills/connect/SKILL.md`: discover capabilities once per session | `SKILL.md` "Run protocol", `references/identity-and-edits.md` | Idea; our wording kept |
57
66
  | `.claude/skills/eventmodeling-core-rules/SKILL.md`: modes (modeling versus critic), element definitions and naming, causality, role catalog, field lineage, open question versus decided failure, offline-first, anti-patterns, structural shapes, quick self-check | `references/core-rules-digest.md` | Adapted closely as a one-page card translated to `.play` constructs. Not adopted: lanes, the single-issuer command rule, linked copies, the translation chain with a never-closing todo list, "read model never drives command validation" (Screenplay `reads` + `require`), the update-feeding-read-model procedure; "bed" is a candidate signal here, not an always-flag |
58
67
 
68
+ ## Eventmodelers Build-Kits
69
+
70
+ Source: https://github.com/Nebulit-GmbH/Eventmodelers-Build-Kits, by Martin Dilger and Nebulit GmbH
71
+ (https://nebulit.de), used with the explicit consent of Martin Dilger and Nebulit GmbH.
72
+
73
+ | Source skill | Used in | How |
74
+ |---|---|---|
75
+ | `eventmodeling-core-rules` ("Concrete Over Generic") | `references/core-rules-digest.md` *Anti-patterns to reject early*, *Quick self-check*; `cratis-chronicle-event-modeling` `SKILL.md` | copied and translated: one real flow with real values instead of a generic structure, with the carve-out for a platform that is itself the product |
76
+ | `eventmodeling-orchestrating-event-modeling` (every role has a screen) and `eventmodeling-storyboarding-events` | `references/phases.md` P2 gate | adapted closely: a persona's Does and Reads lines reach a screen; a read-only persona stays legitimate |
77
+ | kit `CLAUDE.md` (only touch slices whose status is `Created` unless confirmed; a subagent inherits no session state) | `references/phases.md` *Slices under delivery*; `references/per-turn-protocol.md` steps 2 and 3 | adapted closely: delivery status in the plan replaces board status; naming the slice is the approval for exactly those declarations |
78
+ | `eventmodeling-designing-event-models`, `eventmodeling-core-rules`, `eventmodeling-plotting-events` | `cratis-chronicle-event-modeling` `SKILL.md` *Decide before implementing*, *Verify the brief* | adapted closely: command issuers, story order, refused transitions and the rejected event kinds, for the code-first brief |
79
+
59
80
  ## Not adopted from agentic-engineer (rejected, with reasons)
60
81
 
61
82
  Recorded once here for the whole method family, checked against the same commit
@@ -220,6 +220,7 @@ Before reporting done:
220
220
  - `references/delivery-protocol.md` - inputs, commands, reading results, `Customizations/`.
221
221
  - `references/gap-fill-handoff.md` - the brief for `slice-implementer`, fallback record flow.
222
222
  - `references/drift-and-fallback-record.md` - drift, publication refusals, the fallback record, code changed since verification.
223
+ - Read `references/hand-written-changes.md` when investigating hand-written changes against the contract; it defines finding kinds, resolution routing and the report.
223
224
  - Read `references/worked-example.md` when preparing the classification and report for a refused render; it contains a complete model.
224
225
  - Read `references/provenance.md` when checking sources and attribution for the render workflow or gap-fill brief.
225
226
 
@@ -12,9 +12,8 @@
12
12
  The ownership manifest `.cratis-render.json` at the destination records `semanticRevision`
13
13
  (`rev1:<sha256>`), the target, the renderer, the application name and a hash per managed file.
14
14
 
15
- Facts verified with `cratis render` 3.28.2 on one model (historical probe; still how identity works): the same files rendered under the names
16
- `Marina` and `Harbour` gave different `semanticRevision` values, so **the application name is part
17
- of the revision**. The MCP workspace names the application after the model root folder (without
15
+ Rendering the same model under different application names changes `semanticRevision`, so
16
+ **the application name is part of the revision**. The MCP workspace names the application after the model root folder (without
18
17
  `.screenplay/identities.json`), so its `modelRevision` is not comparable with a render's manifest
19
18
  revision by assumption. Without `.screenplay/identities.json` it changes when the root folder is
20
19
  renamed (relocating the root while keeping its name does not); source positions and descriptions do
@@ -69,32 +68,10 @@ adapter, rebuild. Never edit the generated file.
69
68
 
70
69
  ## Hand-written code changed since it was last verified
71
70
 
72
- Use the fallback record's `last verified` code source identity, or the extraction's analysis
73
- history, as the baseline. If it is missing, unreachable or includes uncommitted changes, ask for
74
- an agreed starting commit; do not replace that question with a whole-repository comparison.
75
-
76
- 1. List commits oldest first over the recorded files, shared seams and `Customizations/`, then
77
- inspect each commit's changes per file. Include current uncommitted changes separately; a net
78
- diff can hide a hand edit followed by another delivery.
79
- 2. Separate behavior changes from dependency, CI, formatting and documentation noise. Ignore
80
- work records and corpus configuration; Stage-managed output belongs to the manifest refusal
81
- procedure above. Do not dismiss a changed rule merely because its commit also contains noise.
82
- 3. Locate affected slices through the record's element map, field inventory and specification
83
- mapping, then structural addresses from `cratis screenplay conform`, then names as a last
84
- resort. Read only the contracts and changed code those mappings identify.
85
- 4. Report each difference once, at the declaration where it begins: fields, rules/specifications,
86
- screens, wiring (`produces`, `reads`, reaction or capture triggers), declarations or a whole
87
- slice. Model-only work is planned delivery, not a code-change finding. A change restoring
88
- conformance or an approved, recorded divergence is not a new finding.
89
- 5. With an accepted model, restore the code to its contract by re-delivery, or return an explicit
90
- model edit request through the modeler, review and acceptance, naming identity effects.
91
- Accidental edits favor restoration; never silently revise the model to fit code. For an
92
- extraction with no accepted model, propose updating the candidate from the new evidence,
93
- retaining expert confirmation rather than treating the code as an accepted decision.
94
-
95
- Advance `last verified` only after every finding has a decided resolution and the resulting
96
- code has been checked. An unanswered finding keeps the baseline unchanged. This investigation
97
- and `conform` are not behavioral equivalence verdicts; passing specifications remain necessary.
71
+ Read `references/hand-written-changes.md` for the read-only investigation: agree the baseline,
72
+ walk changes per file, distinguish undelivered scope from removed delivered code, and return
73
+ restoration briefs or model edit requests including affected screens. Neither this investigation
74
+ nor `conform` is a behavioral equivalence verdict; passing specifications remain necessary.
98
75
 
99
76
  ## 4. Fallback record
100
77
  One file per model: `.ai-work/screenplay/<model-slug>/fallback-record.md`, untracked. A durable
@@ -117,7 +94,7 @@ One entry per assigned scope, with realization rows per slice:
117
94
  | assumptions | each declaration address, non-behavioral choice and consequence if wrong, or `none`; the delivery block list wins |
118
95
  | checks run | exact iteration and completion commands, each with result or `not run: <reason>` |
119
96
  | spec mapping | `.play` specification to test name, one line each; missing tests listed |
120
- | field inventory | `n/n` command, event and read-model properties mapped; extras: none, or listed with reason |
97
+ | field inventory | one row per command, event and read-model property with its input-to-code-to-storage chain where applicable, or `no counterpart, because …`; `n/n` mapped; extras: none, or listed with reason |
121
98
  | realization requirements applied | explicit realization notes from slice `description` or `documentation` applied, one line each; other description prose used as a hint is listed separately |
122
99
  | spec delta | at re-delivery: specifications added, changed or removed since `last verified`, each with test status |
123
100
  | divergences | where the code deliberately differs from the model, with reason and approver |
@@ -0,0 +1,150 @@
1
+ # Investigating hand-written code changes
2
+
3
+ ## Contents
4
+
5
+ - Scope and baseline
6
+ - Inspect the changes
7
+ - Finding kinds
8
+ - Judge each difference
9
+ - Resolution routing
10
+ - Report
11
+ - Reconcile the record
12
+
13
+ <!-- Copyright (c) Cratis. All rights reserved. -->
14
+ <!-- Licensed under the MIT license. See LICENSE file in the project root for full license information. -->
15
+
16
+ A read-only investigation of code changes against the slice contract. It edits neither code nor
17
+ model: findings become re-delivery briefs or model edit requests. An accepted model remains the
18
+ contract; new code is evidence of a difference, not authority to revise the model.
19
+
20
+ ## Scope and baseline
21
+
22
+ 1. Name the repository, feature or slices and target ref. Default: `HEAD` plus uncommitted changes.
23
+ For another branch, verify the ref with `git -C <repo> rev-parse --verify <ref>`, trying
24
+ `origin/<branch>` if appropriate. Read with `git -C <repo> show <ref>:<path>`, never switch the
25
+ checkout, because that can disturb somebody else's work. Do not mix working-tree edits into
26
+ an investigation of another ref.
27
+ 2. Use the fallback record's `last verified` code identity, or the extraction's anchored analysis
28
+ note. An explicitly supplied starting commit overrides it. Read the element map, fields,
29
+ shared seams, approved divergences and feature-level legacy-source notes before judging.
30
+ 3. Check the baseline resolves and is an ancestor of the target:
31
+ `git -C <repo> merge-base --is-ancestor <baseline> <ref>`. A missing, unreachable, non-ancestor
32
+ or dirty identity needs one agreed starting commit. Offer the nearest recorded `delivered at`
33
+ or `last verified` commit; otherwise show `git -C <repo> log --oneline -10` as candidates,
34
+ not as an assumed baseline.
35
+ 4. Without usable Git history, say that this investigation cannot run. Route to
36
+ `cratis screenplay conform <model-root> --project <path>` for structural evidence and
37
+ `cratis-application-slice-conformance` for a contract review; neither invents a change range.
38
+
39
+ ## Inspect the changes
40
+
41
+ 1. Share one history read among scopes with the same baseline. List commits oldest first over
42
+ the recorded slice files, shared seams and `Customizations/`:
43
+ `git -C <repo> log --reverse --format='%H %s (%an)' <baseline>..<ref> -- <paths>`.
44
+ Inspect each commit's changes, grouped by file. Include uncommitted changes separately only
45
+ for the default target. A net diff alone can hide a hand edit followed by another delivery.
46
+ 2. A delivery record naming a commit in `delivered at` identifies its as-built code. Stage's
47
+ ownership manifest identifies managed files, not the author of an arbitrary commit. Attribute
48
+ later edits to their actual commits, including edits in a file another delivery created;
49
+ `git -C <repo> diff <delivered-commit>..<ref> -- <file>` shows the candidates, not the full
50
+ attribution. Stage-managed output uses the manifest/refusal procedure in
51
+ `drift-and-fallback-record.md`, not hand-written repair.
52
+ 3. Map changed files to slices through the element map, field chains and specification mapping,
53
+ then structural addresses from `conform`, then names as a last resort. A business change
54
+ mapping to no slice is itself a finding: use the recorded feature folders to locate it, or
55
+ state that it needs a proposed slice. Read only those contracts and the changed code at the
56
+ target ref, not just the diff hunk.
57
+ 4. Separate behavior from noise per file. Dependency, CI, formatting and documentation edits,
58
+ generated Arc proxies, corpus configuration, harness adapters, work records, lockfiles,
59
+ `bin/` and `obj/` normally belong to tooling or generated-output review. Domain-generated
60
+ values, serialization attributes, test helpers, logging and refactors are noise only when
61
+ behavior is preserved. A changed default, authorization gate or disabled test is not noise
62
+ merely because it shares a file or commit with infrastructure edits.
63
+
64
+ ## Finding kinds
65
+
66
+ | Kind | A code change in the range that … | Model side |
67
+ |---|---|---|
68
+ | Fields | adds, removes or renames a command input, event property or read-model/query-result field; changes type, optionality or identity | `command`, `event`, `readmodel`, `query`, `identifier` |
69
+ | Rules | changes validation, a guard, error, default, authorization or a specification so the contract no longer describes the behavior | rules, constraints, `authorize`, `specification` |
70
+ | Screens | changes a page, component or route's displayed or submitted values | `screen`, forms, bindings |
71
+ | Wiring | changes appended events, decision reads, projection inputs or reaction/capture links | `produces`, `reads`, `from`, triggers, `invokes`, captures |
72
+ | Declarations | adds, removes or renames a command, event, read model, query or reaction | the declaration |
73
+ | Slices | adds an uncovered behavior, or removes code a delivery record shows was delivered | the slice |
74
+
75
+ ## Judge each difference
76
+
77
+ - Report only changes in the agreed range. A pre-existing mismatch is not caused by this range;
78
+ do not call it approved merely because it existed at the baseline. Return any blocking
79
+ pre-existing defect separately for a conformance review.
80
+ - A change restoring the accepted contract is no finding; mention restoration in the summary.
81
+ An approved, recorded divergence is no new finding. An unapproved difference still is.
82
+ - Model-only scope without delivery evidence is undelivered work, not a code-change finding.
83
+ A declaration or slice whose element map shows delivery but whose code was removed **is** a
84
+ Declarations or Slices finding; do not hide it as undelivered work.
85
+ - One difference is one finding at the declaration where it starts. Name the affected chain,
86
+ not duplicate findings for every downstream carrier.
87
+
88
+ ## Resolution routing
89
+
90
+ Default with an accepted model: restore code by re-delivery, with the identity effects named.
91
+ A wanted behavior change instead needs a model edit request, review and acceptance before code
92
+ follows it. With an extraction candidate and no accepted model, propose updating the candidate
93
+ from the evidence and retain expert confirmation; code is not an accepted business decision.
94
+
95
+ | Finding | Restore code | Alternative model edit request |
96
+ |---|---|---|
97
+ | Fields or Wiring | `slice-implementer`, or re-render Stage-owned scope | modeler using `cratis-screenplay-slice-design`; event/identity effects stated |
98
+ | Rules | re-deliver the contracted rule and specifications | `cratis-screenplay-scenario-coverage` and the owning command/consistency skill |
99
+ | Screens | re-deliver the contracted page | `cratis-screenplay-read-surface` and `cratis-screenplay-ui-composition` |
100
+ | Declarations added in code | removal needs a human decision, not deletion from this investigation | discovery or slice design, with identity effects |
101
+ | Delivered slice removed in code | re-deliver | removal through the lifecycle's identity owner |
102
+
103
+ For an evidently accidental edit (misspelled property, debugging leftover, disabled test), say
104
+ why restoration is recommended. A declined finding does not silently authorize divergence:
105
+ record the reason and approver if the owner deliberately accepts it.
106
+
107
+ Every model edit request affecting a field, command or read model names all affected screens,
108
+ forms and bindings in the same request, to be changed in place. Adding another screen beside
109
+ an inconsistent one leaves the defect. Use the `screenplay` MCP server's `find-references` with
110
+ `kind: "Property"` and follow `screen-binding` links (model-authoring
111
+ `references/property-links.md`); incomplete links require bounded manual inspection too.
112
+
113
+ ## Report
114
+
115
+ Group findings by kind, omitting empty sections. Each checkbox carries the range's responsible
116
+ commits (identity, subject, author), resolving file locator, declaration, model behavior, code
117
+ behavior and proposed resolution. A short report looks like:
118
+
119
+ ```markdown
120
+ ## Code changes against the contract: <scope>
121
+ Range: <baseline> -> <ref> [plus uncommitted changes]
122
+ Inspected: <n> commits, <n> behavior-changing files
123
+
124
+ ### Fields
125
+ - [ ] <Module/Feature/Slice> <declaration>: model <x>; code <y>.
126
+ Responsible: <commit, subject, author>; delivery: <recorded identity>.
127
+ Location: <repository-relative path and locator>; proof: <specification>.
128
+ Proposed: restore | model edit request <change>; screens: <affected list>.
129
+
130
+ ### Summary
131
+ <What changed, the largest consequence, and the first recommended resolution.>
132
+ Commits: <one per line; delivery commits identified by their record>.
133
+ Not relevant: <noise files and reasons>.
134
+ ```
135
+
136
+ No behavior change in the range: say so in one line, including the inspected scope. Partial
137
+ coverage is not a clean report; name paths or evidence that could not be inspected.
138
+
139
+ ## Reconcile the record
140
+
141
+ Apply no changes from the report itself. The owner chooses resolutions; model edits are batched
142
+ through the modeler, code repairs are queued for delivery, and declined findings retain their
143
+ reasons. Advance `last verified` only after every finding has a decided resolution and the
144
+ resulting code and specifications have been checked. Unanswered or failed resolutions keep
145
+ the baseline unchanged; an empty finding list still requires the checks before advancing it.
146
+
147
+ After writing a fallback entry, check every declaration address resolves (`find-declaration`
148
+ on the `screenplay` MCP server) and every element, field and specification row is nonempty.
149
+ Field mappings name the concrete input-to-code-to-storage chain where applicable, or state
150
+ `no counterpart, because …`. A complete record navigates evidence; it is not behavioral proof.
@@ -30,5 +30,5 @@ Source: https://github.com/Nebulit-GmbH/Eventmodelers-Build-Kits, by Martin Dilg
30
30
 
31
31
  | Source skill | Used in | How |
32
32
  |---|---|---|
33
- | `detect-model-drift` | `references/drift-and-fallback-record.md` *Hand-written code changed since it was last verified*; `SKILL.md` step 8 | adapted closely: baseline from the recorded identity, commits walked oldest first rather than a net diff, behavior separated from noise per file, one finding at the declaration where it begins, planned model work and restorations not reported; model-first default kept, so the fix restores code or raises a model edit request |
34
- | `record-evidence` (classic stack) | `references/drift-and-fallback-record.md` *Fallback record*; `references/gap-fill-handoff.md` result pointer | adapted closely: element, field and specification mapping, files, shared seams, assumptions and checks per slice, with no code excerpts |
33
+ | `detect-model-drift` | `references/hand-written-changes.md`; `references/drift-and-fallback-record.md` investigation pointer; `SKILL.md` step 8 | copied and translated: scoped baseline/ref reads, delivery attribution, finding kinds and report, behavior-preserving noise, removal of delivered code distinguished from undelivered scope, affected screens in each edit request and resolution routing; used with their explicit consent; model-first restoration remains the default rather than changing the model to fit code |
34
+ | `record-evidence` (classic stack) | `references/drift-and-fallback-record.md` *Fallback record*; `references/hand-written-changes.md` record checks; `references/gap-fill-handoff.md` result pointer | adapted closely: element, field and specification mapping including concrete input-to-storage chains, resolving addresses and nonempty rows, files, shared seams, assumptions and checks per slice, with no code excerpts; used with their explicit consent |
@@ -39,6 +39,7 @@ Source: https://github.com/Nebulit-GmbH/Eventmodelers-Build-Kits, by Martin Dilg
39
39
  | Source skill | Used in | How |
40
40
  |---|---|---|
41
41
  | `eventmodeling-elaborating-scenarios` | `references/scenario-catalogue.md` sections 2 and 5, *Example data*; `references/scenario-examples.md`; `references/coverage-matrix.md` *Cell values*; `SKILL.md` | adapted closely: a rejection earns a scenario only if a domain expert could recognize the rule, the duplicate question put as a business question, essential values shown in the body with the rest left out, descriptions that carry no fact a step could state, and a closed list of technical cases left unspecified; concept-rule and once-only specifications are kept on purpose, and a repeat the business would notice is never technical |
42
+ | `eventmodeling-elaborating-scenarios` (examples, error-state and compensation scenarios) and `eventmodeling-identifying-outputs` (error states shown) | `references/scenario-catalogue.md` sections 9 (*Shown*, *Recoverable*) and 10 (follow-up work after a reversal) | copied and translated: the payment-failure view update and the retry after failure, and the compensation triggered by a cancellation, restated as view and retry specifications and an Automation-slice specification; the board scenario syntax is dropped |
42
43
 
43
44
  ## Cratis-original
44
45
  Coverage matrix and obligation derivation from declarations, cell vocabulary (`spec`, `n/a`,
@@ -186,6 +186,17 @@ name them as unfinished.
186
186
  - Shape: the reported outcome is a **fact** (a refusal received is an event), specified in the
187
187
  Translate or Automation slice; a missing answer is a time-based scenario. A rejection
188
188
  (`then error`) is only for requests we refuse ourselves.
189
+ - **Shown:** a failure fact that someone must act on reaches a view the person reads (a status
190
+ literal and the reason, mapped from the failure event). Pin it with a view specification:
191
+ `given <OpeningFact>`, `given <FailureFact>`, then `then query` with the failed status and
192
+ the reason. A failure only an automation sees is covered by the review question in
193
+ `cratis-screenplay-automations-and-translations`. A failure a person must act on that no
194
+ screen shows is a gap.
195
+ - **Recoverable:** after the failure fact, the retry the business allows is accepted:
196
+ `given <FailureFact>`, `when <RetryCommand>`, `then <AttemptFact>`. It catches a once-only
197
+ constraint (`unique event`) that locks legitimate recovery out, and is the opposite case to
198
+ section 5 (duplicate action). `RetryingPaymentAfterADecline` in `invoicing-dues-example.md` is the
199
+ complete form. When the business forbids a retry, the case is a state violation with its message.
189
200
  - n/a: no external system in the path.
190
201
 
191
202
  ## 10. Compensation
@@ -193,6 +204,12 @@ name them as unfinished.
193
204
  - Shape: the reversal command's own specs, plus a spec proving the effect of the reversal:
194
205
  a released claim (`ReservingABerthNightFreedByACancellation`) or a removed row
195
206
  (`BerthBoardLifecycle3Cancelled`). Corrections are new facts, never edits of old ones.
207
+ - When undoing one fact obliges follow-up work (a refund after a paid booking is cancelled), the
208
+ follow-up is an Automation slice. Specify it there: `given <PriorFact>`, `when append
209
+ <CancellationFact>`, `then <RefundRequested>` (or the pending-work row), and the case where no
210
+ compensation is owed (cancelled before payment: no refund fact). Recipes:
211
+ `cratis-screenplay-automations-and-translations` `references/cases-to-specify.md`;
212
+ `RequestingARefundAfterAReversal` in `invoicing-dues-design.md` is the complete form.
196
213
  - Often reveals a missing event: if nothing can undo a fact the business can reverse, ask.
197
214
 
198
215
  ## 11. Evolution compatibility
@@ -67,6 +67,12 @@ Before placing a rule in a layer, list every value it reads and classify each on
67
67
  - **state**: a `reads <View>` path, or the prior facts of the stream.
68
68
  - **context**: the time the decision occurs, the caller, the tenant.
69
69
 
70
+ Decision state is the part of *state* a rule actually branches on. Derive it from the
71
+ specifications, not from the event's shape: a "given no prior activity" and "given already
72
+ {X}" pair means one flag for {X} (a presence check is a flag or a nullable instance); a
73
+ scenario that discriminates on a value means that value. A `reads` view carries exactly the facts the command's specifications branch on, one field
74
+ per fact. Add nothing because an event happens to carry it.
75
+
70
76
  A value that fits none of the three is a gap: a missing input, a missing view or a hidden
71
77
  dependency. Do not close it with prose in `description` or `handler`.
72
78
 
@@ -142,8 +142,16 @@ hop before editing:
142
142
  An explicit mapping to a renamed-away target fails binding (V3, PLAY0273); a property AutoMap
143
143
  used to fill and no longer matches is **not reported** - the field silently stays empty.
144
144
 
145
+ Before an add, check the element one hop further upstream than the stated source. If it already
146
+ carries the value, the requested chain stops too early: extend it to where the value really
147
+ starts (an input, a context value, a generated identifier, a view calculation).
148
+
145
149
  Skip a hop and log why when the field already exists there (add) or is not found on that
146
- element (rename); never skip silently. Report the walk hop by hop: element, field, `updated`
150
+ element (rename); never skip silently. Skipping a hop is also safe when the value already
151
+ arrives there under its old name and an explicit mapping bridges it (hop 3 below). When a hop
152
+ that must carry the value cannot be applied (a persisted event, an accepted slice), do not apply
153
+ the rest as if it had been: stop and route the whole chain to the identity owner. The chain is
154
+ one logical edit. Report the walk hop by hop: element, field, `updated`
147
155
  or `skipped` with the reason (already present; not on this element); name the chain from
148
156
  the consuming element back to the source. Run V1 after the chain edit; if a hop cannot be applied, stop
149
157
  and report that hop. Rename only through the identity-aware path when any hop is persisted
@@ -49,3 +49,9 @@ Source: https://github.com/Nebulit-GmbH/Eventmodelers-Build-Kits, by Martin Dilg
49
49
  |---|---|---|
50
50
  | `eventmodeling-identifying-inputs` | `references/command-inventory.md` *Values a rule reads*; `references/field-lineage.md` | adapted closely: list every value a rule reads and classify it as input, state or context; time, caller and tenant are context, never caller-supplied, and a date the person chooses stays an input; the worked reservation example restated in Screenplay; the upstream mechanism of putting time and the acting user on the command is not adopted |
51
51
  | `eventmodeling-information-completeness` | `references/field-lineage.md` *Where information starts*, *Check as you edit* | adapted closely: every value starts at one specific place and is carried by name; an unknown origin is a gap, never labeled to close a row; checked as each field is edited |
52
+ | `eventmodeling-orchestrating-event-modeling` ("Place in narrative order, never type by type"; "Never stack read models at the end"; wide fan-in is the exception; every role has a screen) | `references/slicing.md` *Declare in story order*; `references/read-model-design.md` *Components*, *Fan-in per field*, *Checks before handing off* | copied and translated (story order, translated to declaration order and the `PLAY0516`/`PLAY0517` checks); adapted closely (mixed kinds of computation split by default, with a written reason to keep them; a persona reaches a screen, while a read-only persona stays legitimate) |
53
+ | `eventmodeling-identifying-outputs` (error states shown) and `eventmodeling-elaborating-scenarios` examples | `references/read-model-design.md` *Checks before handing off* | adapted closely: a failure a person must act on shows in a view, or its omission is a stated decision |
54
+ | `eventmodeling-validating-event-models` (deterministic read models, no side effects in a builder; command with several issuers) | `references/read-model-design.md` *Builder and freshness*; `references/review-questions.md` | adapted closely: a builder replays to the same view; several origins of one command are allowed when each makes the same decision (idea; the upstream single-issuer rule is not adopted) |
55
+ | `attributes` (chain edits start at the real origin; one logical edit) | `references/field-lineage.md` *Adding or renaming a field along a chain* | adapted closely |
56
+ | `add-next-slice` (a new screen matches its siblings) | `references/slicing.md` *The next slice* | adapted closely |
57
+ | `build-state-change` (axon, kurrent and umadb stacks): derive decision state from the specifications, one field per fact a scenario branches on | `references/command-inventory.md` *Values a rule reads* | copied and translated |
@@ -99,9 +99,10 @@ usually two views.
99
99
  list whose status is set by booking, cancellation and maintenance events). Do not use that
100
100
  as a reason to fold in fields without the same wide fan-in: a berth's name and pier (set by
101
101
  one or two events) and its live availability (derived across its whole lifecycle) are two
102
- kinds of computation even on one page. Split them when you can name the consequence; if
103
- you keep one view, note which field has the irreducible fan-in and why (in the slice
104
- `description`).
102
+ kinds of computation even on one page. Mixed kinds of computation split by default. Keep one
103
+ view only with a written reason in the slice `documentation` that names the field with the
104
+ irreducible fan-in and why. Fan-in alone, within one kind of computation, splits only for a
105
+ named consequence (next section).
105
106
  - A screen with several components has one `data` line per component, each
106
107
  `data <RM> via query <Q>` from its own read model (several `data` lines per screen are
107
108
  valid; `cratis-screenplay-read-surface`). A split component sits next to its own source
@@ -114,8 +115,10 @@ usually two views.
114
115
  For each read-model field, count the events that set it. More than about three is a signal to
115
116
  look at, not a rule: a status fed by a long lifecycle is normal. Ask whether the field mixes
116
117
  concerns that should be separate views, and whether every contributing event is genuinely a
117
- change to *this* value. Report a problem only when it has a consequence (coupling, a view that
118
- must change whenever unrelated facts change).
118
+ change to *this* value. Within one kind of computation, report a problem only when it has a
119
+ consequence (coupling, a view that must change whenever unrelated facts change). Fields set once
120
+ by one or two events that ride with a field derived across the whole lifecycle are mixed kinds,
121
+ and that case splits by default (Components).
119
122
 
120
123
  ## Builder and freshness
121
124
 
@@ -131,6 +134,12 @@ one read-model instance (compose queries across person-scoped views instead).
131
134
  Every `from` event must set or affect a field (AutoMap counts); otherwise drop it or record why
132
135
  it stays.
133
136
 
137
+ A builder is deterministic: replaying the same events gives the same view. A reducer body reads
138
+ only the event, the current state and the context members the reducer exposes (`context.Occurred`
139
+ for time, never the wall clock). It calls no service, reads no other view and causes no effect.
140
+ Work that needs any of those is an automation that records a fact, which the view then projects.
141
+ Stage admits only pure reducer bodies for the same reason (`cratis-screenplay-projections`).
142
+
134
143
  ## Query shape follows the business view
135
144
 
136
145
  | The person... | Design-mode query | Executable/renderable scope |
@@ -295,8 +304,16 @@ module Berths
295
304
  - Every consumer that needs state has its read model (a blank creation form and a direct reaction
296
305
  with a documented no-pending-work reason need none); every read model has a consumer.
297
306
  - Every field traced (`field-lineage.md`).
307
+ - Every failure, refusal-received or cancellation fact a person must act on shows in some view
308
+ (a status literal plus the reason), or the omission is a stated decision (see "Omissions are
309
+ decisions"). Pin it with a view specification (`cratis-screenplay-scenario-coverage`
310
+ `references/scenario-catalogue.md` section 9).
311
+ - Every persona's Reads line has a screen whose `data` shows it, and every persona's Does line
312
+ reaches a screen or form `action` for that decision. A persona with neither is missing screens
313
+ (add them) or is not part of this scope (revise its Does/Reads in discovery, or record why). A
314
+ read-only persona is legitimate.
298
315
  - Executable scope: one identity per read model: explicit `key`, else agreeing
299
316
  single-instance `by`, else unambiguous `*Id` only with an admitted list query and
300
317
  no single-instance identifier. Queryless views need explicit `key`. The identifier
301
318
  equals the projection's key (table above); check target renderer admission separately.
302
- - Design-only shapes listed with the V3 code they cause.
319
+ - Each design-only shape (one the renderer does not admit) is listed with the V3 diagnostic code it causes.
@@ -22,3 +22,7 @@ domain consequence.
22
22
  - Where is each invariant enforced atomically, and what happens if two people try at once or a
23
23
  command is retried (`cratis-screenplay-streams-and-consistency`)?
24
24
  - Who may see these rows, and is that enforced by scope/`from`, not by a caller filter?
25
+ - Does a command have several origins (a screen action and a reaction, or two personas)? That is
26
+ allowed. Confirm that each origin makes the same decision under the same rules, refusals and
27
+ gate. If one origin needs a different rule or a trusted actor the other must not have, split
28
+ the command.
@@ -3,6 +3,7 @@
3
3
  ## Contents
4
4
 
5
5
  - Slices are the authoring unit
6
+ - Declare in story order
6
7
  - Slice dependencies
7
8
  - State-transition table (per entity)
8
9
  - Generic edits
@@ -25,6 +26,70 @@ step at the end: design each behaviour as its slice, then audit the set.
25
26
  Screenplay allows several commands or read models in one slice; prefer splitting unless the
26
27
  behaviour is genuinely one (and say why in `documentation`).
27
28
 
29
+ ## Declare in story order
30
+
31
+ Deciding which slices exist is separate from deciding the order you write them. Write them left
32
+ to right as the story happens, one slice at a time: the `StateChange` slice that records a fact,
33
+ then the `StateView` slice (read model, projection, query, screen) that the fact feeds, then the
34
+ next `StateChange`. Never write all commands, then all views, or any other batch by kind. The
35
+ board draws authored declaration and import order, so a batch by kind shows a row of commands
36
+ with the views bunched at the end, cut off from the facts they come from, and no slice reads as
37
+ one self-contained step of the story. A list grouped by slice type is for counting and review
38
+ (`cratis-screenplay-delivery-planning`), never the declaration order.
39
+
40
+ The compiler checks the result against the presentation timeline. `PLAY0516` (information)
41
+ marks a projection, reducer rule or named reaction trigger that uses an event from a slice drawn
42
+ to its right, or a `reads` of a view whose builder is drawn later. `PLAY0517` marks a mutually
43
+ dependent sibling group that no order can fix. Neither fails `--warnaserror`, so read them after
44
+ each batch:
45
+
46
+ - Move the producer first. MCP and C# workspaces offer a typed repair that moves a sibling or
47
+ pins an import. It changes no executable bytes or identities.
48
+ - A view that legitimately reflects a later fact (a waiting list that drops a request once it
49
+ is assigned) may stay where its screen beat is. Say why in the slice `documentation`.
50
+ - Feedback reads (a command reading a summary built from facts its own side produces) are
51
+ excluded by the compiler and need nothing.
52
+
53
+ A folder model needs an ordering root (a sole root, an importing `application.play`, or a unique
54
+ importing root). Without one the check is skipped, which does not mean clean
55
+ (`cratis-screenplay-toolchain`). The `remove with BerthAssigned` line below is the kept case:
56
+ the waiting list legitimately drops a request when the later slice assigns it.
57
+
58
+ ```screenplay expect PLAY0516
59
+ domain Harbour.Moorings
60
+
61
+ concept BerthRequestId : Uuid
62
+ concept BoatName : String
63
+ concept BerthNumber : String
64
+
65
+ module Moorings
66
+ feature SeasonalBerths
67
+ slice StateChange RequestBerth
68
+ command RequestBerth
69
+ berthRequestId BerthRequestId identifier
70
+ boatName BoatName
71
+ produces event BerthRequested
72
+ boatName BoatName = boatName
73
+ slice StateView WaitingList
74
+ readmodel WaitingRequest
75
+ berthRequestId BerthRequestId
76
+ boatName BoatName
77
+ projection WaitingList => WaitingRequest
78
+ from BerthRequested
79
+ berthRequestId = $eventSourceId
80
+ remove with BerthAssigned
81
+ query WaitingRequests => WaitingRequest[]
82
+ screen WaitingListPage
83
+ data WaitingRequest via query WaitingRequests
84
+ action AssignBerth
85
+ slice StateChange AssignBerth
86
+ command AssignBerth
87
+ berthRequestId BerthRequestId identifier
88
+ berthNumber BerthNumber
89
+ produces event BerthAssigned
90
+ berthNumber BerthNumber = berthNumber
91
+ ```
92
+
28
93
  ## Slice dependencies
29
94
 
30
95
  Record, per slice, the events it consumes and which slice produces each. This is for
@@ -184,6 +249,10 @@ fully designed, read the slices in story order and choose, preferring in order:
184
249
  or reverses (`CorrectLockerVolume`), never `Update<Entity>`;
185
250
  4. a notification or follow-up the business expects.
186
251
 
252
+ If the new slice adds a screen in a model that already composes its UI (templates, layout), give
253
+ it the template its sibling screens use (`cratis-screenplay-ui-composition`). A new screen always
254
+ has `data` or an `action`, never a placeholder.
255
+
187
256
  Apply this heuristic only when the brief authorizes selecting another capability; when the
188
257
  requested scope is complete or no supported candidate remains, close the turn without inventing
189
258
  work (scope ownership: `cratis-screenplay-modeling-lifecycle`). Prefer what continues the
@@ -21,7 +21,10 @@ The historical source below stays unchanged; it is not the current placement rec
21
21
  The excerpt's Stage availability note is historical (Stage 4.24.x, Arc 22.25.0).
22
22
  Stage 4.73.1's scaffold pins an Arc/Chronicle set (see the Stage skill's `references/rendered-application.md`), so protected-read APIs are available
23
23
  to gap-fill (the compiled description below saying they are "not available in Stage-rendered apps" is superseded); this neither admits these `.play` rules nor proves target protection.
24
- The original compiled excerpt is retained unchanged.
24
+ The original compiled excerpt is retained unchanged. Its `expect PLAY0516` is the story-order
25
+ information (`slicing.md` "Declare in story order"): the `LockerBoard` view consumes
26
+ `LockerAssigned` from the feature declared after it. A new model declares the producing feature
27
+ first and carries no such information.
25
28
 
26
29
  ```screenplay expect PLAY0516 test=unbound
27
30
  domain Parcelpoint.Lockers