@cratis/pi 7.10.0 → 7.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/package/corpus/agents/backend-developer.md +1 -1
  2. package/package/corpus/agents/code-reviewer.md +2 -2
  3. package/package/corpus/agents/coordinator.md +1 -1
  4. package/package/corpus/agents/frontend-developer.md +1 -1
  5. package/package/corpus/agents/orchestrator.md +1 -1
  6. package/package/corpus/agents/planner.md +2 -2
  7. package/package/corpus/agents/screenplay-modeler.md +1 -1
  8. package/package/corpus/agents/slice-implementer.md +1 -1
  9. package/package/corpus/agents/spec-writer.md +1 -1
  10. package/package/corpus/harnesses/pi/extensions/cratis-hooks/index.ts +6 -5
  11. package/package/corpus/harnesses/pi/extensions/cratis-hooks/quality-gate.ts +25 -4
  12. package/package/corpus/hooks/README.md +33 -7
  13. package/package/corpus/hooks/scripts/cratis-quality-gate.sh +246 -79
  14. package/package/corpus/hooks/scripts/quality-gates.json +17 -3
  15. package/package/corpus/prompts/add-reactor.prompt.md +1 -1
  16. package/package/corpus/prompts/new-vertical-slice.prompt.md +2 -2
  17. package/package/corpus/prompts/write-specs.prompt.md +2 -2
  18. package/package/corpus/rules/application-profile.md +1 -1
  19. package/package/corpus/rules/cratis-folder-is-configuration.md +28 -0
  20. package/package/corpus/rules/general.md +6 -1
  21. package/package/corpus/rules/profiles.md +4 -3
  22. package/package/corpus/rules/reactors.md +1 -1
  23. package/package/corpus/rules/vertical-slices.md +1 -1
  24. package/package/corpus/skills/cratis-application-react-specifications/SKILL.md +1 -1
  25. package/package/corpus/skills/cratis-application-slice-conformance/SKILL.md +2 -2
  26. package/package/corpus/skills/cratis-application-slice-conformance/references/contract-and-precedence.md +1 -1
  27. package/package/corpus/skills/cratis-application-slice-specifications/SKILL.md +1 -1
  28. package/package/corpus/skills/cratis-arc-command/SKILL.md +1 -1
  29. package/package/corpus/skills/cratis-arc-command-execution/SKILL.md +1 -1
  30. package/package/corpus/skills/cratis-arc-command-validation/SKILL.md +1 -1
  31. package/package/corpus/skills/cratis-arc-observable-query-http/SKILL.md +1 -1
  32. package/package/corpus/skills/cratis-arc-query-paging/SKILL.md +1 -1
  33. package/package/corpus/skills/cratis-arc-react-page/SKILL.md +1 -1
  34. package/package/corpus/skills/cratis-chronicle-event-constraints/SKILL.md +1 -1
  35. package/package/corpus/skills/cratis-chronicle-event-modeling/SKILL.md +2 -2
  36. package/package/corpus/skills/cratis-chronicle-event-type-migration/SKILL.md +1 -1
  37. package/package/corpus/skills/cratis-chronicle-projection/SKILL.md +1 -1
  38. package/package/corpus/skills/cratis-chronicle-reactor/SKILL.md +2 -2
  39. package/package/corpus/skills/cratis-chronicle-read-model/SKILL.md +1 -1
  40. package/package/corpus/skills/cratis-chronicle-read-model-specifications/SKILL.md +1 -1
  41. package/package/corpus/skills/cratis-chronicle-reducer/SKILL.md +1 -1
  42. package/package/corpus/skills/cratis-components-stepper-command-dialog/SKILL.md +1 -1
  43. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/SKILL.md +5 -2
  44. package/package/corpus/skills/cratis-screenplay-captures-and-reactions/verification.json +2 -2
  45. package/package/corpus/skills/cratis-screenplay-command-surface/SKILL.md +5 -2
  46. package/package/corpus/skills/cratis-screenplay-command-surface/verification.json +2 -2
  47. package/package/corpus/skills/cratis-screenplay-discovery/SKILL.md +1 -1
  48. package/package/corpus/skills/cratis-screenplay-event-modeling/SKILL.md +9 -6
  49. package/package/corpus/skills/cratis-screenplay-event-modeling/verification.json +2 -2
  50. package/package/corpus/skills/cratis-screenplay-model-authoring/SKILL.md +12 -10
  51. package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-loop.md +3 -4
  52. package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-tools.md +3 -3
  53. package/package/corpus/skills/cratis-screenplay-model-authoring/verification.json +3 -3
  54. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/SKILL.md +5 -5
  55. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/opt-in.md +4 -4
  56. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/phases.md +1 -1
  57. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/verdicts-and-modes.md +1 -1
  58. package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/verification.json +1 -1
  59. package/package/corpus/skills/cratis-screenplay-projections/SKILL.md +5 -2
  60. package/package/corpus/skills/cratis-screenplay-projections/verification.json +2 -2
  61. package/package/corpus/skills/cratis-screenplay-read-surface/SKILL.md +5 -2
  62. package/package/corpus/skills/cratis-screenplay-read-surface/verification.json +2 -2
  63. package/package/corpus/skills/cratis-screenplay-specifications/SKILL.md +5 -2
  64. package/package/corpus/skills/cratis-screenplay-specifications/verification.json +2 -2
  65. package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +1 -1
  66. package/package/corpus/skills/cratis-screenplay-ui-composition/SKILL.md +5 -2
  67. package/package/corpus/skills/cratis-screenplay-ui-composition/verification.json +2 -2
  68. package/package/corpus/skills/cratis-specification-by-example/SKILL.md +1 -1
  69. package/package/corpus/skills/cratis-specifications-csharp/SKILL.md +1 -1
  70. package/package.json +1 -1
