[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M78C5ZRFHDK53VM0WBYJZ9D4":3,"skill-same:01M78C5ZRFHDK53VM0WBYJZ9D4":93},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":15,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":13,"repositoryHtmlUrl":27,"repositoryHomepageUrl":28,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M78C5ZRFHDK53VM0WBYJZ9D4","cratis-screenplay-event-modeling",null,"Entry point and router for model-first Cratis work: the short decision rule (model, or code), the nine-step workflow per behavior, the four slice types, the Cratis divergences from the generic method, the quick validation gate, file layout and what parsed-but-not-runnable means, then the phase skill to load next. Use when designing an information system, mapping a business process or information flow, deciding the event vocabulary or stream boundaries, turning a whiteboard model into `.play`, or when a request may change behavior in an application with a Screenplay model. Not for: Screenplay syntax and the compiler alone (use `cratis-screenplay-toolchain`), the lifecycle, verdicts and handoffs (use `cratis-screenplay-modeling-lifecycle`), or rendering a settled model (use `cratis-screenplay-render-and-gap-fill`).","Cratis\u002FPrologue","Cratis","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F16456213?v=4","01M6BXRH290K4C8RS4PTKK3HXQ","01M78C1YXTSPZGP4G1K2ZM6J1N",0,"MIT","https:\u002F\u002Fgithub.com\u002FCratis\u002FPrologue\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fcratis-screenplay-event-modeling\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FCratis\u002FPrologue\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fcratis-screenplay-event-modeling\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: cratis-screenplay-event-modeling\ndescription: \"Entry point and router for model-first Cratis work: the short decision rule (model, or code), the nine-step workflow per behavior, the four slice types, the Cratis divergences from the generic method, the quick validation gate, file layout and what parsed-but-not-runnable means, then the phase skill to load next. Use when designing an information system, mapping a business process or information flow, deciding the event vocabulary or stream boundaries, turning a whiteboard model into `.play`, or when a request may change behavior in an application with a Screenplay model. Not for: Screenplay syntax and the compiler alone (use `cratis-screenplay-toolchain`), the lifecycle, verdicts and handoffs (use `cratis-screenplay-modeling-lifecycle`), or rendering a settled model (use `cratis-screenplay-render-and-gap-fill`).\"\nlicense: MIT\n---\n\u003C!-- cratis-ai-managed: skills\u002Fcratis-screenplay-event-modeling\u002FSKILL.md -->\n\n# Event modeling with Screenplay (start here)\n\nEvent Modeling is the **method**: walk a business process left to right and write\ndown every behavior as a command that changes the system, a view that reads it,\nan automation that runs off it, or a translation of outside data. Screenplay is\nthe **artifact**: one language that holds that whole model - concepts, commands,\nevents, read models, queries, screens, specifications - in files that compile.\n\nYou are a **facilitator, not a stenographer.** Ask probing questions, challenge\nassumptions, keep asking *\"and then what happens?\"* after every event, every\ncommand, every answer. Use business language. Do not discuss databases, APIs, or\nframeworks during modeling.\n\n**Ask only what the step needs:** ask the one question that changes the model most; in an unattended run assume visibly, never silently; contradictions, a third review round and missing approvals always stop. Read [references\u002Ffacilitation-stance.md](references\u002Ffacilitation-stance.md) for the full rule, and `cratis-screenplay-modeling-lifecycle`'s `references\u002Fstop-or-assume.md` when information is missing or contradictory, or when deciding whether unattended work may proceed.\n\n**Do not cut corners to save tokens or effort.** A rule that needs more slices, events, views,\ntranslation steps or specifications gets them written; budget is never a reason to delete a\nmodeled behavior, label a gap \"accepted debt\" or merge translating outside data into our facts\ninto the work that acts on them. Flag a real trade-off to the user instead of resolving it by cutting the model\n(`cratis-screenplay-modeling-lifecycle`, `references\u002Fcompleteness-self-check.md`). Read `cratis-screenplay-modeling-lifecycle`'s `references\u002Fcompleteness-self-check.md` before every gate and whenever effort or token cost tempts a reduction in modeled behavior.\n\n## Start here\n\n**1. Decide the level (short form; master copy in `cratis-screenplay-modeling-lifecycle`).**\nCheck first that the method skills are installed; installing them never opts a\nrepository in. Decide opt-in per `general.md` \"Model first\"; where `cratis-screenplay-modeling-lifecycle` is installed, run its `scripts\u002Fmodel-first-status.mjs` for the decision, model root and drafts.\nOtherwise stay code-first. Only the entry-point session proposes a model (at most once\nper session, never for trivial, bug-fix, infrastructure, client, framework or\nbrownfield-maintenance work; unattended: record the recommendation in the final report).\nFramework repositories and brownfield work that has not opted in stay code-first.\n\n- **Model:** change the `.play`, verify, review, then render or gap-fill.\n- **Code is right for** infrastructure, clients, Screenplay code attachments and\n  handlers, adapters, and scope Stage cannot render yet (the model stays the contract).\n- **Never:** use code as a shortcut around the model; change the model to match\n  existing code; edit Stage-managed output; leave a modeled rule living only in\n  code; weaken protection (authorization, `pii`, rules) so a model compiles or renders.\n\n**2. Run the lifecycle.** Load `cratis-screenplay-modeling-lifecycle` for modes, the\nindependent verdicts V1-V5, the P0-P9 phases with their gates, stop-or-assume,\nidentity ownership and handoffs. Then load **one** phase skill. Small changes enter\nat the phase where they belong and run the downstream gates for the changed scope.\n\n**3. Pick the phase skill.**\n\n| Phase | Skill |\n| --- | --- |\n| P0-P1 intake, timeline, personas, events | `cratis-screenplay-discovery` |\n| P2 commands, read models, screens, field lineage | `cratis-screenplay-slice-design` |\n| P2 stream identity, consistency, evolution | `cratis-screenplay-streams-and-consistency` |\n| P2 reactions, work queues, clocks, captures | `cratis-screenplay-automations-and-translations` |\n| P3 specifications and coverage | `cratis-screenplay-scenario-coverage` |\n| P4-P5 self-check and independent review | `cratis-screenplay-model-review` |\n| Existing system into a model (replaces P1-P2) | `cratis-screenplay-legacy-extraction` |\n| P7-P9 execute, render, fall back, verify | `cratis-screenplay-render-and-gap-fill` |\n| Tools, versions, verdict commands, diagnostics | `cratis-screenplay-toolchain` |\n| Estimate, order or split delivery of an accepted model | `cratis-screenplay-delivery-planning` |\n\n**4. Nine steps to phase skill.** [references\u002Fnine-steps.md](references\u002Fnine-steps.md)\nkeeps the activities, Screenplay output and facilitation questions of each step:\n\n| Step | Activity | Phase skill |\n| --- | --- | --- |\n| 1-3 | Goal, brainstorm events, order them | `cratis-screenplay-discovery` |\n| 4-6 | Wireframes, commands, read models | `cratis-screenplay-slice-design` |\n| 7-8 | Automations, external integrations | `cratis-screenplay-automations-and-translations` |\n| 9 | Decompose into vertical slices | `cratis-screenplay-slice-design` |\n| after 9 | Specifications, then review | `cratis-screenplay-scenario-coverage`, `cratis-screenplay-model-review` |\n\nRead [references\u002Fnine-steps.md](references\u002Fnine-steps.md) when facilitating a workflow and needing a step's activities, required output, or questions. Read [references\u002Finvoicing-example.md](references\u002Finvoicing-example.md) when you need a complete worked `.play` document (RegisterInvoice command and InvoiceList view) to copy the shape from.\n\n## Verify\n\n```shell\nscreenplay \u003Cmodel-folder> --warnaserror\n```\n\n(The standalone tool; `cratis screenplay validate \u003Cmodel-folder> --warnings-as-errors`\nis the fallback, and neither names the other's verdict. Versions and commands:\n`cratis-screenplay-toolchain`.)\n\n- [ ] Zero errors **and zero warnings**. An unrecognized construct inside a slice\n      is only a warning (`PLAY0029`) and its block is **silently dropped** - a typo\n      can delete a whole projection while the exit code stays `0`.\n- [ ] Every behavior is exactly one slice type, and the whole model validates\n      against the eight Quick gate checks.\n- [ ] Every event is past tense, single-purpose, and carries no event-source id.\n- [ ] Personal data is classified on the `concept`, with a reason.\n- [ ] Specifications name the rejections, not only the happy path.\n- [ ] Bind with the runtime's compiler; tool versions: toolchain `SKILL.md`.\n      Read [references\u002Fparsed-not-runnable.md](references\u002Fparsed-not-runnable.md) (section \"A CLI and Stage that admit v15\") when judging what Stage renders: Translate\u002Fcaptures and refused reactions stay gaps, and mixed effects stay `STAGE-ESM-037`.\n\n## Parsed is not runnable\n\nThe compiler accepts far more than anything executes. Between the syntax tree and\nany runtime sits the **executable semantic model (ESM)**, and it fails closed:\nwhat it cannot represent reports `PLAY0268` or `PLAY0271` and the model does not\nbind. Keep four states apart when you report on a model: **parsed** (the\n`screenplay` tool), **bound** (ESM), **reference-executed** (specifications pass\nthe reference runner) and **target-executed** (Stage or a rendered application).\nThe independent verdicts V1 to V5 that report them are in\n`cratis-screenplay-modeling-lifecycle`.\n\nWhat binds depends on **which tool** you ask, so name the tool and its version:\nRead [references\u002Fparsed-not-runnable.md](references\u002Fparsed-not-runnable.md) (section \"What binds depends on which tool\") when stating what a tool binds or renders (legacy reads and `concurrency` fail with `PLAY0271`; protected command reads opt into v25; `persona` declarations are report-only; an older bundle reports *Slice '\u003Cname>' of type '\u003Ctype>' is not admitted by ESM v1.*).\n\nThe ESM versions, the full disposition table and the Step 7 clock example's binding\nresult are in [references\u002Fparsed-not-runnable.md](references\u002Fparsed-not-runnable.md)\nand `cratis-screenplay-toolchain` (`references\u002Fexecutable-subset.md`). Read `references\u002Fparsed-not-runnable.md` when determining the required ESM version or interpreting binding dispositions. Read `cratis-screenplay-toolchain`'s `references\u002Fexecutable-subset.md` when checking binder admission or reference-execution limits. Model the wider\nlanguage freely when the `.play` file **is** the deliverable - documentation,\nreview, a shared description of a system. Never read a clean `screenplay` run as\nevidence a construct works downstream. The language is frozen at ESM v1–v28 ([the freeze decision](https:\u002F\u002Fgithub.com\u002FCratis\u002FScreenplay\u002Fblob\u002Fmain\u002Fdecisions\u002F0092-the-language-is-frozen-at-esm-v28.md)): model with it, and report a typed\nStage, `cratis render` or Studio refusal as a platform gap rather than waiting for new constructs.\n\n## Locate the model\n\nLook first for the project's existing `.play` files: the folder holding them is the model; a new model goes under `Source\u002F` or `src\u002F`, else `Screenplay\u002F`, never under `.cratis\u002F`. Read [references\u002Ffile-layout.md](references\u002Ffile-layout.md) (section \"Locate the model\") when the location is unclear or source might be copied between repositories. `cratis ai install` manages `.cratis\u002Fai\u002F`, never model files.\n\n## Verified product sources\n\nWhich tool reports what, and how to read installed versions, live only in `cratis-screenplay-toolchain`\n`SKILL.md`; read it before choosing a tool or reporting a version-dependent verdict.\nRead [references\u002Fslice-type-rules.md](references\u002Fslice-type-rules.md) when deciding if a behavior is an Automation or a Translate slice.\n\n## Two phases - discovery, then design\n\n**Never jump into detailed workflow design without broad domain understanding.** Phase 1\nmaps the territory (actors, processes, outside systems, the most critical workflow; ask,\ndo not assume; it lands as `module`, `persona` and `import`; protocol in\n`cratis-screenplay-discovery`). Phase 2 designs one workflow at a time through all nine steps\n([nine-steps.md](references\u002Fnine-steps.md): activities, Screenplay output, questions).\n\n## Keep modeling reasoning with its declaration\n\nRead [references\u002Fmodeling-reasoning.md](references\u002Fmodeling-reasoning.md) when recording assumptions, boundaries or rejected alternatives on a declaration (`description`, `documentation`).\n\n## The prime directive: do not lose information\n\nStore what happened (events), not just current state. Events are immutable\npast-tense facts in business language. **Every read-model field must trace back to\nan event.** If a field has no source event, something is missing from the model -\nit is not an optional column. Every value starts somewhere specific (a person's input, the\nruntime's context, an allocated id, a view's calculation) and is carried by name from there\n(slice-design `references\u002Ffield-lineage.md`).\n\n## The four patterns -> the four slice types\n\nEvery behavior is exactly one. An unknown slice type is a compile error:\n*Unknown slice type '\u003Cx>' - expected StateChange, StateView, Automation or Translate*.\n\n| Pattern | Slice type | Screenplay constructs |\n| --- | --- | --- |\n| Command -> Event | `StateChange` | `command` -> `produces` -> `event`, plus `validate`, `authorize`, `constraint` |\n| Events -> Read Model | `StateView` | `readmodel`, `projection` or `reducer`, `query`, `screen` |\n| Event -> decision -> Command\u002FEvent | `Automation` | `reaction` |\n| External data -> Event | `Translate` | `capture` |\n\nRead [references\u002Fparsed-not-runnable.md](references\u002Fparsed-not-runnable.md) (section \"Trigger reads and event generations\") when deciding whether a decided construct (trigger `reads`, event generations) is implemented. An accepted decision is not necessarily implemented.\n\n## Where Cratis diverges from the generic method\n\nTwo divergences matter, and getting them wrong produces a model that will not\ncompile or will not be safe. Both are deliberate.\n\n- **A command may read state.** The generic method forbids `ReadModel -> Command`\n  edges. Screenplay ships `reads \u003CReadModel> [as \u003Calias>] [by \u003Cproperty>]` so the\n  model shows what a state-dependent decision consulted. Application-root\n  `command reads protected` admits eligible command reads as v25: absent state\n  rejects and matching decide\u002Fcommit changes conflict. Read\n  [protected reads](..\u002Fcratis-screenplay-command-surface\u002Freferences\u002Fprotected-reads.md)\n  for the strict shape and paths. Legacy reads remain PLAY0271; `concurrency` is\n  not protection and cannot combine with protected reads. Stage 4.138.0 renders protected reads as Arc read protection (`cratis render` gets it from the first CLI that bundles it; CLI 3.75.0 refuses them with STAGE-ESM-044); semantic Host\u002Fexecutor support is not generated-app protection.\n  Write state-dependent rules as `reads` plus `require` with an indented message;\n  mark refused shapes as unenforced and name the intended target mechanism. Model uniqueness as a `unique` constraint. Never copy state into a\n  command input, add an attestation flag, or hide the rule in `handler` prose. Do not\n  use `reads` to fetch data the command could carry as input. A reaction trigger\n  declares consulted views with `reads`, but trigger reads remain unprotected;\n  decide in an invoked command instead.\n- **Some validation *does* belong in the model.** The generic method routes format\n  rules to the type system. Screenplay's type system *is* the `concept`, and a\n  concept carries its own `validate` block - so a format rule lives on the concept\n  and travels with every use. A state-dependent rule is not a format rule: it needs\n  the modeled `reads` + `require` intent, specifications, and the recorded\n  target-enforcement gap described above.\n\n## Naming the primitives is the highest-value work\n\nName concepts before events, classify personal data at the concept, keep events past tense and single-purpose, and never put the event-source identity in an event payload.\nRead [references\u002Fnaming-primitives.md](references\u002Fnaming-primitives.md) when declaring concepts, `pii` classification, event shapes, `identifier`, inline events or `id \"\u003Cold name>\"` pins.\n\n## Quick gate - before specifications are called done\n\nRun this after the GWT specifications are written. **Do not proceed with gaps.**\nWhen one is found, ask the user to clarify, create the missing element, re-validate.\nThe full critic pass (evidence, severity, business-question review) is\n`cratis-screenplay-model-review`.\n\n1. Every `readmodel` property traces to an `event` (**backward trace**).\n2. Every `event` feeds a projection, reaction, or capture target (**forward trace**).\n3. Every `command` has documented rejection conditions.\n4. Every `reaction` has a termination condition and cannot loop forever.\n5. No `given`\u002F`when`\u002F`then` clause references an undefined element.\n6. Every behavior is exactly one slice type.\n7. Read-model fields use collection types where the domain allows concurrent\n   instances - ask *\"can there be more than one of these at once?\"* for each field.\n8. No cross-cutting infrastructure is modeled as a `Translate` slice.\n\n## Choose a file layout\n\nChoose the coarsest layout that keeps source and diffs readable; compile the folder, or its root file, as one application, because compiling files individually reports false unknown-type errors (`PLAY0165`, `PLAY0166`, `PLAY0167`).\nRead [references\u002Ffile-layout.md](references\u002Ffile-layout.md) when choosing or changing the file layout, writing `import` barrels, or compiling a split model.\nRead [multi-service models](..\u002Fcratis-screenplay-streams-and-consistency\u002Freferences\u002Fmulti-service-models.md) when the system is several services with their own event stores: one model folder per service, never one folder over all of them.\n\n## Route near misses\n\nThe lifecycle, toolchain and phase skills are in \"Start here\" above. Construct and neighbouring skills:\n\nRead [references\u002Fneighbouring-skills.md](references\u002Fneighbouring-skills.md) when the need is a construct, authoring, rendering, diagram or Chronicle C# skill.\n\n## Lineage\nMethod lineage, Nebulit material and licenses: `references\u002Fprovenance.md`. Read it when checking method lineage, attribution, or adaptation permissions.\n","\u003C!-- cratis-ai-managed: skills\u002Fcratis-screenplay-event-modeling\u002FSKILL.md -->\n\n# Event modeling with Screenplay (start here)\n\nEvent Modeling is the **method**: walk a business process left to right and write\ndown every behavior as a command that changes the system, a view that reads it,\nan automation that runs off it, or a translation of outside data. Screenplay is\nthe **artifact**: one language that holds that whole model - concepts, commands,\nevents, read models, queries, screens, specifications - in files that compile.\n\nYou are a **facilitator, not a stenographer.** Ask probing questions, challenge\nassumptions, keep asking *\"and then what happens?\"* after every event, every\ncommand, every answer. Use business language. Do not discuss databases, APIs, or\nframeworks during modeling.\n\n**Ask only what the step needs:** ask the one question that changes the model most; in an unattended run assume visibly, never silently; contradictions, a third review round and missing approvals always stop. Read [references\u002Ffacilitation-stance.md](references\u002Ffacilitation-stance.md) for the full rule, and `cratis-screenplay-modeling-lifecycle`'s `references\u002Fstop-or-assume.md` when information is missing or contradictory, or when deciding whether unattended work may proceed.\n\n**Do not cut corners to save tokens or effort.** A rule that needs more slices, events, views,\ntranslation steps or specifications gets them written; budget is never a reason to delete a\nmodeled behavior, label a gap \"accepted debt\" or merge translating outside data into our facts\ninto the work that acts on them. Flag a real trade-off to the user instead of resolving it by cutting the model\n(`cratis-screenplay-modeling-lifecycle`, `references\u002Fcompleteness-self-check.md`). Read `cratis-screenplay-modeling-lifecycle`'s `references\u002Fcompleteness-self-check.md` before every gate and whenever effort or token cost tempts a reduction in modeled behavior.\n\n## Start here\n\n**1. Decide the level (short form; master copy in `cratis-screenplay-modeling-lifecycle`).**\nCheck first that the method skills are installed; installing them never opts a\nrepository in. Decide opt-in per `general.md` \"Model first\"; where `cratis-screenplay-modeling-lifecycle` is installed, run its `scripts\u002Fmodel-first-status.mjs` for the decision, model root and drafts.\nOtherwise stay code-first. Only the entry-point session proposes a model (at most once\nper session, never for trivial, bug-fix, infrastructure, client, framework or\nbrownfield-maintenance work; unattended: record the recommendation in the final report).\nFramework repositories and brownfield work that has not opted in stay code-first.\n\n- **Model:** change the `.play`, verify, review, then render or gap-fill.\n- **Code is right for** infrastructure, clients, Screenplay code attachments and\n  handlers, adapters, and scope Stage cannot render yet (the model stays the contract).\n- **Never:** use code as a shortcut around the model; change the model to match\n  existing code; edit Stage-managed output; leave a modeled rule living only in\n  code; weaken protection (authorization, `pii`, rules) so a model compiles or renders.\n\n**2. Run the lifecycle.** Load `cratis-screenplay-modeling-lifecycle` for modes, the\nindependent verdicts V1-V5, the P0-P9 phases with their gates, stop-or-assume,\nidentity ownership and handoffs. Then load **one** phase skill. Small changes enter\nat the phase where they belong and run the downstream gates for the changed scope.\n\n**3. Pick the phase skill.**\n\n| Phase | Skill |\n| --- | --- |\n| P0-P1 intake, timeline, personas, events | `cratis-screenplay-discovery` |\n| P2 commands, read models, screens, field lineage | `cratis-screenplay-slice-design` |\n| P2 stream identity, consistency, evolution | `cratis-screenplay-streams-and-consistency` |\n| P2 reactions, work queues, clocks, captures | `cratis-screenplay-automations-and-translations` |\n| P3 specifications and coverage | `cratis-screenplay-scenario-coverage` |\n| P4-P5 self-check and independent review | `cratis-screenplay-model-review` |\n| Existing system into a model (replaces P1-P2) | `cratis-screenplay-legacy-extraction` |\n| P7-P9 execute, render, fall back, verify | `cratis-screenplay-render-and-gap-fill` |\n| Tools, versions, verdict commands, diagnostics | `cratis-screenplay-toolchain` |\n| Estimate, order or split delivery of an accepted model | `cratis-screenplay-delivery-planning` |\n\n**4. Nine steps to phase skill.** [references\u002Fnine-steps.md](references\u002Fnine-steps.md)\nkeeps the activities, Screenplay output and facilitation questions of each step:\n\n| Step | Activity | Phase skill |\n| --- | --- | --- |\n| 1-3 | Goal, brainstorm events, order them | `cratis-screenplay-discovery` |\n| 4-6 | Wireframes, commands, read models | `cratis-screenplay-slice-design` |\n| 7-8 | Automations, external integrations | `cratis-screenplay-automations-and-translations` |\n| 9 | Decompose into vertical slices | `cratis-screenplay-slice-design` |\n| after 9 | Specifications, then review | `cratis-screenplay-scenario-coverage`, `cratis-screenplay-model-review` |\n\nRead [references\u002Fnine-steps.md](references\u002Fnine-steps.md) when facilitating a workflow and needing a step's activities, required output, or questions. Read [references\u002Finvoicing-example.md](references\u002Finvoicing-example.md) when you need a complete worked `.play` document (RegisterInvoice command and InvoiceList view) to copy the shape from.\n\n## Verify\n\n```shell\nscreenplay \u003Cmodel-folder> --warnaserror\n```\n\n(The standalone tool; `cratis screenplay validate \u003Cmodel-folder> --warnings-as-errors`\nis the fallback, and neither names the other's verdict. Versions and commands:\n`cratis-screenplay-toolchain`.)\n\n- [ ] Zero errors **and zero warnings**. An unrecognized construct inside a slice\n      is only a warning (`PLAY0029`) and its block is **silently dropped** - a typo\n      can delete a whole projection while the exit code stays `0`.\n- [ ] Every behavior is exactly one slice type, and the whole model validates\n      against the eight Quick gate checks.\n- [ ] Every event is past tense, single-purpose, and carries no event-source id.\n- [ ] Personal data is classified on the `concept`, with a reason.\n- [ ] Specifications name the rejections, not only the happy path.\n- [ ] Bind with the runtime's compiler; tool versions: toolchain `SKILL.md`.\n      Read [references\u002Fparsed-not-runnable.md](references\u002Fparsed-not-runnable.md) (section \"A CLI and Stage that admit v15\") when judging what Stage renders: Translate\u002Fcaptures and refused reactions stay gaps, and mixed effects stay `STAGE-ESM-037`.\n\n## Parsed is not runnable\n\nThe compiler accepts far more than anything executes. Between the syntax tree and\nany runtime sits the **executable semantic model (ESM)**, and it fails closed:\nwhat it cannot represent reports `PLAY0268` or `PLAY0271` and the model does not\nbind. Keep four states apart when you report on a model: **parsed** (the\n`screenplay` tool), **bound** (ESM), **reference-executed** (specifications pass\nthe reference runner) and **target-executed** (Stage or a rendered application).\nThe independent verdicts V1 to V5 that report them are in\n`cratis-screenplay-modeling-lifecycle`.\n\nWhat binds depends on **which tool** you ask, so name the tool and its version:\nRead [references\u002Fparsed-not-runnable.md](references\u002Fparsed-not-runnable.md) (section \"What binds depends on which tool\") when stating what a tool binds or renders (legacy reads and `concurrency` fail with `PLAY0271`; protected command reads opt into v25; `persona` declarations are report-only; an older bundle reports *Slice '\u003Cname>' of type '\u003Ctype>' is not admitted by ESM v1.*).\n\nThe ESM versions, the full disposition table and the Step 7 clock example's binding\nresult are in [references\u002Fparsed-not-runnable.md](references\u002Fparsed-not-runnable.md)\nand `cratis-screenplay-toolchain` (`references\u002Fexecutable-subset.md`). Read `references\u002Fparsed-not-runnable.md` when determining the required ESM version or interpreting binding dispositions. Read `cratis-screenplay-toolchain`'s `references\u002Fexecutable-subset.md` when checking binder admission or reference-execution limits. Model the wider\nlanguage freely when the `.play` file **is** the deliverable - documentation,\nreview, a shared description of a system. Never read a clean `screenplay` run as\nevidence a construct works downstream. The language is frozen at ESM v1–v28 ([the freeze decision](https:\u002F\u002Fgithub.com\u002FCratis\u002FScreenplay\u002Fblob\u002Fmain\u002Fdecisions\u002F0092-the-language-is-frozen-at-esm-v28.md)): model with it, and report a typed\nStage, `cratis render` or Studio refusal as a platform gap rather than waiting for new constructs.\n\n## Locate the model\n\nLook first for the project's existing `.play` files: the folder holding them is the model; a new model goes under `Source\u002F` or `src\u002F`, else `Screenplay\u002F`, never under `.cratis\u002F`. Read [references\u002Ffile-layout.md](references\u002Ffile-layout.md) (section \"Locate the model\") when the location is unclear or source might be copied between repositories. `cratis ai install` manages `.cratis\u002Fai\u002F`, never model files.\n\n## Verified product sources\n\nWhich tool reports what, and how to read installed versions, live only in `cratis-screenplay-toolchain`\n`SKILL.md`; read it before choosing a tool or reporting a version-dependent verdict.\nRead [references\u002Fslice-type-rules.md](references\u002Fslice-type-rules.md) when deciding if a behavior is an Automation or a Translate slice.\n\n## Two phases - discovery, then design\n\n**Never jump into detailed workflow design without broad domain understanding.** Phase 1\nmaps the territory (actors, processes, outside systems, the most critical workflow; ask,\ndo not assume; it lands as `module`, `persona` and `import`; protocol in\n`cratis-screenplay-discovery`). Phase 2 designs one workflow at a time through all nine steps\n([nine-steps.md](references\u002Fnine-steps.md): activities, Screenplay output, questions).\n\n## Keep modeling reasoning with its declaration\n\nRead [references\u002Fmodeling-reasoning.md](references\u002Fmodeling-reasoning.md) when recording assumptions, boundaries or rejected alternatives on a declaration (`description`, `documentation`).\n\n## The prime directive: do not lose information\n\nStore what happened (events), not just current state. Events are immutable\npast-tense facts in business language. **Every read-model field must trace back to\nan event.** If a field has no source event, something is missing from the model -\nit is not an optional column. Every value starts somewhere specific (a person's input, the\nruntime's context, an allocated id, a view's calculation) and is carried by name from there\n(slice-design `references\u002Ffield-lineage.md`).\n\n## The four patterns -> the four slice types\n\nEvery behavior is exactly one. An unknown slice type is a compile error:\n*Unknown slice type '\u003Cx>' - expected StateChange, StateView, Automation or Translate*.\n\n| Pattern | Slice type | Screenplay constructs |\n| --- | --- | --- |\n| Command -> Event | `StateChange` | `command` -> `produces` -> `event`, plus `validate`, `authorize`, `constraint` |\n| Events -> Read Model | `StateView` | `readmodel`, `projection` or `reducer`, `query`, `screen` |\n| Event -> decision -> Command\u002FEvent | `Automation` | `reaction` |\n| External data -> Event | `Translate` | `capture` |\n\nRead [references\u002Fparsed-not-runnable.md](references\u002Fparsed-not-runnable.md) (section \"Trigger reads and event generations\") when deciding whether a decided construct (trigger `reads`, event generations) is implemented. An accepted decision is not necessarily implemented.\n\n## Where Cratis diverges from the generic method\n\nTwo divergences matter, and getting them wrong produces a model that will not\ncompile or will not be safe. Both are deliberate.\n\n- **A command may read state.** The generic method forbids `ReadModel -> Command`\n  edges. Screenplay ships `reads \u003CReadModel> [as \u003Calias>] [by \u003Cproperty>]` so the\n  model shows what a state-dependent decision consulted. Application-root\n  `command reads protected` admits eligible command reads as v25: absent state\n  rejects and matching decide\u002Fcommit changes conflict. Read\n  [protected reads](..\u002Fcratis-screenplay-command-surface\u002Freferences\u002Fprotected-reads.md)\n  for the strict shape and paths. Legacy reads remain PLAY0271; `concurrency` is\n  not protection and cannot combine with protected reads. Stage 4.138.0 renders protected reads as Arc read protection (`cratis render` gets it from the first CLI that bundles it; CLI 3.75.0 refuses them with STAGE-ESM-044); semantic Host\u002Fexecutor support is not generated-app protection.\n  Write state-dependent rules as `reads` plus `require` with an indented message;\n  mark refused shapes as unenforced and name the intended target mechanism. Model uniqueness as a `unique` constraint. Never copy state into a\n  command input, add an attestation flag, or hide the rule in `handler` prose. Do not\n  use `reads` to fetch data the command could carry as input. A reaction trigger\n  declares consulted views with `reads`, but trigger reads remain unprotected;\n  decide in an invoked command instead.\n- **Some validation *does* belong in the model.** The generic method routes format\n  rules to the type system. Screenplay's type system *is* the `concept`, and a\n  concept carries its own `validate` block - so a format rule lives on the concept\n  and travels with every use. A state-dependent rule is not a format rule: it needs\n  the modeled `reads` + `require` intent, specifications, and the recorded\n  target-enforcement gap described above.\n\n## Naming the primitives is the highest-value work\n\nName concepts before events, classify personal data at the concept, keep events past tense and single-purpose, and never put the event-source identity in an event payload.\nRead [references\u002Fnaming-primitives.md](references\u002Fnaming-primitives.md) when declaring concepts, `pii` classification, event shapes, `identifier`, inline events or `id \"\u003Cold name>\"` pins.\n\n## Quick gate - before specifications are called done\n\nRun this after the GWT specifications are written. **Do not proceed with gaps.**\nWhen one is found, ask the user to clarify, create the missing element, re-validate.\nThe full critic pass (evidence, severity, business-question review) is\n`cratis-screenplay-model-review`.\n\n1. Every `readmodel` property traces to an `event` (**backward trace**).\n2. Every `event` feeds a projection, reaction, or capture target (**forward trace**).\n3. Every `command` has documented rejection conditions.\n4. Every `reaction` has a termination condition and cannot loop forever.\n5. No `given`\u002F`when`\u002F`then` clause references an undefined element.\n6. Every behavior is exactly one slice type.\n7. Read-model fields use collection types where the domain allows concurrent\n   instances - ask *\"can there be more than one of these at once?\"* for each field.\n8. No cross-cutting infrastructure is modeled as a `Translate` slice.\n\n## Choose a file layout\n\nChoose the coarsest layout that keeps source and diffs readable; compile the folder, or its root file, as one application, because compiling files individually reports false unknown-type errors (`PLAY0165`, `PLAY0166`, `PLAY0167`).\nRead [references\u002Ffile-layout.md](references\u002Ffile-layout.md) when choosing or changing the file layout, writing `import` barrels, or compiling a split model.\nRead [multi-service models](..\u002Fcratis-screenplay-streams-and-consistency\u002Freferences\u002Fmulti-service-models.md) when the system is several services with their own event stores: one model folder per service, never one folder over all of them.\n\n## Route near misses\n\nThe lifecycle, toolchain and phase skills are in \"Start here\" above. Construct and neighbouring skills:\n\nRead [references\u002Fneighbouring-skills.md](references\u002Fneighbouring-skills.md) when the need is a construct, authoring, rendering, diagram or Chronicle C# skill.\n\n## Lineage\nMethod lineage, Nebulit material and licenses: `references\u002Fprovenance.md`. Read it when checking method lineage, attribution, or adaptation permissions.\n",{"name":5,"license":14,"description":7},"main","feed400071bf3f9f4410a956d73413daa6e1b334",".cratis\u002Fai\u002Fskills\u002Fcratis-screenplay-event-modeling","https:\u002F\u002Fgithub.com\u002FCratis\u002FPrologue","https:\u002F\u002Fwww.cratis.io\u002Fprologue\u002F","https:\u002F\u002Fgithub.com\u002FCratis","https:\u002F\u002Fwww.cratis.io","Open-source (MIT) event sourcing and CQRS for .NET and beyond: Chronicle, Arc, Components and Screenplay.","2026-11-14 06:37:10",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add Cratis\u002FPrologue --skill cratis-screenplay-event-modeling",{"tool":39,"command":40},"bunx","bunx skills add Cratis\u002FPrologue --skill cratis-screenplay-event-modeling",{"tool":42,"command":43},"pnpm","pnpm dlx skills add Cratis\u002FPrologue --skill cratis-screenplay-event-modeling","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FCratis\u002FPrologue\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fcratis-screenplay-event-modeling\u002FSKILL.md",true,[47,51,57,61,65,69,73,77,81,85,89],{"path":48,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":15},"LICENSE","许可证",906,{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},"references\u002Ffacilitation-stance.md","REFERENCE","参考文档",1061,"https:\u002F\u002Fgithub.com\u002FCratis\u002FPrologue\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fcratis-screenplay-event-modeling\u002Freferences\u002Ffacilitation-stance.md",{"path":58,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":59,"sourceHtmlUrl":60},"references\u002Ffile-layout.md",5611,"https:\u002F\u002Fgithub.com\u002FCratis\u002FPrologue\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fcratis-screenplay-event-modeling\u002Freferences\u002Ffile-layout.md",{"path":62,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":63,"sourceHtmlUrl":64},"references\u002Finvoicing-example.md",1736,"https:\u002F\u002Fgithub.com\u002FCratis\u002FPrologue\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fcratis-screenplay-event-modeling\u002Freferences\u002Finvoicing-example.md",{"path":66,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":67,"sourceHtmlUrl":68},"references\u002Fmodeling-reasoning.md",835,"https:\u002F\u002Fgithub.com\u002FCratis\u002FPrologue\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fcratis-screenplay-event-modeling\u002Freferences\u002Fmodeling-reasoning.md",{"path":70,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":71,"sourceHtmlUrl":72},"references\u002Fnaming-primitives.md",2129,"https:\u002F\u002Fgithub.com\u002FCratis\u002FPrologue\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fcratis-screenplay-event-modeling\u002Freferences\u002Fnaming-primitives.md",{"path":74,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":75,"sourceHtmlUrl":76},"references\u002Fneighbouring-skills.md",1101,"https:\u002F\u002Fgithub.com\u002FCratis\u002FPrologue\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fcratis-screenplay-event-modeling\u002Freferences\u002Fneighbouring-skills.md",{"path":78,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":79,"sourceHtmlUrl":80},"references\u002Fnine-steps.md",16448,"https:\u002F\u002Fgithub.com\u002FCratis\u002FPrologue\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fcratis-screenplay-event-modeling\u002Freferences\u002Fnine-steps.md",{"path":82,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":83,"sourceHtmlUrl":84},"references\u002Fparsed-not-runnable.md",7976,"https:\u002F\u002Fgithub.com\u002FCratis\u002FPrologue\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fcratis-screenplay-event-modeling\u002Freferences\u002Fparsed-not-runnable.md",{"path":86,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":87,"sourceHtmlUrl":88},"references\u002Fprovenance.md",3737,"https:\u002F\u002Fgithub.com\u002FCratis\u002FPrologue\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fcratis-screenplay-event-modeling\u002Freferences\u002Fprovenance.md",{"path":90,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":91,"sourceHtmlUrl":92},"references\u002Fslice-type-rules.md",1051,"https:\u002F\u002Fgithub.com\u002FCratis\u002FPrologue\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fcratis-screenplay-event-modeling\u002Freferences\u002Fslice-type-rules.md",[94,102,110,118,126,134],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":98,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":19},"01M78CCRM9594FCYFMCY5W137G","vectorization","Designs, implements, optimizes, and reviews SIMD code in .NET: vectorizing scalar loops with TensorPrimitives, Vector64, Vector128, Vector256, Vector512, or hardware intrinsics, and reviewing existing SIMD code, including the generic Vector type, for contract equivalence, tail handling, memory safety, portability, fallbacks, and measured performance. Use when a .NET loop or SIMD routine is being written or reviewed. Not for performance work unrelated to SIMD.","https:\u002F\u002Fgithub.com\u002FCratis\u002FPrologue\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fvectorization\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FCratis\u002FPrologue\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fvectorization\u002FSKILL.md",[],[],{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":106,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":19},"01M78CCJKGDNSDNCMA92PV8GCR","target-authoring","Canonical patterns for writing custom MSBuild targets: DependsOnTargets versus BeforeTargets and AfterTargets, the Build-to-CoreBuild three-level pattern, and the XxxDependsOn chain-extension pattern. Use when diagnosing or fixing custom-target anti-patterns: Directory.Build.targets redefining SDK targets, targets that replace CompileDependsOn instead of extending it, Outputs versus Returns misuse that returns stale results, missing Inputs\u002FOutputs causing needless rebuilds, or missing FileWrites registration. Not for incremental build tuning or general anti-pattern review (use the msbuild skill), or non-MSBuild build systems.","https:\u002F\u002Fgithub.com\u002FCratis\u002FPrologue\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Ftarget-authoring\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FCratis\u002FPrologue\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Ftarget-authoring\u002FSKILL.md",[],[],{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":114,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":19},"01M78CCCWS16JZA36AGB5YVMAN","run-tests","Chooses and runs the repository-compatible .NET test command: classic, VSTest, bridged MTP, or native MTP syntax for MSTest, xUnit, NUnit, and TUnit. Use before running .NET tests or answering with a test command or flags: run the tests, one test, class, category, trait or target framework, combined filters, --filter-query, --no-build, --diag, TRX, coverage collection, crash or hang dumps, filter errors, or unrecognized options. Not for platform identification alone (use platform-detection), writing or debugging test code, interpreting a coverage report (use coverage-analysis), CI investigation, migration, or a persistent hot-reload loop.","https:\u002F\u002Fgithub.com\u002FCratis\u002FPrologue\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Frun-tests\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FCratis\u002FPrologue\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Frun-tests\u002FSKILL.md",[],[],{"skillNo":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":122,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":19},"01M78CC6VC08Y3WTN4T784DYDY","profiling","Uses the free official .NET diagnostics CLI tools for profiling and runtime investigation in a repository: CPU, GC pressure, allocation growth, exception storms, lock contention, and slow code. Use when a .NET application needs performance or runtime profiling. Not for replacing realistic performance or load tests with ad-hoc tracing, production heap collection without a pause-risk plan, crash dumps (use dump-collect), or benchmark design (use microbenchmarking).","https:\u002F\u002Fgithub.com\u002FCratis\u002FPrologue\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fprofiling\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FCratis\u002FPrologue\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fprofiling\u002FSKILL.md",[],[],{"skillNo":127,"name":128,"nameZh":6,"description":129,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":130,"sourceHtmlUrl":131,"categories":132,"keywords":133,"publishedAt":19},"01M78CC14WNAP1Y77ZMM4VD29A","platform-detection","Identifies a .NET project's test platform, framework, command mode, and SDK-style versus classic project system, resolving global.json, project, packages.config, Directory.Build.props, and Directory.Packages.props precedence for MSTest, xUnit, NUnit, and TUnit. Use when asking \"which test platform or framework?\", \"VSTest or MTP?\", or \"what runner does this project use?\", including bridge settings, UseVSTest opt-outs, and conflicting VSTest\u002FMTP configuration. Not for running or filtering tests, commands, flags, TRX, dumps, or test-command errors (use run-tests), or for hot-reload or migration requests.","https:\u002F\u002Fgithub.com\u002FCratis\u002FPrologue\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fplatform-detection\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FCratis\u002FPrologue\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Fplatform-detection\u002FSKILL.md",[],[],{"skillNo":135,"name":136,"nameZh":6,"description":137,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":138,"sourceHtmlUrl":139,"categories":140,"keywords":141,"publishedAt":19},"01M78CBVQKQZ6C9VZAD48GB8AC","orleans","Designs Microsoft Orleans systems from each primitive's purpose and failure model: grains, digital twins, state versus databases, transactions, messaging, streams, timers, reminders, Durable Jobs, stateless workers, grain services, startup, and hosting. Use when a task needs an Orleans design decision: inspect version and topology, choose the primitive, implement, and validate. Not for other actor stacks, batch processing, relational-only CRUD, or advice without an Orleans decision.","https:\u002F\u002Fgithub.com\u002FCratis\u002FPrologue\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Forleans\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FCratis\u002FPrologue\u002Fblob\u002Fmain\u002F.cratis\u002Fai\u002Fskills\u002Forleans\u002FSKILL.md",[],[]]