@cratis/pi 7.6.5 → 7.7.1

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 (212) hide show
  1. package/package/corpus/agents/backend-developer.md +14 -0
  2. package/package/corpus/agents/code-reviewer.md +16 -0
  3. package/package/corpus/agents/coordinator.md +17 -0
  4. package/package/corpus/agents/frontend-developer.md +17 -0
  5. package/package/corpus/agents/orchestrator.md +18 -0
  6. package/package/corpus/agents/planner.md +24 -0
  7. package/package/corpus/agents/screenplay-modeler.md +57 -0
  8. package/package/corpus/agents/screenplay-renderer.md +42 -0
  9. package/package/corpus/agents/screenplay-reviewer.md +45 -0
  10. package/package/corpus/agents/slice-implementer.md +32 -5
  11. package/package/corpus/agents/spec-writer.md +16 -3
  12. package/package/corpus/prompts/add-reactor.prompt.md +5 -3
  13. package/package/corpus/prompts/new-vertical-slice.prompt.md +16 -5
  14. package/package/corpus/prompts/write-specs.prompt.md +12 -6
  15. package/package/corpus/rules/application-profile.md +7 -3
  16. package/package/corpus/rules/general.md +8 -3
  17. package/package/corpus/rules/glossary.md +1 -1
  18. package/package/corpus/rules/profiles.md +42 -4
  19. package/package/corpus/rules/reactors.md +30 -22
  20. package/package/corpus/rules/vertical-slices.md +3 -1
  21. package/package/corpus/skills/cratis-application-react-specifications/SKILL.md +13 -0
  22. package/package/corpus/skills/cratis-application-slice-conformance/LICENSE +2 -0
  23. package/package/corpus/skills/cratis-application-slice-conformance/SKILL.md +173 -0
  24. package/package/corpus/skills/cratis-application-slice-conformance/references/checklists.md +66 -0
  25. package/package/corpus/skills/cratis-application-slice-conformance/references/contract-and-precedence.md +49 -0
  26. package/package/corpus/skills/cratis-application-slice-conformance/references/provenance.md +23 -0
  27. package/package/corpus/skills/cratis-application-slice-conformance/references/worked-example.md +91 -0
  28. package/package/corpus/skills/cratis-application-slice-conformance/verification.json +14 -0
  29. package/package/corpus/skills/cratis-application-slice-specifications/SKILL.md +57 -1
  30. package/package/corpus/skills/cratis-application-slice-specifications/references/provenance.md +16 -0
  31. package/package/corpus/skills/cratis-arc-command/SKILL.md +10 -0
  32. package/package/corpus/skills/cratis-arc-command-execution/SKILL.md +10 -0
  33. package/package/corpus/skills/cratis-arc-command-validation/SKILL.md +10 -0
  34. package/package/corpus/skills/cratis-arc-observable-query-http/SKILL.md +10 -0
  35. package/package/corpus/skills/cratis-arc-query-paging/SKILL.md +10 -0
  36. package/package/corpus/skills/cratis-arc-react-page/SKILL.md +68 -8
  37. package/package/corpus/skills/cratis-arc-react-page/references/from-screenplay.md +199 -0
  38. package/package/corpus/skills/cratis-arc-react-page/references/provenance.md +13 -0
  39. package/package/corpus/skills/cratis-chronicle-event-constraints/SKILL.md +10 -0
  40. package/package/corpus/skills/cratis-chronicle-event-modeling/SKILL.md +38 -10
  41. package/package/corpus/skills/cratis-chronicle-event-type-migration/SKILL.md +13 -0
  42. package/package/corpus/skills/cratis-chronicle-projection/SKILL.md +13 -0
  43. package/package/corpus/skills/cratis-chronicle-reactor/SKILL.md +58 -6
  44. package/package/corpus/skills/cratis-chronicle-reactor/references/provenance.md +9 -0
  45. package/package/corpus/skills/cratis-chronicle-read-model/SKILL.md +13 -0
  46. package/package/corpus/skills/cratis-chronicle-read-model-specifications/SKILL.md +47 -0
  47. package/package/corpus/skills/cratis-chronicle-read-model-specifications/references/provenance.md +11 -0
  48. package/package/corpus/skills/cratis-chronicle-reducer/SKILL.md +13 -0
  49. package/package/corpus/skills/cratis-components-stepper-command-dialog/SKILL.md +13 -0
  50. package/package/corpus/skills/cratis-event-model-diagram/SKILL.md +35 -16
  51. package/package/corpus/skills/cratis-screenplay-automations-and-translations/LICENSE +28 -0
  52. package/package/corpus/skills/cratis-screenplay-automations-and-translations/SKILL.md +166 -0
  53. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/audit-format.md +31 -0
  54. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/automation-patterns.md +139 -0
  55. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/cases-to-specify.md +69 -0
  56. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/effects-and-idempotency.md +88 -0
  57. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/integration-contracts.md +64 -0
  58. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/provenance.md +37 -0
  59. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/realization-and-gap-fill.md +34 -0
  60. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/todo-list-example.md +208 -0
  61. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/translate-example.md +126 -0
  62. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/translation-patterns.md +93 -0
  63. package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/worked-integration.md +98 -0
  64. package/package/corpus/skills/cratis-screenplay-automations-and-translations/verification.json +15 -0
  65. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/SKILL.md +267 -50
  66. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/complete-examples.md +185 -0
  67. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/verification.json +60 -12
  68. package/package/corpus/skills/cratis-screenplay-command-surface/SKILL.md +42 -12
  69. package/package/corpus/skills/cratis-screenplay-discovery/LICENSE +30 -0
  70. package/package/corpus/skills/cratis-screenplay-discovery/SKILL.md +229 -0
  71. package/package/corpus/skills/cratis-screenplay-discovery/references/divergent-sweep.md +37 -0
  72. package/package/corpus/skills/cratis-screenplay-discovery/references/event-naming.md +64 -0
  73. package/package/corpus/skills/cratis-screenplay-discovery/references/facilitation.md +62 -0
  74. package/package/corpus/skills/cratis-screenplay-discovery/references/human-workshop.md +222 -0
  75. package/package/corpus/skills/cratis-screenplay-discovery/references/interview-questions.md +66 -0
  76. package/package/corpus/skills/cratis-screenplay-discovery/references/personas-and-causes.md +152 -0
  77. package/package/corpus/skills/cratis-screenplay-discovery/references/plotting-and-handoff.md +111 -0
  78. package/package/corpus/skills/cratis-screenplay-discovery/references/provenance.md +37 -0
  79. package/package/corpus/skills/cratis-screenplay-discovery/references/storming-loop.md +119 -0
  80. package/package/corpus/skills/cratis-screenplay-discovery/references/worked-session.md +87 -0
  81. package/package/corpus/skills/cratis-screenplay-discovery/verification.json +15 -0
  82. package/package/corpus/skills/cratis-screenplay-event-modeling/SKILL.md +140 -77
  83. package/package/corpus/skills/cratis-screenplay-event-modeling/references/invoicing-example.md +51 -0
  84. package/package/corpus/skills/cratis-screenplay-event-modeling/references/nine-steps.md +114 -28
  85. package/package/corpus/skills/cratis-screenplay-event-modeling/references/parsed-not-runnable.md +50 -0
  86. package/package/corpus/skills/cratis-screenplay-event-modeling/verification.json +28 -3
  87. package/package/corpus/skills/cratis-screenplay-legacy-extraction/LICENSE +31 -0
  88. package/package/corpus/skills/cratis-screenplay-legacy-extraction/SKILL.md +239 -0
  89. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/chronicle-observations.md +25 -0
  90. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/evidence-table-template.md +79 -0
  91. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/expert-verification.md +48 -0
  92. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/generate-notes.md +75 -0
  93. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/intent-example.md +164 -0
  94. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/interview-findings.md +88 -0
  95. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/loss-report-template.md +47 -0
  96. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/prologue-safety.md +147 -0
  97. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/provenance.md +10 -0
  98. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/rule-modeling.md +36 -0
  99. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/side-car-migration.md +126 -0
  100. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/signal-to-intent.md +57 -0
  101. package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/ui-observation.md +52 -0
  102. package/package/corpus/skills/cratis-screenplay-legacy-extraction/verification.json +17 -0
  103. package/package/corpus/skills/cratis-screenplay-model-authoring/SKILL.md +77 -57
  104. package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md +50 -20
  105. package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-loop.md +211 -0
  106. package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-tools.md +44 -6
  107. package/package/corpus/skills/cratis-screenplay-model-authoring/references/provenance.md +13 -0
  108. package/package/corpus/skills/cratis-screenplay-model-authoring/verification.json +64 -10
  109. package/package/corpus/skills/cratis-screenplay-model-review/LICENSE +34 -0
  110. package/package/corpus/skills/cratis-screenplay-model-review/SKILL.md +209 -0
  111. package/package/corpus/skills/cratis-screenplay-model-review/references/anti-patterns.md +89 -0
  112. package/package/corpus/skills/cratis-screenplay-model-review/references/business-questions.md +128 -0
  113. package/package/corpus/skills/cratis-screenplay-model-review/references/checklist.md +176 -0
  114. package/package/corpus/skills/cratis-screenplay-model-review/references/provenance.md +36 -0
  115. package/package/corpus/skills/cratis-screenplay-model-review/references/report-template.md +149 -0
  116. package/package/corpus/skills/cratis-screenplay-model-review/references/review-questions.md +59 -0
  117. package/package/corpus/skills/cratis-screenplay-model-review/references/worked-example.md +255 -0
  118. package/package/corpus/skills/cratis-screenplay-model-review/verification.json +13 -0
  119. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/LICENSE +32 -0
  120. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/SKILL.md +239 -0
  121. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/code-reading-and-tokens.md +55 -0
  122. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/handoff-template.md +124 -0
  123. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/identity-and-edits.md +84 -0
  124. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/opt-in.md +48 -0
  125. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/phase-report-inventories.md +25 -0
  126. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/phases.md +162 -0
  127. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/principles.md +53 -0
  128. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/provenance.md +63 -0
  129. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/reasoning-notes.md +31 -0
  130. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/safety.md +31 -0
  131. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/stop-or-assume.md +46 -0
  132. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/verdicts-and-modes.md +204 -0
  133. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/vocabulary-map.md +55 -0
  134. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/worked-example.md +86 -0
  135. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/verification.json +16 -0
  136. package/package/corpus/skills/cratis-screenplay-projections/SKILL.md +14 -3
  137. package/package/corpus/skills/cratis-screenplay-read-surface/SKILL.md +15 -1
  138. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/LICENSE +2 -0
  139. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +179 -0
  140. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/delivery-protocol.md +99 -0
  141. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/drift-and-ledger.md +67 -0
  142. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/gap-fill-handoff.md +72 -0
  143. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/provenance.md +27 -0
  144. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/renderability-gate.md +56 -0
  145. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/worked-example.md +124 -0
  146. package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/verification.json +14 -0
  147. package/package/corpus/skills/cratis-screenplay-scenario-coverage/LICENSE +31 -0
  148. package/package/corpus/skills/cratis-screenplay-scenario-coverage/SKILL.md +200 -0
  149. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/berth-reservations.md +579 -0
  150. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/chronicle-verification.md +24 -0
  151. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/coverage-matrix.md +102 -0
  152. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/provenance.md +41 -0
  153. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-catalogue.md +196 -0
  154. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-workshop.md +102 -0
  155. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/spec-forms-by-mode.md +71 -0
  156. package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/view-and-story-specs.md +91 -0
  157. package/package/corpus/skills/cratis-screenplay-scenario-coverage/verification.json +13 -0
  158. package/package/corpus/skills/cratis-screenplay-slice-design/LICENSE +30 -0
  159. package/package/corpus/skills/cratis-screenplay-slice-design/SKILL.md +236 -0
  160. package/package/corpus/skills/cratis-screenplay-slice-design/references/command-inventory.md +107 -0
  161. package/package/corpus/skills/cratis-screenplay-slice-design/references/field-lineage.md +130 -0
  162. package/package/corpus/skills/cratis-screenplay-slice-design/references/provenance.md +20 -0
  163. package/package/corpus/skills/cratis-screenplay-slice-design/references/read-model-design.md +201 -0
  164. package/package/corpus/skills/cratis-screenplay-slice-design/references/review-questions.md +23 -0
  165. package/package/corpus/skills/cratis-screenplay-slice-design/references/rule-layers.md +41 -0
  166. package/package/corpus/skills/cratis-screenplay-slice-design/references/slicing.md +122 -0
  167. package/package/corpus/skills/cratis-screenplay-slice-design/references/worked-example.md +305 -0
  168. package/package/corpus/skills/cratis-screenplay-slice-design/verification.json +43 -0
  169. package/package/corpus/skills/cratis-screenplay-specifications/SKILL.md +217 -36
  170. package/package/corpus/skills/cratis-screenplay-specifications/verification.json +28 -4
  171. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/LICENSE +33 -0
  172. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +191 -0
  173. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/boundaries.md +154 -0
  174. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/chronicle-boundaries.md +54 -0
  175. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/consistency-and-concurrency.md +191 -0
  176. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/evolution-example.md +70 -0
  177. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/evolution.md +65 -0
  178. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/provenance.md +13 -0
  179. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/stream-patterns.md +128 -0
  180. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/streams-example.md +378 -0
  181. package/package/corpus/skills/cratis-screenplay-streams-and-consistency/verification.json +14 -0
  182. package/package/corpus/skills/cratis-screenplay-toolchain/LICENSE +2 -0
  183. package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +177 -0
  184. package/package/corpus/skills/cratis-screenplay-toolchain/references/automation-translate-example.md +121 -0
  185. package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet-example.md +319 -0
  186. package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet.md +96 -0
  187. package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostics.md +107 -0
  188. package/package/corpus/skills/cratis-screenplay-toolchain/references/doc-contradictions.md +48 -0
  189. package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-example.md +113 -0
  190. package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-subset.md +148 -0
  191. package/package/corpus/skills/cratis-screenplay-toolchain/references/pdl-example.md +267 -0
  192. package/package/corpus/skills/cratis-screenplay-toolchain/references/provenance.md +51 -0
  193. package/package/corpus/skills/cratis-screenplay-toolchain/references/renderable-subset.md +88 -0
  194. package/package/corpus/skills/cratis-screenplay-toolchain/references/traps.md +51 -0
  195. package/package/corpus/skills/cratis-screenplay-toolchain/references/verdicts.md +134 -0
  196. package/package/corpus/skills/cratis-screenplay-toolchain/references/versions.md +134 -0
  197. package/package/corpus/skills/cratis-screenplay-toolchain/verification.json +15 -0
  198. package/package/corpus/skills/cratis-screenplay-ui-composition/SKILL.md +53 -5
  199. package/package/corpus/skills/cratis-screenplay-ui-composition/references/flow-review.md +56 -0
  200. package/package/corpus/skills/cratis-screenplay-ui-composition/references/provenance.md +13 -0
  201. package/package/corpus/skills/cratis-screenplay-ui-composition/references/worked-flow.md +65 -0
  202. package/package/corpus/skills/cratis-screenplay-ui-composition/verification.json +4 -1
  203. package/package/corpus/skills/cratis-specification-by-example/SKILL.md +44 -1
  204. package/package/corpus/skills/cratis-specifications-csharp/SKILL.md +10 -0
  205. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/SKILL.md +186 -219
  206. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/admission.md +177 -0
  207. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/render-example.md +150 -0
  208. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/rendered-application.md +87 -0
  209. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/sandbox-and-specrunner.md +98 -0
  210. package/package/corpus/skills/cratis-stage-rendering-and-sandbox/verification.json +19 -0
  211. package/package/profile-catalog.json +11 -0
  212. package/package.json +1 -1
