@cratis/pi 7.6.4 → 7.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package/corpus/agents/backend-developer.md +14 -0
- package/package/corpus/agents/code-reviewer.md +16 -0
- package/package/corpus/agents/coordinator.md +17 -0
- package/package/corpus/agents/frontend-developer.md +17 -0
- package/package/corpus/agents/orchestrator.md +18 -0
- package/package/corpus/agents/planner.md +24 -0
- package/package/corpus/agents/screenplay-modeler.md +57 -0
- package/package/corpus/agents/screenplay-renderer.md +42 -0
- package/package/corpus/agents/screenplay-reviewer.md +45 -0
- package/package/corpus/agents/slice-implementer.md +32 -5
- package/package/corpus/agents/spec-writer.md +16 -3
- package/package/corpus/prompts/add-reactor.prompt.md +5 -3
- package/package/corpus/prompts/new-vertical-slice.prompt.md +16 -5
- package/package/corpus/prompts/write-specs.prompt.md +12 -6
- package/package/corpus/rules/application-profile.md +7 -3
- package/package/corpus/rules/general.md +8 -3
- package/package/corpus/rules/glossary.md +1 -1
- package/package/corpus/rules/profiles.md +42 -4
- package/package/corpus/rules/reactors.md +30 -22
- package/package/corpus/rules/vertical-slices.md +3 -1
- package/package/corpus/skills/cratis-application-react-specifications/SKILL.md +13 -0
- package/package/corpus/skills/cratis-application-slice-conformance/LICENSE +2 -0
- package/package/corpus/skills/cratis-application-slice-conformance/SKILL.md +173 -0
- package/package/corpus/skills/cratis-application-slice-conformance/references/checklists.md +66 -0
- package/package/corpus/skills/cratis-application-slice-conformance/references/contract-and-precedence.md +49 -0
- package/package/corpus/skills/cratis-application-slice-conformance/references/provenance.md +23 -0
- package/package/corpus/skills/cratis-application-slice-conformance/references/worked-example.md +91 -0
- package/package/corpus/skills/cratis-application-slice-conformance/verification.json +14 -0
- package/package/corpus/skills/cratis-application-slice-specifications/SKILL.md +57 -1
- package/package/corpus/skills/cratis-application-slice-specifications/references/provenance.md +16 -0
- package/package/corpus/skills/cratis-arc-command/SKILL.md +10 -0
- package/package/corpus/skills/cratis-arc-command-execution/SKILL.md +10 -0
- package/package/corpus/skills/cratis-arc-command-validation/SKILL.md +10 -0
- package/package/corpus/skills/cratis-arc-observable-query-http/SKILL.md +10 -0
- package/package/corpus/skills/cratis-arc-query-paging/SKILL.md +10 -0
- package/package/corpus/skills/cratis-arc-react-page/SKILL.md +68 -8
- package/package/corpus/skills/cratis-arc-react-page/references/from-screenplay.md +199 -0
- package/package/corpus/skills/cratis-arc-react-page/references/provenance.md +13 -0
- package/package/corpus/skills/cratis-chronicle-event-constraints/SKILL.md +10 -0
- package/package/corpus/skills/cratis-chronicle-event-modeling/SKILL.md +38 -10
- package/package/corpus/skills/cratis-chronicle-event-type-migration/SKILL.md +13 -0
- package/package/corpus/skills/cratis-chronicle-projection/SKILL.md +13 -0
- package/package/corpus/skills/cratis-chronicle-reactor/SKILL.md +58 -6
- package/package/corpus/skills/cratis-chronicle-reactor/references/provenance.md +9 -0
- package/package/corpus/skills/cratis-chronicle-read-model/SKILL.md +13 -0
- package/package/corpus/skills/cratis-chronicle-read-model-specifications/SKILL.md +47 -0
- package/package/corpus/skills/cratis-chronicle-read-model-specifications/references/provenance.md +11 -0
- package/package/corpus/skills/cratis-chronicle-reducer/SKILL.md +13 -0
- package/package/corpus/skills/cratis-components-stepper-command-dialog/SKILL.md +13 -0
- package/package/corpus/skills/cratis-event-model-diagram/SKILL.md +35 -16
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/LICENSE +28 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/SKILL.md +166 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/audit-format.md +31 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/automation-patterns.md +139 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/cases-to-specify.md +69 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/effects-and-idempotency.md +88 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/integration-contracts.md +64 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/provenance.md +37 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/realization-and-gap-fill.md +34 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/todo-list-example.md +208 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/translate-example.md +126 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/translation-patterns.md +93 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/worked-integration.md +98 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/verification.json +15 -0
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/SKILL.md +267 -50
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/complete-examples.md +185 -0
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/verification.json +60 -12
- package/package/corpus/skills/cratis-screenplay-command-surface/SKILL.md +42 -12
- package/package/corpus/skills/cratis-screenplay-discovery/LICENSE +30 -0
- package/package/corpus/skills/cratis-screenplay-discovery/SKILL.md +229 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/divergent-sweep.md +37 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/event-naming.md +64 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/facilitation.md +62 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/human-workshop.md +222 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/interview-questions.md +66 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/personas-and-causes.md +152 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/plotting-and-handoff.md +111 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/provenance.md +37 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/storming-loop.md +119 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/worked-session.md +87 -0
- package/package/corpus/skills/cratis-screenplay-discovery/verification.json +15 -0
- package/package/corpus/skills/cratis-screenplay-event-modeling/SKILL.md +140 -77
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/invoicing-example.md +51 -0
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/nine-steps.md +114 -28
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/parsed-not-runnable.md +50 -0
- package/package/corpus/skills/cratis-screenplay-event-modeling/verification.json +28 -3
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/LICENSE +31 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/SKILL.md +239 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/chronicle-observations.md +25 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/evidence-table-template.md +79 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/expert-verification.md +48 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/generate-notes.md +75 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/intent-example.md +164 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/interview-findings.md +88 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/loss-report-template.md +47 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/prologue-safety.md +147 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/provenance.md +10 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/rule-modeling.md +36 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/side-car-migration.md +126 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/signal-to-intent.md +57 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/ui-observation.md +52 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/verification.json +17 -0
- package/package/corpus/skills/cratis-screenplay-model-authoring/SKILL.md +95 -54
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md +50 -20
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-loop.md +211 -0
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-tools.md +45 -5
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/provenance.md +13 -0
- package/package/corpus/skills/cratis-screenplay-model-authoring/verification.json +64 -7
- package/package/corpus/skills/cratis-screenplay-model-review/LICENSE +34 -0
- package/package/corpus/skills/cratis-screenplay-model-review/SKILL.md +209 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/anti-patterns.md +89 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/business-questions.md +128 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/checklist.md +176 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/provenance.md +36 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/report-template.md +149 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/review-questions.md +59 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/worked-example.md +255 -0
- package/package/corpus/skills/cratis-screenplay-model-review/verification.json +13 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/LICENSE +32 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/SKILL.md +239 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/code-reading-and-tokens.md +55 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/handoff-template.md +124 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/identity-and-edits.md +84 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/opt-in.md +48 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/phase-report-inventories.md +25 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/phases.md +162 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/principles.md +53 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/provenance.md +63 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/reasoning-notes.md +31 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/safety.md +31 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/stop-or-assume.md +46 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/verdicts-and-modes.md +204 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/vocabulary-map.md +55 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/worked-example.md +86 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/verification.json +16 -0
- package/package/corpus/skills/cratis-screenplay-projections/SKILL.md +14 -3
- package/package/corpus/skills/cratis-screenplay-read-surface/SKILL.md +15 -1
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/LICENSE +2 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +179 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/delivery-protocol.md +99 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/drift-and-ledger.md +67 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/gap-fill-handoff.md +72 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/provenance.md +27 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/renderability-gate.md +56 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/worked-example.md +124 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/verification.json +14 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/LICENSE +31 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/SKILL.md +200 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/berth-reservations.md +579 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/chronicle-verification.md +24 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/coverage-matrix.md +102 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/provenance.md +41 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-catalogue.md +196 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-workshop.md +102 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/spec-forms-by-mode.md +71 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/view-and-story-specs.md +91 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/verification.json +13 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/LICENSE +30 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/SKILL.md +236 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/command-inventory.md +107 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/field-lineage.md +130 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/provenance.md +20 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/read-model-design.md +201 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/review-questions.md +23 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/rule-layers.md +41 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/slicing.md +122 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/worked-example.md +305 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/verification.json +43 -0
- package/package/corpus/skills/cratis-screenplay-specifications/SKILL.md +217 -36
- package/package/corpus/skills/cratis-screenplay-specifications/verification.json +28 -4
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/LICENSE +33 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +191 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/boundaries.md +154 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/chronicle-boundaries.md +54 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/consistency-and-concurrency.md +191 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/evolution-example.md +70 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/evolution.md +65 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/provenance.md +13 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/stream-patterns.md +128 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/streams-example.md +378 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/verification.json +14 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/LICENSE +2 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +177 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/automation-translate-example.md +121 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet-example.md +319 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet.md +96 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostics.md +107 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/doc-contradictions.md +48 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-example.md +113 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-subset.md +148 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/pdl-example.md +267 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/provenance.md +51 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/renderable-subset.md +88 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/traps.md +51 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/verdicts.md +134 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/versions.md +134 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/verification.json +15 -0
- package/package/corpus/skills/cratis-screenplay-ui-composition/SKILL.md +53 -5
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/flow-review.md +56 -0
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/provenance.md +13 -0
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/worked-flow.md +65 -0
- package/package/corpus/skills/cratis-screenplay-ui-composition/verification.json +4 -1
- package/package/corpus/skills/cratis-specification-by-example/SKILL.md +44 -1
- package/package/corpus/skills/cratis-specifications-csharp/SKILL.md +10 -0
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/SKILL.md +186 -219
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/admission.md +177 -0
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/render-example.md +150 -0
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/rendered-application.md +87 -0
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/sandbox-and-specrunner.md +98 -0
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/verification.json +19 -0
- package/package/profile-catalog.json +11 -0
- package/package.json +1 -1
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
# Complete examples for the excerpts in SKILL.md
|
|
2
|
+
|
|
3
|
+
Each document below is complete and compiles with the standalone `screenplay` 4.64.0
|
|
4
|
+
(`--warnaserror`). The SKILL.md excerpts show the reaction, capture or trigger part of
|
|
5
|
+
these documents. Documents marked ESM v6 need the standalone compiler; `cratis` 3.27.1
|
|
6
|
+
(Screenplay 4.60.1) reports `PLAY0268` when it binds them.
|
|
7
|
+
|
|
8
|
+
## Capture with `source`, `map`, `append` and `children`
|
|
9
|
+
|
|
10
|
+
Parent of the `LegacyInvoiceSync` excerpt. Authoring and binding both pass with the
|
|
11
|
+
standalone tool; a capture's `source` is realization metadata (`PLAY0270`).
|
|
12
|
+
|
|
13
|
+
```screenplay
|
|
14
|
+
concept InvoiceId : Uuid
|
|
15
|
+
concept InvoiceStatus : Enum
|
|
16
|
+
draft
|
|
17
|
+
sent
|
|
18
|
+
paid
|
|
19
|
+
module Invoicing
|
|
20
|
+
feature Legacy
|
|
21
|
+
slice Translate LegacyInvoiceSync
|
|
22
|
+
event InvoiceStatusChanged
|
|
23
|
+
invoiceId InvoiceId
|
|
24
|
+
status InvoiceStatus
|
|
25
|
+
changedAt DateTime
|
|
26
|
+
event InvoicePaidFromSent
|
|
27
|
+
invoiceId InvoiceId
|
|
28
|
+
event InvoiceLineItemAdded
|
|
29
|
+
invoiceId InvoiceId
|
|
30
|
+
lineNumber Int
|
|
31
|
+
capture LegacyInvoiceCapture
|
|
32
|
+
source api
|
|
33
|
+
api LegacyInvoicingApi
|
|
34
|
+
route /invoices
|
|
35
|
+
poll 5m
|
|
36
|
+
key id
|
|
37
|
+
map
|
|
38
|
+
status = status translate
|
|
39
|
+
"utkast" => draft
|
|
40
|
+
"sendt" => sent
|
|
41
|
+
"betalt" => paid
|
|
42
|
+
append InvoiceStatusChanged
|
|
43
|
+
tag legacy
|
|
44
|
+
when status
|
|
45
|
+
invoiceId = $.id
|
|
46
|
+
status = $.status
|
|
47
|
+
changedAt = $context.occurred
|
|
48
|
+
append InvoicePaidFromSent
|
|
49
|
+
when status from "sent" to "paid"
|
|
50
|
+
invoiceId = $.id
|
|
51
|
+
children lineItems identified by lineNumber
|
|
52
|
+
append InvoiceLineItemAdded
|
|
53
|
+
when added
|
|
54
|
+
invoiceId = $.id
|
|
55
|
+
lineNumber = $.lineNumber
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Reaction on a declared trigger with `where` and `invokes`
|
|
59
|
+
|
|
60
|
+
Parent of the `NotifyOnBuildFailure` excerpt. A trigger value needs a type to be
|
|
61
|
+
executable (`PLAY0268` otherwise).
|
|
62
|
+
|
|
63
|
+
```screenplay
|
|
64
|
+
// Needs the standalone screenplay compiler (ESM v6)
|
|
65
|
+
concept Repository : String
|
|
66
|
+
trigger BuildFinished
|
|
67
|
+
description "CI reported a finished build on a watched repository"
|
|
68
|
+
repository Repository
|
|
69
|
+
outcome String
|
|
70
|
+
module Delivery
|
|
71
|
+
feature Builds
|
|
72
|
+
slice StateChange SendFailureNotice
|
|
73
|
+
command SendFailureNotice
|
|
74
|
+
repository Repository identifier
|
|
75
|
+
outcome String
|
|
76
|
+
produces event FailureNoticeSent
|
|
77
|
+
outcome String = outcome
|
|
78
|
+
slice Automation NotifyOnBuildFailure
|
|
79
|
+
reaction NotifyOnFailure
|
|
80
|
+
description "Tells the owning team when a watched build fails"
|
|
81
|
+
when BuildFinished
|
|
82
|
+
repository
|
|
83
|
+
outcome
|
|
84
|
+
invokes SendFailureNotice
|
|
85
|
+
repository = repository
|
|
86
|
+
outcome = outcome
|
|
87
|
+
where outcome == "failed"
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Reaction with `produces` and `invokes`
|
|
91
|
+
|
|
92
|
+
Parent of the `Provisioner` excerpt. The invoked command runs with no caller in the
|
|
93
|
+
reference execution.
|
|
94
|
+
|
|
95
|
+
```screenplay
|
|
96
|
+
// Needs the standalone screenplay compiler (ESM v6)
|
|
97
|
+
concept WorkspaceId : Uuid
|
|
98
|
+
module Onboarding
|
|
99
|
+
feature Workspaces
|
|
100
|
+
slice StateChange AcceptInvitation
|
|
101
|
+
command AcceptInvitation
|
|
102
|
+
invitationId Uuid identifier
|
|
103
|
+
workspaceId WorkspaceId
|
|
104
|
+
produces InvitationAccepted
|
|
105
|
+
for invitationId
|
|
106
|
+
workspaceId = workspaceId
|
|
107
|
+
event InvitationAccepted
|
|
108
|
+
workspaceId WorkspaceId
|
|
109
|
+
slice StateChange SendWelcomeMail
|
|
110
|
+
command SendWelcomeMail
|
|
111
|
+
workspaceId WorkspaceId identifier
|
|
112
|
+
template String
|
|
113
|
+
produces event WelcomeMailSent
|
|
114
|
+
template String = template
|
|
115
|
+
slice Automation ProvisionWorkspace
|
|
116
|
+
event WorkspaceProvisioned
|
|
117
|
+
workspaceId WorkspaceId
|
|
118
|
+
reaction Provisioner
|
|
119
|
+
when InvitationAccepted
|
|
120
|
+
workspaceId
|
|
121
|
+
produces WorkspaceProvisioned
|
|
122
|
+
for workspaceId
|
|
123
|
+
workspaceId = workspaceId
|
|
124
|
+
invokes SendWelcomeMail
|
|
125
|
+
workspaceId = workspaceId
|
|
126
|
+
template = "welcome"
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Trigger `reads` on an event and on the clock
|
|
130
|
+
|
|
131
|
+
Parent of the `ChaseOverdueInvoices` excerpt. This document is authoring-valid but does
|
|
132
|
+
**not** bind at ESM v6: the standalone tool's MCP server reports `PLAY0268` "reads
|
|
133
|
+
'InvoiceBalance' before producing directly, but ESM v6 cannot protect that decision
|
|
134
|
+
dependency (decision 0006)" because a `file` body is an opaque effect. Drop the `file`
|
|
135
|
+
lines and keep only `invokes` for an executable reaction.
|
|
136
|
+
|
|
137
|
+
```screenplay
|
|
138
|
+
// Needs the standalone screenplay compiler (ESM v6)
|
|
139
|
+
concept InvoiceId : Uuid
|
|
140
|
+
module Collections
|
|
141
|
+
feature Overdue
|
|
142
|
+
slice StateChange SendPaymentReminder
|
|
143
|
+
command SendPaymentReminder
|
|
144
|
+
invoiceId InvoiceId identifier
|
|
145
|
+
channel String
|
|
146
|
+
produces event PaymentReminderSent
|
|
147
|
+
channel String = channel
|
|
148
|
+
slice StateView InvoiceBalances
|
|
149
|
+
event InvoiceRegistered
|
|
150
|
+
invoiceId InvoiceId
|
|
151
|
+
amount Decimal
|
|
152
|
+
event InvoiceFellDue
|
|
153
|
+
invoiceId InvoiceId
|
|
154
|
+
readmodel InvoiceBalance
|
|
155
|
+
invoiceId InvoiceId
|
|
156
|
+
amount Decimal
|
|
157
|
+
query InvoiceBalanceById => InvoiceBalance optional
|
|
158
|
+
by invoiceId InvoiceId
|
|
159
|
+
projection InvoiceBalances => InvoiceBalance
|
|
160
|
+
from InvoiceRegistered
|
|
161
|
+
invoiceId = $eventSourceId
|
|
162
|
+
amount = amount
|
|
163
|
+
readmodel OverdueInvoice
|
|
164
|
+
invoiceId InvoiceId
|
|
165
|
+
query OverdueInvoiceById => OverdueInvoice optional
|
|
166
|
+
by invoiceId InvoiceId
|
|
167
|
+
projection OverdueInvoices => OverdueInvoice
|
|
168
|
+
from InvoiceFellDue
|
|
169
|
+
invoiceId = $eventSourceId
|
|
170
|
+
slice Automation ChaseOverdueInvoices
|
|
171
|
+
reaction RemindOnDueDate
|
|
172
|
+
description "Reminds the customer when an invoice falls due unpaid"
|
|
173
|
+
when InvoiceFellDue
|
|
174
|
+
invoiceId
|
|
175
|
+
reads InvoiceBalance as balance by invoiceId
|
|
176
|
+
invokes SendPaymentReminder
|
|
177
|
+
invoiceId = invoiceId
|
|
178
|
+
channel = "email"
|
|
179
|
+
file Reactions/RemindOnDueDate.cs
|
|
180
|
+
reaction SweepOverdueInvoices
|
|
181
|
+
description "Re-checks every overdue invoice each morning"
|
|
182
|
+
at 08:00
|
|
183
|
+
reads OverdueInvoice
|
|
184
|
+
file Reactions/SweepOverdueInvoices.cs
|
|
185
|
+
```
|
|
@@ -3,17 +3,65 @@
|
|
|
3
3
|
"input": "Translate external data into events and declare a reaction.",
|
|
4
4
|
"fixtures": [],
|
|
5
5
|
"assertions": [
|
|
6
|
-
{
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
{
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
{
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
6
|
+
{
|
|
7
|
+
"kind": "skill-contains",
|
|
8
|
+
"value": "main `fd18129`"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"kind": "skill-contains",
|
|
12
|
+
"value": "command-only (`PLAY0474` in a reaction)"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"kind": "skill-contains",
|
|
16
|
+
"value": "Do not extend the inline command destination default"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"kind": "skill-contains",
|
|
20
|
+
"value": ".cratis/screenplay/"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"kind": "skill-contains",
|
|
24
|
+
"value": "`cratis ai install` manages `.cratis/ai/`, not `.cratis/screenplay/`"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"kind": "skill-contains",
|
|
28
|
+
"value": "cannot be mixed in one clause"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"kind": "skill-contains",
|
|
32
|
+
"value": "`where` belongs to the reaction, not to one trigger"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"kind": "skill-contains",
|
|
36
|
+
"value": "Startup` and `Shutdown"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"kind": "skill-contains",
|
|
40
|
+
"value": "`reads <View> [as <alias>] [by <trigger value>]`"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"kind": "skill-contains",
|
|
44
|
+
"value": "Clock triggers read whole views."
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"kind": "skill-contains",
|
|
48
|
+
"value": "Declared, not enforced."
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"kind": "skill-contains",
|
|
52
|
+
"value": "An application trigger is not a UI event"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"kind": "skill-contains",
|
|
56
|
+
"value": "Who is the caller of an `invokes`?"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"kind": "skill-contains",
|
|
60
|
+
"value": "Screenplay#383"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"kind": "skill-contains",
|
|
64
|
+
"value": "[ExecuteCommandsAsSystem]"
|
|
65
|
+
}
|
|
18
66
|
]
|
|
19
67
|
}
|
|
@@ -27,6 +27,7 @@ source is the single flow model.
|
|
|
27
27
|
| --- | --- | --- |
|
|
28
28
|
| `Cratis.Screenplay` | `4.31.0` | Original examples and executable boundaries |
|
|
29
29
|
| `Cratis.Screenplay` | main `fd18129` | Inline events, repairs and canonical `optional`; changed examples compiled |
|
|
30
|
+
| `Cratis.Screenplay` | `4.64.0` (`7e16162`) | Binding behaviour of `handler`, code attachments, `persona` and compliance attributes: `Semantics/SemanticModelBinder*.cs`, `Diagnostics/DiagnosticCodes.cs` |
|
|
30
31
|
|
|
31
32
|
The update follows `commands.md`, `events.md`, `types.md`, `diagnostics.md`,
|
|
32
33
|
`mcp/authoring-tools.md` and decision 0023 at that main commit (after v4.52.0).
|
|
@@ -74,8 +75,10 @@ Keep to it.
|
|
|
74
75
|
|
|
75
76
|
⚠️ **`produces` and `handler` are mutually exclusive** — declaring both is an
|
|
76
77
|
error. Everything else may repeat except `description` (one) and `concurrency`
|
|
77
|
-
(one). A `handler` parses but
|
|
78
|
-
|
|
78
|
+
(one). A `handler` parses but **never binds**, with or without an `implementation`
|
|
79
|
+
or `hint`: the binder reports `PLAY0268` ("handler requires a constrained
|
|
80
|
+
implementation attachment"), and a `handler` is not one of the opaque bodies below.
|
|
81
|
+
Prefer `produces` when the model must run or render.
|
|
79
82
|
|
|
80
83
|
## `identifier` — the stream boundary decision
|
|
81
84
|
|
|
@@ -165,8 +168,12 @@ validate
|
|
|
165
168
|
file Validations/BeAValidOrganizationNumber.cs
|
|
166
169
|
```
|
|
167
170
|
|
|
168
|
-
A bodied rule or fenced block
|
|
169
|
-
reports it unsupported, and a target must supply the
|
|
171
|
+
A bodied rule or fenced block on a validation, rule or policy binds as opaque code
|
|
172
|
+
(ESM v3): the reference runner reports it unsupported, and a target must supply the
|
|
173
|
+
implementation. Two exceptions never bind: the command `handler`, and a `file`
|
|
174
|
+
constraint (the binder records the requirement, then rejects it with `PLAY0268`;
|
|
175
|
+
only `unique` constraints bind).
|
|
176
|
+
Stage 4.24 admits only pure reducer bodies, so such a body is gap-fill code there. Prefer a
|
|
170
177
|
declarative rule when one can say it.
|
|
171
178
|
|
|
172
179
|
**Put format rules on the `concept`, not the command.** A concept carries its own
|
|
@@ -309,8 +316,12 @@ An empty block or an unknown dimension is an error. Omitting `concurrency` does
|
|
|
309
316
|
not mean unchecked appends: Chronicle's default optimistic concurrency applies
|
|
310
317
|
to the routed scope. This does not make command `reads` protected.
|
|
311
318
|
|
|
312
|
-
Decision 0023's
|
|
313
|
-
|
|
319
|
+
Decision 0023's constructs differ in availability. **Authorable at 4.64.0, never
|
|
320
|
+
executable yet** (binding reports `PLAY0268`, so they stop a model at V1): generated
|
|
321
|
+
values and `returns` responses (execution awaits ESM v8), operations (ESM v9), and
|
|
322
|
+
named event sources and streams (ESM v10). Syntax or MCP acceptance is not proof of
|
|
323
|
+
execution. `derive` and `provide` have no documented syntax at that tag; treat them as
|
|
324
|
+
planned and do not write them.
|
|
314
325
|
|
|
315
326
|
## `constraint` — uniqueness at append time
|
|
316
327
|
|
|
@@ -370,8 +381,18 @@ is why the compiler says *expected … or Enum* rather than listing it among the
|
|
|
370
381
|
Attributes `@pii` and `@sensitive`, each with at most one `reason`; a
|
|
371
382
|
reason for an attribute the concept does not declare is an error. **Compliance is
|
|
372
383
|
inherited** — a property typed with a `@pii` concept is PII everywhere. The
|
|
373
|
-
executable model does not bind compliance attributes
|
|
374
|
-
|
|
384
|
+
executable model does not bind compliance attributes (`PLAY0268`, "compliance attributes
|
|
385
|
+
require portable data-subject semantics"), so a `@pii` model stops at authorable (V1);
|
|
386
|
+
keep the attribute, because the classification is the point, and never drop it to bind
|
|
387
|
+
or render.
|
|
388
|
+
|
|
389
|
+
⚠️ **Identifiers are not `@pii`.** `@pii` on a concept that types an identifier
|
|
390
|
+
compiles silently, but Chronicle rejects PII on an event source id (`CHR0034`). Keep
|
|
391
|
+
the stream identity a surrogate `Uuid` concept and carry the personal value (name,
|
|
392
|
+
email) as a separate `@pii` property. **`@sensitive` is unverified:** it has no
|
|
393
|
+
defined portable meaning (Screenplay#384). Stage 4.24.0's legacy syntax renderer maps
|
|
394
|
+
`@sensitive` to `[PII]` (`ConceptRenderer.cs:84`, Stage#197), while the current
|
|
395
|
+
`cratis render` path rejects the model with `PLAY0268`. Do not promise a behaviour for it; both issues are open.
|
|
375
396
|
|
|
376
397
|
⚠️ **Enum trap.** A value literally named `validate` is read as an empty validate
|
|
377
398
|
block. Write `@validate` for the value; the compiler warns when it sees the
|
|
@@ -406,8 +427,8 @@ Three condition forms: `authenticated`, `role "<name>"`, and
|
|
|
406
427
|
a second (`PLAY0441`) — **or** one implementation (a tagged ` ```csharp ` block or
|
|
407
428
|
`file`), never both (`PLAY0440`). Declarative policies run in the reference
|
|
408
429
|
runner; a code policy binds as opaque ESM v3 and needs a target to evaluate it.
|
|
409
|
-
A `persona` is
|
|
410
|
-
(
|
|
430
|
+
A `persona` is authoring metadata: the binder reports it as information `PLAY0270`
|
|
431
|
+
(report-only) and it does not block binding; an unknown policy it lists is an error.
|
|
411
432
|
|
|
412
433
|
## `seed`
|
|
413
434
|
|
|
@@ -439,7 +460,10 @@ Four contexts, and **what each omits is load-bearing** — read
|
|
|
439
460
|
|
|
440
461
|
## Verify
|
|
441
462
|
|
|
442
|
-
- [ ] `screenplay <model> --warnaserror` reports zero errors and zero
|
|
463
|
+
- [ ] Standalone `screenplay <model> --warnaserror` (4.64.0) reports zero errors and zero
|
|
464
|
+
warnings; with only the bundled compiler, `cratis screenplay validate
|
|
465
|
+
--warnings-as-errors` on the model folder (3.27.1 bundles Screenplay 4.60.1, ESM v5 or
|
|
466
|
+
lower). Name which tool produced the result.
|
|
443
467
|
- [ ] No unintended `PLAY0478` or `PLAY0479` information remains.
|
|
444
468
|
- [ ] At most one command property carries `identifier`, and no event property does.
|
|
445
469
|
- [ ] Format rules live on the `concept`; state-dependent rules are specifications.
|
|
@@ -448,9 +472,15 @@ Four contexts, and **what each omits is load-bearing** — read
|
|
|
448
472
|
is stated.
|
|
449
473
|
- [ ] Constraints are `unique` forms; no `file` constraint stands in for another rule.
|
|
450
474
|
- [ ] Each policy has one `require` or one implementation, not both.
|
|
451
|
-
- [ ] Personal data is `@pii` on the concept, with a reason
|
|
475
|
+
- [ ] Personal data is `@pii` on the concept, with a reason; no identifier concept is `@pii`;
|
|
476
|
+
no behaviour is claimed for `@sensitive`.
|
|
477
|
+
- [ ] No `handler` where the model must bind, and no bodied construct described as
|
|
478
|
+
runnable or renderable without saying which tool admits it.
|
|
452
479
|
- [ ] No event carries an optional property covering two situations.
|
|
453
480
|
|
|
481
|
+
Versions, tool capabilities and the executable and renderable subsets: `cratis-screenplay-toolchain` (`references/versions.md`). Where a construct sits in the
|
|
482
|
+
method: `cratis-screenplay-modeling-lifecycle` and `cratis-screenplay-slice-design`.
|
|
483
|
+
|
|
454
484
|
## Route near misses
|
|
455
485
|
|
|
456
486
|
- Deciding *which* commands and events exist: `cratis-screenplay-event-modeling`.
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
This skill adapts parts of the TrogonStack eventmodeling skills
|
|
7
|
+
(https://github.com/TrogonStack/agentskills, plugins/trogonstack-eventmodeling,
|
|
8
|
+
commit 7b249d3ee42d8b7e11fa564141ebd5fbc37aadf1). Their licence follows.
|
|
9
|
+
|
|
10
|
+
MIT License
|
|
11
|
+
|
|
12
|
+
Copyright (c) 2025 Straw Hat, LLC
|
|
13
|
+
|
|
14
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
15
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
16
|
+
in the Software without restriction, including without limitation the rights
|
|
17
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
18
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
19
|
+
furnished to do so, subject to the following conditions:
|
|
20
|
+
|
|
21
|
+
The above copyright notice and this permission notice shall be included in all
|
|
22
|
+
copies or substantial portions of the Software.
|
|
23
|
+
|
|
24
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
25
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
26
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
27
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
28
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
29
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
30
|
+
SOFTWARE.
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cratis-screenplay-discovery
|
|
3
|
+
description: "Discover a domain and its event timeline by interview and live storming, landing results directly in `.play` as modules, personas with Does/Reads/Cannot, features and past-tense events with essential fields, in story order, with branches, way-outs and endings named. Use when starting a model, exploring a workflow, supporting a human workshop, or turning notes, tickets or documents into events. Not for: command or read-model design (use `cratis-screenplay-slice-design`), reviewing a finished model (use `cratis-screenplay-model-review`), or reverse-engineering code (use `cratis-screenplay-legacy-extraction`)."
|
|
4
|
+
license: MIT
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Discovery: events, personas and the story, straight into `.play`
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
Find out what the business does and which facts it must remember, and write those
|
|
12
|
+
facts into a `.play` model while the conversation is still going. Output: a compiling
|
|
13
|
+
skeleton of modules, personas (Does / Reads / Cannot), features and events with
|
|
14
|
+
essential fields, ordered as the story happens, plus the open questions, rules and
|
|
15
|
+
assumptions. Commands, read models and screens come later (`cratis-screenplay-slice-design`).
|
|
16
|
+
Phases, modes, verdicts and the handoff packet live in `cratis-screenplay-modeling-lifecycle`;
|
|
17
|
+
syntax and tool commands in `cratis-screenplay-toolchain`.
|
|
18
|
+
|
|
19
|
+
## When to use / when not
|
|
20
|
+
|
|
21
|
+
- Use: a new model; a new workflow in an existing model; a brief, ticket, transcript,
|
|
22
|
+
spreadsheet or process document to turn into candidate events; a timeline to check for
|
|
23
|
+
completeness; a human workshop the agent supports (`references/human-workshop.md`).
|
|
24
|
+
- Not for: commands, inputs, read models, queries, screens (`cratis-screenplay-slice-design`);
|
|
25
|
+
stream boundaries and invariants (`cratis-screenplay-streams-and-consistency`); reactions,
|
|
26
|
+
captures, external translation (`cratis-screenplay-automations-and-translations`);
|
|
27
|
+
scenarios (`cratis-screenplay-scenario-coverage`); auditing (`cratis-screenplay-model-review`);
|
|
28
|
+
existing code or a database as the source (`cratis-screenplay-legacy-extraction`).
|
|
29
|
+
- Small change to an existing model (one or two events): enter at step 5.
|
|
30
|
+
- Model-first: work in `.play` where an accepted model under the model root covers the scope or
|
|
31
|
+
the repository is opted in (the root holds a committed `.play` file (`git ls-tree -r --name-only HEAD -- <root>` lists it), or the project explicitly set
|
|
32
|
+
`mcpServers.screenplay.root` in `.cratis/ai.json`). Otherwise stay code-first; only the
|
|
33
|
+
entry-point session proposes a model, at most once per session; the master definition is in
|
|
34
|
+
`cratis-screenplay-modeling-lifecycle`. A direct request to model this scope is itself consent.
|
|
35
|
+
|
|
36
|
+
## Verified product sources
|
|
37
|
+
|
|
38
|
+
Pins (Screenplay v4.64.0 `7e16162`, cratis CLI v3.27.1, Stage v4.24.0, Arc v22.50.5, Chronicle
|
|
39
|
+
v19.32.0) are listed once in `cratis-screenplay-toolchain` `references/versions.md`.
|
|
40
|
+
Statements here were checked at those tags:
|
|
41
|
+
|
|
42
|
+
| Fact used here | Source |
|
|
43
|
+
| --- | --- |
|
|
44
|
+
| Persona syntax, report-only, policies must be declared, `description` first and once | Screenplay `v4.64.0:Documentation/screenplay/personas.md` |
|
|
45
|
+
| Single-line and fenced `description` (`FencedText`) | `v4.64.0:Documentation/screenplay/slices.md#descriptions`, `grammar.md:1084-1088` |
|
|
46
|
+
| `<Type>[]`, shapes must be declared; `@pii` and `reason` on concepts | `v4.64.0:Documentation/screenplay/events.md`, `concepts.md` |
|
|
47
|
+
| `then denied`, `given caller`, `then error` | `v4.64.0:Documentation/screenplay/specifications.md` |
|
|
48
|
+
| PII on an event-source id is rejected by Chronicle (CHR0034); nullable event properties warn (CHR0012) | Chronicle `v19.32.0:Source/Clients/DotNET.CodeAnalysis/DiagnosticIds.cs` |
|
|
49
|
+
| Any `@pii` or `@sensitive` on a concept fails binding (PLAY0268) | `v4.64.0:Source/DotNET/Screenplay/Semantics/SemanticModelBinder.Concepts.cs:21-24` |
|
|
50
|
+
|
|
51
|
+
Every complete `screenplay` fence in this skill compiles with the standalone compiler
|
|
52
|
+
4.64.0 (`--warnaserror`) and with `cratis screenplay validate --warnings-as-errors` 3.27.1.
|
|
53
|
+
|
|
54
|
+
## Interview phase
|
|
55
|
+
|
|
56
|
+
**Skip if** the input is a written spec with rules, the named experts are present, and the
|
|
57
|
+
existing model already lists the workflows and personas. Otherwise ask. Ask only for what is
|
|
58
|
+
missing, one question per turn, the one that unblocks the most; offer two to four likely
|
|
59
|
+
answers when the domain suggests them; use the harness's question tool if it has one. Full
|
|
60
|
+
menu with follow-up triggers: `references/interview-questions.md`.
|
|
61
|
+
|
|
62
|
+
Critical questions:
|
|
63
|
+
|
|
64
|
+
1. **How complete is the input?** (written spec / documented rules / rough list / word of
|
|
65
|
+
mouth / running system). Thin input means a heavier step 4. Follow up: for a rough list or
|
|
66
|
+
word of mouth, probe for missing scenarios and ask the rules to be stated.
|
|
67
|
+
2. **Who has the final word on business meaning?** Follow up: only engineers present means
|
|
68
|
+
every meaning is an assumption to confirm; recommend inviting the domain expert.
|
|
69
|
+
3. **Where is it complex, disputed or fragile today?** (the hotspots). Follow up, per hotspot:
|
|
70
|
+
what goes wrong there, what happened the last time.
|
|
71
|
+
4. **Which rules must always or never hold?** Follow up, per rule: what does the person see
|
|
72
|
+
when refused, and must the business remember the breach (a fact only if so)?
|
|
73
|
+
5. **Who takes part, and what may each role not do?** Follow up: for each Cannot, is it an
|
|
74
|
+
authority limit or a rule for everyone?
|
|
75
|
+
|
|
76
|
+
With no input at all, open with: "Describe the starting situation, then the steps people take
|
|
77
|
+
to reach the intended result." With a brief, restate domain and goal in two sentences and confirm.
|
|
78
|
+
|
|
79
|
+
**Unattended: assume visibly.** Never stop to ask. Take the most reasonable assumption,
|
|
80
|
+
record it with its reason in the session STATE.md (`.ai-work/screenplay/<model-slug>/STATE.md`,
|
|
81
|
+
untracked) and, when it shapes the model, in the feature `description`. Keep what the user
|
|
82
|
+
decided apart from what you assumed. Never guess silently.
|
|
83
|
+
|
|
84
|
+
## Procedure
|
|
85
|
+
|
|
86
|
+
1. **Frame.** Read what you were given and the existing `.play` model first; existing events
|
|
87
|
+
are the starting list. Judge the input (question 1). Choose the mode (model-first or offer).
|
|
88
|
+
2. **Map the territory (whole domain, shallow).** What the business does, who takes part, the
|
|
89
|
+
main processes, outside parties, hotspots, and the workflow that matters most. Land it as:
|
|
90
|
+
- `module` per business capability (not per actor, team or layer), with a `description`;
|
|
91
|
+
- `persona` per role that acts or reads, with Does / Reads / Cannot in its `description`
|
|
92
|
+
and its `policy` lines (`references/personas-and-causes.md`);
|
|
93
|
+
- non-human causes (schedules, outside parties, our own follow-up) in STATE.md;
|
|
94
|
+
- `feature` per workflow a single expert could tell end to end; `description` = goal and
|
|
95
|
+
what success means. Do not split one flow; do not merge two stories.
|
|
96
|
+
3. **Storm one workflow** with the loop in `references/storming-loop.md`: pull candidate facts
|
|
97
|
+
from any input, apply the naming and not-an-event filters (`references/event-naming.md`),
|
|
98
|
+
write them into the model, report the change, ask one question.
|
|
99
|
+
4. **Sweep wide, then filter.** After a first story exists, run the lenses in
|
|
100
|
+
`references/divergent-sweep.md`. List first, judge second. Each lens ends as a modeled fact,
|
|
101
|
+
a set-aside, an open question, or "does not apply, because ...". Unattended: model a lens
|
|
102
|
+
fact only when the input implies it; otherwise record an open question.
|
|
103
|
+
5. **Plot: order and branch** (`references/plotting-and-handoff.md`). Walk from the first
|
|
104
|
+
trigger to every end. In each event's slice `description` record what it comes **after**,
|
|
105
|
+
what **causes** it (persona, schedule, outside party, other fact) and what it is **only
|
|
106
|
+
allowed under** (intent). At every event ask what can happen next *instead*, including
|
|
107
|
+
nothing, and which next steps may happen in any order. Classify forks: *outcome branch* (one
|
|
108
|
+
decision, exclusive results: same feature, sibling events) or *separate story* (decided
|
|
109
|
+
before the process starts, everything after differs: its own feature). Name every terminal
|
|
110
|
+
state and every undo or correction path; a dead end is an open question.
|
|
111
|
+
6. **Essential fields.** Each event gets the identity it belongs to (implicit through the
|
|
112
|
+
slice's future `for`; name the subject and what tells two apart in STATE.md) plus one to
|
|
113
|
+
three business facts. Domain names; `<Type>[]` for collections (declare the `type`); a
|
|
114
|
+
`concept` for a value with its own meaning; classify personal data on the concept with
|
|
115
|
+
`@pii` and a reason now. `@pii` compiles but does not bind (PLAY0268 at 4.64.0): record it
|
|
116
|
+
as a known target gap; never drop it to get a clean result.
|
|
117
|
+
7. **Validate, gate, hand off.** After a coherent batch of edits (not every sentence) run V1
|
|
118
|
+
with the tool and version named (`cratis-screenplay-toolchain`). Stop storming a workflow
|
|
119
|
+
when the user says it is complete or both closing questions return nothing new; unattended,
|
|
120
|
+
when every sweep lens has an outcome. Hand off to `cratis-screenplay-slice-design` with
|
|
121
|
+
the packet in `references/plotting-and-handoff.md`.
|
|
122
|
+
|
|
123
|
+
## Rules
|
|
124
|
+
|
|
125
|
+
### Compiler contracts (the tool enforces these)
|
|
126
|
+
- Slice types are a closed set: `StateChange`, `StateView`, `Automation`, `Translate`. In
|
|
127
|
+
discovery an event lives in the `StateChange` slice that will produce it, named after the
|
|
128
|
+
probable command; a slice with only an `event` compiles.
|
|
129
|
+
- A `persona` names declared policies only (unknown policy = error); `description` is the
|
|
130
|
+
first body line and appears once.
|
|
131
|
+
- Declare each event once in the whole application; other slices refer to it by name.
|
|
132
|
+
- Folder-layout round-trips re-sort modules, features and slices by name (a single document
|
|
133
|
+
keeps authored order at v4.64.0): story order is documentation (feature `description`,
|
|
134
|
+
STATE.md), never structure.
|
|
135
|
+
- A misspelt keyword inside a slice is only warning PLAY0029 and the block disappears: always
|
|
136
|
+
validate with warnings as errors.
|
|
137
|
+
|
|
138
|
+
### Modeling defaults (follow unless the domain gives a reason not to)
|
|
139
|
+
- An event is a fact the business wants to remember: past tense, business verb, two to four
|
|
140
|
+
words, specific (`BerthAssigned`, not `BerthUpdated`). No generic edit events.
|
|
141
|
+
- One business decision usually yields one event; several facts recognised separately may
|
|
142
|
+
yield several, with the reason in the slice `description`.
|
|
143
|
+
- Calculated values are views, not events, unless the calculation is itself a decision the
|
|
144
|
+
business must be able to show later (a quoted price, a fee set for the season).
|
|
145
|
+
- Personas are roles with a purpose. A read-only persona is legitimate; a role that neither
|
|
146
|
+
acts nor reads is a question. Avoid a generic `User`.
|
|
147
|
+
- Every event traces to a cause (persona action, schedule, other fact, outside party); every
|
|
148
|
+
party named in a process is a persona or a non-human cause.
|
|
149
|
+
- A hand-over from an outside party is named as the fact we learn from it
|
|
150
|
+
(`MooringPermitGranted`). If most of a story is the outside party's steps, model only what
|
|
151
|
+
crosses to us.
|
|
152
|
+
- A rule that depends on stored state goes into the `description` of the slice it constrains
|
|
153
|
+
(`only if ...`), marked as stated intent not enforced in the model today, with its target
|
|
154
|
+
enforcement named for `cratis-screenplay-streams-and-consistency` and
|
|
155
|
+
`cratis-screenplay-slice-design`. Never state copies, attestation booleans or rules living
|
|
156
|
+
only in prose: `description` text is never rendered.
|
|
157
|
+
- Ask how the work is done today without the system; question steps that exist only for software.
|
|
158
|
+
|
|
159
|
+
### Review questions (ask; do not apply mechanically)
|
|
160
|
+
- A different story, or a different ending of the same story?
|
|
161
|
+
- Does an optional field hide two situations (two events), or one fact with an optional detail?
|
|
162
|
+
- Can several be in progress at once for the same party?
|
|
163
|
+
- What happens when it fails, is withdrawn, expires, or is corrected afterwards?
|
|
164
|
+
- Owned by this business, or reported to it by an outside party?
|
|
165
|
+
- Can two parties want the same scarce thing at once? Who wins?
|
|
166
|
+
- After this point, can it still be called off, and by whom?
|
|
167
|
+
|
|
168
|
+
## Identity-affecting edits on an existing model
|
|
169
|
+
|
|
170
|
+
Renaming, moving or removing an event, feature, module or slice in a model with persisted
|
|
171
|
+
identities (`.screenplay/identities.json`) or stored events is identity-affecting: the identity
|
|
172
|
+
owner performs it (`cratis-screenplay-modeling-lifecycle`). Fresh, unpersisted models: plain edits.
|
|
173
|
+
Prefer typed, identity-preserving MCP operations; a subagent without MCP returns the request.
|
|
174
|
+
|
|
175
|
+
## Gate
|
|
176
|
+
|
|
177
|
+
Binding, checked against fresh tool output, not memory. Discovery is done only when all hold,
|
|
178
|
+
and the report says which verdicts were not run (V2 to V5 are not run in discovery):
|
|
179
|
+
|
|
180
|
+
- V1 passes with warnings as errors (tool and version named).
|
|
181
|
+
- Every workflow in scope has a start trigger, ordered events, named terminal states, branches
|
|
182
|
+
classified, and every sweep lens answered.
|
|
183
|
+
- Every event except a starting one has an *after* and a *cause*; every non-terminal state has
|
|
184
|
+
a way out or a recorded reason it has none.
|
|
185
|
+
- No generic edit event or command name (`Update/Edit/Save/Set/Change<Noun>`,
|
|
186
|
+
`<Noun>Updated/Changed/Edited/Saved`); no two events mean the same thing.
|
|
187
|
+
- Every persona has a purpose, something it does or reads (or a question saying why not), and
|
|
188
|
+
Cannot lines or "none known"; every Cannot line is listed as a denial candidate.
|
|
189
|
+
- Essential fields present; personal data classified on concepts.
|
|
190
|
+
- Rules register, denial candidates, competition and duplicate candidates, hotspots, open
|
|
191
|
+
questions and assumptions are written in STATE.md, not only said in chat.
|
|
192
|
+
|
|
193
|
+
## Verify
|
|
194
|
+
|
|
195
|
+
- Run V1, quoting the tool, its version and the exit status.
|
|
196
|
+
- Read the model back in story order (feature descriptions, then events) and compare with what
|
|
197
|
+
the user said; list differences.
|
|
198
|
+
- Check the Gate bullets one by one and report each as met or not met.
|
|
199
|
+
|
|
200
|
+
## Route near misses
|
|
201
|
+
|
|
202
|
+
- Commands, inputs, read models, screens, lineage: `cratis-screenplay-slice-design`.
|
|
203
|
+
- Streams, constraints, protected decisions: `cratis-screenplay-streams-and-consistency`.
|
|
204
|
+
- Clocks, reactions, outside data: `cratis-screenplay-automations-and-translations`.
|
|
205
|
+
- Specs for Cannot, competition, duplicates: `cratis-screenplay-scenario-coverage`.
|
|
206
|
+
- Grammar for event, persona and concept: `cratis-screenplay-command-surface`; the nine-step
|
|
207
|
+
facilitation questions: `cratis-screenplay-event-modeling`.
|
|
208
|
+
- Audit of a finished model: `cratis-screenplay-model-review`.
|
|
209
|
+
- Existing code or database as the source: `cratis-screenplay-legacy-extraction`.
|
|
210
|
+
- Diagram of the result: `cratis-event-model-diagram`.
|
|
211
|
+
- Syntax, diagnostics and tools: `cratis-screenplay-toolchain`.
|
|
212
|
+
|
|
213
|
+
## References (load on demand)
|
|
214
|
+
|
|
215
|
+
- `references/interview-questions.md` - questions by topic, why, follow-ups.
|
|
216
|
+
- `references/storming-loop.md` - the loop, edit kinds, a compiled discovery skeleton.
|
|
217
|
+
- `references/event-naming.md` - naming rules, not-an-event filter, repairs.
|
|
218
|
+
- `references/personas-and-causes.md` - role catalogue, Cannot resolved to executable gates.
|
|
219
|
+
- `references/divergent-sweep.md` - lenses for the wide pass.
|
|
220
|
+
- `references/plotting-and-handoff.md` - after / caused by / only if, plot format, handoff packet.
|
|
221
|
+
- `references/facilitation.md` - running sessions, disagreement, closing, unattended runs.
|
|
222
|
+
- `references/human-workshop.md` - supporting a human workshop: preparation, run sheet, live scribing.
|
|
223
|
+
- `references/worked-session.md` - a short session end to end.
|
|
224
|
+
- `references/provenance.md` - sources and attribution.
|
|
225
|
+
|
|
226
|
+
## Lineage
|
|
227
|
+
|
|
228
|
+
Adapted in part from TrogonStack `eventmodeling-brainstorming-events` and
|
|
229
|
+
`eventmodeling-plotting-events` (MIT); details in `references/provenance.md`.
|