@cratis/pi 7.10.0 → 7.11.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 +2 -2
- 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 +2 -2
- package/package/corpus/agents/screenplay-modeler.md +1 -1
- package/package/corpus/agents/slice-implementer.md +1 -1
- package/package/corpus/agents/spec-writer.md +1 -1
- package/package/corpus/prompts/add-reactor.prompt.md +1 -1
- package/package/corpus/prompts/new-vertical-slice.prompt.md +2 -2
- package/package/corpus/prompts/write-specs.prompt.md +2 -2
- package/package/corpus/rules/application-profile.md +1 -1
- package/package/corpus/rules/cratis-folder-is-configuration.md +28 -0
- package/package/corpus/rules/general.md +6 -1
- package/package/corpus/rules/profiles.md +4 -3
- 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 -1
- package/package/corpus/skills/cratis-application-slice-conformance/SKILL.md +2 -2
- package/package/corpus/skills/cratis-application-slice-conformance/references/contract-and-precedence.md +1 -1
- package/package/corpus/skills/cratis-application-slice-specifications/SKILL.md +1 -1
- package/package/corpus/skills/cratis-arc-command/SKILL.md +1 -1
- package/package/corpus/skills/cratis-arc-command-execution/SKILL.md +1 -1
- package/package/corpus/skills/cratis-arc-command-validation/SKILL.md +1 -1
- package/package/corpus/skills/cratis-arc-observable-query-http/SKILL.md +1 -1
- package/package/corpus/skills/cratis-arc-query-paging/SKILL.md +1 -1
- package/package/corpus/skills/cratis-arc-react-page/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-event-constraints/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-event-modeling/SKILL.md +2 -2
- package/package/corpus/skills/cratis-chronicle-event-type-migration/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-projection/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-reactor/SKILL.md +2 -2
- package/package/corpus/skills/cratis-chronicle-read-model/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-read-model-specifications/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-reducer/SKILL.md +1 -1
- package/package/corpus/skills/cratis-components-stepper-command-dialog/SKILL.md +1 -1
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/SKILL.md +5 -2
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/verification.json +2 -2
- package/package/corpus/skills/cratis-screenplay-command-surface/SKILL.md +5 -2
- package/package/corpus/skills/cratis-screenplay-command-surface/verification.json +2 -2
- package/package/corpus/skills/cratis-screenplay-discovery/SKILL.md +1 -1
- package/package/corpus/skills/cratis-screenplay-event-modeling/SKILL.md +9 -6
- package/package/corpus/skills/cratis-screenplay-event-modeling/verification.json +2 -2
- package/package/corpus/skills/cratis-screenplay-model-authoring/SKILL.md +12 -10
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-loop.md +3 -4
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-tools.md +3 -3
- package/package/corpus/skills/cratis-screenplay-model-authoring/verification.json +3 -3
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/SKILL.md +5 -5
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/opt-in.md +4 -4
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/phases.md +1 -1
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/verdicts-and-modes.md +1 -1
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/verification.json +1 -1
- package/package/corpus/skills/cratis-screenplay-projections/SKILL.md +5 -2
- package/package/corpus/skills/cratis-screenplay-projections/verification.json +2 -2
- package/package/corpus/skills/cratis-screenplay-read-surface/SKILL.md +5 -2
- package/package/corpus/skills/cratis-screenplay-read-surface/verification.json +2 -2
- package/package/corpus/skills/cratis-screenplay-specifications/SKILL.md +5 -2
- package/package/corpus/skills/cratis-screenplay-specifications/verification.json +2 -2
- package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +1 -1
- package/package/corpus/skills/cratis-screenplay-ui-composition/SKILL.md +5 -2
- package/package/corpus/skills/cratis-screenplay-ui-composition/verification.json +2 -2
- package/package/corpus/skills/cratis-specification-by-example/SKILL.md +1 -1
- package/package/corpus/skills/cratis-specifications-csharp/SKILL.md +1 -1
- 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: the repository is opted in only when the model root (
|
|
52
|
+
0. **Find the contract.** Apply Phase 0 of `application-profile.md` first: the repository is opted in only when the model root (the folder holding the project's `.play` files, or the root set by `mcpServers.screenplay.root` in `.cratis/ai.json`) 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 that root; an empty directory, install output, an installed skill, a `.play` file outside the root or an untracked or uncommitted draft is not opt-in. 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
|
-
Run the model-first decision once per review (master text: `cratis-screenplay-modeling-lifecycle`): the repository is opted in only when the model root (
|
|
34
|
+
Run the model-first decision once per review (master text: `cratis-screenplay-modeling-lifecycle`): the repository is opted in only when the model root (the folder holding the project's `.play` files) 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 `mcpServers.screenplay.root` in `.cratis/ai.json`; an empty directory, install output, an installed skill, a `.play` file outside the root or an untracked or uncommitted draft is not opt-in, and a behavior is a contract only when an accepted model under the root covers it. 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
|
|
|
@@ -41,7 +41,7 @@ In an opted-in repository:
|
|
|
41
41
|
- [ ] The model was not changed to match existing code
|
|
42
42
|
- [ ] Specs derived from `.play` specifications were not weakened or removed
|
|
43
43
|
|
|
44
|
-
Changes
|
|
44
|
+
Changes to `.play` files (the model root) are not reviewed here beyond noting them: route them to `screenplay-reviewer` for an independent, fresh-context model review and list that routing in the report. Review the surrounding code changes as usual.
|
|
45
45
|
|
|
46
46
|
---
|
|
47
47
|
|
|
@@ -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?** Yes only when the model root (
|
|
48
|
+
2. **Opted in?** Yes only when the model root (the folder holding the project's `.play` files) 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 `mcpServers.screenplay.root` in `.cratis/ai.json`. An empty directory, install output, an installed skill, a `.play` file outside the root or an untracked or uncommitted draft is not opt-in; a behavior is a contract only when an accepted model under the root covers it. 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: the model root (
|
|
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: the model root (the folder holding the project's `.play` files) 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 `mcpServers.screenplay.root` in `.cratis/ai.json`. An empty directory, install output, an installed skill, a `.play` file outside the root or an untracked or uncommitted draft is not opt-in (master: `cratis-screenplay-modeling-lifecycle`). 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?** Yes only when the model root (
|
|
49
|
+
2. **Opted in?** Yes only when the model root (the folder holding the project's `.play` files) 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 `mcpServers.screenplay.root` in `.cratis/ai.json`. An empty directory, install output, an installed skill, a `.play` file outside the root or an untracked or uncommitted draft is not opt-in; a behavior is a contract only when an accepted model under the root covers it. 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?** Yes only when the model root (
|
|
47
|
+
2. **Opted in?** Yes only when the model root (the folder holding the project's `.play` files) 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 `mcpServers.screenplay.root` in `.cratis/ai.json`. An empty directory, install output, an installed skill, a `.play` file outside the root or an untracked or uncommitted draft is not opt-in; a behavior is a contract only when an accepted model under the root covers it. 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).
|
|
@@ -53,7 +53,7 @@ Run this once per request, before choosing an implementer; the master text is in
|
|
|
53
53
|
|
|
54
54
|
When the decision above says the repository is opted in and the scope is model-owned behavior or a model change (infrastructure, client, adapter and code-attachment/handler work is planned directly as code, keeping any model or spec contract it touches):
|
|
55
55
|
|
|
56
|
-
- Plan from the `.play` slice and its specifications, not from C# conventions. Detect the slice by name under the model root (configured root, else `.
|
|
56
|
+
- Plan from the `.play` slice and its specifications, not from C# conventions. Detect the slice by name under the model root (configured root, else the folder holding the project's `.play` files); an empty root means the feature starts in discovery and slice design.
|
|
57
57
|
- Consumed events are orientation, not build order. The "State View waits for State Change" rule in the parallelisation rules below applies to hand-written C# only; it does not order model work.
|
|
58
58
|
- Order: `screenplay-modeler` -> `screenplay-reviewer` (fresh context) -> user acceptance -> `screenplay-renderer`. Use `slice-implementer` for gap-fill only, after the renderer reports what Stage cannot render and the work is authorized.
|
|
59
59
|
- The Backend/Specs/Build/Frontend template below is for code-first work and gap-fill; do not use it to bypass an accepted model.
|
|
@@ -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 the level with the decision procedure in `cratis-screenplay-modeling-lifecycle`: the repository is opted in only when the model root (
|
|
25
|
+
1. Decide the level with the decision procedure in `cratis-screenplay-modeling-lifecycle`: the repository is opted in only when the model root (the folder holding the project's `.play` files) 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 `mcpServers.screenplay.root` in `.cratis/ai.json`; an empty directory, install output, an installed skill, a `.play` file outside the root or an untracked or uncommitted draft is not opt-in. 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,7 +41,7 @@ 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 repository's model root (
|
|
44
|
+
1. **Look for a Screenplay model** under the repository's model root (the folder holding the project's `.play` files; search `**/*.play`) and search it for the slice, command, event and read-model names. The repository is opted in only when the model root holds a `.play` file in the committed tree (`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 `.cratis/ai.json` (even if that root is empty); an empty unconfigured directory, install output, an installed skill, a `.play` file outside the root (ignore it) or an untracked or uncommitted draft is not opt-in, and a behaviour is a contract only when an accepted model (committed; its HEAD version remains the contract while working-tree edits are a model change in progress until committed) under the root covers it (master: `cratis-screenplay-modeling-lifecycle`). 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
47
|
4. **Not opted in (neither an accepted model under the root nor a configured root):** 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.
|
|
@@ -35,7 +35,7 @@ Select from these canonical rules in `.cratis/ai/rules/` only after applying the
|
|
|
35
35
|
## Inputs you expect
|
|
36
36
|
|
|
37
37
|
- Feature name, slice name, and slice type (specs are **mandatory for every slice type**)
|
|
38
|
-
- 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, meaning the root holds a committed `.play` file (`git ls-tree -r --name-only HEAD
|
|
38
|
+
- 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, meaning the root 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 `mcpServers.screenplay.root` in `.cratis/ai.json`: 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.
|
|
39
39
|
- The complete slice file (`<Slice>.cs`) so you understand what behaviors to specify
|
|
40
40
|
- Any business rules or constraints that must be validated
|
|
41
41
|
- The namespace root (read from existing source files)
|
|
@@ -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 (the model root (
|
|
12
|
+
- **Model first:** if an accepted model under the model root covers this scope, or the repository is opted in (the model root (the folder holding the project's `.play` files) 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 `mcpServers.screenplay.root` in `.cratis/ai.json`; an empty directory, install output, an installed skill, a `.play` file outside the root or an untracked or uncommitted draft is not opt-in (master: `cratis-screenplay-modeling-lifecycle`)), 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
|
|
|
@@ -11,8 +11,8 @@ Implement a complete **vertical slice** end-to-end. Follow the Implementation Wo
|
|
|
11
11
|
|
|
12
12
|
Before any slice code, find what the code must match. Decide the route once:
|
|
13
13
|
|
|
14
|
-
1. **The slice is in an accepted Screenplay model** (search the model root for the slice, command, event and read-model names;
|
|
15
|
-
2. **The repository is opted in, but the slice is not modeled** (opted in means the model root (
|
|
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** (opted in means the model root (the folder holding the project's `.play` files) 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 `mcpServers.screenplay.root` in `.cratis/ai.json`; an empty directory, install output, an installed skill, a `.play` file outside the root or an untracked or uncommitted draft is not opt-in (master: `cratis-screenplay-modeling-lifecycle`); an accepted model elsewhere that does not cover this slice does not by itself opt in): 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.
|
|
@@ -9,11 +9,11 @@ Write **comprehensive specs** for an existing slice. Invoke the **cratis-applica
|
|
|
9
9
|
|
|
10
10
|
## What to provide
|
|
11
11
|
|
|
12
|
-
The slice file (`.cs`) **and its contract**: the `.play` slice with its specifications when the slice is modeled (search the model root,
|
|
12
|
+
The slice file (`.cs`) **and its contract**: the `.play` slice with its specifications when the slice is modeled (search the model root, the folder holding the project's `.play` files), otherwise the agreed slice outline.
|
|
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** (the model root (
|
|
16
|
+
- **An accepted model under the model root covers the scope, or the repository is opted in** (the model root (the folder holding the project's `.play` files) 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 `mcpServers.screenplay.root` in `.cratis/ai.json`; an empty directory, install output, an installed skill, a `.play` file outside the root or an untracked or uncommitted draft is not opt-in (master: `cratis-screenplay-modeling-lifecycle`)): 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)
|
|
@@ -53,7 +53,7 @@ Tagged **[contract]** (framework-enforced) or **[convention]** (house default).
|
|
|
53
53
|
## Implementation Workflow
|
|
54
54
|
|
|
55
55
|
- **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.
|
|
56
|
-
1. **Look for a Screenplay model** under the model root (
|
|
56
|
+
1. **Look for a Screenplay model** under the model root (the folder holding the project's `.play` files, or the root set by `mcpServers.screenplay.root` in `.cratis/ai.json`; search `**/*.play`) for the slice, command, event and read-model names. A `.play` file outside the root, an untracked or uncommitted draft, an empty directory, or an installed profile or skill is not opt-in; the repository is opted in only when the root 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 set that root explicitly (master definition: **cratis-screenplay-modeling-lifecycle**, "Decide the level first").
|
|
57
57
|
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.
|
|
58
58
|
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.
|
|
59
59
|
4. **Trivial changes** keep the proportional-delegation policy; Phases 1–3 below apply to code you write at either level.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
applyTo: "**/*"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# `.cratis/` is configuration, never a place to produce things
|
|
6
|
+
|
|
7
|
+
The `.cratis/` folder is a configuration folder, like `.vscode/` or `.github/`. It holds
|
|
8
|
+
project configuration and the shared AI corpus itself, and nothing else.
|
|
9
|
+
|
|
10
|
+
- **Allowed:** `.cratis/ai.json` and `.cratis/ai.manifest.json`, the installed corpus under
|
|
11
|
+
`.cratis/ai/`, and other tool configuration a Cratis tool reads (settings, profiles,
|
|
12
|
+
connection and environment descriptors).
|
|
13
|
+
- **Never produce anything there that can end up in production or that a person or
|
|
14
|
+
product consumes as a deliverable:** Screenplay models and `.play` files, source code,
|
|
15
|
+
generated code, specifications, documentation, migrations, assets, data, build output.
|
|
16
|
+
Those belong in the project's own structure: `Source/` or `src/`, `Documentation/`,
|
|
17
|
+
the product's own folders. A Screenplay model goes where the project's `.play` files
|
|
18
|
+
already are, else under `Source/` or `src/`, else in a `Screenplay/` folder at the
|
|
19
|
+
repository root.
|
|
20
|
+
- **Work records are not exempt from a home.** Plans, handovers and scratch notes go in
|
|
21
|
+
`.ai-work/`, never in `.cratis/`; see [local-work-artifacts.md](./local-work-artifacts.md).
|
|
22
|
+
- **Never hand-edit installed corpus files under `.cratis/ai/`** in a consuming
|
|
23
|
+
repository; they are managed by the channel that installed them.
|
|
24
|
+
- If a request would put a deliverable under `.cratis/`, put it in the project structure
|
|
25
|
+
instead and say so in one line; do not ask permission to follow this rule.
|
|
26
|
+
- A repository that already keeps a model under `.cratis/screenplay/` keeps working: read
|
|
27
|
+
it where it is, but do not add new deliverables there, and offer to move it to the
|
|
28
|
+
project structure when the user is changing it anyway.
|
|
@@ -104,7 +104,7 @@ A claim is only as good as the signal behind it — a build result, a test run,
|
|
|
104
104
|
|
|
105
105
|
> **Building an application on Cratis?** Project layout, slice types, slice naming, the seventeen slice rules, the implementation workflow and the application quality gates are in [application-profile.md](./application-profile.md), which loads only for repositories that select an application profile. If you are contributing to a Cratis framework repo, see **Framework profile** below.
|
|
106
106
|
|
|
107
|
-
**Model first.** When an accepted `.play` model covers the scope, or the repository has opted in, the `.play` model is the source of truth for behavior: change the model first, verify it, then render it or gap-fill from it, and never edit Stage-managed output, take code as a shortcut around the model, or weaken protection (authorization, `@pii`, rules) to make a model compile or render. Opted in means the model root (
|
|
107
|
+
**Model first.** When an accepted `.play` model covers the scope, or the repository has opted in, the `.play` model is the source of truth for behavior: change the model first, verify it, then render it or gap-fill from it, and never edit Stage-managed output, take code as a shortcut around the model, or weaken protection (authorization, `@pii`, rules) to make a model compile or render. Opted in means the model root (the folder holding the project's `.play` files) 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 `mcpServers.screenplay.root` in `.cratis/ai.json`; an empty directory, install output, an installed profile or skill, a `.play` file outside the root or an untracked or uncommitted draft is not opt-in, and a behavior is a contract only when an accepted model under the root covers it (accepted means committed: staged or untracked files under the root are drafts; a committed file with uncommitted working-tree edits is a model change in progress, and its HEAD version is the contract until the change is committed; committing a model under the root is the team's act of acceptance and opts the repository in; an explicitly configured but empty root also counts as opted in). Otherwise stay code-first; the entry-point session may propose a model at most once per session (never for trivial, bug-fix, infrastructure, client, framework or brownfield-maintenance work), and infrastructure, client and adapter work stays in code at any level. Trivial changes keep the proportional-delegation policy. The master decision rule is in **cratis-screenplay-modeling-lifecycle** (router: **cratis-screenplay-event-modeling**); if the Screenplay skills are not installed, say so and do not author `.play` from memory.
|
|
108
108
|
|
|
109
109
|
---
|
|
110
110
|
|
|
@@ -146,6 +146,7 @@ A claim is only as good as the signal behind it — a build result, a test run,
|
|
|
146
146
|
| What must stop and ask a human | `capability-is-not-authority.md` (absent authority for a consequential effect: stop and ask) |
|
|
147
147
|
| What counts as evidence that something works | `verification-discipline.md` |
|
|
148
148
|
| Where session notes, plans and handovers may live | `local-work-artifacts.md` |
|
|
149
|
+
| What may be written into the `.cratis/` folder (configuration and the corpus only, never deliverables) | `cratis-folder-is-configuration.md` |
|
|
149
150
|
| Exit-code meaning and wrappers that lose a verdict | `exit-codes-and-wrappers.md` |
|
|
150
151
|
| Writing a scan, allowlist or destructive pass that cannot pass vacuously | `guards-and-fuses.md` |
|
|
151
152
|
| How the shared corpus is installed, updated and rolled back | `ai-distribution.md` |
|
|
@@ -177,6 +178,10 @@ A claim is only as good as the signal behind it — a build result, a test run,
|
|
|
177
178
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
178
179
|
```
|
|
179
180
|
|
|
181
|
+
## `.cratis/` is configuration only
|
|
182
|
+
|
|
183
|
+
Never produce deliverables - Screenplay models, source, generated code, specifications, documentation, anything that can ship - into `.cratis/`. It holds configuration and the shared AI corpus itself. Full rule: [cratis-folder-is-configuration.md](./cratis-folder-is-configuration.md).
|
|
184
|
+
|
|
180
185
|
## Local AI work artifacts — `.ai-work/` only
|
|
181
186
|
|
|
182
187
|
Plans, handovers, session notes, scratch analyses and research dumps are **work records, not documentation**: they live only in the gitignored `.ai-work/` at the repository root, never enter git history, and are never the only copy of a durable decision (those go in `decisions/`). A follow-up that must outlive the session is an issue, not a file. Full rule: [local-work-artifacts.md](./local-work-artifacts.md).
|
|
@@ -151,7 +151,7 @@ Standalone Chronicle client usage (no Arc) in TypeScript is
|
|
|
151
151
|
### Event modeling with Screenplay
|
|
152
152
|
|
|
153
153
|
**Model first.** A repository is opted in only when its model root (where the project's
|
|
154
|
-
`.play` files live: normally under `Source/` or `src/`, else `Screenplay/`) holds a committed `.play` file (`git ls-tree -r --name-only HEAD
|
|
154
|
+
`.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
|
|
155
155
|
`mcpServers.screenplay.root` in `.cratis/ai.json`; an empty directory, install output, an
|
|
156
156
|
installed profile or skill, a `.play` file outside the root or an untracked or uncommitted draft is not
|
|
157
157
|
opt-in. An accepted model under the root covering the scope is the contract and the source
|
|
@@ -205,8 +205,9 @@ The profile also selects the corpus-owned Screenplay MCP declaration from
|
|
|
205
205
|
`mcp-servers.json`. The Cratis CLI hosts the server as `cratis screenplay mcp`
|
|
206
206
|
and registers a scoped entry for supported clients without replacing their other
|
|
207
207
|
servers. Inspect install/status results for adapter support or configuration
|
|
208
|
-
conflicts. The
|
|
209
|
-
|
|
208
|
+
conflicts. The model is wherever the project keeps its `.play` files, else under `Source/` or
|
|
209
|
+
`src/`, else in a `Screenplay/` folder at the repository root; never under `.cratis/`.
|
|
210
|
+
Project-owned configuration can name a root explicitly.
|
|
210
211
|
|
|
211
212
|
## How to Use Profiles
|
|
212
213
|
|
|
@@ -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: the root holds a committed `.play` file (`git ls-tree -r --name-only HEAD
|
|
12
|
+
**Model first:** when an accepted model under the model root covers this scope (or the repository is opted in: the root 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 `mcpServers.screenplay.root` in `.cratis/ai.json`; master definition in `cratis-screenplay-modeling-lifecycle`), 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. A `.play` file outside the root, an untracked or uncommitted draft or an empty directory is not consent.
|
|
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 (in the committed tree: `git ls-tree -r --name-only HEAD
|
|
17
|
+
**Model-first check.** Before changing a slice, look for it in the accepted `.play` model (in the committed tree: `git ls-tree -r --name-only HEAD` lists a `.play` file there, narrowed to `-- <root>` when a root is configured; its HEAD version remains the contract until working-tree edits are committed) under the model root (the folder holding the project's `.play` files, or the root set by `mcpServers.screenplay.root` in `.cratis/ai.json`). A `.play` file outside the root or an untracked or uncommitted draft is not a contract. 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
|
|
|
@@ -181,7 +181,7 @@ them.
|
|
|
181
181
|
## Route near misses
|
|
182
182
|
|
|
183
183
|
- An accepted `.play` model under the model root covers the behavior, or the
|
|
184
|
-
repository is opted in (the root holds a committed `.play` file (`git ls-tree -r --name-only HEAD
|
|
184
|
+
repository is opted in (the root 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 set
|
|
185
185
|
`mcpServers.screenplay.root` in `.cratis/ai.json`; an empty directory, install
|
|
186
186
|
output, an uncommitted `.play` draft or a `.play` file outside the root does not count; master definition:
|
|
187
187
|
`cratis-screenplay-modeling-lifecycle`): change the model first with
|
|
@@ -44,11 +44,11 @@ to these tags; when the Screenplay skills are installed their `references/versio
|
|
|
44
44
|
Find the contract before touching code; say which one you are using. These steps are enough on
|
|
45
45
|
their own when the Screenplay skills are not installed; the master decision rule, when they
|
|
46
46
|
are, is `cratis-screenplay-modeling-lifecycle` ("Decide the level first").
|
|
47
|
-
1. An accepted `.play` model under the model root (
|
|
47
|
+
1. An accepted `.play` model under the model root (the folder holding the project's `.play` files, or the root
|
|
48
48
|
set by `mcpServers.screenplay.root` in `.cratis/ai.json`) covers the slice (search
|
|
49
49
|
`**/*.play` for the slice, command, event and read-model names): the `.play` slice and its
|
|
50
50
|
specifications are the contract. "Accepted" means the `.play` file is in the committed tree
|
|
51
|
-
(`git ls-tree -r --name-only HEAD
|
|
51
|
+
(`git ls-tree -r --name-only HEAD` lists a `.play` file there, narrowed to `-- <root>` when a root is configured). Staged or untracked files under the
|
|
52
52
|
root are drafts, not contracts; a file outside the root is not a contract. A committed file
|
|
53
53
|
with uncommitted working-tree edits is a model change in progress: its HEAD version is the
|
|
54
54
|
contract until the change is committed.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
First the opt-in decision (master: `cratis-screenplay-modeling-lifecycle`, "Decide the level
|
|
5
5
|
first"; `SKILL.md` step 1 suffices when it is not installed): an accepted model under the model
|
|
6
6
|
root covers the slice (accepted means the `.play` file is in the committed tree:
|
|
7
|
-
`git ls-tree -r --name-only HEAD
|
|
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
8
|
file or was explicitly set in `.cratis/ai.json` (even if empty). Staged or untracked files under
|
|
9
9
|
the root are drafts. A committed file with uncommitted working-tree edits is a model change
|
|
10
10
|
in progress; its HEAD version is the contract until the change is committed. An empty directory, install
|
|
@@ -48,7 +48,7 @@ repository before claiming support for another version.
|
|
|
48
48
|
the contract for this skill). Decide this with the decision rule in
|
|
49
49
|
`cratis-screenplay-modeling-lifecycle`: model-first only when an accepted
|
|
50
50
|
model under the model root covers this scope, or the repository is opted in
|
|
51
|
-
(the root holds a committed `.play` file (`git ls-tree -r --name-only HEAD
|
|
51
|
+
(the root 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 set `mcpServers.screenplay.root`
|
|
52
52
|
in `.cratis/ai.json`); an empty directory, install output, a `.play` file
|
|
53
53
|
outside the root or an uncommitted draft does not count, and framework, infrastructure, client, adapter and not-opted-in
|
|
54
54
|
brownfield work stays code-first. Opted in but no model for this scope: model
|
|
@@ -291,7 +291,7 @@ Components guidance, not to this skill.
|
|
|
291
291
|
constraints guidance.
|
|
292
292
|
- Choosing the concept or identity type for a value: `cratis-fundamentals-concept`.
|
|
293
293
|
- An accepted `.play` model under the model root covers the behavior, or the
|
|
294
|
-
repository is opted in (the root holds a committed `.play` file (`git ls-tree -r --name-only HEAD
|
|
294
|
+
repository is opted in (the root 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 set
|
|
295
295
|
`mcpServers.screenplay.root` in `.cratis/ai.json`; an empty directory, install
|
|
296
296
|
output, an uncommitted `.play` draft or a `.play` file outside the root does not count; master definition:
|
|
297
297
|
`cratis-screenplay-modeling-lifecycle`): change the model first with
|
|
@@ -215,7 +215,7 @@ mis-marking it to silence the warning.
|
|
|
215
215
|
- Adding or changing a rule: the Arc command validation guidance.
|
|
216
216
|
- Designing what a reactor should observe: the Chronicle reactor guidance.
|
|
217
217
|
- An accepted `.play` model under the model root covers the behavior, or the
|
|
218
|
-
repository is opted in (the root holds a committed `.play` file (`git ls-tree -r --name-only HEAD
|
|
218
|
+
repository is opted in (the root 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 set
|
|
219
219
|
`mcpServers.screenplay.root` in `.cratis/ai.json`; an empty directory, install
|
|
220
220
|
output, an uncommitted `.play` draft or a `.play` file outside the root does not count; master definition:
|
|
221
221
|
`cratis-screenplay-modeling-lifecycle`): change the model first with
|
|
@@ -45,7 +45,7 @@ another version.
|
|
|
45
45
|
- Writing the specification for the rejection: use
|
|
46
46
|
`cratis-application-slice-specifications`.
|
|
47
47
|
- An accepted `.play` model under the model root covers the behavior, or the
|
|
48
|
-
repository is opted in (the root holds a committed `.play` file (`git ls-tree -r --name-only HEAD
|
|
48
|
+
repository is opted in (the root 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 set
|
|
49
49
|
`mcpServers.screenplay.root` in `.cratis/ai.json`; an empty directory, install
|
|
50
50
|
output, an uncommitted `.play` draft or a `.play` file outside the root does not count; master definition:
|
|
51
51
|
`cratis-screenplay-modeling-lifecycle`): change the model first with
|
|
@@ -163,7 +163,7 @@ apply. Do not construct or suggest credentials.
|
|
|
163
163
|
- Diagnosing a whole slice rather than one endpoint: the slice diagnostics
|
|
164
164
|
guidance.
|
|
165
165
|
- An accepted `.play` model under the model root covers the behavior, or the
|
|
166
|
-
repository is opted in (the root holds a committed `.play` file (`git ls-tree -r --name-only HEAD
|
|
166
|
+
repository is opted in (the root 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 set
|
|
167
167
|
`mcpServers.screenplay.root` in `.cratis/ai.json`; an empty directory, install
|
|
168
168
|
output, an uncommitted `.play` draft or a `.play` file outside the root does not count; master definition:
|
|
169
169
|
`cratis-screenplay-modeling-lifecycle`): change the model first with
|
|
@@ -182,7 +182,7 @@ pinning, keep it in a method a specification can supply arguments to.
|
|
|
182
182
|
- Inspecting an observable query over HTTP: `cratis-arc-observable-query-http`.
|
|
183
183
|
- Whole-slice performance work: the performance review guidance.
|
|
184
184
|
- An accepted `.play` model under the model root covers the behavior, or the
|
|
185
|
-
repository is opted in (the root holds a committed `.play` file (`git ls-tree -r --name-only HEAD
|
|
185
|
+
repository is opted in (the root 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 set
|
|
186
186
|
`mcpServers.screenplay.root` in `.cratis/ai.json`; an empty directory, install
|
|
187
187
|
output, an uncommitted `.play` draft or a `.play` file outside the root does not count; master definition:
|
|
188
188
|
`cratis-screenplay-modeling-lifecycle`): change the model first with
|
|
@@ -337,7 +337,7 @@ props handling, and teardown.
|
|
|
337
337
|
`cratis-chronicle-read-model`.
|
|
338
338
|
- Specifying page behavior with specs: `cratis-application-react-specifications`.
|
|
339
339
|
- An accepted `.play` model under the model root covers the behavior, or the
|
|
340
|
-
repository is opted in (the root holds a committed `.play` file (`git ls-tree -r --name-only HEAD
|
|
340
|
+
repository is opted in (the root 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 set
|
|
341
341
|
`mcpServers.screenplay.root` in `.cratis/ai.json`; an empty directory, install
|
|
342
342
|
output, an uncommitted `.play` draft or a `.play` file outside the root does not count; master definition:
|
|
343
343
|
`cratis-screenplay-modeling-lifecycle`): change the model first with
|
|
@@ -38,7 +38,7 @@ memory.
|
|
|
38
38
|
- You are writing the specification and want the `EventScenario` mechanics in
|
|
39
39
|
depth: use `cratis-chronicle-event-specifications`.
|
|
40
40
|
- An accepted `.play` model under the model root covers the behavior, or the
|
|
41
|
-
repository is opted in (the root holds a committed `.play` file (`git ls-tree -r --name-only HEAD
|
|
41
|
+
repository is opted in (the root 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 set
|
|
42
42
|
`mcpServers.screenplay.root` in `.cratis/ai.json`; an empty directory, install
|
|
43
43
|
output, an uncommitted `.play` draft or a `.play` file outside the root does not count; master definition:
|
|
44
44
|
`cratis-screenplay-modeling-lifecycle`): change the model first with
|
|
@@ -7,8 +7,8 @@ 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 (the root,
|
|
11
|
-
> file (`git ls-tree -r --name-only HEAD
|
|
10
|
+
> repository is opted in (the root, the folder holding the project's `.play` files, holds a committed `.play`
|
|
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
12
|
> `.cratis/ai.json`), the model is the source of truth: use
|
|
13
13
|
> `cratis-screenplay-event-modeling` (and the lifecycle in
|
|
14
14
|
> `cratis-screenplay-modeling-lifecycle`, which holds the master definition)
|
|
@@ -223,7 +223,7 @@ is expected, since the prior generation records history rather than new intent.
|
|
|
223
223
|
## Route near misses
|
|
224
224
|
|
|
225
225
|
- An accepted `.play` model under the model root covers the behavior, or the
|
|
226
|
-
repository is opted in (the root holds a committed `.play` file (`git ls-tree -r --name-only HEAD
|
|
226
|
+
repository is opted in (the root 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 set
|
|
227
227
|
`mcpServers.screenplay.root` in `.cratis/ai.json`; an empty directory, install
|
|
228
228
|
output, an uncommitted `.play` draft or a `.play` file outside the root does not count; master definition:
|
|
229
229
|
`cratis-screenplay-modeling-lifecycle`): change the model first with
|
|
@@ -245,7 +245,7 @@ projection spans streams.
|
|
|
245
245
|
## Route near misses
|
|
246
246
|
|
|
247
247
|
- An accepted `.play` model under the model root covers the behavior, or the
|
|
248
|
-
repository is opted in (the root holds a committed `.play` file (`git ls-tree -r --name-only HEAD
|
|
248
|
+
repository is opted in (the root 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 set
|
|
249
249
|
`mcpServers.screenplay.root` in `.cratis/ai.json`; an empty directory, install
|
|
250
250
|
output, an uncommitted `.play` draft or a `.play` file outside the root does not count; master definition:
|
|
251
251
|
`cratis-screenplay-modeling-lifecycle`): change the model first with
|
|
@@ -24,8 +24,8 @@ causes. It is the adapter side of a **translation** only when its input is
|
|
|
24
24
|
outside data that becomes our own facts.
|
|
25
25
|
|
|
26
26
|
> **Model first.** If an accepted model under the model root covers this scope, or
|
|
27
|
-
> the repository is opted in (the root,
|
|
28
|
-
> committed `.play` file (`git ls-tree -r --name-only HEAD
|
|
27
|
+
> the repository is opted in (the root, the folder holding the project's `.play` files, holds a
|
|
28
|
+
> 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
|
|
29
29
|
> `.cratis/ai.json`; master definition in `cratis-screenplay-modeling-lifecycle`), the automation is
|
|
30
30
|
> a modeled slice: find it (`Automation` or `Translate`), treat its `produces` /
|
|
31
31
|
> `invokes`, conditions and fields as the contract, and write the reactor only as
|
|
@@ -211,7 +211,7 @@ spans streams.
|
|
|
211
211
|
## Route near misses
|
|
212
212
|
|
|
213
213
|
- An accepted `.play` model under the model root covers the behavior, or the
|
|
214
|
-
repository is opted in (the root holds a committed `.play` file (`git ls-tree -r --name-only HEAD
|
|
214
|
+
repository is opted in (the root 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 set
|
|
215
215
|
`mcpServers.screenplay.root` in `.cratis/ai.json`; an empty directory, install
|
|
216
216
|
output, an uncommitted `.play` draft or a `.play` file outside the root does not count; master definition:
|
|
217
217
|
`cratis-screenplay-modeling-lifecycle`): change the model first with
|
|
@@ -42,7 +42,7 @@ version.
|
|
|
42
42
|
readmodel` rows are the contract). Decide this with the decision rule in
|
|
43
43
|
`cratis-screenplay-modeling-lifecycle`: model-first only when an accepted
|
|
44
44
|
model under the model root covers this scope, or the repository is opted in
|
|
45
|
-
(the root holds a committed `.play` file (`git ls-tree -r --name-only HEAD
|
|
45
|
+
(the root 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 set `mcpServers.screenplay.root`
|
|
46
46
|
in `.cratis/ai.json`); an empty directory, install output, a `.play` file
|
|
47
47
|
outside the root or an uncommitted draft does not count, and framework, infrastructure, client, adapter and not-opted-in
|
|
48
48
|
brownfield work stays code-first. Opted in but no model for this scope: model
|
|
@@ -177,7 +177,7 @@ model and assert on the resulting instance. Cover, at minimum:
|
|
|
177
177
|
## Route near misses
|
|
178
178
|
|
|
179
179
|
- An accepted `.play` model under the model root covers the behavior, or the
|
|
180
|
-
repository is opted in (the root holds a committed `.play` file (`git ls-tree -r --name-only HEAD
|
|
180
|
+
repository is opted in (the root 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 set
|
|
181
181
|
`mcpServers.screenplay.root` in `.cratis/ai.json`; an empty directory, install
|
|
182
182
|
output, an uncommitted `.play` draft or a `.play` file outside the root does not count; master definition:
|
|
183
183
|
`cratis-screenplay-modeling-lifecycle`): change the model first with
|
|
@@ -199,7 +199,7 @@ children.
|
|
|
199
199
|
## Route near misses
|
|
200
200
|
|
|
201
201
|
- An accepted `.play` model under the model root covers the behavior, or the
|
|
202
|
-
repository is opted in (the root holds a committed `.play` file (`git ls-tree -r --name-only HEAD
|
|
202
|
+
repository is opted in (the root 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 set
|
|
203
203
|
`mcpServers.screenplay.root` in `.cratis/ai.json`; an empty directory, install
|
|
204
204
|
output, an uncommitted `.play` draft or a `.play` file outside the root does not count; master definition:
|
|
205
205
|
`cratis-screenplay-modeling-lifecycle`): change the model first with
|
|
@@ -12,11 +12,14 @@ slice runs when something happens.
|
|
|
12
12
|
|
|
13
13
|
## Locate the model
|
|
14
14
|
|
|
15
|
-
Look first
|
|
15
|
+
Look first for the project's existing `.play` files: the folder holding them is the
|
|
16
|
+
model. A new model goes under the repository's `Source/` or `src/` folder, else in a
|
|
17
|
+
`Screenplay/` folder at the repository root; never under `.cratis/`, which holds
|
|
18
|
+
configuration and the shared AI corpus only. This is the
|
|
16
19
|
conventional home for consumer-owned `.play` source; do not invent another
|
|
17
20
|
location or search the whole repository before checking it.
|
|
18
21
|
|
|
19
|
-
`cratis ai install` manages `.cratis/ai/`,
|
|
22
|
+
`cratis ai install` manages `.cratis/ai/`, never model files. Never
|
|
20
23
|
hand-copy Screenplay source between repositories. Keep Markdown that explains,
|
|
21
24
|
questions or navigates the model in the repository's documentation; the `.play`
|
|
22
25
|
source is the single flow model.
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
"kind": "skill-contains",
|
|
20
|
-
"value": "
|
|
20
|
+
"value": "Look first for the project's existing `.play` files"
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
"kind": "skill-contains",
|
|
24
|
-
"value": "`cratis ai install` manages `.cratis/ai/`,
|
|
24
|
+
"value": "`cratis ai install` manages `.cratis/ai/`, never model files"
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
"kind": "skill-contains",
|
|
@@ -12,11 +12,14 @@ they are all built from.
|
|
|
12
12
|
|
|
13
13
|
## Locate the model
|
|
14
14
|
|
|
15
|
-
Look first
|
|
15
|
+
Look first for the project's existing `.play` files: the folder holding them is the
|
|
16
|
+
model. A new model goes under the repository's `Source/` or `src/` folder, else in a
|
|
17
|
+
`Screenplay/` folder at the repository root; never under `.cratis/`, which holds
|
|
18
|
+
configuration and the shared AI corpus only. This is the
|
|
16
19
|
conventional home for consumer-owned `.play` source; do not invent another
|
|
17
20
|
location or search the whole repository before checking it.
|
|
18
21
|
|
|
19
|
-
`cratis ai install` manages `.cratis/ai/`,
|
|
22
|
+
`cratis ai install` manages `.cratis/ai/`, never model files. Never
|
|
20
23
|
hand-copy Screenplay source between repositories. Keep Markdown that explains,
|
|
21
24
|
questions or navigates the model in the repository's documentation; the `.play`
|
|
22
25
|
source is the single flow model.
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
{ "kind": "skill-contains", "value": "`reads X optional` is not supported yet" },
|
|
16
16
|
{
|
|
17
17
|
"kind": "skill-contains",
|
|
18
|
-
"value": "
|
|
18
|
+
"value": "Look first for the project's existing `.play` files"
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
"kind": "skill-contains",
|
|
22
|
-
"value": "`cratis ai install` manages `.cratis/ai/`,
|
|
22
|
+
"value": "`cratis ai install` manages `.cratis/ai/`, never model files"
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
"kind": "skill-contains",
|
|
@@ -28,7 +28,7 @@ syntax and tool commands in `cratis-screenplay-toolchain`.
|
|
|
28
28
|
existing code or a database as the source (`cratis-screenplay-legacy-extraction`).
|
|
29
29
|
- Small change to an existing model (one or two events): enter at step 5.
|
|
30
30
|
- Model-first: work in `.play` where an accepted model under the model root covers the scope or
|
|
31
|
-
the repository is opted in (the root holds a committed `.play` file (`git ls-tree -r --name-only HEAD
|
|
31
|
+
the repository is opted in (the root 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
|
|
32
32
|
`mcpServers.screenplay.root` in `.cratis/ai.json`). Otherwise stay code-first; only the
|
|
33
33
|
entry-point session proposes a model, at most once per session; the master definition is in
|
|
34
34
|
`cratis-screenplay-modeling-lifecycle`. A direct request to model this scope is itself consent.
|
|
@@ -37,7 +37,7 @@ into the work that acts on them. Flag a real trade-off to the user instead of re
|
|
|
37
37
|
**1. Decide the level (short form; master copy in `cratis-screenplay-modeling-lifecycle`).**
|
|
38
38
|
Check first that the method skills are installed; installing them never opts a
|
|
39
39
|
repository in. The work is **model-first** only in an opted-in repository: the model
|
|
40
|
-
root (
|
|
40
|
+
root (the folder holding the project's `.play` files) 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
|
|
41
41
|
`mcpServers.screenplay.root` in `.cratis/ai.json`. An empty directory, install output,
|
|
42
42
|
an installed skill, a `.play` file outside the root or an untracked or uncommitted draft is not
|
|
43
43
|
opt-in; staged or untracked files under the root are drafts. A committed file with uncommitted
|
|
@@ -87,11 +87,14 @@ keeps the activities, Screenplay output and facilitation questions of each step:
|
|
|
87
87
|
|
|
88
88
|
## Locate the model
|
|
89
89
|
|
|
90
|
-
Look first
|
|
90
|
+
Look first for the project's existing `.play` files: the folder holding them is the
|
|
91
|
+
model. A new model goes under the repository's `Source/` or `src/` folder, else in a
|
|
92
|
+
`Screenplay/` folder at the repository root; never under `.cratis/`, which holds
|
|
93
|
+
configuration and the shared AI corpus only. This is the
|
|
91
94
|
conventional home for consumer-owned `.play` source; do not invent another
|
|
92
95
|
location or search the whole repository before checking it.
|
|
93
96
|
|
|
94
|
-
`cratis ai install` manages `.cratis/ai/`,
|
|
97
|
+
`cratis ai install` manages `.cratis/ai/`, never model files. Never
|
|
95
98
|
hand-copy Screenplay source between repositories. Keep Markdown that explains,
|
|
96
99
|
questions or navigates the model in the repository's documentation; the `.play`
|
|
97
100
|
source is the single flow model.
|
|
@@ -232,7 +235,7 @@ The full critic pass (evidence, severity, business-question review) is
|
|
|
232
235
|
|
|
233
236
|
## Choose a file layout
|
|
234
237
|
|
|
235
|
-
Treat
|
|
238
|
+
Treat the model folder as one application and choose the coarsest layout
|
|
236
239
|
that keeps both the source and its diffs readable:
|
|
237
240
|
|
|
238
241
|
- Keep one `application.play` while it stays readable top to bottom.
|
|
@@ -323,10 +326,10 @@ order of modules, features or slices.
|
|
|
323
326
|
## Verify
|
|
324
327
|
|
|
325
328
|
```shell
|
|
326
|
-
screenplay
|
|
329
|
+
screenplay <model-folder> --warnaserror
|
|
327
330
|
```
|
|
328
331
|
|
|
329
|
-
(The standalone tool; `cratis screenplay validate
|
|
332
|
+
(The standalone tool; `cratis screenplay validate <model-folder> --warnings-as-errors`
|
|
330
333
|
is the fallback, and neither names the other's verdict. Versions and commands:
|
|
331
334
|
`cratis-screenplay-toolchain`.)
|
|
332
335
|
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
"kind": "skill-contains",
|
|
20
|
-
"value": "
|
|
20
|
+
"value": "Look first for the project's existing `.play` files"
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
"kind": "skill-contains",
|
|
24
|
-
"value": "`cratis ai install` manages `.cratis/ai/`,
|
|
24
|
+
"value": "`cratis ai install` manages `.cratis/ai/`, never model files"
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
"kind": "skill-contains",
|
|
@@ -42,27 +42,29 @@ Never ask the user which folder to use before trying. Call `open-workspace` with
|
|
|
42
42
|
arguments first: a server started without a fixed root binds the folder the host or
|
|
43
43
|
launch directory offers (the client's single workspace root, else the working
|
|
44
44
|
directory when it holds `.play` files). Only when it answers that no root was given,
|
|
45
|
-
or that several roots are offered, pass `path`: `.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
and carry a model between sessions with `workspaceJson`. A root fixed at launch
|
|
45
|
+
or that several roots are offered, pass `path`: the folder holding the project's `.play` files, otherwise the
|
|
46
|
+
folder the user names. Without a project, the server works in `Documents/Screenplay`
|
|
47
|
+
in the user's home folder, so do not invent a location. A root fixed at launch
|
|
49
48
|
cannot be switched: another `path` returns `RootChangeRefused`.
|
|
50
49
|
|
|
51
50
|
**Prefer a fixed root.** Screenplay up to 4.63.1 (so Cratis CLI 3.27.1) fails a
|
|
52
51
|
dynamic-root server right after `notifications/initialized` when the client
|
|
53
52
|
advertises roots; real hosts then drop the connection, and `open-workspace.path`
|
|
54
53
|
cannot prevent it. Start `screenplay mcp <model-folder>` or `cratis screenplay mcp`
|
|
55
|
-
in a project
|
|
54
|
+
in a project (it locates the model: the project's `.play` files, else `Source/` or `src/`, else `Screenplay/`).
|
|
56
55
|
Send `initialize` and `notifications/initialized` before any tool call;
|
|
57
56
|
`tools/list` returns 29 tools (30 on MCP-Apps hosts). Details:
|
|
58
57
|
[MCP loop](references/mcp-loop.md).
|
|
59
58
|
|
|
60
59
|
|
|
61
|
-
Look first
|
|
60
|
+
Look first for the project's existing `.play` files: the folder holding them is the
|
|
61
|
+
model. A new model goes under the repository's `Source/` or `src/` folder, else in a
|
|
62
|
+
`Screenplay/` folder at the repository root; never under `.cratis/`, which holds
|
|
63
|
+
configuration and the shared AI corpus only. This is the
|
|
62
64
|
conventional home for consumer-owned `.play` source. The source is the single flow model;
|
|
63
65
|
keep explanatory Markdown in the owning repository's documentation.
|
|
64
66
|
|
|
65
|
-
`cratis ai install` manages `.cratis/ai/`,
|
|
67
|
+
`cratis ai install` manages `.cratis/ai/`, never model files. Select the
|
|
66
68
|
`cratis/screenplay` profile in the project's AI configuration. The corpus-owned
|
|
67
69
|
`mcp-servers.json` declares the Screenplay server; supported client registration
|
|
68
70
|
is owned by the Cratis CLI, which preserves other servers and user configuration.
|
|
@@ -70,7 +72,7 @@ is owned by the Cratis CLI, which preserves other servers and user configuration
|
|
|
70
72
|
The CLI entry point is:
|
|
71
73
|
|
|
72
74
|
```shell
|
|
73
|
-
cratis screenplay mcp
|
|
75
|
+
cratis screenplay mcp <model-folder>
|
|
74
76
|
```
|
|
75
77
|
|
|
76
78
|
It runs the bundled server. Do not ask the user to install a second global .NET
|
|
@@ -196,7 +198,7 @@ imports afterwards. See the
|
|
|
196
198
|
[language reference](references/language-reference.md) for placement rules.
|
|
197
199
|
|
|
198
200
|
Parent scaffolding carries no duplicated module forms or contributions. Compile
|
|
199
|
-
and validate the whole
|
|
201
|
+
and validate the whole model folder, or its root file, not just
|
|
200
202
|
the edited fragment.
|
|
201
203
|
|
|
202
204
|
## Preserve state and recover explicitly
|
|
@@ -254,7 +256,7 @@ that the code compiles or behaves. Path resolution and `PLAY0430`-`PLAY0434`:
|
|
|
254
256
|
The ordinary CLI remains useful for whole-folder validation:
|
|
255
257
|
|
|
256
258
|
```shell
|
|
257
|
-
cratis screenplay validate
|
|
259
|
+
cratis screenplay validate <model-folder> --warnings-as-errors
|
|
258
260
|
```
|
|
259
261
|
|
|
260
262
|
Repair and refactoring guidance follows Screenplay main `fd18129`. The Cratis
|
|
@@ -16,8 +16,8 @@ differ: read `tools/list`.
|
|
|
16
16
|
|
|
17
17
|
1. Launch with a **fixed root**: `screenplay mcp <model-folder>`, or
|
|
18
18
|
`cratis screenplay mcp <model-folder>`, or `cratis screenplay mcp` inside a
|
|
19
|
-
project
|
|
20
|
-
|
|
19
|
+
project, where the CLI locates the model (the project's `.play` files, else `Source/`
|
|
20
|
+
or `src/`, else a new `Screenplay/` folder; what the `cratis/screenplay` profile registers). Stdio, newline-delimited
|
|
21
21
|
JSON-RPC, one sequential connection.
|
|
22
22
|
2. Send `initialize`, then the `notifications/initialized` notification, **before
|
|
23
23
|
any tool call**. Earlier calls fail with `-32600` "Initialize and send
|
|
@@ -41,8 +41,7 @@ treat that as fatal and drop the connection. Passing `open-workspace.path` does
|
|
|
41
41
|
**not** avoid it, because the error is sent before `open-workspace` runs.
|
|
42
42
|
|
|
43
43
|
Avoid it by fixing the root at launch (the forms in step 1). The `cratis/screenplay`
|
|
44
|
-
profile registration is not affected in an installed project,
|
|
45
|
-
`.cratis/screenplay/` does not exist. Cratis CLI 3.27.1 bundles 4.60.1: for a
|
|
44
|
+
profile registration is not affected in an installed project, and the CLI now locates the model itself, so no model directory has to exist. Cratis CLI 3.27.1 bundles 4.60.1: for a
|
|
46
45
|
dynamic root there, fix the root.
|
|
47
46
|
|
|
48
47
|
## Who owns the connection
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
# Working with the Screenplay MCP
|
|
5
5
|
|
|
6
6
|
The supported CLI launch is `cratis screenplay mcp <model-root>`, or `cratis screenplay mcp`
|
|
7
|
-
alone inside a project
|
|
8
|
-
|
|
7
|
+
alone inside a project, where the CLI locates the model (the project's `.play` files, else
|
|
8
|
+
`Source/` or `src/`, else a new `Screenplay/` folder). The standalone form is `screenplay mcp <model-folder>`. A
|
|
9
9
|
server started with no root at all binds one on first use from `open-workspace`'s
|
|
10
10
|
`path`, the client's roots, or the working directory; that dynamic form hit the
|
|
11
11
|
roots bug in Screenplay up to 4.63.1 (see the [MCP loop](mcp-loop.md#roots-bug-and-the-workaround)),
|
|
12
|
-
so prefer a fixed root.
|
|
12
|
+
so prefer a fixed root. Without a project the server works in `Documents/Screenplay`. Model files never go under `.cratis/`. AI distribution provides the
|
|
13
13
|
profile-selected declaration and guidance; the CLI owns executable hosting and
|
|
14
14
|
client registration. Installation must preserve user-owned MCP servers and
|
|
15
15
|
report unsupported adapters or drift.
|
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
"kind": "skill-contains",
|
|
48
|
-
"value": "
|
|
48
|
+
"value": "Look first for the project's existing `.play` files"
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
"kind": "skill-contains",
|
|
52
|
-
"value": "`cratis ai install` manages `.cratis/ai/`,
|
|
52
|
+
"value": "`cratis ai install` manages `.cratis/ai/`, never model files"
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
"kind": "skill-contains",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
},
|
|
70
70
|
{
|
|
71
71
|
"kind": "skill-contains",
|
|
72
|
-
"value": "cratis screenplay mcp
|
|
72
|
+
"value": "cratis screenplay mcp <model-folder>"
|
|
73
73
|
},
|
|
74
74
|
{
|
|
75
75
|
"kind": "skill-contains",
|
|
@@ -3,7 +3,7 @@ name: cratis-screenplay-modeling-lifecycle
|
|
|
3
3
|
description: "Model first: load before any Cratis application work where a Screenplay `.play` model is, or should become, the source of truth. Holds the model-first decision rule, modes, independent verdicts V1-V5, the P0-P9 phases with Input / Carry-forward / Gate, stop-or-assume, identity ownership, approvals, untrusted content, session state and handoffs, then routes to ONE phase skill. Not for: Screenplay syntax or the compiler (use `cratis-screenplay-toolchain`), a single construct (use the `cratis-screenplay-*` construct skills), or Chronicle runtime diagnosis (use `cratis-chronicle-cli-operations`)."
|
|
4
4
|
license: MIT
|
|
5
5
|
metadata:
|
|
6
|
-
cratis-hint-paths: "
|
|
6
|
+
cratis-hint-paths: "**/*.play"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Screenplay modeling lifecycle
|
|
@@ -18,10 +18,10 @@ an unproven pass.
|
|
|
18
18
|
|
|
19
19
|
## Decide the level first (master copy; run once per request, from any entry point)
|
|
20
20
|
|
|
21
|
-
1. **Opted in?** Only when (a) the model root (
|
|
22
|
-
configured root) holds a `.play` file **in the committed tree** (`git ls-tree -r --name-only HEAD
|
|
21
|
+
1. **Opted in?** Only when (a) the model root (the folder holding the project's `.play` files, or the project's
|
|
22
|
+
configured root) holds a `.play` file **in the committed tree** (`git ls-tree -r --name-only HEAD` lists a `.play` file there, narrowed to `-- <root>` when a root is configured), or (b)
|
|
23
23
|
the project explicitly set `mcpServers.screenplay.root` in `.cratis/ai.json` (an empty configured
|
|
24
|
-
root counts). **Not opt-in:** an empty
|
|
24
|
+
root counts). **Not opt-in:** an empty model folder or the MCP entry that `cratis ai
|
|
25
25
|
install`/`update` creates; an installed profile or skill; a `.play` file outside the root; a
|
|
26
26
|
staged or untracked `.play` file under the root (a draft). Committing a model under the root
|
|
27
27
|
is the team's act of acceptance and opts the repository in.
|
|
@@ -221,7 +221,7 @@ Stage `v4.24.0` (admits ESM v1-v3); opt-in key `mcpServers.screenplay.root` in c
|
|
|
221
221
|
`Documentation/reference/screenplay-mcp.md`. The worked example compiles with both tools.
|
|
222
222
|
## Verify
|
|
223
223
|
```shell
|
|
224
|
-
screenplay
|
|
224
|
+
screenplay <model-folder> --warnaserror --no-color
|
|
225
225
|
```
|
|
226
226
|
- [ ] The first output line states the mode; the last block opens with `Outcome:`; five verdict lines, each a result or "not run: <reason>".
|
|
227
227
|
- [ ] One phase skill per step; STATE.md names the next phase; no code for modeled behavior, no managed output edited.
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
The decision rule is in `SKILL.md` ("Decide the level first"). This file holds the evidence.
|
|
4
4
|
|
|
5
5
|
## Why an empty directory or an MCP entry is not opt-in
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
Through cratis CLI `v3.27.1` the `cratis/screenplay` profile (and composed profiles such as Stage)
|
|
7
|
+
made `cratis ai install`/`update` create the selected model directory, normally `.cratis/screenplay`
|
|
8
|
+
(`Documentation/ai/index.md`: "Install/update creates the selected
|
|
9
9
|
empty model directory ... but does not start the server or create source files"), and register
|
|
10
10
|
a Screenplay MCP entry for it. Uninstall keeps the directory. Both therefore appear in every
|
|
11
11
|
repository that merely installed the language skills, so neither can signal consent.
|
|
@@ -21,7 +21,7 @@ disables registration"; `AiConfiguration.McpServers`, read by `AiMcpDescriptor`
|
|
|
21
21
|
## Edge cases
|
|
22
22
|
- `.play` files only under `.ai-work/`, a docs folder or a sample: not under the root, so not opt-in.
|
|
23
23
|
- Acceptance is visible in the repository: the model root holds at least one `.play` file in
|
|
24
|
-
the committed tree (`git ls-tree -r --name-only HEAD
|
|
24
|
+
the committed tree (`git ls-tree -r --name-only HEAD` lists a `.play` file there, narrowed to `-- <root>` when a root is configured). Committing a model
|
|
25
25
|
under the root is the team's act of acceptance and opts the repository in. P6 commits the
|
|
26
26
|
accepted `.play` files and `.screenplay/identities.json` when present.
|
|
27
27
|
- Staged or untracked files under the root are drafts: they do not opt the repository in and
|
|
@@ -31,7 +31,7 @@ phase, a decision important enough that a later reader could misread the model (
|
|
|
31
31
|
`reasoning-notes.md` for when it belongs in a `description`).
|
|
32
32
|
|
|
33
33
|
## P0 Intake
|
|
34
|
-
- **Input**: the request, the repository,
|
|
34
|
+
- **Input**: the request, the repository, the project's model folder or the configured root.
|
|
35
35
|
- **Carry-forward**: mode; model root; tool check (versions per `cratis-screenplay-toolchain`);
|
|
36
36
|
the decision-rule outcome (model or code-first); STATE.md.
|
|
37
37
|
- **Gate**: mode stated; STATE.md exists; the five intake points (domain, source, goal, constraints,
|
package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/verdicts-and-modes.md
CHANGED
|
@@ -149,7 +149,7 @@ LC_ALL=C sort -u "$tmp/manifest" > "$tmp/sorted" || fail "sort failed"
|
|
|
149
149
|
d=$(shasum -a 256 < "$tmp/sorted") || fail "digest failed"
|
|
150
150
|
echo "$commit+${d:0:12}"
|
|
151
151
|
```
|
|
152
|
-
Example: `ident.sh
|
|
152
|
+
Example: `ident.sh Source/Screenplay Source/Screenplay/.screenplay/identities.json src/Billing/Rule.cs`
|
|
153
153
|
(the identity catalog sits inside the root, so list it only if it lives elsewhere; duplicates are
|
|
154
154
|
merged). Record the output as the source identity; a changed digest invalidates acceptance. After the P6
|
|
155
155
|
commit, recompute it: the digest must equal the one reviewed at P5 (only the commit part may differ). Add the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"skill": "cratis-screenplay-modeling-lifecycle",
|
|
3
|
-
"input": "Add a berth allocation feature to this Cratis application that already has a
|
|
3
|
+
"input": "Add a berth allocation feature to this Cratis application that already has a Screenplay model. How should the work be done and verified?",
|
|
4
4
|
"fixtures": [],
|
|
5
5
|
"assertions": [
|
|
6
6
|
{ "kind": "skill-contains", "value": "Model first" },
|
|
@@ -12,11 +12,14 @@ text. This is half of every event model, and the half most easily got wrong.
|
|
|
12
12
|
|
|
13
13
|
## Locate the model
|
|
14
14
|
|
|
15
|
-
Look first
|
|
15
|
+
Look first for the project's existing `.play` files: the folder holding them is the
|
|
16
|
+
model. A new model goes under the repository's `Source/` or `src/` folder, else in a
|
|
17
|
+
`Screenplay/` folder at the repository root; never under `.cratis/`, which holds
|
|
18
|
+
configuration and the shared AI corpus only. This is the
|
|
16
19
|
conventional home for consumer-owned `.play` source; do not invent another
|
|
17
20
|
location or search the whole repository before checking it.
|
|
18
21
|
|
|
19
|
-
`cratis ai install` manages `.cratis/ai/`,
|
|
22
|
+
`cratis ai install` manages `.cratis/ai/`, never model files. Never
|
|
20
23
|
hand-copy Screenplay source between repositories. Keep Markdown that explains,
|
|
21
24
|
questions or navigates the model in the repository's documentation; the `.play`
|
|
22
25
|
source is the single flow model.
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
{ "kind": "skill-contains", "value": "main `fd18129`" },
|
|
7
7
|
{ "kind": "skill-contains", "value": "it changes no projection contract" },
|
|
8
8
|
{ "kind": "skill-contains", "value": "map the read-model identity from `$eventSourceId`" },
|
|
9
|
-
{ "kind": "skill-contains", "value": "
|
|
10
|
-
{ "kind": "skill-contains", "value": "`cratis ai install` manages `.cratis/ai/`,
|
|
9
|
+
{ "kind": "skill-contains", "value": "Look first for the project's existing `.play` files" },
|
|
10
|
+
{ "kind": "skill-contains", "value": "`cratis ai install` manages `.cratis/ai/`, never model files" },
|
|
11
11
|
{ "kind": "skill-contains", "value": "AutoMap is on by default" },
|
|
12
12
|
{ "kind": "skill-contains", "value": "PLAY0191" },
|
|
13
13
|
{ "kind": "skill-contains", "value": "every event type in the system" },
|
|
@@ -11,11 +11,14 @@ shape, the `query` is the entry point, and the `screen` renders it.
|
|
|
11
11
|
|
|
12
12
|
## Locate the model
|
|
13
13
|
|
|
14
|
-
Look first
|
|
14
|
+
Look first for the project's existing `.play` files: the folder holding them is the
|
|
15
|
+
model. A new model goes under the repository's `Source/` or `src/` folder, else in a
|
|
16
|
+
`Screenplay/` folder at the repository root; never under `.cratis/`, which holds
|
|
17
|
+
configuration and the shared AI corpus only. This is the
|
|
15
18
|
conventional home for consumer-owned `.play` source; do not invent another
|
|
16
19
|
location or search the whole repository before checking it.
|
|
17
20
|
|
|
18
|
-
`cratis ai install` manages `.cratis/ai/`,
|
|
21
|
+
`cratis ai install` manages `.cratis/ai/`, never model files. Never
|
|
19
22
|
hand-copy Screenplay source between repositories. Keep Markdown that explains,
|
|
20
23
|
questions or navigates the model in the repository's documentation; the `.play`
|
|
21
24
|
source is the single flow model.
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
{ "kind": "skill-contains", "value": "filter status InvoiceStatus optional" },
|
|
8
8
|
{ "kind": "skill-contains", "value": "query Q => observable?" },
|
|
9
9
|
{ "kind": "skill-contains", "value": "information `PLAY0479`" },
|
|
10
|
-
{ "kind": "skill-contains", "value": "
|
|
11
|
-
{ "kind": "skill-contains", "value": "`cratis ai install` manages `.cratis/ai/`,
|
|
10
|
+
{ "kind": "skill-contains", "value": "Look first for the project's existing `.play` files" },
|
|
11
|
+
{ "kind": "skill-contains", "value": "`cratis ai install` manages `.cratis/ai/`, never model files" },
|
|
12
12
|
{ "kind": "skill-contains", "value": "The tenant is the default and stays unstated" },
|
|
13
13
|
{ "kind": "skill-contains", "value": "belongs on a `from` parameter, never on a `filter`" },
|
|
14
14
|
{ "kind": "skill-contains", "value": "warnings, not errors" },
|
|
@@ -12,11 +12,14 @@ concrete data.
|
|
|
12
12
|
|
|
13
13
|
## Locate the model
|
|
14
14
|
|
|
15
|
-
Look first
|
|
15
|
+
Look first for the project's existing `.play` files: the folder holding them is the
|
|
16
|
+
model. A new model goes under the repository's `Source/` or `src/` folder, else in a
|
|
17
|
+
`Screenplay/` folder at the repository root; never under `.cratis/`, which holds
|
|
18
|
+
configuration and the shared AI corpus only. This is the
|
|
16
19
|
conventional home for consumer-owned `.play` source; do not invent another
|
|
17
20
|
location or search the whole repository before checking it.
|
|
18
21
|
|
|
19
|
-
`cratis ai install` manages `.cratis/ai/`,
|
|
22
|
+
`cratis ai install` manages `.cratis/ai/`, never model files. Never
|
|
20
23
|
hand-copy Screenplay source between repositories. Keep Markdown that explains,
|
|
21
24
|
questions or navigates the model in the repository's documentation; the `.play`
|
|
22
25
|
source is the single flow model.
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
"kind": "skill-contains",
|
|
24
|
-
"value": "
|
|
24
|
+
"value": "Look first for the project's existing `.play` files"
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
"kind": "skill-contains",
|
|
28
|
-
"value": "`cratis ai install` manages `.cratis/ai/`,
|
|
28
|
+
"value": "`cratis ai install` manages `.cratis/ai/`, never model files"
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
"kind": "skill-contains",
|
|
@@ -15,7 +15,7 @@ skill answers "does it compile, bind, render, and which compiler said so". The m
|
|
|
15
15
|
|
|
16
16
|
## Locate the model
|
|
17
17
|
|
|
18
|
-
Look first in the model root: `.
|
|
18
|
+
Look first in the model root: the folder holding the project's `.play` files (else `Source/` or `src/`, else `Screenplay/`), or the root the project set with `mcpServers.screenplay.root` in `.cratis/ai.json`. A folder of `.play`
|
|
19
19
|
files is one application: always check the folder, never one file of it.
|
|
20
20
|
|
|
21
21
|
## Verified product sources
|
|
@@ -12,11 +12,14 @@ entries other modules contribute are all declared in the `.play` model.
|
|
|
12
12
|
|
|
13
13
|
## Locate the model
|
|
14
14
|
|
|
15
|
-
Look first
|
|
15
|
+
Look first for the project's existing `.play` files: the folder holding them is the
|
|
16
|
+
model. A new model goes under the repository's `Source/` or `src/` folder, else in a
|
|
17
|
+
`Screenplay/` folder at the repository root; never under `.cratis/`, which holds
|
|
18
|
+
configuration and the shared AI corpus only. This is the
|
|
16
19
|
conventional home for consumer-owned `.play` source; do not invent another
|
|
17
20
|
location or search the whole repository before checking it.
|
|
18
21
|
|
|
19
|
-
`cratis ai install` manages `.cratis/ai/`,
|
|
22
|
+
`cratis ai install` manages `.cratis/ai/`, never model files. Never
|
|
20
23
|
hand-copy Screenplay source between repositories. Keep Markdown that explains,
|
|
21
24
|
questions or navigates the model in the repository's documentation; the `.play`
|
|
22
25
|
source is the single flow model.
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
{ "kind": "skill-contains", "value": "invoiceId = $eventSourceId" },
|
|
9
9
|
{ "kind": "skill-contains", "value": "InvoiceStatusView optional" },
|
|
10
10
|
{ "kind": "skill-contains", "value": "An existing success continuation does not imply a response contract" },
|
|
11
|
-
{ "kind": "skill-contains", "value": "
|
|
12
|
-
{ "kind": "skill-contains", "value": "`cratis ai install` manages `.cratis/ai/`,
|
|
11
|
+
{ "kind": "skill-contains", "value": "Look first for the project's existing `.play` files" },
|
|
12
|
+
{ "kind": "skill-contains", "value": "`cratis ai install` manages `.cratis/ai/`, never model files" },
|
|
13
13
|
{ "kind": "skill-contains", "value": "A form is discovered, not referenced" },
|
|
14
14
|
{ "kind": "skill-contains", "value": "declares no\n`fits slot`" },
|
|
15
15
|
{ "kind": "skill-contains", "value": "override-priority order" },
|
|
@@ -54,7 +54,7 @@ before claiming behavior for another version.
|
|
|
54
54
|
model). Decide this with the decision rule in
|
|
55
55
|
`cratis-screenplay-modeling-lifecycle`: model-first only when an accepted
|
|
56
56
|
model under the model root covers this scope, or the repository is opted in
|
|
57
|
-
(the root holds a committed `.play` file (`git ls-tree -r --name-only HEAD
|
|
57
|
+
(the root 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 set `mcpServers.screenplay.root`
|
|
58
58
|
in `.cratis/ai.json`); an empty directory, install output, a `.play` file
|
|
59
59
|
outside the root or an uncommitted draft does not count, and framework, infrastructure, client, adapter and not-opted-in
|
|
60
60
|
brownfield work stays code-first. Opted in but no model for this scope: model
|
|
@@ -36,7 +36,7 @@ another version. Never translate an assertion or helper name from memory.
|
|
|
36
36
|
plain `Specification` base in this file and do not reach for the scenario
|
|
37
37
|
family except to test the very engine that repository provides.
|
|
38
38
|
- An accepted `.play` model under the model root covers the behavior, or the
|
|
39
|
-
repository is opted in (the root holds a committed `.play` file (`git ls-tree -r --name-only HEAD
|
|
39
|
+
repository is opted in (the root 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 set
|
|
40
40
|
`mcpServers.screenplay.root` in `.cratis/ai.json`; an empty directory, install
|
|
41
41
|
output, an uncommitted `.play` draft or a `.play` file outside the root does not count; master definition:
|
|
42
42
|
`cratis-screenplay-modeling-lifecycle`): change the model first with
|