@@ -0,0 +1,72 @@
1
+ # Gap-fill hand-off to `slice-implementer`
2
+
3
+ For scope the renderer rejects (case C in `SKILL.md`) and for hand-written scope next to a
4
+ generated base (case B). The render phase reports the capability boundary; the implementer
5
+ authors the code with the `.play` slice and its specifications as the contract. Contract
6
+ reconciliation, specification mapping, delta delivery and the final status are owned by
7
+ `cratis-application-slice-conformance`; this file only says what the brief carries and what
8
+ comes back.
9
+
10
+ ## One scope per brief
11
+ One ledger entry (`drift-and-ledger.md`), one scope, one implementer. The brief is a set of
12
+ paths and addresses, not pasted contents:
13
+ - model root, source identity, the qualified slice addresses (`Module/Feature/Slice`) in scope,
14
+ their specifications and the referenced contract locations;
15
+ - the blocking codes from the probe and the ledger entry id;
16
+ - target project, owned paths, and the repository's conventions (Arc and Chronicle hand-written
17
+ slices; `rules/vertical-slices.md`);
18
+ - the skill per slice kind: State Change `cratis-screenplay-command-surface`; State View
19
+ `cratis-screenplay-projections` and `cratis-screenplay-read-surface`; Automation and Translate
20
+ `cratis-screenplay-automations-and-translations` and `cratis-screenplay-captures-and-reactions`;
21
+ the code skills `cratis-arc-command`, `cratis-chronicle-read-model`, `cratis-chronicle-reactor`;
22
+ - rules that live in prose today, each with its intended realization and a test (see "Rules the
23
+ model states only in prose");
24
+ - known unsupported semantics, open questions and the checks required before reporting done;
25
+ - the standing instruction, verbatim in spirit: *The `.play` slice and its specifications are
26
+ the specification. Do not invent fields, rules or defaults. Each specification becomes a test
27
+ with the same name; never weaken, skip or delete one to pass. Do not edit managed files.
28
+ Return a field inventory (command, event and read-model properties mapped to code locations)
29
+ and list anything you added that the model does not state (expected: none). Realization notes
30
+ in the slice description bind adapters and fallback code. The repository's pattern wins over a
31
+ generic template; report the mismatch. Stop on a contradiction and return an edit request.*
32
+
33
+ Before coding, the implementer reads each scoped slice completely: descriptions,
34
+ specifications, concepts, inherited authorization, referenced events and views, and resolves
35
+ ambiguous addresses; contracts are never inferred from names.
36
+
37
+ ## What comes back
38
+ - Status `done | partial | blocked` from `cratis-application-slice-conformance`.
39
+ - The specification mapping (specification, test, result), the field inventory, divergences
40
+ with who approved them, and the check results, recorded in the ledger entry.
41
+ - Edit requests for the modeler session: address, change, rationale. Walkthrough-derived cases
42
+ belong in accepted `.play` specifications first, never as a second behavioural contract in
43
+ code-only tests. Integration tests may check wiring and persistence without inventing rules.
44
+ - The gate: the repository's Tier 1 checks, plus integration evidence for the behaviour claimed;
45
+ unavailable checks are `not run: <reason>`. The delivered code then goes through code review.
46
+
47
+ ## Rules the model states only in prose
48
+ A rule that exists only in a description, or a state-dependent rule the model marks as not
49
+ enforced, is unenforced in generated scope. List it in the ledger as a target requirement. In
50
+ hand-written code it needs an atomic enforcement point: a protected read or a concurrency scope
51
+ (in a Stage-rendered application Arc is 22.25.0, which has no `[ProtectedDecision]`; a
52
+ hand-written application on a newer Arc may use it), or a Chronicle constraint. A stale view or
53
+ a caller-supplied status is not enforcement.
54
+
55
+ ## Automation and Translate scope
56
+ Stage 4.24 renders no Automation or Translate slice, so the whole automation is gap-fill: the
57
+ reactor and its adapter, written against the slice and its specifications. Where they are
58
+ registered depends on the case. Case B (a generated base exists, and the user authorized the
59
+ gap-fill): the registration goes through the seams in `Customizations/Program.cs`, which does
60
+ not bind a modeled reaction or capture. Case C (no generated application): there is no generated
61
+ `Program.cs` or partial hook, so the registration follows the hand-written application's own
62
+ composition conventions (`rules/vertical-slices.md`, `cratis-chronicle-reactor`).
63
+ A reaction invokes a command with no caller (Screenplay has no caller syntax today), so the
64
+ code needs a trusted path (`[ExecuteCommandsAsSystem]`, Arc 20.56.0 and later, in a rendered
65
+ application's Arc 22.25.0 too); never invent `runs as`.
66
+
67
+ ## Re-delivery
68
+ The work list is the full in-scope contract delta since the ledger's last verified source
69
+ identity (specifications, rules, mappings, realization notes), then the whole contract is
70
+ reconciled again and the field inventory redone. The specification delta is one ledger field.
71
+ When the scope later renders (a revisit trigger fires), plan the migration to managed output
72
+ with the user: the hand-written files collide with planned paths and must move first.
@@ -0,0 +1,27 @@
1
+ # Provenance
2
+
3
+ ## Moved and rewritten (Cratis)
4
+ - The render workflow of the earlier model skill set: capability probe, renderability
5
+ classification, delivery protocol, drift and fallback ledger. Rewritten for Stage 4.24 and cli
6
+ 3.27.1, with the render facts verified at those tags and by running `cratis render`; the
7
+ helper scripts are not shipped (their steps are the manual commands in `references/delivery-protocol.md`).
8
+ - The fallback-conformance checklist moved into `cratis-application-slice-conformance`
9
+ (`references/checklists.md`); this skill links it and keeps no copy.
10
+ - Three delivery cases (admission failure, generated base plus authorized gap-fill, fully
11
+ hand-written delivery) and the whole-model rule: from the #493 plan review of render versus gap-fill.
12
+
13
+ ## Ideas only (written independently)
14
+ - Idea from Nebulit-GmbH/agentic-engineer@07b0f30:`.claude/skills/build-state-change/SKILL.md`
15
+ and `build-state-view/SKILL.md`, written independently: verify against a contract with
16
+ population, update and removal checks, and "repeat rejected versus idempotent success" as
17
+ different guarantees (via `cratis-application-slice-conformance`).
18
+ - Idea from Nebulit-GmbH/agentic-engineer@07b0f30:`.build-kit/CLAUDE.md` and `.build-kit/lib/*prompt*.md`,
19
+ written independently: tests derived from the specifications are the oracle and never
20
+ weakened; one scope per brief; the repository pattern beats template guidance; a field
21
+ inventory; the specification delta as the work list on re-delivery
22
+ (`references/gap-fill-handoff.md`).
23
+ - Idea from Nebulit-GmbH/agentic-engineer@07b0f30:`.claude/skills/update-slice-status/SKILL.md` and
24
+ `update-prompt-status/SKILL.md`, written independently: bounded, closed status per scope
25
+ (the `done | partial | blocked` outcome and the ledger fields).
26
+
27
+ No TrogonStack/agentskills text is used in this skill.
@@ -0,0 +1,56 @@
1
+ # Renderability gate: classifying what the probe reports
2
+
3
+ The admitted subset itself (what Stage renders, member by member) is owned by
4
+ `cratis-stage-rendering-and-sandbox` (`references/admission.md`, the code table) and
5
+ `cratis-screenplay-toolchain` (`references/renderable-subset.md`); version facts are in
6
+ `cratis-screenplay-toolchain` `references/versions.md`. This file is about **classifying** what the
7
+ probe reports and choosing what to do. Do not copy the code table here.
8
+
9
+ ## Pipeline that produces the codes
10
+ 1. The CLI compiles and binds the model with its **bundled** Screenplay (4.60.1 in cratis 3.27.1,
11
+ ESM up to v5). Binding errors are `PLAY0268` (outside the admitted vertical), `PLAY0269`
12
+ (deferred), `PLAY0270` (report-only information), `PLAY0271` (legacy semantics) and `PLAY0273`
13
+ (a specification shape).
14
+ 2. Execution planning builds the plan and can emit `PLAN-*` diagnostics before Stage runs.
15
+ 3. Stage plans the target and admits or rejects each member: `STAGE-ESM-0xx`; profile and path
16
+ problems `STAGE-CRATIS-0xx`. For an ESM v4 model with evolved events the CLI adds
17
+ `CLI-RENDER-003` after Stage's own `STAGE-ESM-016` version refusal, as a supplementary
18
+ generation diagnostic, not as a pre-check.
19
+ 4. Any error anywhere publishes nothing: the run ends with exit 5 and the diagnostics.
20
+
21
+ The standalone `screenplay` tool can report V3 ready where the bundled binder refuses (newer
22
+ ESM). Only the probe answers renderability. `PLAY0270` entries are information, not blockers.
23
+
24
+ ## Classification
25
+
26
+ | Class | Meaning | Typical examples (each verified in `admission.md`) | Action |
27
+ | --- | --- | --- | --- |
28
+ | **Model fix (in mode)** | the model is in, or the user chose, renderable mode and breaks its own subset in a way that has a renderable equivalent with the same meaning | a `produces` whose `for` is not the command identifier; one `StateChange` slice with two commands (`STAGE-ESM-004`); two projections for one read model (`-007`); a policy without `authenticated` (`-015`) | edit request to the modeler session with address, change and rationale |
29
+ | **Capability gap** | the intended meaning needs a construct Stage does not render yet | list, observable and filtered queries (`PLAY0268` "must declare one caller-supplied 'by'", `-010`); Automation and Translate slices (`PLAY0268` "not admitted by ESM v1", `-001`, Stage#79); reactions, clocks, captures and triggers (v6, `-016`); event generations (`CLI-RENDER-003`); conditional `produces when` (`-006`); `reads` (`PLAY0271`); code validation (`-005`); opaque policies (`-015`); compliance attributes (`PLAY0268` "require portable data-subject semantics"); a command `handler` (`PLAY0268`) | keep the model; ledger entry; options a to c in `SKILL.md`; link the Stage issue |
30
+ | **Tool skew** | the bundled compiler disagrees with documented semantics | the false `PLAY0285` on reaction cascades (cli#242); codes the standalone compiler does not raise | record in the session state and the ledger; never "fix" a correct model |
31
+ | **Environment** | not the model | restore failures, missing SDK, a destination that is not writable | fix the environment or report blocked |
32
+
33
+ ## Triage rules
34
+ - A capability gap never becomes a model fix by deleting meaning. Turning a list screen into a
35
+ keyed lookup, dropping `@pii`, removing authorization or a rule, or splitting a conditional
36
+ outcome into separate commands is a **modeling decision** for the user and the modeler, made
37
+ for business reasons, not to please the renderer.
38
+ - A refusal never licenses dropping a specification, an event generation or a protection.
39
+ - Group codes by construct and count, report the first few with their `file(line,col)` location,
40
+ and keep the full JSON in the probe folder. Do not paste the list.
41
+ - One error blocks the whole application. Say how many slices are affected, and which slices
42
+ would render if the blockers were removed (from the locations), marked as an estimate.
43
+ - Admission can pass and a Debug test still fail. Admission is never a passing test; see
44
+ `cratis-stage-rendering-and-sandbox` `references/render-example.md`.
45
+
46
+ ## Stage issues to cite in ledger entries
47
+ Read at the time of writing (all open): portable query semantics Stage#58 (list, observable and
48
+ filtered queries); Automation and Translate slices Stage#79; mapping expressions and projection
49
+ blocks Stage#117; modeled authentication Stage#120; event generation v4 Stage#165; per-persona
50
+ screens Stage#194; compliance attributes Stage#197. Check that an issue is still open before citing
51
+ it, and cite only numbers you have just read. A closed issue is a trigger to probe again.
52
+
53
+ ## Reference outcomes
54
+ - The complete marina model of `cratis-stage-rendering-and-sandbox` `references/render-example.md`:
55
+ admission ok, 30 artifacts, Debug build ok, 7 tests passed (cratis 3.27.1).
56
+ - The model in `worked-example.md`: admission refused with 2 blocking `PLAY0268` diagnostics, nothing published.
@@ -0,0 +1,124 @@
1
+ # Worked example: a refused render, the classification and the report
2
+
3
+ A marina model with one renderable command and one list view. The model compiles; `cratis render`
4
+ refuses it, so nothing is published. The example shows how to classify, decide and report.
5
+
6
+ ## The model
7
+
8
+ ```screenplay
9
+ // cratis-screenplay-render-and-gap-fill: complete model for the refused-render example.
10
+ // Compiles with warnings as errors; `cratis render` 3.27.1 refuses the list query.
11
+ domain Harbour.Marina
12
+
13
+ concept BerthId : Uuid
14
+ concept BoatName : String
15
+ validate
16
+ not empty message "A boat name is required"
17
+
18
+ policy IsHarbourMaster
19
+ require authenticated and role "HarbourMaster"
20
+
21
+ module Berths
22
+ description "Which boats hold which berths"
23
+ feature Reservations
24
+ slice StateChange ReserveBerth
25
+ description "A boat reserves one berth"
26
+ command ReserveBerth
27
+ berthId BerthId identifier
28
+ boatName BoatName
29
+ authorize IsHarbourMaster
30
+ produces BerthReserved
31
+ for berthId
32
+ boatName = boatName
33
+ event BerthReserved
34
+ boatName BoatName
35
+ specification ReservingABerth
36
+ given caller
37
+ authenticated
38
+ role "HarbourMaster"
39
+ when ReserveBerth
40
+ berthId = "6f1c2a8e-0b1d-4d55-9a3e-2f6a7c1d0e11"
41
+ boatName = "Sea Otter"
42
+ then BerthReserved
43
+ for "6f1c2a8e-0b1d-4d55-9a3e-2f6a7c1d0e11"
44
+ boatName = "Sea Otter"
45
+
46
+ slice StateView BerthRegister
47
+ description "All berths with their current boat"
48
+ readmodel BerthEntry
49
+ berthId BerthId
50
+ boatName BoatName
51
+ query AllBerths => BerthEntry[]
52
+ projection BerthEntryProjection => BerthEntry
53
+ from BerthReserved
54
+ berthId = $eventSourceId
55
+ boatName = boatName
56
+ ```
57
+
58
+ ## The probe
59
+
60
+ Source identity recorded first (`<commit>+<digest>`), tools named: `screenplay 4.64.0`, `cratis 3.27.1`.
61
+ V1 passed on both. Then:
62
+
63
+ ```text
64
+ $ cratis render <model-root> --name Marina --destination .ai-work/screenplay/marina/render-probe/Marina -o json
65
+ exit 5, nothing published
66
+ PLAY0268 hire.play(38,7) Read model 'BerthEntry' must have one unambiguous keyed query to identify
67
+ instances in the first ESM v1 vertical.
68
+ PLAY0268 hire.play(41,7) Query 'AllBerths' must declare one caller-supplied 'by' argument in the
69
+ first ESM v1 vertical.
70
+ (+ four PLAY0270 information entries: authoring metadata, not blockers)
71
+ ```
72
+
73
+ ## Classification
74
+
75
+ | Diagnostic | Class | Why |
76
+ | --- | --- | --- |
77
+ | `PLAY0268` `AllBerths` | capability gap | the business question is "show all berths"; Stage renders only a keyed optional lookup (Stage#58) |
78
+ | `PLAY0268` `BerthEntry` keyed query | capability gap (same cause) | it follows from the missing keyed query |
79
+
80
+ Both blockers sit in one slice, `Berths/Reservations/BerthRegister`; `ReserveBerth` would pass on
81
+ its own (an estimate: the rest of the model was not probed alone, and a partial render does
82
+ not exist). The tempting "model fix" is a keyed `BerthById` lookup in place of the list. That
83
+ changes what the harbour master can see, so it is a **modeling decision for the user**, never a
84
+ renderer workaround. Here the user keeps the list.
85
+
86
+ ## Decision and ledger entry
87
+
88
+ Case A, then case C for the list: the user keeps the full model, `ReserveBerth` and the view are
89
+ delivered by hand, and the model stays the contract.
90
+
91
+ ```text
92
+ F1 scope: Berths/Reservations/BerthRegister (spec: none yet) ; Berths/Reservations/ReserveBerth (ReservingABerth)
93
+ blocking codes: PLAY0268 x2 (list query, keyed query)
94
+ class: capability gap decision: implementer (user, <date>)
95
+ fallback location: src/Marina.Application/Berths/ spec mapping: ReservingABerth -> to be written
96
+ revisit trigger: Stage#58 (portable query semantics) last verified: <source identity>
97
+ ```
98
+
99
+ Gap noted for the modeler: `BerthRegister` has no specification, so its hand-written delivery
100
+ has no oracle for the list; the edit request asks `cratis-screenplay-scenario-coverage` for one
101
+ (`given` the reservation event, `then query AllBerths` with the expected rows, subject to
102
+ what the reference execution route supports).
103
+
104
+ ## The report
105
+
106
+ ```text
107
+ Mode: renderable (user chose) Source: <commit>+<digest> tools: screenplay 4.64.0, cratis 3.27.1
108
+ V1 authorable: pass (1 file, screenplay 4.64.0; cratis validate also pass)
109
+ V2 diagnostics: not run: no MCP in this session (the bundled binder's PLAY0268 came from the render probe)
110
+ V3 binding: blocked: PLAY0268 x2 (cratis 3.27.1 bundled binder)
111
+ V4 specs: not run: no reference execution route in this toolchain (1 specification written, none run)
112
+ V5 admission: refused, 2 blocking diagnostics (list query), nothing published
113
+ V5 publication: not run: admission refused
114
+ V5 build: not run: nothing published
115
+ V5 tests: not run: nothing published
116
+ UI omissions: not applicable (no render)
117
+ Hand-off: F1 to slice-implementer (brief: paths and addresses; contract: the .play slice and its
118
+ specifications; conformance: cratis-application-slice-conformance)
119
+ Edit request: BerthRegister needs a specification for the list (address, expected rows)
120
+ ```
121
+
122
+ When the list query later renders, probe again with the same inputs. If it does, plan the
123
+ migration from hand-written files to managed output with the user before re-rendering; a hand
124
+ file on a planned path makes publication refuse.
@@ -0,0 +1,14 @@
1
+ {
2
+ "skill": "cratis-screenplay-render-and-gap-fill",
3
+ "input": "The marina .play model is accepted. Render it with cratis render, tell me whether it builds and its generated specs pass, and say what to do about anything Stage cannot render.",
4
+ "fixtures": [],
5
+ "assertions": [
6
+ { "kind": "skill-contains", "value": "A. Admission failure" },
7
+ { "kind": "skill-contains", "value": "a customization never makes a rejected model renderable" },
8
+ { "kind": "skill-contains", "value": "slice-implementer" },
9
+ { "kind": "skill-contains", "value": "cratis-application-slice-conformance" },
10
+ { "kind": "skill-contains", "value": "**Debug" },
11
+ { "kind": "skill-contains", "value": "`--force` needs approval" },
12
+ { "kind": "skill-contains", "value": "a whole-application V5 is never claimed from a subset" }
13
+ ]
14
+ }
@@ -0,0 +1,31 @@
1
+ Copyright (c) Cratis. All rights reserved.
2
+ Licensed under the MIT license. See LICENSE file in the canonical Cratis/AI repository for the full license text.
3
+
4
+ ## Third-party notices
5
+
6
+ `references/scenario-workshop.md` (and the interview protocol and quality checklist in
7
+ `SKILL.md`) adapt material from TrogonStack agentskills,
8
+ `plugins/trogonstack-eventmodeling/skills/eventmodeling-elaborating-scenarios`
9
+ (commit `7b249d3ee42d8b7e11fa564141ebd5fbc37aadf1`), under this licence:
10
+
11
+ MIT License
12
+
13
+ Copyright (c) 2025 Straw Hat, LLC
14
+
15
+ Permission is hereby granted, free of charge, to any person obtaining a copy
16
+ of this software and associated documentation files (the "Software"), to deal
17
+ in the Software without restriction, including without limitation the rights
18
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
19
+ copies of the Software, and to permit persons to whom the Software is
20
+ furnished to do so, subject to the following conditions:
21
+
22
+ The above copyright notice and this permission notice shall be included in all
23
+ copies or substantial portions of the Software.
24
+
25
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31
+ SOFTWARE.
@@ -0,0 +1,200 @@
1
+ ---
2
+ name: cratis-screenplay-scenario-coverage
3
+ description: "Decide and write Screenplay specifications for slices: a coverage matrix before drafting, every applicable scenario type per command (rules, denial, duplicates and retries, competing claims, ordering, external failure, compensation, evolution), view lifecycle specs per read model, shared example data, spec forms per mode, and a workshop guide for scenario sessions. Use when writing or auditing given/when/then in a `.play` model. Not for: spec grammar and comparison semantics (use `cratis-screenplay-specifications`), C# specs (use `cratis-specifications-csharp`)."
4
+ license: MIT
5
+ ---
6
+
7
+ # Screenplay scenario coverage
8
+
9
+ ## Purpose
10
+ Turn designed slices into specifications that pin behaviour a business person would argue
11
+ about. Decide **which** situations need a specification before writing any (coverage matrix),
12
+ then write them with consistent example data in the form the chosen mode admits. Situations the
13
+ language cannot express today are recorded, not faked. Grammar and outcome comparison live in
14
+ `cratis-screenplay-specifications`; this skill owns coverage and method.
15
+
16
+ ## When / when not
17
+ - Use: the scenario phase of `cratis-screenplay-modeling-lifecycle`; adding or changing a
18
+ slice's specs; checking coverage of an existing model; deciding how to specify retries, races,
19
+ cascades or event evolution; running a scenario workshop.
20
+ - Not for: grammar and comparison (`cratis-screenplay-specifications`); designing the commands
21
+ or views (`cratis-screenplay-slice-design`); where invariants live
22
+ (`cratis-screenplay-streams-and-consistency`); reaction and capture recipes
23
+ (`cratis-screenplay-automations-and-translations`); C# specs (`cratis-specifications-csharp`,
24
+ `cratis-specification-by-example`); a full audit (`cratis-screenplay-model-review`).
25
+
26
+ ## Verified product sources
27
+ Screenplay v4.64.0 (`7e16162`): `Documentation/screenplay/specifications.md` and the standalone
28
+ compiler; `cratis` 3.27.1 bundles Screenplay 4.60.1. The full pin table and the probes are in
29
+ `cratis-screenplay-toolchain` `references/versions.md`. Specification obligations reported by
30
+ the MCP (Screenplay#390) and multi-step storylines (Screenplay#394) are **not available**: the
31
+ coverage matrix is built by hand and lifecycle families emulate storylines.
32
+
33
+ ## Interview phase
34
+ **Skip if** the brief already states the coverage depth (rules, denials, state violations,
35
+ retries, races), the critical rules with an allowed and a refused example each, how the specs
36
+ will be used (reference only, executable, rendered and tested) and who validates them.
37
+ Critical questions, one at a time, with follow-ups:
38
+ 1. **Depth.** Reference examples only, every command variation, or production-grade including
39
+ edge cases? Production work needs the full matrix. Follow-up: which commands matter most?
40
+ 2. **Known rules and edge cases.** Which mistakes would be costly? For each rule: one allowed
41
+ request, the nearest refused one, and why they differ (`references/scenario-catalogue.md`
42
+ "Eliciting cases").
43
+ 3. **Use.** Design record, executable (V2/V3), reference run (V4) or rendered tests (V5)? It
44
+ decides the admitted forms (`references/spec-forms-by-mode.md`).
45
+ 4. **Validation.** Who confirms the business outcomes: domain expert, developer, tester? For a
46
+ group session use `references/scenario-workshop.md`.
47
+ **Unattended:** assume visibly. Write each assumption as a `question` cell with the default you
48
+ used; never invent a rule. Record who actually answered; an agent asking itself four kinds of
49
+ question is not four approvals.
50
+
51
+ ## Procedure
52
+ 1. **Mode first** (`cratis-screenplay-modeling-lifecycle`): it decides the admitted spec forms.
53
+ Fix the model root and source revision.
54
+ 2. **Ask only what is missing** (Interview phase). Take discovery and slice-design outcome lists
55
+ (Cannot lines, "only if", refusals, competition candidates, endings) as coverage seeds.
56
+ 3. **Inventory before drafting**: read commands, effective gates (own, feature, module), rules,
57
+ constraints, productions, reactions, captures, read models and queries in scope; derive the
58
+ obligations from those declarations, not from specs already present.
59
+ 4. **Coverage matrix before any spec** (`references/coverage-matrix.md`). Rows: every command,
60
+ reaction, capture, read model and gated query. Columns: the scenario types below. Each cell
61
+ is `spec <Name>`, `n/a: <domain reason>`, `recorded: <why not expressible>`,
62
+ `open: <case>`, `question: <id>` or `gap: <code>`. "Fewer specs" is never a reason; a
63
+ declaration (constraint, policy) or another command's denial is not a spec.
64
+ 5. **Per read model, decide the shape**: single-transition specs only, or also a lifecycle
65
+ family (cumulative givens). Write the decision and reason in the matrix.
66
+ 6. **Example data**: a small cast per feature; reuse only where meaning agrees; preserve
67
+ existing intentional fixtures (`references/scenario-catalogue.md` "Example data").
68
+ 7. **Draft commands**: happy path, each rule, denial, duplicates and retries, competing claims,
69
+ state violations, alternative branches, compensation, external failure, evolution. In each
70
+ rejection vary only the value under test.
71
+ 8. **Separate view pass**: population, each update, accumulation, removal (with a surviving
72
+ row), absence, ordering. Mark lifecycle branches as branches.
73
+ 9. **State-dependent rules**: `reads <View>` + `require <expr> message "..."` as stated intent,
74
+ marked **NOT enforced in the model today** in the slice `description` (binding reports
75
+ PLAY0268/0271: expected in design mode; Screenplay#129/#209), target named (Arc
76
+ `[ProtectedDecision]` + `DecisionRead<T>`, Chronicle DCB, or a constraint). Forbidden:
77
+ caller-supplied copies of state in `require`, boolean attestation inputs (`confirmsX ==
78
+ true`) and rules hidden in `handler`/hint prose. Never drop an unresolved given or assertion
79
+ to make a spec compile: record the blocked case and continue.
80
+ 10. **Validate** the batch (V1, warnings as errors); V2/V3 when executable or renderable. The
81
+ phase report carries the matrix path, spec names added or changed, `recorded`, `open` and
82
+ `gap` cells and open questions.
83
+
84
+ ## Scenario types (decide each per command; detail in `references/scenario-catalogue.md`)
85
+ | Type | Question | Usual Screenplay shape |
86
+ |---|---|---|
87
+ | Happy path | What facts does a valid request establish? | `when Cmd` -> every firing production, payload exact |
88
+ | Rule rejection | Which input is refused, with what message? | one spec per rule; `then error "<exact message>"` (prefer `$strings.<key>`); always pinned (a bare `then error` is valid language but not accepted here) |
89
+ | Denial | Who must not do this? | `given caller` without the policy -> `then denied`; one per gated command and query, only where the whole Boolean gate is false; ownership claims need other-owner denial |
90
+ | State violation | Which prior facts make this wrong? | givens + constraint (`unique event` exclusivity) -> `then error`; else `recorded` |
91
+ | Duplicate / retry | Same request again (lost acknowledgement)? | `when <Command>`, same identifier, earlier fact as `given` -> constraint message, or the accepted repeat |
92
+ | Competing claim | Two people claim the same thing at once? | `when <Command>`, other source's fact as `given` (different `for`) -> constraint "another event source..." |
93
+ | Alternative path | Which branches exist, including "nothing happens"? | true and false witnesses per `produces when`; unconditional productions always fire |
94
+ | Ordering | Facts late or out of order? | view family with reordered givens; translation specs; else `recorded` |
95
+ | External failure | The other system refuses, times out or answers twice? | outcome as a recorded fact (capture/translation), never a fake rejection |
96
+ | Compensation | How is this undone, what does undoing free? | reversal command + spec showing the released claim or removed row |
97
+ | Evolution | Do old facts still mean the same after a contract change? | spec on the new generation; compatibility note in `description` |
98
+ | View | What does each screen show after each fact? | `given` events (`for`) -> `then query`; `when append` -> update/removal |
99
+
100
+ **Once, idempotent, exactly once are different claims.** A `unique event` constraint proves the
101
+ *fact* occurs once per event source; it does not make *command handling* idempotent (a retry is
102
+ rejected, not answered with success), and nothing in the model proves an *external effect* (an
103
+ email, a payment) happens exactly once. Say which of the three a spec proves; record the rest as
104
+ target requirements.
105
+
106
+ ## Rules
107
+ ### Compiler contracts
108
+ - At most one `when` action; with none, assert only read-model or query outcomes.
109
+ - `then` events are exact in count and order (`then events in any order` relaxes order only).
110
+ - Command denial: `then denied` with no success or error outcome. Read-only query denial:
111
+ `then query <Query>` with `arguments` and no `result`, then `then denied`. Every gated command
112
+ or query spec needs `given caller` (module and feature gates count); an authorized scenario
113
+ gets no inferred fixture (PLAY0389). Unauthorized is never `then error`.
114
+ - Duplicate and competing specs use `when <Command>`; `when append` is for projection and
115
+ automation triggers, and for a constraint the command's own validation would reject first.
116
+ - `null` only for optional read-model properties; constraint messages are copied verbatim.
117
+ - Executable-only binding checks (PLAY0350/0352/0388/0389/0273) do not show in V1: run V3.
118
+
119
+ ### Modeling defaults
120
+ - Every slice has at least one specification at the application boundary.
121
+ - One behaviour per spec; names read as sentences: `Reserving...`, `Rejecting...`, `Refusing...`
122
+ (denial), `<View>LifecycleN<State>` for families.
123
+ - `for` on every given, appended and expected event, and on the `when` command where the
124
+ destination matters. A competing-claim given needs a *different* `for`.
125
+ - Format rules belong on a `concept`: give each concept rule representative acceptance,
126
+ rejection and boundary specs once (through one command that carries it), not on every use;
127
+ never `n/a` automatically. This matches `cratis-screenplay-specifications`, which also
128
+ requires one rejection spec per concept rule. Business rules get one rejection spec each.
129
+ - Persona Cannot lines are intent: each needs an executable gate plus a `then denied` spec whose
130
+ caller carries that persona's roles and claims, else record a gap.
131
+ - Descriptions are not rendered: a rule only in prose is unenforced in rendered scope; turn it
132
+ into a rule layer, a spec or a recorded target requirement.
133
+ - Prove projections with events (`given`/`when append`), not `given readmodel`; seed read models
134
+ only for performer-backed views or commands that decide on view state.
135
+ - No contradiction between a family and single-transition specs of the same view.
136
+
137
+ ### Quality checklist (adapted from the TrogonStack scenario checklist; `references/provenance.md`)
138
+ - Every command has a success spec, a spec per rule, and state-violation specs where a lifecycle
139
+ exists; every gated command and query has its own denial.
140
+ - Givens state the facts and their sources; outcomes list the exact events or the exact message.
141
+ - Every read model has population, update and (where it removes) removal specs.
142
+ - Alternative paths, compensation and external failure are specified or carry a reason.
143
+ - Each matrix cell holds a value; each `n/a` is a domain reason.
144
+
145
+ ### Review questions
146
+ - Where is this invariant enforced, and what does the loser of a race see (enforced or declared)?
147
+ - What does a client that lost the acknowledgement do with the retry's answer?
148
+ - Can facts from other event sources arrive before ours? Does the view tolerate it?
149
+ - After a correction or backdated fact, does the view still say something true?
150
+ - Cross-context views: are the real source contracts resolved, or is missing evidence a gap?
151
+
152
+ ## Version skew: reaction cascades and false PLAY0285
153
+ Under ESM v6 a command spec's `then` lists the events reactions cascade from it. The
154
+ cratis-bundled compiler reports a **false PLAY0285** for such a spec (cli#242, open); the
155
+ standalone `screenplay` tool accepts it. Neither checks that a cascade event is *missing*.
156
+ - Standalone tool available: write the v6-correct spec (own productions plus cascade); validate
157
+ with `screenplay <folder> --warnaserror --no-color`; record the `cratis` PLAY0285 as a
158
+ tool-version gap. Examples with cascades start with `// Needs the standalone screenplay compiler (ESM v6)`.
159
+ - `cratis` only: keep the command spec to its own productions, specify the reaction in its
160
+ Automation slice (`when append <Trigger>` -> `then <Produced>`), record the pending cascade
161
+ expectation in `STATE.md` as known-incomplete. Never delete the reaction.
162
+
163
+ ## Gate
164
+ A scope is spec-complete only when: the matrix has no `open`, `question` or `gap` cell (or the
165
+ scope is reported as explicitly incomplete); V1 passes with the tool named in
166
+ `cratis-screenplay-toolchain`; for executable or renderable scope V3 is binding-ready.
167
+
168
+ ## Verify
169
+ - Re-inventory declarations at the reported revision: every applicable obligation maps to an
170
+ existing spec whose givens, action and assertions exercise it.
171
+ - Commands and read models are checked in separate passes; each removing projection has a
172
+ populated-then-removed spec.
173
+ - V1 passes (standalone `screenplay` required when cascades are specified); report tool and
174
+ version.
175
+ - V4 is "not run: no route" unless a Screenplay reference route was actually executed (Stage's spec runner is target-engine evidence, never V4); V1/V3 do not prove specs
176
+ pass. V5 is "not run" unless rendering was attempted; report admission, publication, build and
177
+ tests separately.
178
+ - Match guarantees to evidence: `.play` outcomes, in-process Chronicle scenarios and real-kernel
179
+ tests are not interchangeable (`references/chronicle-verification.md`).
180
+ - Reference example `references/berth-reservations.md`: compiles with warnings as errors.
181
+
182
+ ## Route near misses
183
+ - Grammar, vocabulary, comparison: `cratis-screenplay-specifications`. Rules being pinned:
184
+ `cratis-screenplay-command-surface`. Projections asserted on: `cratis-screenplay-projections`.
185
+ - Reaction, clock and capture scenarios: `cratis-screenplay-automations-and-translations`.
186
+ Invariant placement: `cratis-screenplay-streams-and-consistency`.
187
+ - Reviewing coverage critically: `cratis-screenplay-model-review`. C# specs:
188
+ `cratis-specifications-csharp`.
189
+
190
+ ## References (load on demand)
191
+ - `references/scenario-catalogue.md` - each type: ask, applies when, n/a when, shape, traps; example data.
192
+ - `references/view-and-story-specs.md` - view specs, lifecycle families, ordering, lag.
193
+ - `references/coverage-matrix.md` - obligations from declarations, template, worked matrix.
194
+ - `references/scenario-workshop.md` - facilitation guide for group scenario sessions.
195
+ - `references/chronicle-verification.md` - guarantees that need more than a `.play` outcome.
196
+ - `references/spec-forms-by-mode.md` - admitted forms in design, executable, renderable.
197
+ - `references/berth-reservations.md` - complete compiled example (marina guest berths).
198
+
199
+ ## Lineage
200
+ Attribution and adapted sources: `references/provenance.md`.