@@ -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 -- <root>` lists it; its HEAD version remains the contract until working-tree edits are committed) under the model root (default `.cratis/screenplay/`, 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).
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 -- <root>` lists it), or the project set
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 (default `.cratis/screenplay/`, or the 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 -- <root>` lists it). Staged or untracked files under the
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 -- <root>` lists it), or the root holds a committed `.play`
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 -- <root>` lists it), or the project set `mcpServers.screenplay.root`
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 -- <root>` lists it), or the project set
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 -- <root>` lists it), or the project set
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 -- <root>` lists it), or the project set
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 -- <root>` lists it), or the project set
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 -- <root>` lists it), or the project set
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 -- <root>` lists it), or the project set
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 -- <root>` lists it), or the project set
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, default `.cratis/screenplay/`, holds a committed `.play`
11
- > file (`git ls-tree -r --name-only HEAD -- <root>` lists it), or the project explicitly set `mcpServers.screenplay.root` in
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 -- <root>` lists it), or the project set
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 -- <root>` lists it), or the project set
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, default `.cratis/screenplay/`, holds a
28
- > committed `.play` file (`git ls-tree -r --name-only HEAD -- <root>` lists it), or the project explicitly set `mcpServers.screenplay.root` in
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 -- <root>` lists it), or the project set
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 -- <root>` lists it), or the project set `mcpServers.screenplay.root`
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 -- <root>` lists it), or the project set
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 -- <root>` lists it), or the project set
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 in `.cratis/screenplay/` at the repository root. This is the
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/`, not `.cratis/screenplay/`. Never
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": ".cratis/screenplay/"
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/`, not `.cratis/screenplay/`"
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 in `.cratis/screenplay/` at the repository root. This is the
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/`, not `.cratis/screenplay/`. Never
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": ".cratis/screenplay/"
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/`, not `.cratis/screenplay/`"
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 -- <root>` lists it), or the project explicitly set
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 (default `.cratis/screenplay/`) holds a committed `.play` file (`git ls-tree -r --name-only HEAD -- <root>` lists it), or the project explicitly set
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 in `.cratis/screenplay/` at the repository root. This is the
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/`, not `.cratis/screenplay/`. Never
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 `.cratis/screenplay/` as one application and choose the coarsest layout
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 .cratis/screenplay/ --warnaserror
329
+ screenplay <model-folder> --warnaserror
327
330
  ```
328
331
 
329
- (The standalone tool; `cratis screenplay validate .cratis/screenplay --warnings-as-errors`
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": ".cratis/screenplay/"
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/`, not `.cratis/screenplay/`"
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`: `.cratis/screenplay` in a repository
46
- that has one, otherwise the folder the user names. In Claude or ChatGPT desktop the
47
- host manages the files, so do not invent a location; work in what the host provides
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 with `.cratis/ai.json` (fixed root `.cratis/screenplay`).
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 in `.cratis/screenplay/` at the repository root. This is the
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/`, not `.cratis/screenplay/`. Select the
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 .cratis/screenplay
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 `.cratis/screenplay/` folder, or its root file, not just
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 .cratis/screenplay --warnings-as-errors
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 whose `.cratis/ai.json` resolves the default root `.cratis/screenplay`
20
- (what the `cratis/screenplay` profile registers). Stdio, newline-delimited
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, but fails fast when
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 with `.cratis/ai.json`, which resolves the fixed default root
8
- `.cratis/screenplay`. The standalone form is `screenplay mcp <model-folder>`. A
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. The default consumer model location is `.cratis/screenplay/`. AI distribution provides the
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": ".cratis/screenplay/"
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/`, not `.cratis/screenplay/`"
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 .cratis/screenplay"
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: ".cratis/screenplay/**/*.play"
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 (default `.cratis/screenplay/`, or the project's
22
- configured root) holds a `.play` file **in the committed tree** (`git ls-tree -r --name-only HEAD -- <root>` lists it), or (b)
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 `.cratis/screenplay/` or the MCP entry that `cratis ai
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 .cratis/screenplay/ --warnaserror --no-color
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
- At cratis CLI `v3.27.1` the `cratis/screenplay` profile (and composed profiles such as Stage)
7
- makes `cratis ai install`/`update` create the selected model directory, normally the corpus
8
- default `.cratis/screenplay` (`Documentation/ai/index.md`: "Install/update creates the selected
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 -- <root>` lists it). Committing a model
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, `.cratis/screenplay/` or the configured root.
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,
@@ -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 .cratis/screenplay .cratis/screenplay/.screenplay/identities.json src/Billing/Rule.cs`
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 .cratis/screenplay model. How should the work be done and verified?",
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 in `.cratis/screenplay/` at the repository root. This is the
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/`, not `.cratis/screenplay/`. Never
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.