@cratis/pi 7.14.1 → 7.14.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package/corpus/agents/security-reviewer.md +2 -1
- package/package/corpus/rules/concepts.md +13 -7
- package/package/corpus/rules/glossary.md +2 -1
- package/package/corpus/rules/vertical-slices.md +5 -4
- package/package/corpus/skills/cratis-application-slice-conformance/SKILL.md +11 -2
- package/package/corpus/skills/cratis-application-slice-conformance/references/build-prompts.md +8 -0
- package/package/corpus/skills/cratis-application-slice-conformance/references/checklists.md +10 -6
- package/package/corpus/skills/cratis-application-slice-specifications/SKILL.md +1 -1
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/SKILL.md +11 -7
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/authentication.md +12 -2
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/authorization.md +16 -1
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/frontend.md +7 -0
- package/package/corpus/skills/cratis-arc-authentication-authorization-and-identity/references/observable-emission-guards.md +9 -0
- package/package/corpus/skills/cratis-arc-command/SKILL.md +24 -16
- package/package/corpus/skills/cratis-arc-command/references/command-result.md +7 -0
- package/package/corpus/skills/cratis-arc-command/references/handler-shapes.md +10 -3
- package/package/corpus/skills/cratis-arc-command-execution/SKILL.md +1 -1
- package/package/corpus/skills/cratis-arc-command-operation/SKILL.md +5 -1
- package/package/corpus/skills/cratis-arc-command-operation/references/execution-and-recovery.md +12 -0
- package/package/corpus/skills/cratis-arc-command-operation/references/testing.md +10 -3
- package/package/corpus/skills/cratis-arc-command-typescript/SKILL.md +20 -116
- package/package/corpus/skills/cratis-arc-command-typescript/references/chronicle-events.md +11 -8
- package/package/corpus/skills/cratis-arc-command-typescript/references/command-specifications.md +63 -0
- package/package/corpus/skills/cratis-arc-command-typescript/references/hosting-and-storage.md +10 -0
- package/package/corpus/skills/cratis-arc-command-typescript/references/proxy-generation.md +38 -0
- package/package/corpus/skills/cratis-arc-command-typescript/references/slice-layout.md +19 -0
- package/package/corpus/skills/cratis-arc-command-typescript/verification.json +1 -1
- package/package/corpus/skills/cratis-arc-command-validation/SKILL.md +1 -1
- package/package/corpus/skills/cratis-arc-query-paging/SKILL.md +11 -10
- package/package/corpus/skills/cratis-arc-react-page/SKILL.md +30 -19
- package/package/corpus/skills/cratis-arc-react-page/references/data-page.md +11 -0
- package/package/corpus/skills/cratis-arc-react-page/references/data-tables.md +10 -0
- package/package/corpus/skills/cratis-arc-react-page/references/dialogs.md +12 -10
- package/package/corpus/skills/cratis-arc-react-page/references/from-screenplay.md +10 -0
- package/package/corpus/skills/cratis-arc-react-page/references/mvvm.md +11 -0
- package/package/corpus/skills/cratis-arc-react-page/references/queries-and-commands.md +7 -0
- package/package/corpus/skills/cratis-chronicle-client-dotnet/SKILL.md +58 -122
- package/package/corpus/skills/cratis-chronicle-client-dotnet/references/compatibility-check.md +26 -0
- package/package/corpus/skills/cratis-chronicle-client-dotnet/references/discovery.md +22 -0
- package/package/corpus/skills/cratis-chronicle-client-dotnet/references/hosting.md +31 -0
- package/package/corpus/skills/cratis-chronicle-client-elixir/SKILL.md +52 -131
- package/package/corpus/skills/cratis-chronicle-client-elixir/references/append-api.md +19 -0
- package/package/corpus/skills/cratis-chronicle-client-elixir/references/variants.md +73 -0
- package/package/corpus/skills/cratis-chronicle-client-kotlin/SKILL.md +29 -232
- package/package/corpus/skills/cratis-chronicle-client-kotlin/references/connection-lifecycle.md +20 -0
- package/package/corpus/skills/cratis-chronicle-client-kotlin/references/discovery-and-registration.md +44 -0
- package/package/corpus/skills/cratis-chronicle-client-kotlin/references/java-api.md +33 -0
- package/package/corpus/skills/cratis-chronicle-client-kotlin/references/spring-boot.md +54 -0
- package/package/corpus/skills/cratis-chronicle-client-kotlin/references/variants.md +77 -0
- package/package/corpus/skills/cratis-chronicle-client-typescript/SKILL.md +26 -102
- package/package/corpus/skills/cratis-chronicle-client-typescript/references/read-models-and-projections.md +23 -0
- package/package/corpus/skills/cratis-chronicle-client-typescript/references/variants.md +63 -0
- package/package/corpus/skills/cratis-chronicle-compliance/SKILL.md +11 -2
- package/package/corpus/skills/cratis-chronicle-event-modeling/SKILL.md +2 -2
- package/package/corpus/skills/cratis-chronicle-event-type-migration/SKILL.md +13 -13
- package/package/corpus/skills/cratis-chronicle-mcp-inspection/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-projection/SKILL.md +13 -4
- package/package/corpus/skills/cratis-chronicle-projection/references/fluent-builder.md +10 -0
- package/package/corpus/skills/cratis-chronicle-projection/references/model-bound-attributes.md +14 -6
- package/package/corpus/skills/cratis-chronicle-projection/references/variants.md +9 -0
- package/package/corpus/skills/cratis-chronicle-reactor/SKILL.md +7 -49
- package/package/corpus/skills/cratis-chronicle-reactor/references/domain-failures.md +19 -0
- package/package/corpus/skills/cratis-chronicle-reactor/references/specifications.md +33 -0
- package/package/corpus/skills/cratis-chronicle-read-model/SKILL.md +2 -2
- package/package/corpus/skills/cratis-chronicle-read-model/references/queries.md +11 -0
- package/package/corpus/skills/cratis-chronicle-read-model-specifications/SKILL.md +1 -0
- package/package/corpus/skills/cratis-chronicle-reducer/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-web-workbench/SKILL.md +24 -24
- package/package/corpus/skills/cratis-content-length/SKILL.md +1 -1
- package/package/corpus/skills/cratis-content-length/references/length-evidence.md +12 -0
- package/package/corpus/skills/cratis-developer-marketing/SKILL.md +19 -19
- package/package/corpus/skills/cratis-developer-marketing/references/measurement.md +10 -0
- package/package/corpus/skills/cratis-developer-marketing/references/playbook-evidence.md +10 -0
- package/package/corpus/skills/cratis-engineering-csharp-conventions/SKILL.md +5 -0
- package/package/corpus/skills/cratis-engineering-csharp-conventions/references/code-style.md +15 -0
- package/package/corpus/skills/cratis-engineering-csharp-conventions/references/exceptions-logging-and-di.md +9 -4
- package/package/corpus/skills/cratis-engineering-decision-record/SKILL.md +1 -2
- package/package/corpus/skills/cratis-engineering-decision-record/references/record-format.md +8 -0
- package/package/corpus/skills/cratis-engineering-docs-authoring/SKILL.md +1 -2
- package/package/corpus/skills/cratis-engineering-effect-boundaries/references/failure-archetypes.md +10 -0
- package/package/corpus/skills/cratis-fundamentals-concept/SKILL.md +4 -4
- package/package/corpus/skills/cratis-fundamentals-type-discovery/SKILL.md +1 -1
- package/package/corpus/skills/cratis-lens-browser-extension/SKILL.md +18 -18
- package/package/corpus/skills/cratis-performance-review/SKILL.md +1 -1
- package/package/corpus/skills/cratis-release-notes/SKILL.md +1 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/SKILL.md +29 -4
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/automation-patterns.md +16 -4
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/effects-and-idempotency.md +4 -15
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/todo-list-example.md +6 -2
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/translation-patterns.md +1 -6
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/SKILL.md +45 -245
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/capture-map-and-example.md +42 -0
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/complete-examples.md +155 -0
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/specifying-triggers-and-clock.md +27 -0
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/trigger-reads-example.md +21 -0
- package/package/corpus/skills/cratis-screenplay-command-surface/SKILL.md +70 -221
- package/package/corpus/skills/cratis-screenplay-command-surface/references/context.md +10 -0
- package/package/corpus/skills/cratis-screenplay-command-surface/references/generated-values-and-responses.md +51 -0
- package/package/corpus/skills/cratis-screenplay-command-surface/references/inline-events.md +62 -0
- package/package/corpus/skills/cratis-screenplay-command-surface/references/policy-persona-seed.md +46 -0
- package/package/corpus/skills/cratis-screenplay-command-surface/references/validate-rules.md +36 -0
- package/package/corpus/skills/cratis-screenplay-command-surface/verification.json +11 -11
- package/package/corpus/skills/cratis-screenplay-discovery/SKILL.md +10 -3
- package/package/corpus/skills/cratis-screenplay-discovery/references/facilitation.md +1 -6
- package/package/corpus/skills/cratis-screenplay-discovery/references/human-workshop.md +13 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/personas-and-causes.md +8 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/plotting-and-handoff.md +11 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/storming-loop.md +7 -0
- package/package/corpus/skills/cratis-screenplay-event-modeling/SKILL.md +75 -198
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/file-layout.md +89 -0
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/naming-primitives.md +26 -0
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/nine-steps.md +14 -1
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/parsed-not-runnable.md +8 -0
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/provenance.md +10 -0
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/slice-type-rules.md +12 -0
- package/package/corpus/skills/cratis-screenplay-event-modeling/verification.json +12 -6
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/SKILL.md +5 -6
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/candidate-inventory.md +11 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/prologue-safety.md +8 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/side-car-migration.md +11 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/ui-observation.md +1 -1
- package/package/corpus/skills/cratis-screenplay-model-authoring/SKILL.md +33 -10
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md +8 -0
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-loop.md +13 -17
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-tools.md +11 -0
- package/package/corpus/skills/cratis-screenplay-model-review/SKILL.md +9 -9
- package/package/corpus/skills/cratis-screenplay-model-review/references/business-questions.md +9 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/checklist.md +16 -1
- package/package/corpus/skills/cratis-screenplay-model-review/references/report-template.md +9 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/worked-example.md +9 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/SKILL.md +17 -8
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/handoff-template.md +8 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/identity-and-edits.md +1 -6
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/phases.md +19 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/safety.md +1 -1
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/verdicts-and-modes.md +11 -1
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/vocabulary-map.md +2 -2
- package/package/corpus/skills/cratis-screenplay-projections/SKILL.md +3 -4
- package/package/corpus/skills/cratis-screenplay-projections/references/pdl-grammar.md +8 -0
- package/package/corpus/skills/cratis-screenplay-read-surface/SKILL.md +2 -2
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +3 -3
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/gap-fill-handoff.md +1 -1
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/renderability-gate.md +1 -1
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/worked-example.md +8 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/SKILL.md +10 -10
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/coverage-matrix.md +8 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/invoicing-dues-example.md +4 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-catalogue.md +17 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-examples.md +10 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-workshop.md +11 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/view-and-story-specs.md +12 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/SKILL.md +2 -2
- package/package/corpus/skills/cratis-screenplay-slice-design/references/command-inventory.md +7 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/field-lineage.md +8 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/read-model-design.md +16 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/slicing.md +10 -0
- package/package/corpus/skills/cratis-screenplay-specifications/SKILL.md +52 -360
- package/package/corpus/skills/cratis-screenplay-specifications/references/actions-beyond-commands.md +34 -0
- package/package/corpus/skills/cratis-screenplay-specifications/references/concept-rules.md +77 -0
- package/package/corpus/skills/cratis-screenplay-specifications/references/generated-fixtures.md +39 -0
- package/package/corpus/skills/cratis-screenplay-specifications/references/reactions-and-cascades.md +72 -0
- package/package/corpus/skills/cratis-screenplay-specifications/references/worked-example.md +110 -0
- package/package/corpus/skills/cratis-screenplay-specifications/verification.json +6 -6
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +23 -3
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/boundaries.md +13 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/chronicle-boundaries.md +3 -3
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/consistency-and-concurrency.md +16 -20
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/stream-patterns.md +16 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +13 -7
- package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostics.md +10 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/doc-contradictions.md +1 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-subset.md +12 -2
- package/package/corpus/skills/cratis-screenplay-toolchain/references/generated-responses-example.md +1 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/provenance.md +2 -2
- package/package/corpus/skills/cratis-screenplay-toolchain/references/renderable-subset.md +1 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/traps.md +1 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/verdicts.md +10 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/versions.md +15 -5
- package/package/corpus/skills/cratis-screenplay-ui-composition/SKILL.md +11 -13
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/flow-review.md +1 -1
- package/package/corpus/skills/cratis-security-review/SKILL.md +13 -8
- package/package/corpus/skills/cratis-social-feed-post/SKILL.md +10 -10
- package/package/corpus/skills/cratis-social-feed-post/references/engagement-evidence.md +12 -0
- package/package/corpus/skills/cratis-specifications-csharp/SKILL.md +13 -2
- package/package/corpus/skills/cratis-specifications-csharp/references/application-scenarios.md +10 -10
- package/package/corpus/skills/cratis-specifications-csharp/references/csharp-patterns.md +10 -0
- package/package/corpus/skills/cratis-specifications-csharp/references/integration-specs.md +9 -0
- package/package/corpus/skills/cratis-specifications-typescript/SKILL.md +1 -2
- package/package/corpus/skills/cratis-specifications-typescript/references/typescript-patterns.md +11 -1
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/SKILL.md +30 -21
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/admission.md +9 -0
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/render-example.md +5 -0
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/sandbox-and-specrunner.md +2 -4
- package/package/corpus/skills/cratis-studio-mcp-safety-guidance/SKILL.md +2 -2
- package/package/corpus/skills/cratis-writing-voice-and-cadence/SKILL.md +39 -39
- package/package/corpus/skills/cratis-writing-voice-and-cadence/references/ai-tells.md +10 -0
- package/package.json +1 -1
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Supporting a human workshop
|
|
2
2
|
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- The agent's part
|
|
6
|
+
- Before the workshop
|
|
7
|
+
- Run sheet: discovery
|
|
8
|
+
- Techniques
|
|
9
|
+
- Remote adaptations
|
|
10
|
+
- After the workshop
|
|
11
|
+
- Multi-day plan mapped to phases
|
|
12
|
+
- Checklists
|
|
13
|
+
- Success indicators
|
|
14
|
+
- Evidence and privacy
|
|
15
|
+
|
|
3
16
|
Adapted in part from TrogonStack `eventmodeling-brainstorming-events/references/facilitating-event-modeling-workshops.md`
|
|
4
17
|
(MIT; see `provenance.md`), reshaped for Screenplay and for an agent in a supporting role.
|
|
5
18
|
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Personas and causes
|
|
2
2
|
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- Role catalogue on `persona`
|
|
6
|
+
- What a Cannot line becomes
|
|
7
|
+
- Cannot resolved to an executable gate
|
|
8
|
+
- Checks while building
|
|
9
|
+
- Non-human causes (STATE.md, until a reaction or translation exists)
|
|
10
|
+
|
|
3
11
|
## Role catalogue on `persona`
|
|
4
12
|
|
|
5
13
|
Every actor the story mentions gets a catalogue entry. Human roles are `persona`
|
package/package/corpus/skills/cratis-screenplay-discovery/references/plotting-and-handoff.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Plotting the story and handing it on
|
|
2
2
|
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- 1. Sequence
|
|
6
|
+
- 2. Record after / caused by / only if
|
|
7
|
+
- 3. Ask what can happen instead
|
|
8
|
+
- 4. Plot output format
|
|
9
|
+
- Whose turn is it in the story?
|
|
10
|
+
- Storyline: one view walked through its states
|
|
11
|
+
- 5. Plot checks
|
|
12
|
+
- Handoff packet to `cratis-screenplay-slice-design`
|
|
13
|
+
|
|
3
14
|
Plotting arranges the discovered events as a narrative: what happens first, what depends on
|
|
4
15
|
what, what can happen instead, where it ends. In Screenplay the plot is written into the
|
|
5
16
|
model (slice and feature `description` text) and into STATE.md; files sort by name, so story
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# The storming loop on `.play`
|
|
2
2
|
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- One turn
|
|
6
|
+
- Choosing the next question
|
|
7
|
+
- When to stop
|
|
8
|
+
- A discovery skeleton
|
|
9
|
+
|
|
3
10
|
The model is the whiteboard. Every piece of input is turned into model edits first; the chat
|
|
4
11
|
then reports what changed and asks one question. The user should always be able to look at the
|
|
5
12
|
`.play` source and see the conversation so far.
|
|
@@ -24,13 +24,13 @@ most reasonable answer, say so visibly where it can be corrected, never guess si
|
|
|
24
24
|
visibly during modeling; delivery blocks any guess that could encode a wrong rule, authorization,
|
|
25
25
|
money or time behavior. Contradictions, a third review round, a gate only the user can accept,
|
|
26
26
|
and approvals not yet given always stop
|
|
27
|
-
(`cratis-screenplay-modeling-lifecycle`, `references/stop-or-assume.md`).
|
|
27
|
+
(`cratis-screenplay-modeling-lifecycle`, `references/stop-or-assume.md`). Read `cratis-screenplay-modeling-lifecycle`'s `references/stop-or-assume.md` when information is missing or contradictory, or when deciding whether unattended work may proceed.
|
|
28
28
|
|
|
29
29
|
**Do not cut corners to save tokens or effort.** A rule that needs more slices, events, views,
|
|
30
30
|
translation steps or specifications gets them written; budget is never a reason to delete a
|
|
31
31
|
modeled behavior, label a gap "accepted debt" or merge translating outside data into our facts
|
|
32
32
|
into the work that acts on them. Flag a real trade-off to the user instead of resolving it by cutting the model
|
|
33
|
-
(`cratis-screenplay-modeling-lifecycle`, `references/completeness-self-check.md`).
|
|
33
|
+
(`cratis-screenplay-modeling-lifecycle`, `references/completeness-self-check.md`). Read `cratis-screenplay-modeling-lifecycle`'s `references/completeness-self-check.md` before every gate and whenever effort or token cost tempts a reduction in modeled behavior.
|
|
34
34
|
|
|
35
35
|
## Start here
|
|
36
36
|
|
|
@@ -85,6 +85,68 @@ keeps the activities, Screenplay output and facilitation questions of each step:
|
|
|
85
85
|
| 9 | Decompose into vertical slices | `cratis-screenplay-slice-design` |
|
|
86
86
|
| after 9 | Specifications, then review | `cratis-screenplay-scenario-coverage`, `cratis-screenplay-model-review` |
|
|
87
87
|
|
|
88
|
+
Read [references/nine-steps.md](references/nine-steps.md) when facilitating a workflow and needing a step's activities, required output, or questions. Read [references/invoicing-example.md](references/invoicing-example.md) when you need a complete worked `.play` document (RegisterInvoice command and InvoiceList view) to copy the shape from.
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
## Verify
|
|
92
|
+
|
|
93
|
+
```shell
|
|
94
|
+
screenplay <model-folder> --warnaserror
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
(The standalone tool; `cratis screenplay validate <model-folder> --warnings-as-errors`
|
|
98
|
+
is the fallback, and neither names the other's verdict. Versions and commands:
|
|
99
|
+
`cratis-screenplay-toolchain`.)
|
|
100
|
+
|
|
101
|
+
- [ ] Zero errors **and zero warnings**. An unrecognized construct inside a slice
|
|
102
|
+
is only a warning (`PLAY0029`) and its block is **silently dropped** - a typo
|
|
103
|
+
can delete a whole projection while the exit code stays `0`.
|
|
104
|
+
- [ ] Every behavior is exactly one slice type, and the whole model validates
|
|
105
|
+
against the eight Quick gate checks.
|
|
106
|
+
- [ ] Every event is past tense, single-purpose, and carries no event-source id.
|
|
107
|
+
- [ ] Personal data is classified on the `concept`, with a reason.
|
|
108
|
+
- [ ] Specifications name the rejections, not only the happy path.
|
|
109
|
+
- [ ] If the model must reach a runtime, check it binds with the tool that will
|
|
110
|
+
consume it. The standalone 4.68.0 binder admits Automation and Translate slices
|
|
111
|
+
(ESM v6) and generated values and responses (ESM v7); Stage 4.24.0 admits ESM v1 to v3 (4.24.2: v1 to v4, evolved events refused with `STAGE-ESM-026`) and renders only `StateChange` and
|
|
112
|
+
`StateView` slices, so automations and translations are gap-fill there.
|
|
113
|
+
|
|
114
|
+
## Parsed is not runnable
|
|
115
|
+
|
|
116
|
+
The compiler accepts far more than anything executes. Between the syntax tree and
|
|
117
|
+
any runtime sits the **executable semantic model (ESM)**, and it fails closed:
|
|
118
|
+
what it cannot represent reports `PLAY0268` or `PLAY0271` and the model does not
|
|
119
|
+
bind. Keep four states apart when you report on a model: **parsed** (the
|
|
120
|
+
`screenplay` tool), **bound** (ESM), **reference-executed** (specifications pass
|
|
121
|
+
the reference runner) and **target-executed** (Stage or a rendered application).
|
|
122
|
+
The independent verdicts V1 to V5 that report them are in
|
|
123
|
+
`cratis-screenplay-modeling-lifecycle`.
|
|
124
|
+
|
|
125
|
+
What binds depends on **which tool** you ask, so name the tool and its version:
|
|
126
|
+
|
|
127
|
+
- `Automation` and `Translate` slices, reactions, captures and triggers: the
|
|
128
|
+
standalone `screenplay` 4.66.0 or later and the `cratis` 3.28.2 bundle (4.66.0) bind them (ESM v6).
|
|
129
|
+
The `cratis` 3.27.1 bundle (Screenplay 4.60.1) reported *Slice '<name>' of type '<type>'
|
|
130
|
+
is not admitted by ESM v1.* Stage 4.24.2 admits only ESM v1 to v4 and renders none of them.
|
|
131
|
+
- `reads` and `concurrency` on a command do not bind (`PLAY0271`), so no decision is
|
|
132
|
+
protected against stale state. A reaction trigger's `reads` that only `invokes` is
|
|
133
|
+
report-only intent (`PLAY0270`); one that `produces` directly fails binding (`PLAY0268`).
|
|
134
|
+
- `persona` declarations are report-only and never block; `@pii` and `@sensitive`
|
|
135
|
+
concepts do block binding (`PLAY0268`). Keep them anyway: the classification is
|
|
136
|
+
part of the model. Report the block.
|
|
137
|
+
- Generated values and `returns` responses bind and execute from standalone 4.68.0 (ESM v7) but fail binding
|
|
138
|
+
with `PLAY0268` on the 4.66.0 bundled in `cratis` 3.28.x, and Stage 4.24.2 does not render them
|
|
139
|
+
(`STAGE-ESM-016`, tracked in Stage#201): gap-fill. Operations and systems, and event sources and
|
|
140
|
+
streams, are authorable but non-executable (`PLAY0268`; not admitted by any supported ESM version);
|
|
141
|
+
a command `handler` never binds.
|
|
142
|
+
|
|
143
|
+
The ESM versions, the full disposition table and the Step 7 clock example's binding
|
|
144
|
+
result are in [references/parsed-not-runnable.md](references/parsed-not-runnable.md)
|
|
145
|
+
and `cratis-screenplay-toolchain` (`references/executable-subset.md`). Read `references/parsed-not-runnable.md` when determining the required ESM version or interpreting binding dispositions. Read `cratis-screenplay-toolchain`'s `references/executable-subset.md` when checking binder admission or reference-execution limits. Model the wider
|
|
146
|
+
language freely when the `.play` file **is** the deliverable - documentation,
|
|
147
|
+
review, a shared description of a system. Never read a clean `screenplay` run as
|
|
148
|
+
evidence a construct works downstream.
|
|
149
|
+
|
|
88
150
|
## Locate the model
|
|
89
151
|
|
|
90
152
|
Look first for the project's existing `.play` files: the folder holding them is the
|
|
@@ -110,20 +172,14 @@ source is the single flow model.
|
|
|
110
172
|
| `Cratis.Screenplay.Tool` | `4.66.0` (`c89198b`) | Persona, operation and stream dispositions below were read at this tag, and the Step 7 clock example was probed through MCP on it |
|
|
111
173
|
|
|
112
174
|
The pin set for the whole Screenplay family, and which tool reports what, lives only in
|
|
113
|
-
`cratis-screenplay-toolchain` `references/versions.md`. The `fd18129` update follows
|
|
175
|
+
`cratis-screenplay-toolchain` `references/versions.md`. Read `cratis-screenplay-toolchain`'s `references/versions.md` before choosing a tool or reporting a version-dependent verdict. The `fd18129` update follows
|
|
114
176
|
`commands.md`, `events.md` and decision 0023 at that main commit (after v4.52.0);
|
|
115
177
|
compilation does not establish reference execution. The original baseline was checked at
|
|
116
178
|
tag `v4.31.0` (commit `355dffb`): `Documentation/screenplay/{slices,commands,folders,printing,interactions,specifications}.md`,
|
|
117
179
|
`projections/keys.md`, and decisions 0001 to 0014. Changed [nine-step examples](references/nine-steps.md)
|
|
118
180
|
use the newer commit and the 4.66.0 and 4.68.0 tools; do not attribute them to the old tag.
|
|
119
181
|
|
|
120
|
-
|
|
121
|
-
> the GWT discipline follow **Event Modeling** (Adam Dymitruk; Martin Dilger,
|
|
122
|
-
> *Understanding Eventsourcing*), as structured in
|
|
123
|
-
> [jwilger/agent-skills `event-modeling`](https://github.com/jwilger/agent-skills/tree/main/skills/event-modeling).
|
|
124
|
-
> Screenplay adopts that vocabulary directly: *"Slices are the atom - everything
|
|
125
|
-
> lives inside a typed slice aligned with Event Modeling's vocabulary."*
|
|
126
|
-
> Where Cratis deliberately diverges, this skill says so.
|
|
182
|
+
Read [references/slice-type-rules.md](references/slice-type-rules.md) when deciding if a behavior is an Automation or a Translate slice.
|
|
127
183
|
|
|
128
184
|
## Two phases - discovery, then design
|
|
129
185
|
|
|
@@ -152,16 +208,7 @@ Every behavior is exactly one. An unknown slice type is a compile error:
|
|
|
152
208
|
| Event -> decision -> Command/Event | `Automation` | `reaction` |
|
|
153
209
|
| External data -> Event | `Translate` | `capture` |
|
|
154
210
|
|
|
155
|
-
|
|
156
|
-
appear as many times as the behavior needs. Only `description` is limited to one.
|
|
157
|
-
|
|
158
|
-
**Automation has four required components** - a triggering occurrence, the state
|
|
159
|
-
it consults (the trigger's `reads`), conditional logic, and a resulting command
|
|
160
|
-
or event. If the events are always unconditionally co-produced, it is **not** an
|
|
161
|
-
automation: model it as one `StateChange` slice with several `produces` blocks.
|
|
162
|
-
|
|
163
|
-
**Translation is workflow-specific anti-corruption.** Generic infrastructure every
|
|
164
|
-
workflow needs (event persistence, message transport) is not a `Translate` slice.
|
|
211
|
+
Read [references/parsed-not-runnable.md](references/parsed-not-runnable.md) (section "Decision 0006 and shipped generations") when deciding whether a decided construct (trigger `reads`, event generations) is implemented. An accepted decision is not necessarily implemented.
|
|
165
212
|
|
|
166
213
|
## Where Cratis diverges from the generic method
|
|
167
214
|
|
|
@@ -171,7 +218,7 @@ compile or will not be safe. Both are deliberate.
|
|
|
171
218
|
- **A command may read state.** The generic method forbids `ReadModel -> Command`
|
|
172
219
|
edges. Screenplay ships `reads <ReadModel> [as <alias>] [by <property>]` so the
|
|
173
220
|
model shows what a state-dependent decision consulted. **It is not a protected
|
|
174
|
-
read
|
|
221
|
+
read at Screenplay 4.68.0:** nothing checks at append time that the state is still current,
|
|
175
222
|
the executable model rejects `reads` and `concurrency` (`PLAY0271`), and adding
|
|
176
223
|
`concurrency` does not make the decision safe (decision 0003, Screenplay #129).
|
|
177
224
|
Write a state-dependent rule as `reads <View>` plus `require <expr> message "..."`
|
|
@@ -190,32 +237,11 @@ compile or will not be safe. Both are deliberate.
|
|
|
190
237
|
the modeled `reads` + `require` intent, specifications, and the recorded
|
|
191
238
|
target-enforcement gap described above.
|
|
192
239
|
|
|
240
|
+
|
|
193
241
|
## Naming the primitives is the highest-value work
|
|
194
242
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
`Decimal`, `Bool`, `Date` and `DateTime`; `Enum` is a separate concept kind,
|
|
198
|
-
with its values indented beneath.
|
|
199
|
-
- **Classify personal data at the concept**, with a reason:
|
|
200
|
-
`concept PersonName : String @pii` plus an indented `pii reason "..."`. Every
|
|
201
|
-
usage inherits it; a reason for an attribute the concept does not declare is an
|
|
202
|
-
error. Decide this before fixing event shapes - erasure follows the subject and
|
|
203
|
-
the subject follows the stream.
|
|
204
|
-
- **Events are past tense and self-describing** - `InvoiceRegistered`, never
|
|
205
|
-
`Created`. One purpose per event; an event needing an optional property to cover
|
|
206
|
-
two situations is two events.
|
|
207
|
-
- **The event-source identity is never an event property.** The command binds it
|
|
208
|
-
with `identifier` on at most one property; marking an *event* property
|
|
209
|
-
`identifier` is an error: *an event never carries its event source id*.
|
|
210
|
-
- **Inline events remain slice-owned contracts.** A command may introduce one
|
|
211
|
-
with `produces event <Name>` and typed mappings; other slices still consume it
|
|
212
|
-
by name. Extracting it changes placement, not its contract or projection meaning.
|
|
213
|
-
- **Storage identity is not payload identity.** `for` selects the event source;
|
|
214
|
-
`id "<old name>"` preserves an event type's old persisted name on rename. New
|
|
215
|
-
events omit the pin, and the pin does not replace catalog identity. Do not copy
|
|
216
|
-
the same-source identifier into payload merely to project it; use `$eventSourceId`.
|
|
217
|
-
- **Domain facts, not runtime context.** Test: would this field have the same value
|
|
218
|
-
if the event were replayed on a different machine? If not, it does not belong.
|
|
243
|
+
Name concepts before events, classify personal data at the concept, keep events past tense and single-purpose, and never put the event-source identity in an event payload.
|
|
244
|
+
Read [references/naming-primitives.md](references/naming-primitives.md) when declaring concepts, `@pii` classification, event shapes, `identifier`, inline events or `id "<old name>"` pins.
|
|
219
245
|
|
|
220
246
|
## Quick gate - before specifications are called done
|
|
221
247
|
|
|
@@ -234,160 +260,11 @@ The full critic pass (evidence, severity, business-question review) is
|
|
|
234
260
|
instances - ask *"can there be more than one of these at once?"* for each field.
|
|
235
261
|
8. No cross-cutting infrastructure is modeled as a `Translate` slice.
|
|
236
262
|
|
|
237
|
-
## Choose a file layout
|
|
238
263
|
|
|
239
|
-
|
|
240
|
-
that keeps both the source and its diffs readable:
|
|
241
|
-
|
|
242
|
-
- Keep one `application.play` while it stays readable top to bottom.
|
|
243
|
-
- Use one file per module when modules are simple.
|
|
244
|
-
- Use one file per feature when features have sub-features.
|
|
245
|
-
- Use one file per slice when the model is large enough that a change must be
|
|
246
|
-
reviewable in isolation.
|
|
247
|
-
|
|
248
|
-
Reviewability, not an arbitrary line count, triggers the next split. In a large
|
|
249
|
-
model, one slice per file makes a scripted edit's blast radius visible in the
|
|
250
|
-
diff instead of hiding cross-reference defects in a single enormous file.
|
|
251
|
-
|
|
252
|
-
At the most granular layout, folders mirror the language, one folder per level,
|
|
253
|
-
and every level above the slices is a **barrel file** that declares its scope
|
|
254
|
-
and imports what is beneath it:
|
|
255
|
-
|
|
256
|
-
- `application.play` at the root holds `domain` and imports the rest:
|
|
257
|
-
`import "Shared/*.play"` for the files of `concept`, `type`, `policy`,
|
|
258
|
-
`persona`, `authentication` and `seed`, then one import per module file.
|
|
259
|
-
- `<Module>/<Module>.play` declares the module - `description`, `authorize`,
|
|
260
|
-
templates, forms - and its features. Either declare each feature inline and
|
|
261
|
-
import its folder (`feature Orders` / `import "Orders/*.play"`), or import one
|
|
262
|
-
`<Feature>/<Feature>.play` per feature.
|
|
263
|
-
- `<Feature>/<Feature>.play`, when a feature has its own file, declares the
|
|
264
|
-
feature and imports its slice files (`import "*.play"`) and any nested
|
|
265
|
-
feature's file.
|
|
266
|
-
- A slice file holds just its `slice`, at the top level. The import that brings
|
|
267
|
-
it in places it in its feature, so it does **not** restate `module` or
|
|
268
|
-
`feature` - the barrel above it already says where it belongs.
|
|
269
|
-
|
|
270
|
-
The root then reads as a table of contents, and every file is reachable from
|
|
271
|
-
it: `screenplay application.play` compiles exactly what the imports reach, and
|
|
272
|
-
a file no import reaches is not part of the application. Do not hand-write the
|
|
273
|
-
older merge-only layout, where barrels import nothing and every slice file
|
|
274
|
-
restates `module` and `feature` so the folder merges into one model. It compiles
|
|
275
|
-
as a folder, but the root says nothing about what the application holds and
|
|
276
|
-
every slice file repeats where it lives. The MCP `expand-layout` tool still
|
|
277
|
-
writes that layout; compose its output with imports when you take it over.
|
|
278
|
-
|
|
279
|
-
**Compose focused files with imports** (v4.48.0, checked at tag `v4.48.0`,
|
|
280
|
-
commit `3baf4a4`). `import "<path or glob>"` imports `.play` files relative to
|
|
281
|
-
the importing file - `**` crosses folders, `*` stays in one, `..` climbs. Where
|
|
282
|
-
the import is written decides where the files belong: at the top level it brings
|
|
283
|
-
in whole documents; inside a `module` or `feature` it places each imported file
|
|
284
|
-
there, so a file holds only its part of the story - a slice file is just the
|
|
285
|
-
`slice`. A root file that imports everything says what the application is made
|
|
286
|
-
of:
|
|
287
|
-
|
|
288
|
-
Layout sketches (file contents, not standalone documents):
|
|
289
|
-
|
|
290
|
-
```text
|
|
291
|
-
domain Acme.Commerce
|
|
292
|
-
|
|
293
|
-
import "Shared/*.play"
|
|
294
|
-
import "Ordering/Ordering.play"
|
|
295
|
-
```
|
|
296
|
-
|
|
297
|
-
```text
|
|
298
|
-
module Ordering
|
|
299
|
-
description "Orders, from basket to doorstep"
|
|
300
|
-
feature Orders
|
|
301
|
-
import "Orders/*.play"
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
Every file is imported once. When a root glob and a module file both match a
|
|
305
|
-
file, the deepest placement wins; two placements where neither lies inside the
|
|
306
|
-
other are an error (`PLAY0457`), and so is a file that declares a module other
|
|
307
|
-
than the one it is placed in (`PLAY0459`). A placed file's top level holds only
|
|
308
|
-
what its scope can hold (`PLAY0460`) - a `screen template` belongs in the
|
|
309
|
-
module file, not in a slice file placed in a feature. `import Customers.CustomerRegistered` without quotes still
|
|
310
|
-
names a contract from another bounded context.
|
|
311
|
-
|
|
312
|
-
⚠️ **Compile the folder, or its root file, as one application.**
|
|
313
|
-
`screenplay <root file>` compiles what the root imports. `screenplay <folder>` merges every
|
|
314
|
-
`.play` beneath the root *before* resolving, so an event declared in one file and
|
|
315
|
-
produced in another resolves. Compiling files individually reports unknown types,
|
|
316
|
-
events and policies (`PLAY0165`, `PLAY0166`, `PLAY0167`) that are not missing.
|
|
317
|
-
Duplicates *across* files are real errors naming both ends (`PLAY0172`, `PLAY0173`).
|
|
318
|
-
|
|
319
|
-
Round-tripping a folder does not preserve the order of **modules, features and
|
|
320
|
-
slices**: they come back sorted by name, and members of one module or feature
|
|
321
|
-
that come from different files print in canonical kind order. Order *within* one
|
|
322
|
-
file is kept, and some order carries meaning: `authorize` gates and policy
|
|
323
|
-
operands evaluate left to right, and specification events compare in authored
|
|
324
|
-
order unless `then events in any order` is stated. Never encode meaning in the
|
|
325
|
-
order of modules, features or slices.
|
|
326
|
-
|
|
327
|
-
## Verify
|
|
328
|
-
|
|
329
|
-
```shell
|
|
330
|
-
screenplay <model-folder> --warnaserror
|
|
331
|
-
```
|
|
332
|
-
|
|
333
|
-
(The standalone tool; `cratis screenplay validate <model-folder> --warnings-as-errors`
|
|
334
|
-
is the fallback, and neither names the other's verdict. Versions and commands:
|
|
335
|
-
`cratis-screenplay-toolchain`.)
|
|
336
|
-
|
|
337
|
-
- [ ] Zero errors **and zero warnings**. An unrecognized construct inside a slice
|
|
338
|
-
is only a warning (`PLAY0029`) and its block is **silently dropped** - a typo
|
|
339
|
-
can delete a whole projection while the exit code stays `0`.
|
|
340
|
-
- [ ] Every behavior is exactly one slice type, and the whole model validates
|
|
341
|
-
against the eight checks above.
|
|
342
|
-
- [ ] Every event is past tense, single-purpose, and carries no event-source id.
|
|
343
|
-
- [ ] Personal data is classified on the `concept`, with a reason.
|
|
344
|
-
- [ ] Specifications name the rejections, not only the happy path.
|
|
345
|
-
- [ ] If the model must reach a runtime, check it binds with the tool that will
|
|
346
|
-
consume it. The standalone 4.68.0 binder admits Automation and Translate slices
|
|
347
|
-
(ESM v6) and generated values and responses (ESM v7); Stage 4.24.0 admits ESM v1 to v3 (4.24.2: v1 to v4, evolved events refused with `STAGE-ESM-026`) and renders only `StateChange` and
|
|
348
|
-
`StateView` slices, so automations and translations are gap-fill there.
|
|
349
|
-
|
|
350
|
-
## Parsed is not runnable
|
|
351
|
-
|
|
352
|
-
The compiler accepts far more than anything executes. Between the syntax tree and
|
|
353
|
-
any runtime sits the **executable semantic model (ESM)**, and it fails closed:
|
|
354
|
-
what it cannot represent reports `PLAY0268` or `PLAY0271` and the model does not
|
|
355
|
-
bind. Keep four states apart when you report on a model: **parsed** (the
|
|
356
|
-
`screenplay` tool), **bound** (ESM), **reference-executed** (specifications pass
|
|
357
|
-
the reference runner) and **target-executed** (Stage or a rendered application).
|
|
358
|
-
The independent verdicts V1 to V5 that report them are in
|
|
359
|
-
`cratis-screenplay-modeling-lifecycle`.
|
|
360
|
-
|
|
361
|
-
What binds depends on **which tool** you ask, so name the tool and its version:
|
|
362
|
-
|
|
363
|
-
- `Automation` and `Translate` slices, reactions, captures and triggers: the
|
|
364
|
-
standalone `screenplay` 4.66.0 or later and the `cratis` 3.28.2 bundle (4.66.0) bind them (ESM v6).
|
|
365
|
-
The `cratis` 3.27.1 bundle (Screenplay 4.60.1) reported *Slice '<name>' of type '<type>'
|
|
366
|
-
is not admitted by ESM v1.* Stage 4.24.2 admits only ESM v1 to v4 and renders none of them.
|
|
367
|
-
- `reads` and `concurrency` on a command do not bind (`PLAY0271`), so no decision is
|
|
368
|
-
protected against stale state. A reaction trigger's `reads` that only `invokes` is
|
|
369
|
-
report-only intent (`PLAY0270`); one that `produces` directly fails binding (`PLAY0268`).
|
|
370
|
-
- `persona` declarations are report-only and never block; `@pii` and `@sensitive`
|
|
371
|
-
concepts do block binding (`PLAY0268`). Keep them anyway: the classification is
|
|
372
|
-
part of the model. Report the block.
|
|
373
|
-
- Generated values and `returns` responses bind and execute from standalone 4.68.0 (ESM v7) but fail binding
|
|
374
|
-
with `PLAY0268` on the 4.66.0 bundled in `cratis` 3.28.x, and Stage 4.24.2 does not render them
|
|
375
|
-
(`STAGE-ESM-016`, tracked in Stage#201): gap-fill. Operations and systems, and event sources and
|
|
376
|
-
streams, are authorable but non-executable (`PLAY0268`; not admitted by any supported ESM version);
|
|
377
|
-
a command `handler` never binds.
|
|
378
|
-
|
|
379
|
-
The ESM versions, the full disposition table and the Step 7 clock example's binding
|
|
380
|
-
result are in [references/parsed-not-runnable.md](references/parsed-not-runnable.md)
|
|
381
|
-
and `cratis-screenplay-toolchain` (`references/executable-subset.md`). Model the wider
|
|
382
|
-
language freely when the `.play` file **is** the deliverable - documentation,
|
|
383
|
-
review, a shared description of a system. Never read a clean `screenplay` run as
|
|
384
|
-
evidence a construct works downstream.
|
|
264
|
+
## Choose a file layout
|
|
385
265
|
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
but nothing enforces them yet. Event generations and typed repairs now ship;
|
|
389
|
-
generations do not supply deployed migrations. Do not treat every accepted
|
|
390
|
-
decision as implemented: check the construct's own page and the versions table.
|
|
266
|
+
Choose the coarsest layout that keeps source and diffs readable; compile the folder, or its root file, as one application, because compiling files individually reports false unknown-type errors (`PLAY0165`, `PLAY0166`, `PLAY0167`).
|
|
267
|
+
Read [references/file-layout.md](references/file-layout.md) when choosing or changing the file layout, writing `import` barrels, or compiling a split model.
|
|
391
268
|
|
|
392
269
|
## Route near misses
|
|
393
270
|
|
|
@@ -407,4 +284,4 @@ The lifecycle, toolchain and phase skills are in "Start here" above. Construct a
|
|
|
407
284
|
| Modeling against hand-written Chronicle C# | `cratis-chronicle-event-modeling` |
|
|
408
285
|
|
|
409
286
|
## Lineage
|
|
410
|
-
Method lineage, Nebulit material and licenses: `references/provenance.md`.
|
|
287
|
+
Method lineage, Nebulit material and licenses: `references/provenance.md`. Read it when checking method lineage, attribution, or adaptation permissions.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
## Choose a file layout
|
|
2
|
+
|
|
3
|
+
Treat the model folder as one application and choose the coarsest layout
|
|
4
|
+
that keeps both the source and its diffs readable:
|
|
5
|
+
|
|
6
|
+
- Keep one `application.play` while it stays readable top to bottom.
|
|
7
|
+
- Use one file per module when modules are simple.
|
|
8
|
+
- Use one file per feature when features have sub-features.
|
|
9
|
+
- Use one file per slice when the model is large enough that a change must be
|
|
10
|
+
reviewable in isolation.
|
|
11
|
+
|
|
12
|
+
Reviewability, not an arbitrary line count, triggers the next split. In a large
|
|
13
|
+
model, one slice per file makes a scripted edit's blast radius visible in the
|
|
14
|
+
diff instead of hiding cross-reference defects in a single enormous file.
|
|
15
|
+
|
|
16
|
+
At the most granular layout, folders mirror the language, one folder per level,
|
|
17
|
+
and every level above the slices is a **barrel file** that declares its scope
|
|
18
|
+
and imports what is beneath it:
|
|
19
|
+
|
|
20
|
+
- `application.play` at the root holds `domain` and imports the rest:
|
|
21
|
+
`import "Shared/*.play"` for the files of `concept`, `type`, `policy`,
|
|
22
|
+
`persona`, `authentication` and `seed`, then one import per module file.
|
|
23
|
+
- `<Module>/<Module>.play` declares the module - `description`, `authorize`,
|
|
24
|
+
templates, forms - and its features. Either declare each feature inline and
|
|
25
|
+
import its folder (`feature Orders` / `import "Orders/*.play"`), or import one
|
|
26
|
+
`<Feature>/<Feature>.play` per feature.
|
|
27
|
+
- `<Feature>/<Feature>.play`, when a feature has its own file, declares the
|
|
28
|
+
feature and imports its slice files (`import "*.play"`) and any nested
|
|
29
|
+
feature's file.
|
|
30
|
+
- A slice file holds just its `slice`, at the top level. The import that brings
|
|
31
|
+
it in places it in its feature, so it does **not** restate `module` or
|
|
32
|
+
`feature` - the barrel above it already says where it belongs.
|
|
33
|
+
|
|
34
|
+
The root then reads as a table of contents, and every file is reachable from
|
|
35
|
+
it: `screenplay application.play` compiles exactly what the imports reach, and
|
|
36
|
+
a file no import reaches is not part of the application. Do not hand-write the
|
|
37
|
+
older merge-only layout, where barrels import nothing and every slice file
|
|
38
|
+
restates `module` and `feature` so the folder merges into one model. It compiles
|
|
39
|
+
as a folder, but the root says nothing about what the application holds and
|
|
40
|
+
every slice file repeats where it lives. The MCP `expand-layout` tool still
|
|
41
|
+
writes that layout; compose its output with imports when you take it over.
|
|
42
|
+
|
|
43
|
+
**Compose focused files with imports** (v4.48.0, checked at tag `v4.48.0`,
|
|
44
|
+
commit `3baf4a4`). `import "<path or glob>"` imports `.play` files relative to
|
|
45
|
+
the importing file - `**` crosses folders, `*` stays in one, `..` climbs. Where
|
|
46
|
+
the import is written decides where the files belong: at the top level it brings
|
|
47
|
+
in whole documents; inside a `module` or `feature` it places each imported file
|
|
48
|
+
there, so a file holds only its part of the story - a slice file is just the
|
|
49
|
+
`slice`. A root file that imports everything says what the application is made
|
|
50
|
+
of:
|
|
51
|
+
|
|
52
|
+
Layout sketches (file contents, not standalone documents):
|
|
53
|
+
|
|
54
|
+
```text
|
|
55
|
+
domain Acme.Commerce
|
|
56
|
+
|
|
57
|
+
import "Shared/*.play"
|
|
58
|
+
import "Ordering/Ordering.play"
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
```text
|
|
62
|
+
module Ordering
|
|
63
|
+
description "Orders, from basket to doorstep"
|
|
64
|
+
feature Orders
|
|
65
|
+
import "Orders/*.play"
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Every file is imported once. When a root glob and a module file both match a
|
|
69
|
+
file, the deepest placement wins; two placements where neither lies inside the
|
|
70
|
+
other are an error (`PLAY0457`), and so is a file that declares a module other
|
|
71
|
+
than the one it is placed in (`PLAY0459`). A placed file's top level holds only
|
|
72
|
+
what its scope can hold (`PLAY0460`) - a `screen template` belongs in the
|
|
73
|
+
module file, not in a slice file placed in a feature. `import Customers.CustomerRegistered` without quotes still
|
|
74
|
+
names a contract from another bounded context.
|
|
75
|
+
|
|
76
|
+
⚠️ **Compile the folder, or its root file, as one application.**
|
|
77
|
+
`screenplay <root file>` compiles what the root imports. `screenplay <folder>` merges every
|
|
78
|
+
`.play` beneath the root *before* resolving, so an event declared in one file and
|
|
79
|
+
produced in another resolves. Compiling files individually reports unknown types,
|
|
80
|
+
events and policies (`PLAY0165`, `PLAY0166`, `PLAY0167`) that are not missing.
|
|
81
|
+
Duplicates *across* files are real errors naming both ends (`PLAY0172`, `PLAY0173`).
|
|
82
|
+
|
|
83
|
+
Round-tripping a folder does not preserve the order of **modules, features and
|
|
84
|
+
slices**: they come back sorted by name, and members of one module or feature
|
|
85
|
+
that come from different files print in canonical kind order. Order *within* one
|
|
86
|
+
file is kept, and some order carries meaning: `authorize` gates and policy
|
|
87
|
+
operands evaluate left to right, and specification events compare in authored
|
|
88
|
+
order unless `then events in any order` is stated. Never encode meaning in the
|
|
89
|
+
order of modules, features or slices.
|
package/package/corpus/skills/cratis-screenplay-event-modeling/references/naming-primitives.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
## Naming the primitives is the highest-value work
|
|
2
|
+
|
|
3
|
+
- **Concepts before events.** `concept InvoiceId : Uuid` once, and every construct
|
|
4
|
+
using it is typed end to end. The seven primitives are `Uuid`, `String`, `Int`,
|
|
5
|
+
`Decimal`, `Bool`, `Date` and `DateTime`; `Enum` is a separate concept kind,
|
|
6
|
+
with its values indented beneath.
|
|
7
|
+
- **Classify personal data at the concept**, with a reason:
|
|
8
|
+
`concept PersonName : String @pii` plus an indented `pii reason "..."`. Every
|
|
9
|
+
usage inherits it; a reason for an attribute the concept does not declare is an
|
|
10
|
+
error. Decide this before fixing event shapes - erasure follows the subject and
|
|
11
|
+
the subject follows the stream.
|
|
12
|
+
- **Events are past tense and self-describing** - `InvoiceRegistered`, never
|
|
13
|
+
`Created`. One purpose per event; an event needing an optional property to cover
|
|
14
|
+
two situations is two events.
|
|
15
|
+
- **The event-source identity is never an event property.** The command binds it
|
|
16
|
+
with `identifier` on at most one property; marking an *event* property
|
|
17
|
+
`identifier` is an error: *an event never carries its event source id*.
|
|
18
|
+
- **Inline events remain slice-owned contracts.** A command may introduce one
|
|
19
|
+
with `produces event <Name>` and typed mappings; other slices still consume it
|
|
20
|
+
by name. Extracting it changes placement, not its contract or projection meaning.
|
|
21
|
+
- **Storage identity is not payload identity.** `for` selects the event source;
|
|
22
|
+
`id "<old name>"` preserves an event type's old persisted name on rename. New
|
|
23
|
+
events omit the pin, and the pin does not replace catalog identity. Do not copy
|
|
24
|
+
the same-source identifier into payload merely to project it; use `$eventSourceId`.
|
|
25
|
+
- **Domain facts, not runtime context.** Test: would this field have the same value
|
|
26
|
+
if the event were replayed on a different machine? If not, it does not belong.
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# The nine-step workflow design process
|
|
2
2
|
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- Step 1 — Identify the user goal
|
|
6
|
+
- Step 2 — Brainstorm events
|
|
7
|
+
- Step 3 — Order events chronologically
|
|
8
|
+
- Step 4 — Create wireframes
|
|
9
|
+
- Step 5 — Identify commands
|
|
10
|
+
- Step 6 — Design read models
|
|
11
|
+
- Step 7 — Find automations
|
|
12
|
+
- Step 8 — Map external integrations
|
|
13
|
+
- Step 9 — Decompose into vertical slices
|
|
14
|
+
- Facilitation questions quick reference
|
|
15
|
+
|
|
3
16
|
Follow all nine steps for each workflow. Do not skip steps, do not combine them,
|
|
4
17
|
and do not start workflow 2 while workflow 1 is incomplete — **discovery is
|
|
5
18
|
design**. Each step has a defined Screenplay output; produce it.
|
|
@@ -264,7 +277,7 @@ module Invoicing
|
|
|
264
277
|
issuedAt = "2026-10-05T07:30:00Z"
|
|
265
278
|
```
|
|
266
279
|
|
|
267
|
-
|
|
280
|
+
At the example's verified Screenplay 4.66.0 version, iterating the overdue items needs code (a clock trigger reads the whole view and takes
|
|
268
281
|
no `by`); see `cratis-screenplay-automations-and-translations`. A reaction that `produces`
|
|
269
282
|
directly while it `reads` fails binding (`PLAY0268`): decide in a command instead.
|
|
270
283
|
|
package/package/corpus/skills/cratis-screenplay-event-modeling/references/parsed-not-runnable.md
CHANGED
|
@@ -53,3 +53,11 @@ diagnostics. It binds as a scheduled invocation; its `reads` is intent only, so
|
|
|
53
53
|
decision is not executed by the model. The `cratis` 3.28.2 bundle (Screenplay 4.66.0) binds it the same way (probed); the 3.27.1 bundle
|
|
54
54
|
(Screenplay 4.60.1, ESM v1 to v5) compiled it but rejected the Automation slice at binding. Report reaction
|
|
55
55
|
specifications as authored, not as run, unless a V4 run says otherwise.
|
|
56
|
+
|
|
57
|
+
## Decision 0006 and shipped generations
|
|
58
|
+
|
|
59
|
+
Decision 0006 shipped in Screenplay 4.31.0: a reaction trigger can declare the
|
|
60
|
+
views it decides from with `reads` (see `cratis-screenplay-captures-and-reactions`),
|
|
61
|
+
but nothing enforces them yet. Event generations and typed repairs now ship;
|
|
62
|
+
generations do not supply deployed migrations. Do not treat every accepted
|
|
63
|
+
decision as implemented: check the construct's own page and the versions table.
|
|
@@ -17,3 +17,13 @@ is adapted with the agreement of Martin Dilger and Nebulit GmbH.
|
|
|
17
17
|
|---|---|---|
|
|
18
18
|
| `.claude/skills/eventmodeling-orchestrating-event-modeling/SKILL.md`: "Do not cut corners to save tokens or effort" | `SKILL.md` paragraph "Do not cut corners to save tokens or effort" (short form; full text in the lifecycle skill) | Adapted closely; restored from #493; translated to Screenplay |
|
|
19
19
|
| `.claude/skills/eventmodeling-interview-protocol/SKILL.md`: when to ask, unless told not to ask | `SKILL.md` paragraph "Ask only what the step needs" (short form; full text in the lifecycle skill) | Adapted closely; restored from #493; recording moved to STATE.md |
|
|
20
|
+
|
|
21
|
+
## Method lineage in SKILL.md
|
|
22
|
+
|
|
23
|
+
> **Method lineage.** The two-phase process, the nine steps, the four patterns and
|
|
24
|
+
> the GWT discipline follow **Event Modeling** (Adam Dymitruk; Martin Dilger,
|
|
25
|
+
> *Understanding Eventsourcing*), as structured in
|
|
26
|
+
> [jwilger/agent-skills `event-modeling`](https://github.com/jwilger/agent-skills/tree/main/skills/event-modeling).
|
|
27
|
+
> Screenplay adopts that vocabulary directly: *"Slices are the atom - everything
|
|
28
|
+
> lives inside a typed slice aligned with Event Modeling's vocabulary."*
|
|
29
|
+
> Where Cratis deliberately diverges, this skill says so.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
## Slice type rules
|
|
2
|
+
|
|
3
|
+
**A slice is one behavior, not one artifact of each kind.** Every construct may
|
|
4
|
+
appear as many times as the behavior needs. Only `description` is limited to one.
|
|
5
|
+
|
|
6
|
+
**Automation has four required components** - a triggering occurrence, the state
|
|
7
|
+
it consults (the trigger's `reads`), conditional logic, and a resulting command
|
|
8
|
+
or event. If the events are always unconditionally co-produced, it is **not** an
|
|
9
|
+
automation: model it as one `StateChange` slice with several `produces` blocks.
|
|
10
|
+
|
|
11
|
+
**Translation is workflow-specific anti-corruption.** Generic infrastructure every
|
|
12
|
+
workflow needs (event persistence, message transport) is not a `Translate` slice.
|
|
@@ -9,11 +9,13 @@
|
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
11
|
"kind": "skill-contains",
|
|
12
|
-
"value": "Inline events remain slice-owned contracts"
|
|
12
|
+
"value": "Inline events remain slice-owned contracts",
|
|
13
|
+
"file": "references/naming-primitives.md"
|
|
13
14
|
},
|
|
14
15
|
{
|
|
15
16
|
"kind": "skill-contains",
|
|
16
|
-
"value": "Storage identity is not payload identity"
|
|
17
|
+
"value": "Storage identity is not payload identity",
|
|
18
|
+
"file": "references/naming-primitives.md"
|
|
17
19
|
},
|
|
18
20
|
{
|
|
19
21
|
"kind": "skill-contains",
|
|
@@ -25,7 +27,8 @@
|
|
|
25
27
|
},
|
|
26
28
|
{
|
|
27
29
|
"kind": "skill-contains",
|
|
28
|
-
"value": "Use one file per slice"
|
|
30
|
+
"value": "Use one file per slice",
|
|
31
|
+
"file": "references/file-layout.md"
|
|
29
32
|
},
|
|
30
33
|
{
|
|
31
34
|
"kind": "skill-contains",
|
|
@@ -53,15 +56,18 @@
|
|
|
53
56
|
},
|
|
54
57
|
{
|
|
55
58
|
"kind": "skill-contains",
|
|
56
|
-
"value": "Event generations and typed repairs now ship"
|
|
59
|
+
"value": "Event generations and typed repairs now ship",
|
|
60
|
+
"file": "references/parsed-not-runnable.md"
|
|
57
61
|
},
|
|
58
62
|
{
|
|
59
63
|
"kind": "skill-contains",
|
|
60
|
-
"value": "every level above the slices is a **barrel file**"
|
|
64
|
+
"value": "every level above the slices is a **barrel file**",
|
|
65
|
+
"file": "references/file-layout.md"
|
|
61
66
|
},
|
|
62
67
|
{
|
|
63
68
|
"kind": "skill-contains",
|
|
64
|
-
"value": "it does **not** restate `module` or"
|
|
69
|
+
"value": "it does **not** restate `module` or",
|
|
70
|
+
"file": "references/file-layout.md"
|
|
65
71
|
},
|
|
66
72
|
{
|
|
67
73
|
"kind": "skill-contains",
|