@cratis/pi 7.9.3 → 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/harnesses/pi/extensions/cratis-mcp/configuration.ts +4 -3
- package/package/corpus/harnesses/pi/extensions/cratis-mcp/index.ts +1 -1
- package/package/corpus/mcp-servers.json +0 -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/ai-distribution.md +2 -1
- 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 +5 -4
- 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-toolchain/references/versions.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)
|
|
@@ -95,8 +95,9 @@ export function selectedServer(project: string, corpus: string) {
|
|
|
95
95
|
JSON.stringify(server.profiles) !== '["cratis/screenplay"]' || server.env !== undefined) {
|
|
96
96
|
throw new Error('Only the distributed native Cratis Screenplay MCP command is supported.');
|
|
97
97
|
}
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
// Without an explicit root the Cratis CLI locates the model itself: the existing .play files, else Source/src, else Screenplay/.
|
|
99
|
+
const root = object(screenplay) ? screenplay.root : undefined;
|
|
100
|
+
if (root !== undefined && typeof root !== 'string') throw new Error('Screenplay MCP root must be a project-relative string.');
|
|
100
101
|
const physicalProject = realpathSync(project);
|
|
101
|
-
return { project: physicalProject, root: physicalRoot(physicalProject, root) };
|
|
102
|
+
return { project: physicalProject, root: root === undefined ? undefined : physicalRoot(physicalProject, root) };
|
|
102
103
|
}
|
|
@@ -59,7 +59,7 @@ export function registerBridge(pi: ExtensionAPI, corpus: string, connect = start
|
|
|
59
59
|
failures.clear();
|
|
60
60
|
if (!selection) return;
|
|
61
61
|
if (uncertain) throw new Error('Screenplay mutation outcome remains unknown. Explicitly reload, inspect workspace-state, and obtain authorization before any recovery.');
|
|
62
|
-
const modelRoot = selection.root;
|
|
62
|
+
const modelRoot = selection.root ?? "the project's Screenplay model";
|
|
63
63
|
const activeConnection = connect(selection.project);
|
|
64
64
|
connection = activeConnection;
|
|
65
65
|
try {
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
"transport": "stdio",
|
|
8
8
|
"command": "cratis",
|
|
9
9
|
"args": ["screenplay", "mcp"],
|
|
10
|
-
"defaultRoot": ".cratis/screenplay",
|
|
11
10
|
"description": "Understand and safely author one Screenplay application through typed AST operations, reviewed proposals, durable identities, and explicit recovery."
|
|
12
11
|
}
|
|
13
12
|
]
|
|
@@ -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)
|
|
@@ -45,7 +45,8 @@ remove only unchanged owned entries on uninstall. Unsupported adapters must be
|
|
|
45
45
|
reported explicitly rather than presented as configured.
|
|
46
46
|
|
|
47
47
|
Project model roots and opt-outs are consumer-owned configuration. Guidance
|
|
48
|
-
installation never
|
|
48
|
+
installation never creates or manages a model directory: the Screenplay MCP locates the model
|
|
49
|
+
itself (existing `.play` files, else `Source/` or `src/`, else a new `Screenplay/` folder). Ordinary
|
|
49
50
|
model writes still require the model-authoring proposal/apply contract and the
|
|
50
51
|
user's in-scope request.
|
|
51
52
|
|
|
@@ -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).
|
|
@@ -150,8 +150,8 @@ Standalone Chronicle client usage (no Arc) in TypeScript is
|
|
|
150
150
|
|
|
151
151
|
### Event modeling with Screenplay
|
|
152
152
|
|
|
153
|
-
**Model first.** A repository is opted in only when its model root (
|
|
154
|
-
`.
|
|
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` 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
|