@cratis/pi 7.6.5 → 7.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +77 -57
- 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 +44 -6
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/provenance.md +13 -0
- package/package/corpus/skills/cratis-screenplay-model-authoring/verification.json +64 -10
- 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,37 @@
|
|
|
1
|
+
# The divergent sweep
|
|
2
|
+
|
|
3
|
+
Purpose: find the facts nobody mentioned because everyone described the good day. Run it after
|
|
4
|
+
the first story of a workflow exists. List first, judge second: write every candidate down,
|
|
5
|
+
then run each through `event-naming.md`.
|
|
6
|
+
|
|
7
|
+
Picture the business running this workflow for a full year, then walk these lenses over each
|
|
8
|
+
stage of the story:
|
|
9
|
+
|
|
10
|
+
| Lens | Ask | Usually yields |
|
|
11
|
+
|---|---|---|
|
|
12
|
+
| Other starts | Can this begin another way (in person, by phone, by an outside party, on a schedule)? | extra causes; sometimes a separate story |
|
|
13
|
+
| Change of mind | At this stage, can the initiator or the business call it off or change it? Until when? | cancellation/withdrawal facts; "only if" limits (state-violation specs) |
|
|
14
|
+
| Waiting | What if nobody acts? Does it expire, get chased, escalate? | deadline facts; clock causes |
|
|
15
|
+
| Hand-over failure | Where we depend on someone else: refusal, no answer, late answer, two answers? | outside facts; compensation; duplicate candidates |
|
|
16
|
+
| Competition | Can two parties want the same scarce thing at once? Who wins, and how does the loser learn? | competition candidates (competing-claim specs); uniqueness rules |
|
|
17
|
+
| Repetition | Can the same request arrive twice? Several in progress for one party? | duplicate/retry candidates; subject identity |
|
|
18
|
+
| Correction | A recorded fact is wrong: how is it put right, who must know? | correction facts instead of edits |
|
|
19
|
+
| Endings | Every way this finishes, by each party; what depended on it and must now go? | terminal facts; removal from lists (removal specs) |
|
|
20
|
+
| Afterwards | Renew, reopen, roll over, appeal, refund? | follow-on stories or branches |
|
|
21
|
+
| On behalf | Can someone act for another, or override? | Does/Cannot lines (denial specs) |
|
|
22
|
+
| Proof later | What will an auditor, regulator or angry customer ask to see? | facts that looked like detail |
|
|
23
|
+
| Hotspots | For each hotspot named in step 2: what goes wrong there today? | the deepest branch set |
|
|
24
|
+
|
|
25
|
+
Outcome per lens and stage: modeled fact, set-aside (with why), open question, or "does not
|
|
26
|
+
apply, because ...". The sweep is done when every lens has an outcome; do not invent facts to
|
|
27
|
+
fill a lens. Unattended: model a lens fact only when the input implies it; otherwise it is an
|
|
28
|
+
open question with the assumption in use.
|
|
29
|
+
|
|
30
|
+
## Handoff seeds for later skills
|
|
31
|
+
| Discovery item | Becomes (not decided here) |
|
|
32
|
+
|---|---|
|
|
33
|
+
| Cannot line | a gate and `then denied` spec, or a recorded gap |
|
|
34
|
+
| "Only if" | a rule layer / `require` / constraint, or a recorded target requirement |
|
|
35
|
+
| Competition candidate | a competing-claim spec; consistency design |
|
|
36
|
+
| Duplicate candidate | a duplicate/retry spec |
|
|
37
|
+
| Ending | removal from affected views |
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Naming events and filtering non-events
|
|
2
|
+
|
|
3
|
+
## Naming
|
|
4
|
+
|
|
5
|
+
- **Past tense, business verb.** The name says what became true: `BerthAssigned`,
|
|
6
|
+
`FeeWaived`, `InspectionFailed`.
|
|
7
|
+
- **Two to four words**, subject first when it helps: `BoatArrived`, `BerthRequestDeclined`.
|
|
8
|
+
- **Specific over generic.** A generic verb (`Changed`, `Updated`, `Processed`, `Handled`,
|
|
9
|
+
`Created`) hides which business decision was taken. Ask what kind of change it was.
|
|
10
|
+
- **The business's words**, not the software's: no `Record`, `Row`, `Entity`, `Dto`, `Request`
|
|
11
|
+
(unless a request is itself a business act, as in `BerthRequested`).
|
|
12
|
+
- **Self-describing.** Someone reading the event list alone should understand the story.
|
|
13
|
+
- **Properties** are camelCase domain names (`berthNumber`, not `id2` or `berth_no`). The
|
|
14
|
+
identity of the thing the event happened to is not a property; it comes from `for` later.
|
|
15
|
+
|
|
16
|
+
## Not an event (set aside, often a view or a question)
|
|
17
|
+
|
|
18
|
+
| Kind | Looks like | Why it is not a fact | What to do instead |
|
|
19
|
+
|---|---|---|---|
|
|
20
|
+
| Looking | someone opened, viewed, searched, filtered | nothing changed in the business | a read model need; note it for `cratis-screenplay-slice-design` |
|
|
21
|
+
| Technical | sent a request, saved a row, synced, retried, logged in (session) | describes the software, not the business | ask what business outcome the step served |
|
|
22
|
+
| Generic edit | `XUpdated`, `XChanged`, `XEdited`, `XSaved` | hides the decision | split into the specific changes people actually make |
|
|
23
|
+
| Running figure | balance, total, occupancy rate, count so far | recomputed from facts, changes all the time | a view, unless it is a decision (below) |
|
|
24
|
+
| Not yet | might happen, is expected, should be | speculative; nothing became true | model the fact when it happens; deadlines are reached facts |
|
|
25
|
+
| Still going | is pending, is waiting, is in progress | a state between facts, not a fact | name the fact that started it (`BerthRequested`) |
|
|
26
|
+
| Secret or bearer value | token, magic link, signed URL, password in a payload | a credential; the event log is permanent | record a keyed hash or opaque reference |
|
|
27
|
+
| Aggregate plus fan-out | `RequestsSent` with a list *and* one `RequestSentToPartner` each | the same fact twice; they can disagree | keep one shape, chosen by how consumers read it |
|
|
28
|
+
| Attempted | tried and was refused | a rejected command leaves no fact | a rejection scenario, unless the business must remember the refusal |
|
|
29
|
+
|
|
30
|
+
**Exceptions that are facts:**
|
|
31
|
+
|
|
32
|
+
- A calculated result the business decided on and must be able to show later (a quoted price,
|
|
33
|
+
a fee fixed for the season, a risk assessment, a grade) is a fact: record it when decided.
|
|
34
|
+
- A refusal the business must remember (a declined application, a failed inspection) is a
|
|
35
|
+
decision with an outcome and is a fact; a refused click is not.
|
|
36
|
+
- A deadline passing is a fact when the business acts on it or must prove it was noticed
|
|
37
|
+
(`PaymentDeadlinePassed`).
|
|
38
|
+
|
|
39
|
+
## Repairs (illustrative, marina domain)
|
|
40
|
+
|
|
41
|
+
| Candidate | Problem | Better |
|
|
42
|
+
|---|---|---|
|
|
43
|
+
| `BerthUpdated` | generic edit | `BerthReassigned` or `BerthLengthCorrected`, whichever happened |
|
|
44
|
+
| `HarbourmasterViewedWaitingList` | looking | set aside; a waiting-list view |
|
|
45
|
+
| `OccupancyRecalculated` | running figure | a view; no event |
|
|
46
|
+
| `SeasonFeeCalculated` | maybe a decision | `SeasonFeeSet` if the fee is fixed and must be shown later |
|
|
47
|
+
| `BoatWillLeave` | not yet | `BoatDeparted` when it happens; `DepartureNoticeGiven` if notice is a business act |
|
|
48
|
+
| `ArrivalPending` | still going | the starting fact: `BerthAssigned` |
|
|
49
|
+
| `SyncWithHarbourAuthorityDone` | technical | what the authority told us: `MooringPermitGranted` |
|
|
50
|
+
| `AssignBerthFailed` | attempted | a rejection scenario on `AssignBerth` |
|
|
51
|
+
|
|
52
|
+
## Granularity checks (questions, not laws)
|
|
53
|
+
|
|
54
|
+
- Would the business ever react to one part of this without the other? If yes, consider two
|
|
55
|
+
events.
|
|
56
|
+
- Optional event properties: the default is none. Chronicle warns on nullable event
|
|
57
|
+
properties (CHR0012) and a specification cannot state `null` for an event value (PLAY0350).
|
|
58
|
+
Make the value required, or record the second situation as its own event. Keep `optional`
|
|
59
|
+
only for a detail the business genuinely may not have, with the reason in the `description`.
|
|
60
|
+
- Does the event restate the creation event's fields (a generic edit in disguise)? Ask which
|
|
61
|
+
business change it records; if none, name the specific correction or drop it.
|
|
62
|
+
- Never put personal data in the event-source id; one data subject per event.
|
|
63
|
+
- Store a deadline, not clock-relative state (`IsOverdue`).
|
|
64
|
+
- Does the event carry data about two different people? Consider one event per person.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Facilitation
|
|
2
|
+
|
|
3
|
+
## Stance
|
|
4
|
+
|
|
5
|
+
- Help people say what happens in their business; do not teach event modeling unless asked.
|
|
6
|
+
- Use their words in names and descriptions. Correct a name by writing the better one into the
|
|
7
|
+
model and mentioning it in the change report, not by explaining why theirs was wrong.
|
|
8
|
+
- Keep the conversation about the business. Databases, APIs and frameworks are out of scope
|
|
9
|
+
during discovery; park them in STATE.md if they come up.
|
|
10
|
+
- Breadth before depth: a rough map of the whole domain first, then one workflow at a time.
|
|
11
|
+
|
|
12
|
+
## Filtering without friction
|
|
13
|
+
|
|
14
|
+
When someone offers a non-event, ask what changed because of it. "When the harbourmaster
|
|
15
|
+
looks at the waiting list, does anything get decided?" If the answer names a decision, model
|
|
16
|
+
that decision. If not, note the need as a view and move on.
|
|
17
|
+
|
|
18
|
+
## Disagreement
|
|
19
|
+
|
|
20
|
+
- When people describe the same step differently, first check whether they describe different
|
|
21
|
+
situations (two branches, two roles). Often both are right.
|
|
22
|
+
- If it is a real disagreement, write both versions as an open question in STATE.md, take one
|
|
23
|
+
as the working assumption (say which), and continue. Do not stall the session on it.
|
|
24
|
+
- Domain experts decide business meaning; engineers decide feasibility. When only engineers
|
|
25
|
+
are present, mark business-meaning decisions as assumptions to confirm.
|
|
26
|
+
|
|
27
|
+
## Group sessions
|
|
28
|
+
|
|
29
|
+
- Ask the quieter participants directly about their part of the process.
|
|
30
|
+
- Treat a sceptic's objection as a likely failure path: write it down as a question, not a disagreement.
|
|
31
|
+
- Let idea-generators run, capture everything, and sort afterwards; do not slow the momentum
|
|
32
|
+
with filtering in the middle of their stream.
|
|
33
|
+
- Someone who dominates: thank them, capture the point, and turn to the others for theirs.
|
|
34
|
+
- For a live workshop with people in a room, use `human-workshop.md`.
|
|
35
|
+
- Timebox broad discovery; deep dives happen per workflow.
|
|
36
|
+
- Read the event list aloud in story order at checkpoints; gaps are easier to hear than see.
|
|
37
|
+
|
|
38
|
+
## Unattended runs
|
|
39
|
+
|
|
40
|
+
- Never block on a question. Take the most reasonable assumption, record it in STATE.md with
|
|
41
|
+
why, and mark it in the feature `description` when it shapes the model.
|
|
42
|
+
- Prefer assumptions that keep the model honest (fewer, clearly named facts) over ones that
|
|
43
|
+
invent detail.
|
|
44
|
+
|
|
45
|
+
## Evidence and privacy
|
|
46
|
+
|
|
47
|
+
- Do not paste production data, customer records or personal data into hosted models or
|
|
48
|
+
sub-agents without the user's approval. Use invented examples in the model and in
|
|
49
|
+
specifications.
|
|
50
|
+
- Classify personal data on the concept as soon as it shows up.
|
|
51
|
+
|
|
52
|
+
## Closing a session
|
|
53
|
+
|
|
54
|
+
1. Validate the model (`--warnings-as-errors`).
|
|
55
|
+
2. Summarise: workflows covered, events added or renamed, personas, what was set aside.
|
|
56
|
+
3. List open questions with the one that blocks progress first.
|
|
57
|
+
4. List assumptions taken.
|
|
58
|
+
5. Per workflow give the happy path, the decision points and the terminal facts in a few lines.
|
|
59
|
+
6. Propose the next step: the next workflow, or `cratis-screenplay-slice-design` for this one.
|
|
60
|
+
7. Update STATE.md (phase, status, carry-forward); keep durable rationale in model
|
|
61
|
+
`description` text, which is rendered and queryable; `//` comments survive printing at
|
|
62
|
+
Screenplay v4.64.0, but check the dropped-comments report after any edit that cannot retain them.
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
# Supporting a human workshop
|
|
2
|
+
|
|
3
|
+
Adapted in part from TrogonStack `eventmodeling-brainstorming-events/references/facilitating-event-modeling-workshops.md`
|
|
4
|
+
(MIT; see `provenance.md`), reshaped for Screenplay and for an agent in a supporting role.
|
|
5
|
+
|
|
6
|
+
Event modeling is a collaborative workshop. Often a person facilitates a room while the
|
|
7
|
+
agent supports: preparing the session, writing what is said into the `.play` model as it is
|
|
8
|
+
said, reading the story back, and producing the follow-up. The agent never replaces the
|
|
9
|
+
facilitator and never runs the room.
|
|
10
|
+
|
|
11
|
+
## The agent's part
|
|
12
|
+
|
|
13
|
+
| Moment | The agent does |
|
|
14
|
+
|---|---|
|
|
15
|
+
| Before | proposes participants, an agenda and a run sheet; reads existing models and documents; lists likely hotspots and questions |
|
|
16
|
+
| During | scribes: turns what is said into events, personas and feature descriptions in `.play`, validates after each batch, reports changes in two or three lines; keeps the open-question and assumption lists; reads the event list back in story order on request |
|
|
17
|
+
| Between rounds | runs the divergent sweep lenses on what exists and hands the facilitator the three best questions |
|
|
18
|
+
| After | validates, writes the summary, lists open questions and assumptions, proposes the next session |
|
|
19
|
+
|
|
20
|
+
Keep what people said (decisions, with who) apart from what was inferred (assumptions).
|
|
21
|
+
Business meaning belongs to the domain experts in the room; the agent marks anything else
|
|
22
|
+
as an assumption to confirm.
|
|
23
|
+
|
|
24
|
+
## Before the workshop
|
|
25
|
+
|
|
26
|
+
### Participants
|
|
27
|
+
|
|
28
|
+
Required roles:
|
|
29
|
+
|
|
30
|
+
- Domain expert or product owner: business rules, priorities, constraints.
|
|
31
|
+
- Developers (two or three): feasibility and implementation concerns.
|
|
32
|
+
- Tester (one or two): edge cases and coverage.
|
|
33
|
+
- Facilitator (one): keeps pace and shared understanding.
|
|
34
|
+
|
|
35
|
+
Optional: UX designer (workflows, screens), security or compliance lead (personal data,
|
|
36
|
+
authority), operations, a real user. Five to eight people is the right size: fewer miss
|
|
37
|
+
perspectives, more cannot be facilitated.
|
|
38
|
+
|
|
39
|
+
### Invitation
|
|
40
|
+
|
|
41
|
+
```text
|
|
42
|
+
Subject: Event modeling session: <domain>
|
|
43
|
+
|
|
44
|
+
We are mapping how <domain> works: what happens, in what order, who is involved and what can
|
|
45
|
+
go wrong. Date, duration, place or link.
|
|
46
|
+
|
|
47
|
+
Please think about: the workflows that matter most; where things go wrong or get disputed
|
|
48
|
+
today; which outside parties are involved; and what you would want a newcomer to understand.
|
|
49
|
+
|
|
50
|
+
No event modeling experience is needed.
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Workspace
|
|
54
|
+
|
|
55
|
+
- In a room: a wall or whiteboard at least two and a half metres wide, sticky notes in three
|
|
56
|
+
colours, markers, a visible timer, a camera for the result, and the agent's screen visible
|
|
57
|
+
to everyone showing the live `.play` source or a rendered view of it.
|
|
58
|
+
- Remote: a shared canvas everyone can edit, a call with recording agreed in advance, a shared
|
|
59
|
+
document for notes, and the live model visible by screen share. Chat stays open for side
|
|
60
|
+
remarks; one person owns the canvas, one the notes.
|
|
61
|
+
|
|
62
|
+
### Note colours and what they become
|
|
63
|
+
|
|
64
|
+
| Note | Becomes in the model |
|
|
65
|
+
|---|---|
|
|
66
|
+
| Orange: event (past tense) | `event` in the `StateChange` slice that produces it |
|
|
67
|
+
| Yellow: role | `persona` (with Does / Reads / Cannot) |
|
|
68
|
+
| Blue: command (later session) | `command` (`cratis-screenplay-slice-design`) |
|
|
69
|
+
| Green: view (later session) | `readmodel` and `query` (`cratis-screenplay-slice-design`) |
|
|
70
|
+
| Pink: question or hotspot | an open question or hotspot in STATE.md |
|
|
71
|
+
|
|
72
|
+
Use the agreed colours consistently, whatever they are; the mapping is what matters.
|
|
73
|
+
|
|
74
|
+
## Run sheet: discovery
|
|
75
|
+
|
|
76
|
+
Times are guides for a tight group; complex domains need more. Watch the clock and keep moving.
|
|
77
|
+
|
|
78
|
+
### 1. Understand goals (5 to 10 minutes)
|
|
79
|
+
|
|
80
|
+
Someone explains the goals: what problem, who the users are, what outcomes matter. The agent
|
|
81
|
+
writes the module and feature candidates and the goal text for their `description`s.
|
|
82
|
+
|
|
83
|
+
### 2. Free brainstorm (15 to 20 minutes)
|
|
84
|
+
|
|
85
|
+
Facilitator: "Imagine this running for a year. What happens? When something changes in the
|
|
86
|
+
business, what is the event? Put down any event you think of." People call out events;
|
|
87
|
+
capture everything without filtering. Encourage "what about ...". Example calls:
|
|
88
|
+
|
|
89
|
+
```text
|
|
90
|
+
"Boat owner requests a berth" "Berth assigned" "Boat arrives"
|
|
91
|
+
"Harbourmaster checks the waiting list" "Season fee paid" "Boat leaves"
|
|
92
|
+
"Berth request withdrawn" "Fee reminder sent"
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
The agent writes each as a candidate (past tense, business verb) in the model or the
|
|
96
|
+
candidate list, without lecturing on names.
|
|
97
|
+
|
|
98
|
+
### 3. Gentle filtering (10 to 15 minutes)
|
|
99
|
+
|
|
100
|
+
Introduce "something that became true and that the business must remember" conversationally:
|
|
101
|
+
|
|
102
|
+
```text
|
|
103
|
+
Facilitator: Does "Harbourmaster checks the waiting list" change anything?
|
|
104
|
+
Participants: Not really, he just looks.
|
|
105
|
+
Facilitator: Right, so it is a view we will need. But when he gives a berth to someone,
|
|
106
|
+
that changes things. What do we call that?
|
|
107
|
+
Participants: BerthAssigned.
|
|
108
|
+
Facilitator: And "Season fee paid"? Does something change?
|
|
109
|
+
Participants: Yes, the request moves from unpaid to paid.
|
|
110
|
+
Facilitator: Then it is a fact.
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Clarify together: logging in is not a business fact unless sign-ins are tracked; an email sent
|
|
114
|
+
is a notification, not a fact, unless the business must prove it was sent; a check made by the
|
|
115
|
+
system alone is not a fact. When unsure, keep it and refine later. The agent moves non-events to
|
|
116
|
+
"set aside" with the view need noted. Naming rules and repairs: `event-naming.md`.
|
|
117
|
+
|
|
118
|
+
### 4. Roles (5 to 10 minutes)
|
|
119
|
+
|
|
120
|
+
Ask who does what and who must not. The agent writes personas with Does / Reads / Cannot, and
|
|
121
|
+
lists non-human causes (schedules, outside parties) separately.
|
|
122
|
+
|
|
123
|
+
### 5. Plot the timeline (15 to 20 minutes)
|
|
124
|
+
|
|
125
|
+
- Establish order: "What happens first? Before a berth can be assigned, what must happen?"
|
|
126
|
+
- Handle branches: "Can something different happen from here? What if the harbour is full?"
|
|
127
|
+
Write the branches clearly (an outcome branch or a separate story).
|
|
128
|
+
- Identify parallel flows: "Do these happen at the same time or one after another?"
|
|
129
|
+
- Ask everywhere: "What happens next instead, including nothing?"
|
|
130
|
+
|
|
131
|
+
Do not get stuck on exact timing; the point is the logical flow. The agent keeps the feature
|
|
132
|
+
`description` story line and after / caused by / only if in the slices current
|
|
133
|
+
(`plotting-and-handoff.md`).
|
|
134
|
+
|
|
135
|
+
### 6. Sweep and close (15 to 20 minutes)
|
|
136
|
+
|
|
137
|
+
Run the divergent sweep (`divergent-sweep.md`) as questions to the room, hotspots first. Read
|
|
138
|
+
the event list aloud in story order: gaps are easier to hear than to see. Close with the two
|
|
139
|
+
questions: "Is there anything that happens here that we have not written down?" and "Which
|
|
140
|
+
open question blocks the next step?"
|
|
141
|
+
|
|
142
|
+
Later sessions (commands, views, screens, scenarios) use `cratis-screenplay-slice-design`
|
|
143
|
+
and `cratis-screenplay-scenario-coverage`.
|
|
144
|
+
|
|
145
|
+
## Techniques
|
|
146
|
+
|
|
147
|
+
### Personalities
|
|
148
|
+
|
|
149
|
+
- **Quiet participants:** ask directly about their part of the process; do not embarrass.
|
|
150
|
+
- **Dominating voices:** thank them, capture the point, turn to others.
|
|
151
|
+
- **Sceptics:** take them seriously ("what is your concern?"); the objection is often a hidden
|
|
152
|
+
failure path. Write it down as a question.
|
|
153
|
+
- **Idea-generators:** capture everything, sort later, do not slow the momentum.
|
|
154
|
+
|
|
155
|
+
### Conversation, not correction
|
|
156
|
+
|
|
157
|
+
Do not say "that is not an event". Say "does that actually change anything?" Use examples from
|
|
158
|
+
their business. Ask why an event matters and who cares about it (a view, a rule, an outside party).
|
|
159
|
+
|
|
160
|
+
### Pace and energy
|
|
161
|
+
|
|
162
|
+
Good pacing is five to seven minutes per item, quick moves between steps, a break every 45 to
|
|
163
|
+
60 minutes, and standing rather than sitting. Warning signs: people checking phones, someone
|
|
164
|
+
talking endlessly, long silences (the question is too hard), fatigue. Recovery: a ten-minute
|
|
165
|
+
break, a change of activity (drawing to writing), and a restatement of goals and what is left.
|
|
166
|
+
|
|
167
|
+
### Disagreement
|
|
168
|
+
|
|
169
|
+
1. If there is a clear right answer, use it.
|
|
170
|
+
2. If reasonable people disagree, combine both if both are valid, note both as an open question,
|
|
171
|
+
and take one as the working assumption (say which).
|
|
172
|
+
3. If it does not matter yet, defer it. Do not stall the room; keep moving.
|
|
173
|
+
|
|
174
|
+
## Remote adaptations
|
|
175
|
+
|
|
176
|
+
Shorter sessions (90 minutes rather than four hours), a break every 30 minutes, structured
|
|
177
|
+
input (everyone adds ideas before discussion), clear roles (one drawing, one taking notes, the
|
|
178
|
+
agent writing the model), recording on, and an async follow-up so people can digest.
|
|
179
|
+
|
|
180
|
+
## After the workshop
|
|
181
|
+
|
|
182
|
+
Same day: validate the model and capture the artefacts (photographs of the wall, the exported
|
|
183
|
+
canvas, the recording), share the model and summary with everyone, and list gaps.
|
|
184
|
+
|
|
185
|
+
Within one or two days: send a summary of what was covered, the decisions, and the open
|
|
186
|
+
questions; ask for corrections; schedule the next session and name who owns what.
|
|
187
|
+
|
|
188
|
+
## Multi-day plan mapped to phases
|
|
189
|
+
|
|
190
|
+
| Session | Content | Skill |
|
|
191
|
+
|---|---|---|
|
|
192
|
+
| Day 1, morning | goals, brainstorm, filtering, roles, plot | this skill |
|
|
193
|
+
| Day 1, afternoon | sweep, remaining workflows, closing | this skill |
|
|
194
|
+
| Day 2, morning | commands, inputs, views, screens | `cratis-screenplay-slice-design` |
|
|
195
|
+
| Day 2, afternoon | streams, consistency, outside parties, clocks | `cratis-screenplay-streams-and-consistency`, `cratis-screenplay-automations-and-translations` |
|
|
196
|
+
| Day 3 | scenarios and review | `cratis-screenplay-scenario-coverage`, `cratis-screenplay-model-review` |
|
|
197
|
+
|
|
198
|
+
## Checklists
|
|
199
|
+
|
|
200
|
+
Before: invitations out a week ahead; the right people confirmed; room or tools tested; notes,
|
|
201
|
+
markers and templates ready; the facilitator briefed; objectives clear to all; existing model
|
|
202
|
+
and documents read by the agent.
|
|
203
|
+
|
|
204
|
+
During: started on time; purpose and format explained; each step has an objective; everything
|
|
205
|
+
captured; timing kept; everyone took part; energy held; decisions written; ended on time; the
|
|
206
|
+
model validated at least at each break.
|
|
207
|
+
|
|
208
|
+
After: artefacts shared; summary written; gaps listed; feedback requested; next steps
|
|
209
|
+
scheduled; every participant knows their deliverable.
|
|
210
|
+
|
|
211
|
+
## Success indicators
|
|
212
|
+
|
|
213
|
+
Good: everyone took part, decisions were made and written, the model compiles and tells the
|
|
214
|
+
story, the team understands it, next steps are clear, the energy held.
|
|
215
|
+
|
|
216
|
+
Needs work: some people silent throughout; unclear what was decided; no artefact; talk drifting
|
|
217
|
+
to languages and databases; people left tired.
|
|
218
|
+
|
|
219
|
+
## Evidence and privacy
|
|
220
|
+
|
|
221
|
+
Do not put production data, customer records or personal data on the shared screen, in the
|
|
222
|
+
recording, or into a hosted agent without the participants' approval. Use invented examples.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Interview questions by topic
|
|
2
|
+
|
|
3
|
+
Use these as a menu, not a script. Skip anything the input already answers. Ask one question
|
|
4
|
+
per turn and pick the one whose answer changes the model most. In an unattended run, write the
|
|
5
|
+
assumption you take instead of asking.
|
|
6
|
+
|
|
7
|
+
| Topic | Question | Why it matters | Follow up when... |
|
|
8
|
+
|---|---|---|---|
|
|
9
|
+
| Goal | What should be true when this works well? What would make it a failure? | Sets the feature `description` and what "done" means for the workflow | the answer is a feature list: ask which outcome the list serves |
|
|
10
|
+
| Scope | Which part of the business are we modeling now, and what is deliberately out? | Prevents a model of everything | "everything": ask for the one workflow that hurts most today |
|
|
11
|
+
| Today | How is this done now, without the system (paper, email, spreadsheet)? | Real steps reveal real facts; software-only steps are suspects | a step exists only for a tool: ask what business need it serves |
|
|
12
|
+
| Roles | Who takes part, and what is each one there to do or decide? | Personas need a purpose; reveals read-only roles | two roles do the same things: ask whether they differ in authority |
|
|
13
|
+
| Authority | Who may do this, and who must not? | Feeds policies; separates actors from observers | "anyone": ask whether anonymous callers are really allowed |
|
|
14
|
+
| Start | What has to happen before the first step? What sets it off? | Every timeline needs a trigger | the trigger is "the user clicks": ask what made them want to |
|
|
15
|
+
| Next | And after that, what happens? | Builds the plot; repeat until an end is reached | an answer skips time: ask what happened in between |
|
|
16
|
+
| Endings | When is this finished? In how many ways can it finish? | Terminal facts (completed, cancelled, expired) | only the happy ending is named |
|
|
17
|
+
| Failure | What can go wrong here? What does the other party see when it does? | Rejections, compensations and correction facts | a failure has a business consequence: ask whether it must be remembered |
|
|
18
|
+
| Rules | What must always or never be true? | Invariants and refusals | for each rule: what does the person see when refused, and does the business record the breach? If it depends on other records, note it for `cratis-screenplay-streams-and-consistency` |
|
|
19
|
+
| Time | Are there deadlines, schedules, seasons or expiry? | Clock-driven facts and automations | a deadline passes silently: ask whether the business records that it passed |
|
|
20
|
+
| Many | Can several of these be in progress at once for the same party? | Collections vs single values; stream identity | yes: ask what tells them apart |
|
|
21
|
+
| Outside | Which outside parties or systems send or receive information here? | Later translations and contracts | they send facts we rely on: ask how we recognise which of our records it concerns |
|
|
22
|
+
| Corrections | Can a recorded fact turn out wrong? How is it put right today? | Correction and reversal events instead of edits | "we just edit it": ask who needs to know it was changed |
|
|
23
|
+
| History | What would an auditor, a regulator or an angry customer ask to see later? | Finds facts that look like detail but must be kept | a calculation must be shown later: treat it as a fact |
|
|
24
|
+
| People's data | Which values identify or describe a person? How long may we keep them? | `@pii` on concepts before event shapes settle | data about two people in one fact: consider separate facts |
|
|
25
|
+
| Volume | How often does this happen, and how long does one instance live? | Informs stream design later; never a reason to drop a fact | an instance lives for years: note it for stream review |
|
|
26
|
+
| Input | What do we have to go on: written rules, a rough list, word of mouth, a running system? | Sets how hard to sweep | only word of mouth: run every sweep lens |
|
|
27
|
+
| Who decides | Who has the final word on what this means for the business? | Separates decisions from assumptions | no one present: mark meaning as assumption to confirm |
|
|
28
|
+
| Hotspots | Where does this go wrong, get disputed or need workarounds today? | Focuses depth | per hotspot: what happened the last time? |
|
|
29
|
+
| Competition | Can two parties want the same thing at the same moment? | Uniqueness rules, competing claims | yes: who wins, and what does the other see? |
|
|
30
|
+
| On behalf | Does anyone do this for someone else, or override it? | Authority and denial | yes: may they, and must we record who acted? |
|
|
31
|
+
| In any order | After this, which next steps must wait for each other and which need not? | Ordering, later automations | they need not: say so in the feature description |
|
|
32
|
+
| Instead | At this point, what else could happen instead, including nothing? | Branches and endings | "nothing": does it expire or wait forever? |
|
|
33
|
+
|
|
34
|
+
## Interview flow
|
|
35
|
+
|
|
36
|
+
Skip the interview when all three hold: the input is written (stories, spec or notes) with
|
|
37
|
+
its rules, the people who know the domain are named and taking part, and the existing model
|
|
38
|
+
already lists workflows and personas. Otherwise run it in two passes:
|
|
39
|
+
|
|
40
|
+
1. **Assess the input** (Input, Who decides). Gauge how complete the input is and whether
|
|
41
|
+
the people who know the business are present. Thin input or engineers only: sweep harder
|
|
42
|
+
and mark business meaning as assumption.
|
|
43
|
+
2. **Map complexity** (Hotspots, Rules). Find where depth is needed and which rules may
|
|
44
|
+
produce facts. Plan which workflow to storm first from the answers.
|
|
45
|
+
|
|
46
|
+
Record the answers in STATE.md in two lists: *Decisions* (what the user said, with who) and
|
|
47
|
+
*Assumptions* (what you took in their absence, with why). Only the second list is something a
|
|
48
|
+
reviewer should challenge.
|
|
49
|
+
|
|
50
|
+
## Opening and closing questions
|
|
51
|
+
|
|
52
|
+
- Opening a session with a brief: restate the domain and goal in two sentences and ask
|
|
53
|
+
whether that is right before storming.
|
|
54
|
+
- Opening with no input: ask for a walk-through from the first step to the goal.
|
|
55
|
+
- Technique: one question; when the domain suggests likely answers, offer two to four plus
|
|
56
|
+
"something else". It exposes the assumption you would otherwise make.
|
|
57
|
+
- Stop when the user says the workflow is complete, or both closing questions return nothing new.
|
|
58
|
+
- Closing a workflow: "Is there anything that happens here that we have not written down?"
|
|
59
|
+
and "Which of the open questions blocks the next step?"
|
|
60
|
+
|
|
61
|
+
## Signals that discovery is not done
|
|
62
|
+
|
|
63
|
+
- A persona with nothing to do or read.
|
|
64
|
+
- An event nobody can say the cause of.
|
|
65
|
+
- A workflow with no terminal fact or no failure path.
|
|
66
|
+
- Answers that describe screens or tables instead of what happened.
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# Personas and causes
|
|
2
|
+
|
|
3
|
+
## Role catalogue on `persona`
|
|
4
|
+
|
|
5
|
+
Every actor the story mentions gets a catalogue entry. Human roles are `persona`
|
|
6
|
+
declarations; system actors (schedules, outside parties, our own follow-up work) are listed
|
|
7
|
+
as non-human causes below, by convention: the persona grammar does not forbid them (it checks
|
|
8
|
+
the name and declared policy references), but discovery keeps personas to people and defers the
|
|
9
|
+
reactions and translations that system actors imply to `cratis-screenplay-automations-and-translations`.
|
|
10
|
+
|
|
11
|
+
Each persona carries a `description` (documented in `personas.md` and `slices.md#descriptions`
|
|
12
|
+
of the Screenplay docs) with four parts:
|
|
13
|
+
|
|
14
|
+
- **purpose**: what the role is there to do or decide (first sentence);
|
|
15
|
+
- **Does**: decisions it takes in scope (each becomes a command later);
|
|
16
|
+
- **Reads**: what it needs to see to decide (each becomes a view later);
|
|
17
|
+
- **Cannot**: things it might plausibly try but must not do. Write "none known" rather than
|
|
18
|
+
omitting it.
|
|
19
|
+
|
|
20
|
+
The role catalogue is mandatory: without Cannot lines there are no denial candidates, and
|
|
21
|
+
without Does and Reads lines later phases do not know which commands and views a role needs.
|
|
22
|
+
|
|
23
|
+
A multi-line description uses a fenced block (the fence is shown with four backticks so the
|
|
24
|
+
example can nest it; the complete documents below use the one-line form):
|
|
25
|
+
|
|
26
|
+
````screenplay excerpt
|
|
27
|
+
policy IsAuthenticated
|
|
28
|
+
require authenticated
|
|
29
|
+
policy IsHarbourmaster
|
|
30
|
+
require role "Harbourmaster"
|
|
31
|
+
|
|
32
|
+
persona Harbourmaster
|
|
33
|
+
description
|
|
34
|
+
```text
|
|
35
|
+
Decides who gets which berth and records arrivals and departures.
|
|
36
|
+
Does: assigns or declines berth requests; withdraws an assignment before arrival.
|
|
37
|
+
Reads: open requests by season; free berths by length.
|
|
38
|
+
Cannot: set or waive season fees; request a berth on an owner's behalf.
|
|
39
|
+
```
|
|
40
|
+
policy IsAuthenticated
|
|
41
|
+
policy IsHarbourmaster
|
|
42
|
+
````
|
|
43
|
+
|
|
44
|
+
Parent document: the complete example under "Cannot resolved to an executable gate" below
|
|
45
|
+
declares the same policies and persona with the one-line form.
|
|
46
|
+
|
|
47
|
+
## What a Cannot line becomes
|
|
48
|
+
|
|
49
|
+
The persona block is report-only: Screenplay neither binds nor enforces it, and no rendered
|
|
50
|
+
code contains it (`description` text is never rendered). Cannot text is intent, not
|
|
51
|
+
protection. Discovery lists the candidates; each stays pending until a later phase resolves it
|
|
52
|
+
into exactly one of these:
|
|
53
|
+
|
|
54
|
+
1. **Executable.** An `authorize` gate with a role, claim or authenticated policy the persona
|
|
55
|
+
does not satisfy, or an ownership policy (`claim "x" matches subject|<command property>`),
|
|
56
|
+
plus a `then denied` specification whose `given caller` carries the roles and claims that
|
|
57
|
+
stand for that persona (`cratis-screenplay-scenario-coverage`). Every command and query
|
|
58
|
+
under an inherited module or feature `authorize` gets its own denial spec. Ownership
|
|
59
|
+
against a Uuid-backed identifier is not renderable today (STAGE-ESM-015): note it.
|
|
60
|
+
2. **Gap or target requirement.** The check depends on stored state ("only the requester may
|
|
61
|
+
withdraw") or cannot be gated today. Record it as a gap with its target enforcement for
|
|
62
|
+
`cratis-screenplay-streams-and-consistency`; it is not enforcement and not a passed denial.
|
|
63
|
+
3. **Scope disposition.** No command exists for it. Record that decision explicitly; it is a
|
|
64
|
+
disposition, not proof of a denial.
|
|
65
|
+
|
|
66
|
+
Anything not yet resolved is an open question. Do not write Cannot lines for rules that bind
|
|
67
|
+
everyone (business rules, not authority).
|
|
68
|
+
|
|
69
|
+
A spec that passes is not a persona check by itself: it proves the gate refuses a caller with
|
|
70
|
+
those roles and claims. Say which fixture stands for which persona.
|
|
71
|
+
|
|
72
|
+
## Cannot resolved to an executable gate
|
|
73
|
+
|
|
74
|
+
Complete document: the persona's Cannot line "set or waive season fees" has no command yet
|
|
75
|
+
(a scope disposition), while "assign a berth" is limited to the Harbourmaster, so the Cannot
|
|
76
|
+
line for the BoatOwner on `AssignBerth` resolves to a gate and a denial spec.
|
|
77
|
+
|
|
78
|
+
```screenplay
|
|
79
|
+
domain Harbour.Moorings
|
|
80
|
+
|
|
81
|
+
concept BerthRequestId : Uuid
|
|
82
|
+
concept BerthNumber : String
|
|
83
|
+
|
|
84
|
+
policy IsAuthenticated
|
|
85
|
+
require authenticated
|
|
86
|
+
policy IsHarbourmaster
|
|
87
|
+
require role "Harbourmaster"
|
|
88
|
+
|
|
89
|
+
persona BoatOwner
|
|
90
|
+
description "Asks for a berth for the season. Does: requests a berth. Reads: own requests. Cannot: assign a berth; see other owners' requests."
|
|
91
|
+
policy IsAuthenticated
|
|
92
|
+
persona Harbourmaster
|
|
93
|
+
description "Decides who gets which berth. Does: assigns berths. Reads: open requests. Cannot: set or waive season fees (no command yet: scope disposition)."
|
|
94
|
+
policy IsAuthenticated
|
|
95
|
+
policy IsHarbourmaster
|
|
96
|
+
|
|
97
|
+
module Moorings
|
|
98
|
+
feature SeasonalBerths
|
|
99
|
+
slice StateChange AssignBerth
|
|
100
|
+
command AssignBerth
|
|
101
|
+
berthRequestId BerthRequestId identifier
|
|
102
|
+
berthNumber BerthNumber
|
|
103
|
+
authorize IsHarbourmaster
|
|
104
|
+
produces event BerthAssigned
|
|
105
|
+
berthNumber BerthNumber = berthNumber
|
|
106
|
+
specification AssigningABerthAsHarbourmaster
|
|
107
|
+
given caller
|
|
108
|
+
authenticated
|
|
109
|
+
role "Harbourmaster"
|
|
110
|
+
when AssignBerth
|
|
111
|
+
berthRequestId = "9c858901-8a57-4791-81fe-4c455b099bc9"
|
|
112
|
+
berthNumber = "A-12"
|
|
113
|
+
then BerthAssigned
|
|
114
|
+
for "9c858901-8a57-4791-81fe-4c455b099bc9"
|
|
115
|
+
berthNumber = "A-12"
|
|
116
|
+
specification DenyingABoatOwnerAssigningABerth
|
|
117
|
+
given caller
|
|
118
|
+
authenticated
|
|
119
|
+
role "BoatOwner"
|
|
120
|
+
when AssignBerth
|
|
121
|
+
berthRequestId = "9c858901-8a57-4791-81fe-4c455b099bc9"
|
|
122
|
+
berthNumber = "A-12"
|
|
123
|
+
then denied
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Writing the denial spec belongs to scenario coverage; in discovery, record in STATE.md:
|
|
127
|
+
|
|
128
|
+
| Persona | Cannot line | Resolution (pending) |
|
|
129
|
+
|---|---|---|
|
|
130
|
+
| BoatOwner | assign a berth | gate `IsHarbourmaster` on `AssignBerth` + denial spec with role `BoatOwner` |
|
|
131
|
+
| BoatOwner | see other owners' requests | gap: depends on stored state (ownership of the request); target named in streams review |
|
|
132
|
+
| Harbourmaster | set or waive season fees | scope disposition: no command in this scope |
|
|
133
|
+
|
|
134
|
+
## Checks while building
|
|
135
|
+
|
|
136
|
+
- Two personas with the same Does lines: do they differ in authority? If not, merge.
|
|
137
|
+
- A Cannot line one of the persona's own policies would allow: open question.
|
|
138
|
+
- "Can someone act for another?" (office staff for an owner, a supervisor override): a Does
|
|
139
|
+
line with its own policy, or a Cannot line.
|
|
140
|
+
- A role that only reads is fine; a role that neither does nor reads is a question.
|
|
141
|
+
- Every party named in a process is a persona or a non-human cause.
|
|
142
|
+
|
|
143
|
+
## Non-human causes (STATE.md, until a reaction or translation exists)
|
|
144
|
+
|
|
145
|
+
| Cause | Record |
|
|
146
|
+
|---|---|
|
|
147
|
+
| Schedule or deadline | what passes or recurs; whether the business must remember it passed |
|
|
148
|
+
| Outside party | who; what they tell us or we tell them; how it reaches us (they send it / we fetch it / a file / someone re-types it); how we know which of our records it concerns |
|
|
149
|
+
| Our own follow-up | which fact sets it off; what it decides |
|
|
150
|
+
|
|
151
|
+
Design mode: do not declare `system` blocks; outside parties stay in this table for
|
|
152
|
+
`cratis-screenplay-automations-and-translations`.
|