@cratis/pi 7.54.0 → 7.56.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package/corpus/agents/backend-developer.md +1 -1
- package/package/corpus/agents/code-reviewer.md +1 -1
- package/package/corpus/agents/coordinator.md +1 -1
- package/package/corpus/agents/frontend-developer.md +1 -1
- package/package/corpus/agents/orchestrator.md +1 -1
- package/package/corpus/agents/planner.md +1 -1
- package/package/corpus/agents/screenplay-modeler.md +1 -1
- package/package/corpus/agents/slice-implementer.md +2 -2
- package/package/corpus/agents/spec-writer.md +1 -1
- package/package/corpus/harnesses/copilot/instructions/application-profile.instructions.md +1 -1
- package/package/corpus/harnesses/copilot/instructions/profiles.instructions.md +1 -5
- package/package/corpus/harnesses/copilot/instructions/reactors.instructions.md +1 -1
- package/package/corpus/harnesses/copilot/instructions/vertical-slices.instructions.md +1 -1
- package/package/corpus/prompts/add-reactor.prompt.md +1 -1
- package/package/corpus/prompts/new-vertical-slice.prompt.md +1 -1
- package/package/corpus/prompts/write-specs.prompt.md +1 -1
- package/package/corpus/rules/application-profile.md +1 -1
- package/package/corpus/rules/profiles.md +1 -5
- package/package/corpus/rules/reactors.md +1 -1
- package/package/corpus/rules/vertical-slices.md +1 -1
- package/package/corpus/skills/cratis-application-react-specifications/SKILL.md +1 -4
- package/package/corpus/skills/cratis-application-slice-conformance/SKILL.md +6 -10
- package/package/corpus/skills/cratis-application-slice-conformance/references/contract-and-precedence.md +3 -8
- package/package/corpus/skills/cratis-application-slice-specifications/SKILL.md +1 -3
- package/package/corpus/skills/cratis-arc-command/SKILL.md +1 -4
- package/package/corpus/skills/cratis-arc-command-execution/SKILL.md +1 -4
- package/package/corpus/skills/cratis-arc-command-validation/SKILL.md +1 -4
- package/package/corpus/skills/cratis-arc-observable-query-http/SKILL.md +1 -4
- package/package/corpus/skills/cratis-arc-query-paging/SKILL.md +1 -4
- package/package/corpus/skills/cratis-arc-react-page/SKILL.md +1 -4
- package/package/corpus/skills/cratis-chronicle-event-constraints/SKILL.md +1 -4
- package/package/corpus/skills/cratis-chronicle-event-modeling/SKILL.md +2 -5
- package/package/corpus/skills/cratis-chronicle-event-type-migration/SKILL.md +1 -4
- package/package/corpus/skills/cratis-chronicle-projection/SKILL.md +1 -4
- package/package/corpus/skills/cratis-chronicle-reactor/SKILL.md +1 -3
- package/package/corpus/skills/cratis-chronicle-read-model/SKILL.md +1 -4
- package/package/corpus/skills/cratis-chronicle-read-model-specifications/SKILL.md +1 -3
- package/package/corpus/skills/cratis-chronicle-reducer/SKILL.md +1 -4
- package/package/corpus/skills/cratis-components-stepper-command-dialog/SKILL.md +1 -4
- package/package/corpus/skills/cratis-screenplay-discovery/SKILL.md +1 -2
- package/package/corpus/skills/cratis-screenplay-event-modeling/SKILL.md +1 -7
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/generate-notes.md +6 -0
- package/package/corpus/skills/cratis-screenplay-model-review/SKILL.md +1 -1
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/SKILL.md +9 -9
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/opt-in.md +3 -33
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/phases.md +2 -5
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/scripts/model-first-self-test.mjs +104 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/scripts/model-first-status.mjs +141 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +1 -1
- package/package/corpus/skills/cratis-screenplay-ui-composition/SKILL.md +2 -0
- package/package/corpus/skills/cratis-specification-by-example/SKILL.md +1 -3
- package/package/corpus/skills/cratis-specifications-csharp/SKILL.md +1 -4
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/SKILL.md +17 -14
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/behavior-walk.md +77 -0
- package/package.json +1 -1
|
@@ -49,7 +49,7 @@ Load **cratis-application-slice-conformance** when it is installed; read the ski
|
|
|
49
49
|
|
|
50
50
|
## Process
|
|
51
51
|
|
|
52
|
-
0. **Find the contract.** Apply Phase 0 of `application-profile.md` first:
|
|
52
|
+
0. **Find the contract.** Apply Phase 0 of `application-profile.md` first: decide opt-in per `general.md` "Model first"; where `cratis-screenplay-modeling-lifecycle` is installed, run its `scripts/model-first-status.mjs` for the decision, model root and drafts. When opted in, an accepted model under the root is the contract, and new behaviour missing from the model is a request to add it, not a reason to use an outline. Skill availability is checked separately from opt-in. Without opt-in, an agreed outline is the contract and code-first work (infrastructure, clients, adapters, framework) is preserved. If the slice is in a Screenplay model, the `.play` slice and its specifications are the contract: write C# only for scope the renderer rejects or for adapters, never edit Stage-managed output, and never change the model to match code. If the contract is ambiguous or contradictory, do not guess: stop that scope and return one specific question (for `.play`, an edit request: address, change, reason).
|
|
53
53
|
1. **Determine the namespace root** by reading an existing source file to identify the convention (e.g. `Studio`, `Library`, `MyApp`).
|
|
54
54
|
2. **Read existing slices** in the same feature to understand naming, existing concepts, and events you may reference.
|
|
55
55
|
3. **Create a single `.cs` file** at `<Feature>/<Slice>/<Slice>.cs` (under the app source root; an optional `<Module>/` may group the feature — there is **no** top-level `Features/` wrapper).
|
|
@@ -31,7 +31,7 @@ Select only diff-relevant, profile-applicable canonical rules in `.cratis/ai/rul
|
|
|
31
31
|
|
|
32
32
|
## Model-first check
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
Decide opt-in per `general.md` "Model first"; where `cratis-screenplay-modeling-lifecycle` is installed, run its `scripts/model-first-status.mjs` once per review for the decision, model root and drafts. Otherwise skip this section, and do not demand a model from framework, brownfield or not-opted-in work. If the Screenplay skills are missing, say so in the report rather than reviewing model content from memory.
|
|
35
35
|
|
|
36
36
|
In an opted-in repository:
|
|
37
37
|
|
|
@@ -45,7 +45,7 @@ After selecting the profile and lane, read the applicable entries only:
|
|
|
45
45
|
Run this once per request, before choosing an implementer; the master text is in `cratis-screenplay-modeling-lifecycle`.
|
|
46
46
|
|
|
47
47
|
1. **Skill availability is separate from consent.** Check that the Screenplay method skills you need are installed. If they are missing, report which and stop for model work; never author Screenplay from memory and never install anything. Installed skills never opt a repository in.
|
|
48
|
-
2. **Opted in?**
|
|
48
|
+
2. **Opted in?** Apply `general.md` "Model first" for opt-in; where `cratis-screenplay-modeling-lifecycle` is installed, run its `scripts/model-first-status.mjs` for the decision, model root and drafts. If your brief already states the decision, use it. Then the `.play` model is the source of truth and the plan starts from it.
|
|
49
49
|
3. **Not opted in:** stay code-first. Only the entry-point agent or session proposes a model (never when your brief carries the decision), at most once per session, naming the feature it would start with, and never for trivial, bug-fix, infrastructure, client, framework or brownfield-maintenance work; if declined, do not ask again, and put the decision in the brief of every delegated agent. Unattended: record the recommendation in the final report. Framework, brownfield, infrastructure, client and adapter work stays code-first and is never forced into a model.
|
|
50
50
|
4. **Code is the right level for** infrastructure, clients, Screenplay code attachments and handlers, adapters, and scope Stage cannot render yet (gap-fill, with the `.play` slice and specs as the contract). Never use code as a shortcut around the model, change the model to match existing code, edit Stage-managed output, leave a modeled rule living only in code, or weaken protection (authorization, `@pii`, rules) to make a model compile or render.
|
|
51
51
|
5. **Proportional execution still applies.** A model-first request does not require a multi-agent hierarchy: a trivial change is one short plan for one implementer (or the parent).
|
|
@@ -52,7 +52,7 @@ Confirm that the TypeScript proxies exist in the slice folder before writing any
|
|
|
52
52
|
|
|
53
53
|
## Model-first check
|
|
54
54
|
|
|
55
|
-
Before writing slice UI, decide the level. The model is the source of truth when an accepted `.play` model covers the slice, or when the repository has opted in
|
|
55
|
+
Before writing slice UI, decide the level. The model is the source of truth when an accepted `.play` model covers the slice, or when the repository has opted in (per `general.md` "Model first"; where `cratis-screenplay-modeling-lifecycle` is installed, run its `scripts/model-first-status.mjs` for the decision, model root and drafts). The page is then the model's implementation:
|
|
56
56
|
|
|
57
57
|
- Read the slice's `screen` and `form` declarations first, and follow `cratis-arc-react-page` `references/from-screenplay.md` for the declaration-to-component mapping. Use `cratis-screenplay-modeling-lifecycle` for the model-first decision rule.
|
|
58
58
|
- Where the model and the request disagree, fix the model first (through the modeler, or ask) and report it. Never change the model to match existing code, and never add data or actions in the page that the model lacks.
|
|
@@ -46,7 +46,7 @@ After selecting the profile and lane, read the applicable entries only:
|
|
|
46
46
|
Run this once per request, before choosing an implementer; the master text is in `cratis-screenplay-modeling-lifecycle`.
|
|
47
47
|
|
|
48
48
|
1. **Skill availability is separate from consent.** Check that the Screenplay method skills you need are installed. If they are missing, report which and stop for model work; never author Screenplay from memory and never install anything. Installed skills never opt a repository in.
|
|
49
|
-
2. **Opted in?**
|
|
49
|
+
2. **Opted in?** Apply `general.md` "Model first" for opt-in; where `cratis-screenplay-modeling-lifecycle` is installed, run its `scripts/model-first-status.mjs` for the decision, model root and drafts. If your brief already states the decision, use it. Then the `.play` model is the source of truth and the plan starts from it.
|
|
50
50
|
3. **Not opted in:** stay code-first. Only the entry-point agent or session proposes a model (never when your brief carries the decision), at most once per session, naming the feature it would start with, and never for trivial, bug-fix, infrastructure, client, framework or brownfield-maintenance work; if declined, do not ask again, and put the decision in the brief of every delegated agent. Unattended: record the recommendation in the final report. Framework, brownfield, infrastructure, client and adapter work stays code-first and is never forced into a model.
|
|
51
51
|
4. **Code is the right level for** infrastructure, clients, Screenplay code attachments and handlers, adapters, and scope Stage cannot render yet (gap-fill, with the `.play` slice and specs as the contract). Never use code as a shortcut around the model, change the model to match existing code, edit Stage-managed output, leave a modeled rule living only in code, or weaken protection (authorization, `@pii`, rules) to make a model compile or render.
|
|
52
52
|
5. **Proportional execution still applies.** A model-first request does not require a multi-agent hierarchy: a trivial change is one short plan for one implementer (or the parent).
|
|
@@ -44,7 +44,7 @@ After selecting the profile and lane, read the applicable entries only:
|
|
|
44
44
|
Run this once per request, before choosing an implementer; the master text is in `cratis-screenplay-modeling-lifecycle`.
|
|
45
45
|
|
|
46
46
|
1. **Skill availability is separate from consent.** Check that the Screenplay method skills you need are installed. If they are missing, report which and stop for model work; never author Screenplay from memory and never install anything. Installed skills never opt a repository in.
|
|
47
|
-
2. **Opted in?**
|
|
47
|
+
2. **Opted in?** Apply `general.md` "Model first" for opt-in; where `cratis-screenplay-modeling-lifecycle` is installed, run its `scripts/model-first-status.mjs` for the decision, model root and drafts. If your brief already states the decision, use it. Then the `.play` model is the source of truth and the plan starts from it.
|
|
48
48
|
3. **Not opted in:** stay code-first. Only the entry-point agent or session proposes a model (never when your brief carries the decision), at most once per session, naming the feature it would start with, and never for trivial, bug-fix, infrastructure, client, framework or brownfield-maintenance work; if declined, do not ask again, and put the decision in the brief of every delegated agent. Unattended: record the recommendation in the final report. Framework, brownfield, infrastructure, client and adapter work stays code-first and is never forced into a model.
|
|
49
49
|
4. **Code is the right level for** infrastructure, clients, Screenplay code attachments and handlers, adapters, and scope Stage cannot render yet (gap-fill, with the `.play` slice and specs as the contract). Never use code as a shortcut around the model, change the model to match existing code, edit Stage-managed output, leave a modeled rule living only in code, or weaken protection (authorization, `@pii`, rules) to make a model compile or render.
|
|
50
50
|
5. **Proportional execution still applies.** A model-first request does not require a multi-agent hierarchy: a trivial change is one short plan for one implementer (or the parent).
|
|
@@ -22,7 +22,7 @@ You author and change the `.play` model, the source of truth for behavior. Code
|
|
|
22
22
|
|
|
23
23
|
## Capability guard (first, before anything else)
|
|
24
24
|
|
|
25
|
-
1. Decide
|
|
25
|
+
1. Decide opt-in per `general.md` "Model first"; where `cratis-screenplay-modeling-lifecycle` is installed, run its `scripts/model-first-status.mjs` for the decision, model root and drafts. A direct user request to model this scope is itself the consent for that scope. Your work in the model root stays a draft until the user commits it; recommend the commit at P6 and never commit yourself. Otherwise stop and report that the repository is not opted in (never propose a model yourself when delegated); the code-first path belongs to the code agents.
|
|
26
26
|
2. Availability is separate from consent. If `cratis-screenplay-modeling-lifecycle` (or the phase skill the step needs) is not installed, say that the `cratis/screenplay` profile is not installed, name the missing skill, and stop with `Outcome: blocked`. Never author Screenplay from memory, never install anything.
|
|
27
27
|
3. Read the `.play` slice, its specifications and STATE.md before concluding something is missing.
|
|
28
28
|
|
|
@@ -41,10 +41,10 @@ A new vertical slice (State Change, State View, Automation, Translation), or a n
|
|
|
41
41
|
|
|
42
42
|
### Phase 1 — Contract
|
|
43
43
|
Find what the code must match before writing any of it.
|
|
44
|
-
1. **Look for a Screenplay model** under the
|
|
44
|
+
1. **Look for a Screenplay model** under the model root (opted in per `general.md` "Model first"; where `cratis-screenplay-modeling-lifecycle` is installed, run its `scripts/model-first-status.mjs` for the decision, root and drafts) and search it for the slice, command, event and read-model names. Use the decision in your brief if it carries one. If the Screenplay skills are not installed, say so and do not author `.play` from memory.
|
|
45
45
|
2. **An accepted model under the root covers the slice:** the `.play` slice and its specifications are the contract. Change behaviour in the model first, then render it; write C# by hand only for scope the renderer rejects (gap-fill, per `cratis-screenplay-render-and-gap-fill`) or for adapters and infrastructure. Never hand-edit Stage-managed output; never change the model to match existing code.
|
|
46
46
|
3. **Opted in (an accepted model under the root, or a configured root, even if empty) but no accepted model covers this behaviour:** return a request to add it to the model (address, change, reason); new behaviour starts in discovery and slice design (`cratis-screenplay-discovery`, `cratis-screenplay-slice-design`). Write code first only when the user chooses to, or the behaviour cannot be expressed in `.play`; then report that the model lags the code.
|
|
47
|
-
4. **Not opted in (
|
|
47
|
+
4. **Not opted in (per `general.md` "Model first"; where `cratis-screenplay-modeling-lifecycle` is installed, run its `scripts/model-first-status.mjs`):** stay code-first; do not propose a model (only the entry-point agent or session does, at most once per session; a declined proposal is not repeated). Confirm Module/Feature, slice name and type, the behaviour in one sentence, whether a UI surface is needed. For new behaviour, unclear event names/stream boundaries or multi-slice flows, run **cratis-chronicle-event-modeling**. Confirm the domain requirements as before; the agreed outline (fields, events, rules, scenarios) is the contract, recorded where the team tracks work, if anywhere.
|
|
48
48
|
|
|
49
49
|
Load **cratis-application-slice-conformance** and keep its inventory open through every later phase. **Gate:** you can name the contract and its specification list.
|
|
50
50
|
|
|
@@ -36,7 +36,7 @@ Select from these canonical rules in `.cratis/ai/rules/` only after applying the
|
|
|
36
36
|
## Inputs you expect
|
|
37
37
|
|
|
38
38
|
- Feature name, slice name, and slice type (specs are **mandatory for every slice type**)
|
|
39
|
-
- The slice's contract and its specification list: the `.play` slice's specifications, or the agreed outline. Before accepting an outline, apply Phase 0 of `application-profile.md` (an accepted model under the model root covers the scope, or the repository is opted in,
|
|
39
|
+
- The slice's contract and its specification list: the `.play` slice's specifications, or the agreed outline. Before accepting an outline, apply Phase 0 of `application-profile.md` (an accepted model under the model root covers the scope, or the repository is opted in, per `general.md` "Model first"; where `cratis-screenplay-modeling-lifecycle` is installed, run its `scripts/model-first-status.mjs`: the contract is the `.play` slice's specifications; if the model lacks the behaviour, request it be added; check skill availability separately). Without opt-in, an agreed outline is the contract and code-first work is preserved. Existing code is not the contract.
|
|
40
40
|
- The complete slice file (`<Slice>.cs`) so you understand what behaviors to specify
|
|
41
41
|
- Any business rules or constraints that must be validated
|
|
42
42
|
- The namespace root (read from existing source files)
|
|
@@ -69,7 +69,7 @@ Tagged **[contract]** (framework-enforced) or **[convention]** (house default).
|
|
|
69
69
|
|
|
70
70
|
- **Starting a brand-new application:** scaffold it instead of hand-writing the skeleton: `dotnet new install Cratis.Templates`, then `dotnet new cratis -n MyApp -o MyApp` (`--language Kotlin|Java`, `--Database MongoDB|PostgreSQL|MsSql|SQLite`; `cratis-aspire` for Aspire; `cratis-chronicle-console` or `cratis-chronicle-web` for a Chronicle client only). Non-interactive runs need `--allow-scripts yes`; the .NET templates target `net10.0`. The template writes `.cratis/ai.json`; run `cratis ai update` afterwards. Its `SomeModule/SomeFeature/Registration/` slice is the house shape. There is no Go, Python or Elixir template (verified at Cratis.Templates `v1.7.4`).
|
|
71
71
|
- **Phase 0 — Find the contract / choose the level.** Before writing slice code, find what the code must match, and choose the level once for the whole scope.
|
|
72
|
-
1. **Look for a Screenplay model** under the model root (
|
|
72
|
+
1. **Look for a Screenplay model** under the model root (opted in per `general.md` "Model first"; where `cratis-screenplay-modeling-lifecycle` is installed, run its `scripts/model-first-status.mjs` for the decision, root and drafts) for the slice, command, event and read-model names.
|
|
73
73
|
2. **Model level** — an accepted model under the root covers the scope, or the repository is opted in and this scope has no model yet. The `.play` slice and its specs are the contract: change the model first (new behavior starts in discovery), verify it (V1–V3), get an independent review, then render with Stage or gap-fill by hand only what the renderer rejects. Hand-written code stays checked against the model (**cratis-application-slice-conformance**). Never edit Stage-managed output, never implement behavior the model does not state, never change the model to match existing code, never weaken protection to make it compile or render. Start with **cratis-screenplay-event-modeling** (decision rule), then **cratis-screenplay-modeling-lifecycle**. If the Screenplay skills are not installed, say so; do not author `.play` from memory.
|
|
74
74
|
3. **Code level** — infrastructure (hosting, DI composition, identity wiring, CI, deployment), clients, Screenplay code attachments and handlers, adapters in the render's customization area, and scope Stage cannot render yet (the model remains the contract). Framework repositories and brownfield work that is not opted in also stay code-first. Only the entry-point session may propose a model, at most once per session and never for trivial, bug-fix, infrastructure, client, framework or brownfield-maintenance work; if declined, do not ask again. Confirm Module/Feature, slice name, slice type and domain requirements as before; for new behavior or unclear event vocabulary run **cratis-chronicle-event-modeling** first, and record the agreed outline (fields, events, rules, scenarios) where the team tracks work, if anywhere. If you write code first where a model exists, say the model now lags.
|
|
75
75
|
4. **Trivial changes** keep the proportional-delegation policy; Phases 1–3 below apply to code you write at either level.
|
|
@@ -227,11 +227,7 @@ The MCP catalog has no install-hints field and does not install the executable.
|
|
|
227
227
|
|
|
228
228
|
### Event modeling with Screenplay
|
|
229
229
|
|
|
230
|
-
**Model first.**
|
|
231
|
-
`.play` files live: normally under `Source/` or `src/`, else `Screenplay/`) holds a committed `.play` file (`git ls-tree -r --name-only HEAD` lists a `.play` file there, narrowed to `-- <root>` when a root is configured) or the project explicitly set
|
|
232
|
-
`mcpServers.screenplay.root` in `.cratis/ai.json`; an empty directory, install output, an
|
|
233
|
-
installed profile or skill, a `.play` file outside the root or an untracked or uncommitted draft is not
|
|
234
|
-
opt-in. An accepted model under the root covering the scope is the contract and the source
|
|
230
|
+
**Model first.** Decide opt-in per `general.md` "Model first"; where `cratis-screenplay-modeling-lifecycle` is installed, run its `scripts/model-first-status.mjs` for the decision, model root and drafts. An accepted model under the root covering the scope is the contract and the source
|
|
235
231
|
of truth for behavior. Change the model, verify and independently review it, then render
|
|
236
232
|
or gap-fill from its contract; never edit Stage-managed output or weaken protection.
|
|
237
233
|
Otherwise stay code-first; only the entry-point session may propose a model, at most once
|
|
@@ -10,7 +10,7 @@ profile: application
|
|
|
10
10
|
|
|
11
11
|
Reactors are the "if this then that" of event sourcing — they observe events and produce side effects. Unlike projections (which build state), reactors *do things*: send emails, trigger commands in other slices, call external APIs.
|
|
12
12
|
|
|
13
|
-
**Model first:** when an accepted model under the model root covers this scope (or the repository is opted in
|
|
13
|
+
**Model first:** when an accepted model under the model root covers this scope (or the repository is opted in per `general.md` "Model first"; where `cratis-screenplay-modeling-lifecycle` is installed, run its `scripts/model-first-status.mjs`), a reactor implements an automation that the model owns (`produces` / `invokes`); read the modeled slice first and keep the reactor to what the model leaves to code (gap-fill). Otherwise (not opted in) stay code-first: this file and the **cratis-chronicle-reactor** skill are the guide, and the entry-point session may propose a model at most once per session. See `cratis-screenplay-modeling-lifecycle`'s `scripts/model-first-status.mjs` for the decision, root and drafts.
|
|
14
14
|
|
|
15
15
|
## IReactor — Marker Interface
|
|
16
16
|
|
|
@@ -15,7 +15,7 @@ A vertical slice owns a single behavior: the command or query, the events it pro
|
|
|
15
15
|
|
|
16
16
|
This file is the reference for *what* goes in each part of a slice. Layout, slice types, workflow, and quality gates are in [general.md](../../../rules/general.md).
|
|
17
17
|
|
|
18
|
-
**Model-first check.** Before changing a slice, look for it in the accepted `.play` model
|
|
18
|
+
**Model-first check.** Before changing a slice, look for it in the accepted `.play` model under the model root (opted in per `general.md` "Model first"; where `cratis-screenplay-modeling-lifecycle` is installed, run its `scripts/model-first-status.mjs` for the decision, root and drafts). If an accepted model covers it, change the model and render or gap-fill from it; never edit Stage-managed files. See Phase 0 in [application-profile.md](./application-profile.instructions.md).
|
|
19
19
|
|
|
20
20
|
## Technical stack
|
|
21
21
|
|
|
@@ -9,7 +9,7 @@ Add a reactor that observes events and produces side effects. Invoke the **crati
|
|
|
9
9
|
|
|
10
10
|
## Confirm first
|
|
11
11
|
|
|
12
|
-
- **Model first:** if an accepted model under the model root covers this scope, or the repository is opted in (
|
|
12
|
+
- **Model first:** if an accepted model under the model root covers this scope, or the repository is opted in (per `general.md` "Model first"; where `cratis-screenplay-modeling-lifecycle` is installed, run its `scripts/model-first-status.mjs`), the automation belongs in the model (`produces` / `invokes`); check there before writing code and follow the model-first routing in `.cratis/ai/rules/general.md`. Reactor code is then gap-fill against the modeled contract. If not opted in, stay code-first.
|
|
13
13
|
- **Events to react to**, the **side effect**, and the slice type: `Automation` (our own event causes an external side effect, a follow-up event, or a follow-up command) or `Translation` (data from an outside system recorded as our own facts).
|
|
14
14
|
- **Contract details to settle:** where each output field comes from (the trigger event, an injected read model, or a stated mapping), every condition that skips an event, and what must not happen twice.
|
|
15
15
|
|
|
@@ -12,7 +12,7 @@ Implement a complete **vertical slice** end-to-end. Follow the Implementation Wo
|
|
|
12
12
|
Before any slice code, find what the code must match. Decide the route once:
|
|
13
13
|
|
|
14
14
|
1. **The slice is in an accepted Screenplay model** (search the model root for the slice, command, event and read-model names; the project's `**/*.play`, or the configured root). The `.play` slice and its specifications are the contract. Change behavior in the model first (the `cratis-screenplay-*` skills), then render it (`cratis-stage-rendering-and-sandbox`). Hand-write C# only for scope the renderer rejects, or for adapters, infrastructure and clients; the model stays the oracle for that code (`cratis-application-slice-conformance`). Never hand-edit rendered, managed output, and never change the model to match existing code.
|
|
15
|
-
2. **The repository is opted in, but the slice is not modeled** (
|
|
15
|
+
2. **The repository is opted in, but the slice is not modeled** (per `general.md` "Model first"; where `cratis-screenplay-modeling-lifecycle` is installed, run its `scripts/model-first-status.mjs` for the decision, model root and drafts): model it first, then continue with route 1. Write code first only when the user chooses to, or the behavior cannot be expressed in `.play`; say then that the model lags the code.
|
|
16
16
|
3. **No accepted model covers this scope and the repository is not opted in:** stay code-first and never force a model. Only the entry-point session may propose one, at most once per session, never for trivial, bug-fix, infrastructure, client, framework or brownfield-maintenance work, and not again if declined. Framework, brownfield, infrastructure, client and adapter work keep their code-first path. For new behavior or unclear event vocabulary, run **cratis-chronicle-event-modeling** first; the agreed outline (fields, events, rules, scenarios) is the contract, recorded where the team tracks work, if anywhere.
|
|
17
17
|
|
|
18
18
|
Whether the Screenplay skills are installed is a separate question from consent: if the route needs them and they are missing, say so and ask; do not author `.play` from memory.
|
|
@@ -13,7 +13,7 @@ The slice file (`.cs`) **and its contract**: the `.play` slice with its specific
|
|
|
13
13
|
|
|
14
14
|
If no contract can be found, decide once:
|
|
15
15
|
|
|
16
|
-
- **An accepted model under the model root covers the scope, or the repository is opted in** (
|
|
16
|
+
- **An accepted model under the model root covers the scope, or the repository is opted in** (per `general.md` "Model first"; where `cratis-screenplay-modeling-lifecycle` is installed, run its `scripts/model-first-status.mjs` for the decision, model root and drafts): do not write code-derived specs in its place. Route to the `cratis-screenplay-*` skills (`cratis-screenplay-specifications`, `cratis-screenplay-scenario-coverage`) to add the slice's specifications to the model first. If those skills are not installed, say so and stop; do not author `.play` from memory.
|
|
17
17
|
- **No model coverage and no opt-in:** stay code-first. Write from the code, report every case as a proposal rather than as agreed behavior. A model is proposed only by the entry-point session, at most once per session, and not for trivial, bug-fix, infrastructure, client, framework or brownfield-maintenance work.
|
|
18
18
|
|
|
19
19
|
## Coverage (every slice type)
|
|
@@ -68,7 +68,7 @@ Tagged **[contract]** (framework-enforced) or **[convention]** (house default).
|
|
|
68
68
|
|
|
69
69
|
- **Starting a brand-new application:** scaffold it instead of hand-writing the skeleton: `dotnet new install Cratis.Templates`, then `dotnet new cratis -n MyApp -o MyApp` (`--language Kotlin|Java`, `--Database MongoDB|PostgreSQL|MsSql|SQLite`; `cratis-aspire` for Aspire; `cratis-chronicle-console` or `cratis-chronicle-web` for a Chronicle client only). Non-interactive runs need `--allow-scripts yes`; the .NET templates target `net10.0`. The template writes `.cratis/ai.json`; run `cratis ai update` afterwards. Its `SomeModule/SomeFeature/Registration/` slice is the house shape. There is no Go, Python or Elixir template (verified at Cratis.Templates `v1.7.4`).
|
|
70
70
|
- **Phase 0 — Find the contract / choose the level.** Before writing slice code, find what the code must match, and choose the level once for the whole scope.
|
|
71
|
-
1. **Look for a Screenplay model** under the model root (
|
|
71
|
+
1. **Look for a Screenplay model** under the model root (opted in per `general.md` "Model first"; where `cratis-screenplay-modeling-lifecycle` is installed, run its `scripts/model-first-status.mjs` for the decision, root and drafts) for the slice, command, event and read-model names.
|
|
72
72
|
2. **Model level** — an accepted model under the root covers the scope, or the repository is opted in and this scope has no model yet. The `.play` slice and its specs are the contract: change the model first (new behavior starts in discovery), verify it (V1–V3), get an independent review, then render with Stage or gap-fill by hand only what the renderer rejects. Hand-written code stays checked against the model (**cratis-application-slice-conformance**). Never edit Stage-managed output, never implement behavior the model does not state, never change the model to match existing code, never weaken protection to make it compile or render. Start with **cratis-screenplay-event-modeling** (decision rule), then **cratis-screenplay-modeling-lifecycle**. If the Screenplay skills are not installed, say so; do not author `.play` from memory.
|
|
73
73
|
3. **Code level** — infrastructure (hosting, DI composition, identity wiring, CI, deployment), clients, Screenplay code attachments and handlers, adapters in the render's customization area, and scope Stage cannot render yet (the model remains the contract). Framework repositories and brownfield work that is not opted in also stay code-first. Only the entry-point session may propose a model, at most once per session and never for trivial, bug-fix, infrastructure, client, framework or brownfield-maintenance work; if declined, do not ask again. Confirm Module/Feature, slice name, slice type and domain requirements as before; for new behavior or unclear event vocabulary run **cratis-chronicle-event-modeling** first, and record the agreed outline (fields, events, rules, scenarios) where the team tracks work, if anywhere. If you write code first where a model exists, say the model now lags.
|
|
74
74
|
4. **Trivial changes** keep the proportional-delegation policy; Phases 1–3 below apply to code you write at either level.
|
|
@@ -226,11 +226,7 @@ The MCP catalog has no install-hints field and does not install the executable.
|
|
|
226
226
|
|
|
227
227
|
### Event modeling with Screenplay
|
|
228
228
|
|
|
229
|
-
**Model first.**
|
|
230
|
-
`.play` files live: normally under `Source/` or `src/`, else `Screenplay/`) holds a committed `.play` file (`git ls-tree -r --name-only HEAD` lists a `.play` file there, narrowed to `-- <root>` when a root is configured) or the project explicitly set
|
|
231
|
-
`mcpServers.screenplay.root` in `.cratis/ai.json`; an empty directory, install output, an
|
|
232
|
-
installed profile or skill, a `.play` file outside the root or an untracked or uncommitted draft is not
|
|
233
|
-
opt-in. An accepted model under the root covering the scope is the contract and the source
|
|
229
|
+
**Model first.** Decide opt-in per `general.md` "Model first"; where `cratis-screenplay-modeling-lifecycle` is installed, run its `scripts/model-first-status.mjs` for the decision, model root and drafts. An accepted model under the root covering the scope is the contract and the source
|
|
234
230
|
of truth for behavior. Change the model, verify and independently review it, then render
|
|
235
231
|
or gap-fill from its contract; never edit Stage-managed output or weaken protection.
|
|
236
232
|
Otherwise stay code-first; only the entry-point session may propose a model, at most once
|
|
@@ -9,7 +9,7 @@ profile: application
|
|
|
9
9
|
|
|
10
10
|
Reactors are the "if this then that" of event sourcing — they observe events and produce side effects. Unlike projections (which build state), reactors *do things*: send emails, trigger commands in other slices, call external APIs.
|
|
11
11
|
|
|
12
|
-
**Model first:** when an accepted model under the model root covers this scope (or the repository is opted in
|
|
12
|
+
**Model first:** when an accepted model under the model root covers this scope (or the repository is opted in per `general.md` "Model first"; where `cratis-screenplay-modeling-lifecycle` is installed, run its `scripts/model-first-status.mjs`), a reactor implements an automation that the model owns (`produces` / `invokes`); read the modeled slice first and keep the reactor to what the model leaves to code (gap-fill). Otherwise (not opted in) stay code-first: this file and the **cratis-chronicle-reactor** skill are the guide, and the entry-point session may propose a model at most once per session. See `cratis-screenplay-modeling-lifecycle`'s `scripts/model-first-status.mjs` for the decision, root and drafts.
|
|
13
13
|
|
|
14
14
|
## IReactor — Marker Interface
|
|
15
15
|
|
|
@@ -14,7 +14,7 @@ A vertical slice owns a single behavior: the command or query, the events it pro
|
|
|
14
14
|
|
|
15
15
|
This file is the reference for *what* goes in each part of a slice. Layout, slice types, workflow, and quality gates are in [general.md](./general.md).
|
|
16
16
|
|
|
17
|
-
**Model-first check.** Before changing a slice, look for it in the accepted `.play` model
|
|
17
|
+
**Model-first check.** Before changing a slice, look for it in the accepted `.play` model under the model root (opted in per `general.md` "Model first"; where `cratis-screenplay-modeling-lifecycle` is installed, run its `scripts/model-first-status.mjs` for the decision, root and drafts). If an accepted model covers it, change the model and render or gap-fill from it; never edit Stage-managed files. See Phase 0 in [application-profile.md](./application-profile.md).
|
|
18
18
|
|
|
19
19
|
## Technical stack
|
|
20
20
|
|
|
@@ -183,10 +183,7 @@ them.
|
|
|
183
183
|
## Route near misses
|
|
184
184
|
|
|
185
185
|
- An accepted `.play` model under the model root covers the behavior, or the
|
|
186
|
-
repository is opted in (
|
|
187
|
-
`mcpServers.screenplay.root` in `.cratis/ai.json`; an empty directory, install
|
|
188
|
-
output, an uncommitted `.play` draft or a `.play` file outside the root does not count; master definition:
|
|
189
|
-
`cratis-screenplay-modeling-lifecycle`): change the model first with
|
|
186
|
+
repository is opted in (per `general.md` "Model first"; where `cratis-screenplay-modeling-lifecycle` is installed, run its `scripts/model-first-status.mjs`): change the model first with
|
|
190
187
|
`cratis-screenplay-event-modeling`. If the Screenplay skills are not installed,
|
|
191
188
|
say so and do not author `.play` from memory.
|
|
192
189
|
Edit code here only for infrastructure, clients, adapters, Screenplay code
|
|
@@ -52,17 +52,13 @@ This skill is a method: it names no API of its own. When the Screenplay skills a
|
|
|
52
52
|
Find the contract before touching code; say which one you are using. These steps are enough on
|
|
53
53
|
their own when the Screenplay skills are not installed; the master decision rule, when they
|
|
54
54
|
are, is `cratis-screenplay-modeling-lifecycle` ("Decide the level first").
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
Decide opt-in per `general.md` "Model first"; where `cratis-screenplay-modeling-lifecycle` is installed, run its `scripts/model-first-status.mjs` for the decision, model root and drafts.
|
|
56
|
+
Staged or untracked `.play` files are drafts, not the contract; a `.play` outside the model root is not a contract.
|
|
57
|
+
For a committed model with working-tree edits, HEAD remains the contract until the change is committed.
|
|
58
|
+
1. An accepted `.play` model under the model root covers the slice (search
|
|
57
59
|
`**/*.play` for the slice, command, event and read-model names): the `.play` slice and its
|
|
58
|
-
specifications are the contract.
|
|
59
|
-
|
|
60
|
-
root are drafts, not contracts; a file outside the root is not a contract. A committed file
|
|
61
|
-
with uncommitted working-tree edits is a model change in progress: its HEAD version is the
|
|
62
|
-
contract until the change is committed.
|
|
63
|
-
2. The repository is opted in (the root holds a committed `.play` file, or the project
|
|
64
|
-
explicitly set that root, even if it is empty; an empty unconfigured directory, install
|
|
65
|
-
output, an installed skill or an uncommitted draft does not count) but this
|
|
60
|
+
specifications are the contract.
|
|
61
|
+
2. The repository is opted in but this
|
|
66
62
|
scope has no model yet: new behaviour starts in discovery and slice design
|
|
67
63
|
(`cratis-screenplay-discovery`, `cratis-screenplay-slice-design`); do not code first. If those
|
|
68
64
|
skills are not installed, say so and do not author `.play` from memory.
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
# Contract, precedence and conflicting evidence
|
|
2
2
|
|
|
3
3
|
## Which contract
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
`git ls-tree -r --name-only HEAD` lists a `.play` file there, narrowed to `-- <root>` when a root is configured), or the root holds a committed `.play`
|
|
8
|
-
file or was explicitly set in `.cratis/ai.json` (even if empty). Staged or untracked files under
|
|
9
|
-
the root are drafts. A committed file with uncommitted working-tree edits is a model change
|
|
10
|
-
in progress; its HEAD version is the contract until the change is committed. An empty directory, install
|
|
11
|
-
output, an uncommitted `.play` draft or a `.play` file outside the root does not count. Otherwise stay code-first.
|
|
4
|
+
Decide opt-in per `general.md` "Model first"; where `cratis-screenplay-modeling-lifecycle` is installed, run its `scripts/model-first-status.mjs` for the decision, model root and drafts. SKILL.md step 1 suffices when the Screenplay skills are not installed.
|
|
5
|
+
Staged or untracked `.play` files are drafts, not the contract; a `.play` outside the model root is not a contract.
|
|
6
|
+
For a committed model with working-tree edits, HEAD remains the contract until the change is committed.
|
|
12
7
|
|
|
13
8
|
| Situation | Contract | Code's role |
|
|
14
9
|
| --- | --- | --- |
|
|
@@ -53,9 +53,7 @@ repository before claiming support for another version.
|
|
|
53
53
|
the contract for this skill). Decide this with the decision rule in
|
|
54
54
|
`cratis-screenplay-modeling-lifecycle`: model-first only when an accepted
|
|
55
55
|
model under the model root covers this scope, or the repository is opted in
|
|
56
|
-
(
|
|
57
|
-
in `.cratis/ai.json`); an empty directory, install output, a `.play` file
|
|
58
|
-
outside the root or an uncommitted draft does not count, and framework, infrastructure, client, adapter and not-opted-in
|
|
56
|
+
(opted in per `general.md` "Model first"; where `cratis-screenplay-modeling-lifecycle` is installed, run its `scripts/model-first-status.mjs`); framework, infrastructure, client, adapter and not-opted-in
|
|
59
57
|
brownfield work stays code-first. Opted in but no model for this scope: model
|
|
60
58
|
it first (`cratis-screenplay-discovery`, then `cratis-screenplay-slice-design`)
|
|
61
59
|
before writing specifications. If those Screenplay skills are not installed,
|
|
@@ -12,10 +12,7 @@ whatever `Handle()` returns into events, server-executed operations, a response,
|
|
|
12
12
|
or a combination.
|
|
13
13
|
|
|
14
14
|
- An accepted `.play` model under the model root covers the behavior, or the
|
|
15
|
-
repository is opted in (
|
|
16
|
-
`mcpServers.screenplay.root` in `.cratis/ai.json`; an empty directory, install
|
|
17
|
-
output, an uncommitted `.play` draft or a `.play` file outside the root does not count; master definition:
|
|
18
|
-
`cratis-screenplay-modeling-lifecycle`): change the model first with
|
|
15
|
+
repository is opted in (per `general.md` "Model first"; where `cratis-screenplay-modeling-lifecycle` is installed, run its `scripts/model-first-status.mjs`): change the model first with
|
|
19
16
|
`cratis-screenplay-event-modeling`. If the Screenplay skills are not installed,
|
|
20
17
|
say so and do not author `.play` from memory.
|
|
21
18
|
Edit code here only for infrastructure, clients, adapters, Screenplay code
|
|
@@ -234,10 +234,7 @@ Recovery can redeliver the trigger even with `[OnceOnly]`, and a command whose o
|
|
|
234
234
|
- Adding or changing a rule: the Arc command validation guidance.
|
|
235
235
|
- Designing what a reactor should observe: the Chronicle reactor guidance.
|
|
236
236
|
- An accepted `.play` model under the model root covers the behavior, or the
|
|
237
|
-
repository is opted in (
|
|
238
|
-
`mcpServers.screenplay.root` in `.cratis/ai.json`; an empty directory, install
|
|
239
|
-
output, an uncommitted `.play` draft or a `.play` file outside the root does not count; master definition:
|
|
240
|
-
`cratis-screenplay-modeling-lifecycle`): change the model first with
|
|
237
|
+
repository is opted in (per `general.md` "Model first"; where `cratis-screenplay-modeling-lifecycle` is installed, run its `scripts/model-first-status.mjs`): change the model first with
|
|
241
238
|
`cratis-screenplay-event-modeling`. If the Screenplay skills are not installed,
|
|
242
239
|
say so and do not author `.play` from memory.
|
|
243
240
|
Edit code here only for infrastructure, clients, adapters, Screenplay code
|
|
@@ -47,10 +47,7 @@ another version.
|
|
|
47
47
|
- Writing the specification for the rejection: use
|
|
48
48
|
`cratis-application-slice-specifications`.
|
|
49
49
|
- An accepted `.play` model under the model root covers the behavior, or the
|
|
50
|
-
repository is opted in (
|
|
51
|
-
`mcpServers.screenplay.root` in `.cratis/ai.json`; an empty directory, install
|
|
52
|
-
output, an uncommitted `.play` draft or a `.play` file outside the root does not count; master definition:
|
|
53
|
-
`cratis-screenplay-modeling-lifecycle`): change the model first with
|
|
50
|
+
repository is opted in (per `general.md` "Model first"; where `cratis-screenplay-modeling-lifecycle` is installed, run its `scripts/model-first-status.mjs`): change the model first with
|
|
54
51
|
`cratis-screenplay-event-modeling`. If the Screenplay skills are not installed,
|
|
55
52
|
say so and do not author `.play` from memory.
|
|
56
53
|
Edit code here only for infrastructure, clients, adapters, Screenplay code
|
|
@@ -204,10 +204,7 @@ apply. Do not construct or suggest credentials.
|
|
|
204
204
|
- Diagnosing a whole slice rather than one endpoint: the slice diagnostics
|
|
205
205
|
guidance.
|
|
206
206
|
- An accepted `.play` model under the model root covers the behavior, or the
|
|
207
|
-
repository is opted in (
|
|
208
|
-
`mcpServers.screenplay.root` in `.cratis/ai.json`; an empty directory, install
|
|
209
|
-
output, an uncommitted `.play` draft or a `.play` file outside the root does not count; master definition:
|
|
210
|
-
`cratis-screenplay-modeling-lifecycle`): change the model first with
|
|
207
|
+
repository is opted in (per `general.md` "Model first"; where `cratis-screenplay-modeling-lifecycle` is installed, run its `scripts/model-first-status.mjs`): change the model first with
|
|
211
208
|
`cratis-screenplay-event-modeling`. If the Screenplay skills are not installed,
|
|
212
209
|
say so and do not author `.play` from memory.
|
|
213
210
|
Edit code here only for infrastructure, clients, adapters, Screenplay code
|
|
@@ -10,10 +10,7 @@ Arc applies paging and sorting for you. You never write `Skip`/`Take` or read
|
|
|
10
10
|
the query string — you choose a **return shape** that the framework can narrow.
|
|
11
11
|
|
|
12
12
|
- An accepted `.play` model under the model root covers the behavior, or the
|
|
13
|
-
repository is opted in (
|
|
14
|
-
`mcpServers.screenplay.root` in `.cratis/ai.json`; an empty directory, install
|
|
15
|
-
output, an uncommitted `.play` draft or a `.play` file outside the root does not count; master definition:
|
|
16
|
-
`cratis-screenplay-modeling-lifecycle`): change the model first with
|
|
13
|
+
repository is opted in (per `general.md` "Model first"; where `cratis-screenplay-modeling-lifecycle` is installed, run its `scripts/model-first-status.mjs`): change the model first with
|
|
17
14
|
`cratis-screenplay-event-modeling`. If the Screenplay skills are not installed,
|
|
18
15
|
say so and do not author `.play` from memory.
|
|
19
16
|
Edit code here only for infrastructure, clients, adapters, Screenplay code
|
|
@@ -10,10 +10,7 @@ Build the page from the generated Arc proxies and the Cratis Components
|
|
|
10
10
|
wrappers. Do not hand-roll a table, a dialog, or a fetch.
|
|
11
11
|
|
|
12
12
|
- An accepted `.play` model under the model root covers the behavior, or the
|
|
13
|
-
repository is opted in (
|
|
14
|
-
`mcpServers.screenplay.root` in `.cratis/ai.json`; an empty directory, install
|
|
15
|
-
output, an uncommitted `.play` draft or a `.play` file outside the root does not count; master definition:
|
|
16
|
-
`cratis-screenplay-modeling-lifecycle`): change the model first with
|
|
13
|
+
repository is opted in (per `general.md` "Model first"; where `cratis-screenplay-modeling-lifecycle` is installed, run its `scripts/model-first-status.mjs`): change the model first with
|
|
17
14
|
`cratis-screenplay-event-modeling`. If the Screenplay skills are not installed,
|
|
18
15
|
say so and do not author `.play` from memory.
|
|
19
16
|
Read the model's `screen` and `form` with
|
|
@@ -51,10 +51,7 @@ memory.
|
|
|
51
51
|
- You are writing the specification and want the `EventScenario` mechanics in
|
|
52
52
|
depth: use `cratis-chronicle-event-specifications`.
|
|
53
53
|
- An accepted `.play` model under the model root covers the behavior, or the
|
|
54
|
-
repository is opted in (
|
|
55
|
-
`mcpServers.screenplay.root` in `.cratis/ai.json`; an empty directory, install
|
|
56
|
-
output, an uncommitted `.play` draft or a `.play` file outside the root does not count; master definition:
|
|
57
|
-
`cratis-screenplay-modeling-lifecycle`): change the model first with
|
|
54
|
+
repository is opted in (per `general.md` "Model first"; where `cratis-screenplay-modeling-lifecycle` is installed, run its `scripts/model-first-status.mjs`): change the model first with
|
|
58
55
|
`cratis-screenplay-event-modeling`. If the Screenplay skills are not installed,
|
|
59
56
|
say so and do not author `.play` from memory.
|
|
60
57
|
Edit code here only for infrastructure, clients, adapters, Screenplay code
|
|
@@ -7,13 +7,10 @@ license: MIT
|
|
|
7
7
|
# Chronicle event modeling
|
|
8
8
|
|
|
9
9
|
> **Model-first check.** If an accepted model under the model root covers this scope, or the
|
|
10
|
-
> repository is opted in (
|
|
11
|
-
> file (`git ls-tree -r --name-only HEAD` lists a `.play` file there, narrowed to `-- <root>` when a root is configured), or the project explicitly set `mcpServers.screenplay.root` in
|
|
12
|
-
> `.cratis/ai.json`), the model is the source of truth: use
|
|
10
|
+
> repository is opted in (per `general.md` "Model first"; where `cratis-screenplay-modeling-lifecycle` is installed, run its `scripts/model-first-status.mjs`), the model is the source of truth: use
|
|
13
11
|
> `cratis-screenplay-event-modeling` (and the lifecycle in
|
|
14
12
|
> `cratis-screenplay-modeling-lifecycle`, which holds the master definition)
|
|
15
|
-
> instead of this skill.
|
|
16
|
-
> outside the root or an untracked or uncommitted draft is not consent. This skill is for
|
|
13
|
+
> instead of this skill. This skill is for
|
|
17
14
|
> hand-written C# models where the repository has not opted in (never force a
|
|
18
15
|
> model; only the entry-point session proposes one, at most once per session), and for
|
|
19
16
|
> code-level work against an already accepted contract (stream identity,
|
|
@@ -19,10 +19,7 @@ events.
|
|
|
19
19
|
## Route near misses
|
|
20
20
|
|
|
21
21
|
- An accepted `.play` model under the model root covers the behavior, or the
|
|
22
|
-
repository is opted in (
|
|
23
|
-
`mcpServers.screenplay.root` in `.cratis/ai.json`; an empty directory, install
|
|
24
|
-
output, an uncommitted `.play` draft or a `.play` file outside the root does not count; master definition:
|
|
25
|
-
`cratis-screenplay-modeling-lifecycle`): change the model first with
|
|
22
|
+
repository is opted in (per `general.md` "Model first"; where `cratis-screenplay-modeling-lifecycle` is installed, run its `scripts/model-first-status.mjs`): change the model first with
|
|
26
23
|
`cratis-screenplay-event-modeling`. If the Screenplay skills are not installed,
|
|
27
24
|
say so and do not author `.play` from memory.
|
|
28
25
|
Edit code here only for infrastructure, clients, adapters, Screenplay code
|
|
@@ -277,10 +277,7 @@ projection spans streams.
|
|
|
277
277
|
## Route near misses
|
|
278
278
|
|
|
279
279
|
- An accepted `.play` model under the model root covers the behavior, or the
|
|
280
|
-
repository is opted in (
|
|
281
|
-
`mcpServers.screenplay.root` in `.cratis/ai.json`; an empty directory, install
|
|
282
|
-
output, an uncommitted `.play` draft or a `.play` file outside the root does not count; master definition:
|
|
283
|
-
`cratis-screenplay-modeling-lifecycle`): change the model first with
|
|
280
|
+
repository is opted in (per `general.md` "Model first"; where `cratis-screenplay-modeling-lifecycle` is installed, run its `scripts/model-first-status.mjs`): change the model first with
|
|
284
281
|
`cratis-screenplay-event-modeling`. If the Screenplay skills are not installed,
|
|
285
282
|
say so and do not author `.play` from memory.
|
|
286
283
|
Edit code here only for infrastructure, clients, adapters, Screenplay code
|
|
@@ -20,9 +20,7 @@ effects. If the answer is "populate a queryable model", it is not a reactor.
|
|
|
20
20
|
| both a model and an effect | one projection *and* one reactor |
|
|
21
21
|
|
|
22
22
|
> **Model first.** If an accepted model under the model root covers this scope, or
|
|
23
|
-
> the repository is opted in (
|
|
24
|
-
> committed `.play` file (`git ls-tree -r --name-only HEAD` lists a `.play` file there, narrowed to `-- <root>` when a root is configured), or the project explicitly set `mcpServers.screenplay.root` in
|
|
25
|
-
> `.cratis/ai.json`; master definition in `cratis-screenplay-modeling-lifecycle`), the automation is
|
|
23
|
+
> the repository is opted in (per `general.md` "Model first"; where `cratis-screenplay-modeling-lifecycle` is installed, run its `scripts/model-first-status.mjs`), the automation is
|
|
26
24
|
> a modeled slice: find it (`Automation` or `Translate`), treat its `produces` /
|
|
27
25
|
> `invokes`, conditions and fields as the contract, and write the reactor only as
|
|
28
26
|
> gap-fill for what the model leaves to code (Stage renders supported event-triggered Automation;
|
|
@@ -249,10 +249,7 @@ spans streams.
|
|
|
249
249
|
## Route near misses
|
|
250
250
|
|
|
251
251
|
- An accepted `.play` model under the model root covers the behavior, or the
|
|
252
|
-
repository is opted in (
|
|
253
|
-
`mcpServers.screenplay.root` in `.cratis/ai.json`; an empty directory, install
|
|
254
|
-
output, an uncommitted `.play` draft or a `.play` file outside the root does not count; master definition:
|
|
255
|
-
`cratis-screenplay-modeling-lifecycle`): change the model first with
|
|
252
|
+
repository is opted in (per `general.md` "Model first"; where `cratis-screenplay-modeling-lifecycle` is installed, run its `scripts/model-first-status.mjs`): change the model first with
|
|
256
253
|
`cratis-screenplay-event-modeling`. If the Screenplay skills are not installed,
|
|
257
254
|
say so and do not author `.play` from memory.
|
|
258
255
|
Edit code here only for infrastructure, clients, adapters, Screenplay code
|
|
@@ -49,9 +49,7 @@ version.
|
|
|
49
49
|
readmodel` rows are the contract). Decide this with the decision rule in
|
|
50
50
|
`cratis-screenplay-modeling-lifecycle`: model-first only when an accepted
|
|
51
51
|
model under the model root covers this scope, or the repository is opted in
|
|
52
|
-
(
|
|
53
|
-
in `.cratis/ai.json`); an empty directory, install output, a `.play` file
|
|
54
|
-
outside the root or an uncommitted draft does not count, and framework, infrastructure, client, adapter and not-opted-in
|
|
52
|
+
(opted in per `general.md` "Model first"; where `cratis-screenplay-modeling-lifecycle` is installed, run its `scripts/model-first-status.mjs`); framework, infrastructure, client, adapter and not-opted-in
|
|
55
53
|
brownfield work stays code-first. Opted in but no model for this scope: model
|
|
56
54
|
it first (`cratis-screenplay-discovery`, then `cratis-screenplay-slice-design`)
|
|
57
55
|
before writing specifications. If those Screenplay skills are not installed,
|