@cratis/pi 7.6.4 → 7.7.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 +14 -0
- package/package/corpus/agents/code-reviewer.md +16 -0
- package/package/corpus/agents/coordinator.md +17 -0
- package/package/corpus/agents/frontend-developer.md +17 -0
- package/package/corpus/agents/orchestrator.md +18 -0
- package/package/corpus/agents/planner.md +24 -0
- package/package/corpus/agents/screenplay-modeler.md +57 -0
- package/package/corpus/agents/screenplay-renderer.md +42 -0
- package/package/corpus/agents/screenplay-reviewer.md +45 -0
- package/package/corpus/agents/slice-implementer.md +32 -5
- package/package/corpus/agents/spec-writer.md +16 -3
- package/package/corpus/prompts/add-reactor.prompt.md +5 -3
- package/package/corpus/prompts/new-vertical-slice.prompt.md +16 -5
- package/package/corpus/prompts/write-specs.prompt.md +12 -6
- package/package/corpus/rules/application-profile.md +7 -3
- package/package/corpus/rules/general.md +8 -3
- package/package/corpus/rules/glossary.md +1 -1
- package/package/corpus/rules/profiles.md +42 -4
- package/package/corpus/rules/reactors.md +30 -22
- package/package/corpus/rules/vertical-slices.md +3 -1
- package/package/corpus/skills/cratis-application-react-specifications/SKILL.md +13 -0
- package/package/corpus/skills/cratis-application-slice-conformance/LICENSE +2 -0
- package/package/corpus/skills/cratis-application-slice-conformance/SKILL.md +173 -0
- package/package/corpus/skills/cratis-application-slice-conformance/references/checklists.md +66 -0
- package/package/corpus/skills/cratis-application-slice-conformance/references/contract-and-precedence.md +49 -0
- package/package/corpus/skills/cratis-application-slice-conformance/references/provenance.md +23 -0
- package/package/corpus/skills/cratis-application-slice-conformance/references/worked-example.md +91 -0
- package/package/corpus/skills/cratis-application-slice-conformance/verification.json +14 -0
- package/package/corpus/skills/cratis-application-slice-specifications/SKILL.md +57 -1
- package/package/corpus/skills/cratis-application-slice-specifications/references/provenance.md +16 -0
- package/package/corpus/skills/cratis-arc-command/SKILL.md +10 -0
- package/package/corpus/skills/cratis-arc-command-execution/SKILL.md +10 -0
- package/package/corpus/skills/cratis-arc-command-validation/SKILL.md +10 -0
- package/package/corpus/skills/cratis-arc-observable-query-http/SKILL.md +10 -0
- package/package/corpus/skills/cratis-arc-query-paging/SKILL.md +10 -0
- package/package/corpus/skills/cratis-arc-react-page/SKILL.md +68 -8
- package/package/corpus/skills/cratis-arc-react-page/references/from-screenplay.md +199 -0
- package/package/corpus/skills/cratis-arc-react-page/references/provenance.md +13 -0
- package/package/corpus/skills/cratis-chronicle-event-constraints/SKILL.md +10 -0
- package/package/corpus/skills/cratis-chronicle-event-modeling/SKILL.md +38 -10
- package/package/corpus/skills/cratis-chronicle-event-type-migration/SKILL.md +13 -0
- package/package/corpus/skills/cratis-chronicle-projection/SKILL.md +13 -0
- package/package/corpus/skills/cratis-chronicle-reactor/SKILL.md +58 -6
- package/package/corpus/skills/cratis-chronicle-reactor/references/provenance.md +9 -0
- package/package/corpus/skills/cratis-chronicle-read-model/SKILL.md +13 -0
- package/package/corpus/skills/cratis-chronicle-read-model-specifications/SKILL.md +47 -0
- package/package/corpus/skills/cratis-chronicle-read-model-specifications/references/provenance.md +11 -0
- package/package/corpus/skills/cratis-chronicle-reducer/SKILL.md +13 -0
- package/package/corpus/skills/cratis-components-stepper-command-dialog/SKILL.md +13 -0
- package/package/corpus/skills/cratis-event-model-diagram/SKILL.md +35 -16
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/LICENSE +28 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/SKILL.md +166 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/audit-format.md +31 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/automation-patterns.md +139 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/cases-to-specify.md +69 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/effects-and-idempotency.md +88 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/integration-contracts.md +64 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/provenance.md +37 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/realization-and-gap-fill.md +34 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/todo-list-example.md +208 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/translate-example.md +126 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/translation-patterns.md +93 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/worked-integration.md +98 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/verification.json +15 -0
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/SKILL.md +267 -50
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/complete-examples.md +185 -0
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/verification.json +60 -12
- package/package/corpus/skills/cratis-screenplay-command-surface/SKILL.md +42 -12
- package/package/corpus/skills/cratis-screenplay-discovery/LICENSE +30 -0
- package/package/corpus/skills/cratis-screenplay-discovery/SKILL.md +229 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/divergent-sweep.md +37 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/event-naming.md +64 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/facilitation.md +62 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/human-workshop.md +222 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/interview-questions.md +66 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/personas-and-causes.md +152 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/plotting-and-handoff.md +111 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/provenance.md +37 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/storming-loop.md +119 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/worked-session.md +87 -0
- package/package/corpus/skills/cratis-screenplay-discovery/verification.json +15 -0
- package/package/corpus/skills/cratis-screenplay-event-modeling/SKILL.md +140 -77
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/invoicing-example.md +51 -0
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/nine-steps.md +114 -28
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/parsed-not-runnable.md +50 -0
- package/package/corpus/skills/cratis-screenplay-event-modeling/verification.json +28 -3
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/LICENSE +31 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/SKILL.md +239 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/chronicle-observations.md +25 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/evidence-table-template.md +79 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/expert-verification.md +48 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/generate-notes.md +75 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/intent-example.md +164 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/interview-findings.md +88 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/loss-report-template.md +47 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/prologue-safety.md +147 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/provenance.md +10 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/rule-modeling.md +36 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/side-car-migration.md +126 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/signal-to-intent.md +57 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/ui-observation.md +52 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/verification.json +17 -0
- package/package/corpus/skills/cratis-screenplay-model-authoring/SKILL.md +95 -54
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md +50 -20
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-loop.md +211 -0
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-tools.md +45 -5
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/provenance.md +13 -0
- package/package/corpus/skills/cratis-screenplay-model-authoring/verification.json +64 -7
- package/package/corpus/skills/cratis-screenplay-model-review/LICENSE +34 -0
- package/package/corpus/skills/cratis-screenplay-model-review/SKILL.md +209 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/anti-patterns.md +89 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/business-questions.md +128 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/checklist.md +176 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/provenance.md +36 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/report-template.md +149 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/review-questions.md +59 -0
- package/package/corpus/skills/cratis-screenplay-model-review/references/worked-example.md +255 -0
- package/package/corpus/skills/cratis-screenplay-model-review/verification.json +13 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/LICENSE +32 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/SKILL.md +239 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/code-reading-and-tokens.md +55 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/handoff-template.md +124 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/identity-and-edits.md +84 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/opt-in.md +48 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/phase-report-inventories.md +25 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/phases.md +162 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/principles.md +53 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/provenance.md +63 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/reasoning-notes.md +31 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/safety.md +31 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/stop-or-assume.md +46 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/verdicts-and-modes.md +204 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/vocabulary-map.md +55 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/worked-example.md +86 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/verification.json +16 -0
- package/package/corpus/skills/cratis-screenplay-projections/SKILL.md +14 -3
- package/package/corpus/skills/cratis-screenplay-read-surface/SKILL.md +15 -1
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/LICENSE +2 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +179 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/delivery-protocol.md +99 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/drift-and-ledger.md +67 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/gap-fill-handoff.md +72 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/provenance.md +27 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/renderability-gate.md +56 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/worked-example.md +124 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/verification.json +14 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/LICENSE +31 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/SKILL.md +200 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/berth-reservations.md +579 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/chronicle-verification.md +24 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/coverage-matrix.md +102 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/provenance.md +41 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-catalogue.md +196 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-workshop.md +102 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/spec-forms-by-mode.md +71 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/view-and-story-specs.md +91 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/verification.json +13 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/LICENSE +30 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/SKILL.md +236 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/command-inventory.md +107 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/field-lineage.md +130 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/provenance.md +20 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/read-model-design.md +201 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/review-questions.md +23 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/rule-layers.md +41 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/slicing.md +122 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/references/worked-example.md +305 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/verification.json +43 -0
- package/package/corpus/skills/cratis-screenplay-specifications/SKILL.md +217 -36
- package/package/corpus/skills/cratis-screenplay-specifications/verification.json +28 -4
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/LICENSE +33 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +191 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/boundaries.md +154 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/chronicle-boundaries.md +54 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/consistency-and-concurrency.md +191 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/evolution-example.md +70 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/evolution.md +65 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/provenance.md +13 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/stream-patterns.md +128 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/streams-example.md +378 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/verification.json +14 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/LICENSE +2 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +177 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/automation-translate-example.md +121 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet-example.md +319 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet.md +96 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostics.md +107 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/doc-contradictions.md +48 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-example.md +113 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-subset.md +148 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/pdl-example.md +267 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/provenance.md +51 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/renderable-subset.md +88 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/traps.md +51 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/verdicts.md +134 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/references/versions.md +134 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/verification.json +15 -0
- package/package/corpus/skills/cratis-screenplay-ui-composition/SKILL.md +53 -5
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/flow-review.md +56 -0
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/provenance.md +13 -0
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/worked-flow.md +65 -0
- package/package/corpus/skills/cratis-screenplay-ui-composition/verification.json +4 -1
- package/package/corpus/skills/cratis-specification-by-example/SKILL.md +44 -1
- package/package/corpus/skills/cratis-specifications-csharp/SKILL.md +10 -0
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/SKILL.md +186 -219
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/admission.md +177 -0
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/render-example.md +150 -0
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/rendered-application.md +87 -0
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/sandbox-and-specrunner.md +98 -0
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/verification.json +19 -0
- package/package/profile-catalog.json +11 -0
- package/package.json +1 -1
package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md
CHANGED
|
@@ -13,7 +13,7 @@ repository is the full list; this page is the authoring summary.
|
|
|
13
13
|
|
|
14
14
|
**Top level:** `domain`, `import`, `concept`, `type`, `policy`, `persona`,
|
|
15
15
|
`authentication`, `trigger`, `theme`, `layout`, `ui profile`, `behavior`,
|
|
16
|
-
`module`, `seed
|
|
16
|
+
`module`, `seed`, and the syntax-only `system` and `eventsource` (with its `stream`s).
|
|
17
17
|
|
|
18
18
|
**Inside a module:** `description`, `authorize`, `import "<glob>"`,
|
|
19
19
|
`screen`/`dialog` templates, `form`, `contribute`, `on`/`uses` behavior
|
|
@@ -43,7 +43,7 @@ as one application.
|
|
|
43
43
|
| `Translate` | Translate external data into events | Capture |
|
|
44
44
|
|
|
45
45
|
Any slice can contain `description`, `file`, `event`, `command`, `query`,
|
|
46
|
-
`projection`, `capture`, `reaction`, `screen`, `constraint`, `specification`,
|
|
46
|
+
`projection`, `capture`, `reaction`, `operation` (syntax-only), `screen`, `constraint`, `specification`,
|
|
47
47
|
`readmodel` and `reducer`. An unknown slice construct is only a warning
|
|
48
48
|
(`PLAY0029`) and its block is skipped; never accept a warning-free claim without
|
|
49
49
|
compiling the entire document set.
|
|
@@ -61,7 +61,8 @@ members or translating names from memory.
|
|
|
61
61
|
|
|
62
62
|
This registration model uses an inline event and context identity rather than
|
|
63
63
|
copying the identifier into payload. It was compiled at main `fd18129` with zero
|
|
64
|
-
source diagnostics
|
|
64
|
+
source diagnostics and recompiled with standalone 4.64.0 `--warnaserror`; neither
|
|
65
|
+
check runs its specifications. Inline lowering
|
|
65
66
|
and `optional` spelling do not themselves select a newer ESM version.
|
|
66
67
|
|
|
67
68
|
```screenplay
|
|
@@ -116,11 +117,19 @@ A construct can be in one of four states. Say which one you checked.
|
|
|
116
117
|
|
|
117
118
|
| State | What establishes it | What it does not prove |
|
|
118
119
|
| --- | --- | --- |
|
|
119
|
-
| **Parsed** | `screenplay <folder> --warnaserror` or MCP authoring diagnostics: syntax plus model
|
|
120
|
+
| **Parsed** | `screenplay <folder> --warnaserror` or MCP authoring diagnostics: syntax plus the model-consistency checks (`PLAY0282`-`PLAY0294`, for example a specification event that no producer can emit, `PLAY0285`) | Binding, execution, or anything about attached code. It never binds, so it cannot report `PLAY0268`, and the tool never reads `file` attachments |
|
|
120
121
|
| **Bound** | Semantic binding to the executable semantic model (ESM): MCP `executableReady`, executable diagnostics | That the reference execution plan admits the model, or that any specification passes |
|
|
121
|
-
| **Reference-executed** | The reference runner passes the specification | Target behavior; opaque code never runs here |
|
|
122
|
+
| **Reference-executed** | The reference runner passes the specification (library only: no MCP tool and no `screenplay` command runs it) | Target behavior; opaque code never runs here |
|
|
122
123
|
| **Target-executed** | Stage or a rendered application runs it with the implementations supplied | Nothing further in Screenplay |
|
|
123
124
|
|
|
125
|
+
Map the states onto the verdicts of `cratis-screenplay-modeling-lifecycle`:
|
|
126
|
+
Parsed is V1 (authorable); Bound is V2 (executable diagnostics read) and V3
|
|
127
|
+
(binding-ready, zero executable errors); Reference-executed is V4; Target-executed
|
|
128
|
+
is V5, reported as admission, publication, build and tests separately. A verdict
|
|
129
|
+
you did not run is "not run" with the reason, never implied by a lower one. MCP
|
|
130
|
+
`readiness.executableReady` can be true while executable diagnostics still hold
|
|
131
|
+
information entries (`PLAY0269`, `PLAY0270`).
|
|
132
|
+
|
|
124
133
|
The ESM version is selected by what a model uses, never by the author:
|
|
125
134
|
|
|
126
135
|
- **v1** is the default.
|
|
@@ -135,6 +144,13 @@ The ESM version is selected by what a model uses, never by the author:
|
|
|
135
144
|
- **v4** represents complete event generations, with one contract identity and
|
|
136
145
|
distinct revision property identities. Historical declarations are not migration
|
|
137
146
|
implementations; a target without migration support must reject the contract.
|
|
147
|
+
- **v5** adds keyed read-model absence assertions (`then no readmodel`).
|
|
148
|
+
- **v6** (standalone tool 4.61 and later; v4.64.0 `Versions.cs`) admits reactions,
|
|
149
|
+
captures, application triggers and the clock, hence `Automation` and
|
|
150
|
+
`Translate` slices. The Cratis CLI 3.27.1 bundles Screenplay 4.60.1 (ESM 5 at
|
|
151
|
+
most): there these constructs fail binding with `PLAY0268`. Name the tool
|
|
152
|
+
with every bound result; `cratis-screenplay-toolchain` (`references/versions.md`)
|
|
153
|
+
holds the per-tool table.
|
|
138
154
|
|
|
139
155
|
Inline events lower to slice-owned standalone contracts and preserve equivalent
|
|
140
156
|
canonical bytes. Event `description`, `documentation` and rename-only `id` are
|
|
@@ -145,21 +161,30 @@ execution plan, and the plan is created only when every reachable capability is
|
|
|
145
161
|
admitted. One refused construct blocks the whole plan, so no specification in
|
|
146
162
|
the model runs, including specifications that never touch it.
|
|
147
163
|
|
|
148
|
-
What binds today, what the reference execution plan refuses, what is opaque,
|
|
149
|
-
what blocks binding
|
|
164
|
+
What binds today, what the reference execution plan refuses, what is opaque, what is
|
|
165
|
+
authorable but not executable, and what blocks binding. The snapshot comes from the
|
|
166
|
+
v4.31.0 table, re-read against v4.64.0 documentation and probed through the MCP of
|
|
167
|
+
the standalone 4.64.0 tool for the rows marked "probed"; Cratis CLI 3.27.1
|
|
168
|
+
(Screenplay 4.60.1) differs where stated.
|
|
150
169
|
|
|
151
170
|
| Disposition | Constructs |
|
|
152
171
|
| --- | --- |
|
|
153
172
|
| Binds and runs in the reference runner | `StateChange`/`StateView` slices; `produces` including `when` conditions over command properties and literal tags; the portable validation rules, `matches email`, quoted `matches` patterns and `require` over command properties; declarative policies and `authorize` on modules, features, commands and keyed queries; `unique` constraints; projections as Chronicle lowers them, including variants, except the projection constructs in the next row; specifications, including `given caller`, `then denied` and `when append` |
|
|
154
173
|
| Binds, but the reference execution plan refuses it | A projection-level `remove via join`; `all` beside removals, `children` or `nested`; a `join`, `children` or `remove via join` inside `nested`; any event-context value other than the event source identity in a projection mapping or key, such as `$eventContext.occurred`, `$eventContext.sequenceNumber` or `$eventContext.causedBy.subject` (`$eventSourceId` and `$eventContext.eventSourceId` run) |
|
|
155
|
-
| Binds as
|
|
156
|
-
|
|
|
174
|
+
| Binds as ESM v6 on the standalone tool (probed), `PLAY0268` on Cratis CLI 3.27.1 | `Automation` and `Translate` slices, reactions that produce or invoke, captures, top-level `trigger`, clock, trigger and capture specifications. The library reference runner evaluates them (v6 actions); no `screenplay` command or MCP tool runs it, and Stage 4.24.0 renders none of them (the whole automation is gap-fill) |
|
|
175
|
+
| Reaction with trigger `reads` | Direct-producing (or code-bodied) reaction with `reads`: `PLAY0268` ("ESM v6 cannot protect that decision dependency", decision 0006), non-executable. Invokes-only reaction with `reads`: information only; the invoked command must declare and protect its own decision reads. Keep the `reads`; never remove them to obtain binding |
|
|
176
|
+
| Binds as opaque code (v3); reference runner reports unsupported | Bodied reducers, bodied named rules, fenced `validate` blocks, code or file policies. A pure reducer body is the only attachment Stage 4.24.0 admits |
|
|
177
|
+
| Information only, never blocks (probed) | `persona` (report-only: `PLAY0270`, the policies it lists must exist), `authentication`, `domain`, `seed`, descriptions and `file` provenance. A persona does not block binding and does not change behavior, so state persona scope in a description or a policy the model uses |
|
|
178
|
+
| Authorable, not executable (`PLAY0268`, probed) | `generated` properties and `returns` responses (allocated ESM v8), `system` and `operation` (v9), `eventsource` and `stream` (v10). The MCP reads and edits them (`declaration-details`, `find-fixtures`, `read-workspace` views `event-sources`/`event-streams`/`command-routes`) with `executionAvailable: false`. Keep them in the model as intent; do not strip them to make the model bind, and do not call the model executable |
|
|
179
|
+
| Blocks binding (`PLAY0268`) | `@pii`/`@sensitive` concepts (probed: "compliance attributes require portable data-subject semantics"), command `handler` (never binds; a command cannot declare both `produces` and `handler`, `PLAY0035`), bare `rule <Name>`, `require` or conditions over read-model paths, dates and `today` in comparisons, `$context.tenant`/claims/roles/causation in `produces`, `$env` conditions, `file` constraints, unquoted `import` of an external contract, a read model whose keyed queries in its own slice do not share one `by` property (none, or two different properties; several queries over the same property bind), any query other than `=> <ReadModel> optional` with one caller-supplied `by` argument (so also observable, filtered, scoped and performer-backed queries), `$causedBy` and templates in projections |
|
|
157
180
|
| Blocks binding (`PLAY0271`, legacy meaning) | Command `reads` and `concurrency` |
|
|
158
181
|
| Deferred (`PLAY0269`, information) | Screens, layouts, templates, forms, contributions, UI profiles, themes, behaviors and `on`/`uses` |
|
|
159
|
-
| Metadata only (`PLAY0270`, information) | `domain`, `seed`, descriptions and `file` provenance on declarations |
|
|
182
|
+
| Metadata only (`PLAY0270`, information) | `domain`, `seed`, `persona`, trigger and other descriptions, and `file` provenance on declarations |
|
|
160
183
|
|
|
161
|
-
The table is a snapshot, not a contract
|
|
162
|
-
|
|
184
|
+
The table is a snapshot, not a contract (rows without "probed" are carried from
|
|
185
|
+
v4.31.0 and v4.64.0 documentation): ask the binder (MCP `executable-diagnostics`
|
|
186
|
+
view) rather than extrapolating from it. Neither `screenplay` nor
|
|
187
|
+
`cratis screenplay validate` binds, so a clean validation says nothing about this table. Retain valid source that the
|
|
163
188
|
backend cannot represent rather than downgrading it to a stub. The MCP does not
|
|
164
189
|
run specifications, compile embedded code, generate an application, or follow
|
|
165
190
|
realization files. Stage owns rendering and runtime admission.
|
|
@@ -168,8 +193,10 @@ realization files. Stage owns rendering and runtime admission.
|
|
|
168
193
|
|
|
169
194
|
Decision 0006 shipped in Screenplay 4.31.0: a reaction trigger may declare
|
|
170
195
|
`reads <View> [as <alias>] [by <trigger value>]` (see
|
|
171
|
-
`cratis-screenplay-captures-and-reactions`).
|
|
172
|
-
|
|
196
|
+
`cratis-screenplay-captures-and-reactions`). At v4.64.0 a direct-producing
|
|
197
|
+
reaction with `reads` fails binding (`PLAY0268`); an invokes-only reaction reports
|
|
198
|
+
the reads as information, and the invoked command must protect its own
|
|
199
|
+
dependencies. On Cratis CLI 3.27.1 every reaction fails binding.
|
|
173
200
|
|
|
174
201
|
Do not infer availability from an accepted decision. Event generations and typed
|
|
175
202
|
diagnostic repairs now exist; see the event and MCP references rather than the
|
|
@@ -178,12 +205,15 @@ full historical shapes, not deployed-schema immutability or a working migrator.
|
|
|
178
205
|
Code attachment/source-map support likewise does not prove code round-trip
|
|
179
206
|
execution equivalence.
|
|
180
207
|
|
|
181
|
-
Decision 0023's generated values and `returns
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
208
|
+
Decision 0023's generated values and `returns`, operations and named event
|
|
209
|
+
sources/streams are **authorable** at v4.64.0 (syntax only, see the table above and
|
|
210
|
+
`commands.md`, `operations.md`, `event-sources.md` in the Screenplay documentation):
|
|
211
|
+
write them, but binding reports `PLAY0268` and nothing executes them until
|
|
212
|
+
ESM v8, v9 and v10 are admitted. Do not drop them for the sake of a green bind.
|
|
213
|
+
Protected reads and `derive`/`provide` (allocated v11) have no documented syntax at
|
|
214
|
+
v4.64.0: do not teach or invent one. Affected-instance declarations, per-event data
|
|
215
|
+
subjects, external event origin and query paging/sorting/change-set delivery also
|
|
216
|
+
remain unavailable here.
|
|
187
217
|
|
|
188
218
|
`Type optional` is canonical for admitted type references; `Type?` remains
|
|
189
219
|
compatible with information `PLAY0479`. The modifier follows `[]` for an optional
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
<!-- Copyright (c) Cratis. All rights reserved. -->
|
|
2
|
+
<!-- Licensed under the MIT license. See LICENSE file in the project root for full license information. -->
|
|
3
|
+
|
|
4
|
+
# The Screenplay MCP loop
|
|
5
|
+
|
|
6
|
+
The working loop for the session that owns the model connection: connect, orient,
|
|
7
|
+
choose an edit route, propose, review, apply, verify. Tool-by-tool arguments and
|
|
8
|
+
refusals are in the [MCP tool guide](mcp-tools.md); verdict names (V1 to V5) are
|
|
9
|
+
defined by `cratis-screenplay-modeling-lifecycle`. Facts here were read at
|
|
10
|
+
Screenplay v4.64.0 (`Source/DotNET/Screenplay.Mcp/`, `Documentation/screenplay/mcp/`)
|
|
11
|
+
and probed against the standalone 4.64.0 tool and, for the connection behavior,
|
|
12
|
+
4.63.1. Cratis CLI 3.27.1 bundles Screenplay 4.60.1, whose tool set and views can
|
|
13
|
+
differ: read `tools/list`.
|
|
14
|
+
|
|
15
|
+
## Connect
|
|
16
|
+
|
|
17
|
+
1. Launch with a **fixed root**: `screenplay mcp <model-folder>`, or
|
|
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
|
|
21
|
+
JSON-RPC, one sequential connection.
|
|
22
|
+
2. Send `initialize`, then the `notifications/initialized` notification, **before
|
|
23
|
+
any tool call**. Earlier calls fail with `-32600` "Initialize and send
|
|
24
|
+
notifications/initialized before using tools".
|
|
25
|
+
3. Pass a physical path. Symbolic links and reparse points are refused, including
|
|
26
|
+
`.screenplay` metadata.
|
|
27
|
+
4. `tools/list` returns **29 tools**, or **30 on hosts that advertise the MCP-Apps
|
|
28
|
+
UI extension** (the extra tool is `visualize-model`). Read the schemas once per
|
|
29
|
+
connection; never hard-code a count or an argument list.
|
|
30
|
+
5. A root given at startup is fixed for the connection: `open-workspace.path` may
|
|
31
|
+
name the same directory, anything else returns `RootChangeRefused`. Start a
|
|
32
|
+
separately authorized connection to model another application.
|
|
33
|
+
|
|
34
|
+
### Roots bug and the workaround
|
|
35
|
+
|
|
36
|
+
Screenplay up to 4.63.1 (fixed in 4.63.2; the 4.64.0 tool is fixed) read the
|
|
37
|
+
client's roots reply from the wrong member. A server started **without** a root,
|
|
38
|
+
facing a client that advertises roots, answered with an error with `id: null`
|
|
39
|
+
immediately after `notifications/initialized`, before any tool call. Real hosts
|
|
40
|
+
treat that as fatal and drop the connection. Passing `open-workspace.path` does
|
|
41
|
+
**not** avoid it, because the error is sent before `open-workspace` runs.
|
|
42
|
+
|
|
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
|
|
46
|
+
dynamic root there, fix the root.
|
|
47
|
+
|
|
48
|
+
## Who owns the connection
|
|
49
|
+
|
|
50
|
+
- **Proposals are connection-local.** They live in memory, at most **16**
|
|
51
|
+
outstanding (`LimitExceeded`); `open-workspace`, a successful `apply` and a root
|
|
52
|
+
change clear them. A proposal id means nothing in another process, another
|
|
53
|
+
session or after a reopen.
|
|
54
|
+
- **One owner** (normally the main session) holds the connection and does
|
|
55
|
+
open, propose, review, approval, `apply`. Only `apply` and `recover-workspace`
|
|
56
|
+
write.
|
|
57
|
+
- **Non-owners** (reviewers, renderers, explainers, subagents without MCP) never
|
|
58
|
+
return proposal ids. They return a bounded **edit request**; the owner
|
|
59
|
+
re-proposes it on its own connection:
|
|
60
|
+
|
|
61
|
+
```text
|
|
62
|
+
root: <model root>
|
|
63
|
+
beforeRevision / catalogRevision: <the values read>
|
|
64
|
+
target: <qualified address and kind>
|
|
65
|
+
change: <text diff or typed intent>
|
|
66
|
+
rationale: <why>
|
|
67
|
+
expected impact: <diagnostics, identity effect, specifications>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
- Read-only orientation (`describe-application`, `search-declarations`,
|
|
71
|
+
`diagnostics`, and `read-workspace` views) is fine from any session that has its
|
|
72
|
+
own short-lived connection.
|
|
73
|
+
- Discover capabilities once per session (tool, version, `tools/list` schemas,
|
|
74
|
+
root, configuration) and reuse them. Refresh when the root, tool, version or
|
|
75
|
+
configuration changes or a call fails. Never reuse a stale revision, catalog
|
|
76
|
+
revision, handle or proposal.
|
|
77
|
+
- Identify a declaration by its qualified address (module, feature, slice, name)
|
|
78
|
+
and load only that scope plus what it depends on. Do not keep a duplicate JSON
|
|
79
|
+
copy of the model. Bind every edit request and proposal to the revision you read.
|
|
80
|
+
|
|
81
|
+
## The loop
|
|
82
|
+
|
|
83
|
+
1. `tools/list` once per connection.
|
|
84
|
+
2. Orient cheaply: `describe-application` summary, `diagnostics`, then scoped
|
|
85
|
+
`search-declarations`, `declaration-details`, `dependencies`. Paging with
|
|
86
|
+
`offset > 0` requires `expectedSourceRevision`.
|
|
87
|
+
3. `open-workspace` and keep `revision` and `catalogRevision`. Opening writes
|
|
88
|
+
nothing. With `identityPersistence: "root-local-on-apply"` the identities file
|
|
89
|
+
is written only by `apply`.
|
|
90
|
+
4. Choose the edit route (next section). For typed edits: `syntax-schema` for the
|
|
91
|
+
node kind, then `read-ast` with `includeContent` for revision-bound handles.
|
|
92
|
+
Never invent a handle.
|
|
93
|
+
5. Propose one coherent change (a slice works best): `propose-ast` with
|
|
94
|
+
`validation: "Authoring"`, `referencePolicy: "Safe"` (`Draft` only for
|
|
95
|
+
deliberate, reported gaps), `formatting: "PreserveTrivia"` for value and mapping
|
|
96
|
+
patches, otherwise `CanonicalizeTouchedDocuments` (reprints the touched files).
|
|
97
|
+
6. Review: `read-proposal` (`view` changes, then before/after per document, then
|
|
98
|
+
`dropped-comments`), `introducedExecutableErrors`, `droppedCommentCount`. On
|
|
99
|
+
MCP-Apps hosts `visualize-model` with the `proposalId` shows Current and
|
|
100
|
+
Proposed, and its `sketch` argument previews a what-if of whole documents
|
|
101
|
+
without writing. An
|
|
102
|
+
unintended executable regression is discarded (`discard-proposal`) and
|
|
103
|
+
re-proposed. Intent the user has accepted that does not run yet (`generated`/
|
|
104
|
+
`returns`, `system`/`operation`, `eventsource`/`stream`; `PLAY0268` by design)
|
|
105
|
+
may be applied from a reviewed `Authoring` proposal: disclose the new
|
|
106
|
+
diagnostics, report V3 as not binding-ready, and never drop or stub the
|
|
107
|
+
construct. The server's own guidance is to apply such a proposal only when
|
|
108
|
+
the user accepts a model that does not run yet.
|
|
109
|
+
7. Get approval unless the user already approved this effect and target (ask again
|
|
110
|
+
only when target or consequence expands). A request or brief that names a rename,
|
|
111
|
+
move or removal is that approval, also unattended: do not ask again per apply. Then `apply` with the **before**
|
|
112
|
+
revisions. Every old handle and proposal is gone afterwards: re-read at the new
|
|
113
|
+
revision.
|
|
114
|
+
8. Verify: compile the whole folder (V1), read `executable-diagnostics` (V2,
|
|
115
|
+
V3), naming the tool and version. Hand off to the verdict vocabulary; do not
|
|
116
|
+
restate a state you did not run.
|
|
117
|
+
|
|
118
|
+
## One edit strategy
|
|
119
|
+
|
|
120
|
+
1. **Discover** what the installed server offers (`tools/list`, `repair-capabilities`).
|
|
121
|
+
2. **Prefer typed, identity-preserving operations**: `propose-rename` for renames
|
|
122
|
+
(keeps `id` pins and assigned identities, refuses on ambiguity),
|
|
123
|
+
`propose-repair`, `propose-extract-inline-event`, `propose-ast` for additions,
|
|
124
|
+
replacements, removals and moves.
|
|
125
|
+
3. **Bounded text edits** are fine only where no catalog address changes (table below). With
|
|
126
|
+
`.screenplay/identities.json`, adding, removing or renaming a declaration, a property of a
|
|
127
|
+
command, event, read model, composite type or trigger, a query, a query argument or a
|
|
128
|
+
specification changes addresses; creating, deleting, renaming or moving a mapped `.play` file
|
|
129
|
+
changes the document mappings (`IdentityMappingConflict` at reopen).
|
|
130
|
+
A text edit is **never** a way around a refusal: if a typed operation refused,
|
|
131
|
+
change the request or ask, do not retype the file.
|
|
132
|
+
4. **`id` pins alone are not enough when `.screenplay/identities.json` exists.**
|
|
133
|
+
A text rename plus an `id "<old name>"` pin protects the stored event type
|
|
134
|
+
name but leaves the identity catalog pointing at the old declaration; the next
|
|
135
|
+
`apply` can mint new identities silently. Use the identity-preserving operation.
|
|
136
|
+
5. **A session without MCP** (a subagent, or a harness with no server) carries out a
|
|
137
|
+
requested rename by text with `id "<Old>"` pins and an identity note when no
|
|
138
|
+
`.screenplay/identities.json` exists. When it exists, it does not edit
|
|
139
|
+
catalog-changing declarations by text: it returns the edit request above to the
|
|
140
|
+
owning session, and its report says first that the requested change is NOT done.
|
|
141
|
+
|
|
142
|
+
| Edit class | Examples | Route |
|
|
143
|
+
| --- | --- | --- |
|
|
144
|
+
| Address-preserving | descriptions; bodies of rules and expressions; mappings between members that already exist; any edit that adds, removes or renames no addressed element. Also every edit in a model with no `.screenplay/identities.json` except persisted names | bounded text edit of the `.play` file, then compile the folder; or `propose-ast` |
|
|
145
|
+
| Catalog-changing (identity file present) | add, remove or rename a declaration (slice, command, event, read model, projection, ...), a property of a command, event, read model, composite type or trigger, a query, a query argument or a specification; create, delete, rename or move a mapped `.play` document (McpState refuses reopening with `IdentityMappingConflict`; use document operations in `propose-ast`); rename, remove or move an event, command, read model, constraint, module, feature or slice; move declarations between files; contract evolution of a persisted event (new generation, property added, removed or retyped) | `propose-rename` or a reviewed `propose-ast`; never a blind text rename. Renaming a constraint resets its uniqueness index: ask first unless the request names it, then report the reset. A persisted event rename needs `id "OldName"` (added by default) |
|
|
146
|
+
| Repair | `PLAY0166`, `0478`, `0469`, `0471`, `0479` (and recipe-only `0397`) | `propose-repair` with `formatting` |
|
|
147
|
+
| Inline event extraction | `produces event ...` to a declared event | `propose-extract-inline-event` |
|
|
148
|
+
| Parser-invalid document | no editable handles | `propose-ast` `replace-document` with a whole typed document, or fix the text |
|
|
149
|
+
| Syntax-only constructs | `generated`/`returns`, `system`/`operation`, `eventsource`/`stream` | typed `propose-ast` edits; no automatic rename or routing repair exists |
|
|
150
|
+
|
|
151
|
+
## Identity state (`.screenplay/identities.json`)
|
|
152
|
+
|
|
153
|
+
- `apply` persists identities with the `.play` changes (probed: the file survives
|
|
154
|
+
restarts without `export-workspace`). `open-workspace` and read-only commands
|
|
155
|
+
never create it. Commit both.
|
|
156
|
+
- A model only ever edited as text has **no persisted identities** until the first
|
|
157
|
+
`apply`. Whether a first apply is the intended initialization is not documented
|
|
158
|
+
beyond "after the first apply, keep `.screenplay/identities.json`"; ask before
|
|
159
|
+
relying on it.
|
|
160
|
+
- Text-editing an identity-affecting declaration in a model that has the file
|
|
161
|
+
breaks continuity silently on the next apply. In a model without it the risk is
|
|
162
|
+
to persisted Chronicle event types (use `id` pins).
|
|
163
|
+
- Do not read the file for content (token cost); `read-workspace` with `view:
|
|
164
|
+
"semantics"` returns identity assignments, not a model summary.
|
|
165
|
+
- Apply is not crash-atomic across files: it journals its inverse first. The model
|
|
166
|
+
root must be trusted and exclusively writable during effects.
|
|
167
|
+
|
|
168
|
+
## Read-only views worth knowing
|
|
169
|
+
|
|
170
|
+
- **`source-map`** (`read-workspace`): the compiler's semantic entries ordered by
|
|
171
|
+
semantic id with `role` (Declaration or Description), identity `origin`,
|
|
172
|
+
`documentId`, `path` and an exact zero-based UTF-16 `span` plus one-based
|
|
173
|
+
line and column. `available` is true only when compilation succeeded; an empty
|
|
174
|
+
page alone is not evidence of success. Executable diagnostics have their own view.
|
|
175
|
+
- **`whenAppendedEvent`**: specification fixtures that use `when append` appear in
|
|
176
|
+
`declaration-details`, the syntax index and `find-fixtures` with the role
|
|
177
|
+
`whenAppendedEvent` (payload) and `whenAppendedEventDestination` (the `for`
|
|
178
|
+
value). References and dependencies carry that role instead of `thenEvent`, so a
|
|
179
|
+
query for `then` events does not return the appended event.
|
|
180
|
+
- **`executable-model`**: canonical ESM bytes; `modelRevision` (`rev1:<sha256>`)
|
|
181
|
+
exists only when the model binds. Without an identities file it changes when the root folder is
|
|
182
|
+
renamed (a relocation that keeps the name does not), because application identity is
|
|
183
|
+
bootstrapped from the root name. Source positions and descriptions do not change it, and a
|
|
184
|
+
file move changes it only if it changes logical placement or application identity. Do not compare it with a render manifest's revision. Do not read
|
|
185
|
+
the bytes themselves.
|
|
186
|
+
- **`implementation-requirements`**: attachments with `bodySpan`/`bodyLines`; see
|
|
187
|
+
the [MCP tool guide](mcp-tools.md#code-attachments).
|
|
188
|
+
|
|
189
|
+
## Failures (use `failureKind`, never message text)
|
|
190
|
+
|
|
191
|
+
| failureKind | Response |
|
|
192
|
+
| --- | --- |
|
|
193
|
+
| `StaleRevision`, `DiskDrift`, `IdentityStateDrift` | Reopen and re-propose |
|
|
194
|
+
| `ProposalRejected` | Read `conflicts`; change the request |
|
|
195
|
+
| `FormattingConsentRequired` | Pass `formatting` |
|
|
196
|
+
| `UnknownProposal` | The connection was reopened or the proposal applied: re-propose |
|
|
197
|
+
| `LimitExceeded` | Discard unused proposals (16 cap) |
|
|
198
|
+
| `PendingOperation`, `RecoveryRequired` | `workspace-state`, then ask before `recover-workspace` |
|
|
199
|
+
| `RootChangeRefused` | Keep the fixed root, or start a new connection |
|
|
200
|
+
| `ApplyOutcomeUnknown`, or EOF during `apply` | **Never retry `apply`.** Reconnect, read `workspace-state`, ask the user |
|
|
201
|
+
|
|
202
|
+
Never delete `.screenplay/pending.json`. Limits reject and never truncate: 512
|
|
203
|
+
files, 8 MiB total, 2 MiB per file, 1 MiB structured result, 200 items or 192 KiB
|
|
204
|
+
per page. Excluded directories: `.git`, `.ai-work`, `.screenplay`, `bin`, `obj`,
|
|
205
|
+
`node_modules`.
|
|
206
|
+
|
|
207
|
+
## Provenance
|
|
208
|
+
|
|
209
|
+
The structure of this loop (ownership, edit-request shape, failure handling) is
|
|
210
|
+
adapted from the project's earlier event-modeling toolkit draft and re-verified
|
|
211
|
+
against the Screenplay sources named above. See [provenance](provenance.md).
|
|
@@ -3,23 +3,32 @@
|
|
|
3
3
|
|
|
4
4
|
# Working with the Screenplay MCP
|
|
5
5
|
|
|
6
|
-
The supported CLI launch is `cratis screenplay mcp <model-root
|
|
7
|
-
|
|
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
|
|
9
|
+
server started with no root at all binds one on first use from `open-workspace`'s
|
|
10
|
+
`path`, the client's roots, or the working directory; that dynamic form hit the
|
|
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
|
|
8
13
|
profile-selected declaration and guidance; the CLI owns executable hosting and
|
|
9
14
|
client registration. Installation must preserve user-owned MCP servers and
|
|
10
15
|
report unsupported adapters or drift.
|
|
11
16
|
|
|
12
17
|
## Tool groups
|
|
13
18
|
|
|
14
|
-
|
|
15
|
-
|
|
19
|
+
`tools/list` returns 29 tools (30 on MCP-Apps hosts, which add `visualize-model`),
|
|
20
|
+
after `initialize` and `notifications/initialized`. Discover current argument
|
|
21
|
+
schemas with `tools/list`; do not infer arguments from these short descriptions.
|
|
22
|
+
The connection procedure, edit routes, identity state and failure handling are in
|
|
23
|
+
the [MCP loop](mcp-loop.md).
|
|
16
24
|
|
|
17
25
|
| Group | Tools | Intent |
|
|
18
26
|
| --- | --- | --- |
|
|
19
27
|
| Understanding | `describe-application`, `search-declarations`, `find-declaration`, `declaration-details` | Navigate logical hierarchy and inspect bounded details |
|
|
20
28
|
| References and examples | `find-references`, `dependencies`, `find-fixtures`, `find-assertion-gaps` | Inspect declared relationships and authored examples, not executed coverage |
|
|
21
29
|
| Source and validation | `diagnostics`, `read-document`, `merged-document`, `syntax-schema` | Read exact source or typed structure and diagnose problems |
|
|
22
|
-
| Workspace inspection | `open-workspace`, `read-workspace`, `read-ast`, `workspace-state`, `export-workspace` | Obtain current identities, handles, readiness, code attachment requirements
|
|
30
|
+
| Workspace inspection | `open-workspace`, `read-workspace`, `read-ast`, `workspace-state`, `export-workspace`, `repair-capabilities` | Obtain current identities, handles, readiness, code attachment requirements, source-map locations, durable-state status and the repair catalog |
|
|
31
|
+
| Visual (MCP-Apps hosts only) | `visualize-model` | Draw the board for the model or a `proposalId`; its `sketch` argument previews a what-if of whole documents. Reads only |
|
|
23
32
|
| Planning | `propose-ast`, `propose-rename`, `propose-repair`, `propose-extract-inline-event`, `propose`, `recommend-layout`, `expand-layout` | Produce validated, reviewable candidates without writing them |
|
|
24
33
|
| Review | `read-proposal`, `discard-proposal` | Inspect exact changes, dropped comments and proposed attachments, or abandon a connection-local proposal |
|
|
25
34
|
| Effects | `apply`, `recover-workspace` | Apply an accepted plan or explicitly recover an interrupted write |
|
|
@@ -81,6 +90,29 @@ refuse the rename. Do not promise a generation-2 payload-removal repair or a
|
|
|
81
90
|
VS Code and Monaco provide local optionality quick fixes without .NET; they do
|
|
82
91
|
not host these production-repair transactions. Use MCP for production repairs.
|
|
83
92
|
|
|
93
|
+
## Syntax-only constructs through the MCP
|
|
94
|
+
|
|
95
|
+
`generated` properties and `returns` responses, `system`/`operation`, and
|
|
96
|
+
`eventsource`/`stream` are authorable but not executable (`PLAY0268`, ESM v8, v9,
|
|
97
|
+
v10). The server reads and edits them: `declaration-details` exposes `isGenerated`
|
|
98
|
+
and a command `response` view, `route` and `streams` views; `read-workspace` offers
|
|
99
|
+
the views `event-sources`, `event-streams`, `event-source-details`,
|
|
100
|
+
`event-stream-details`, `command-routes` and `event-source-diagnostics` (detail
|
|
101
|
+
views need the exact `authoringKey` from the inventory). Each discloses
|
|
102
|
+
`executionAvailable: false`. Discover the node kinds with `syntax-schema` and edit
|
|
103
|
+
through typed `propose-ast`; there is no automatic source or stream rename and no
|
|
104
|
+
routing repair. Inline-event extraction refuses response-bearing commands.
|
|
105
|
+
|
|
106
|
+
## Source map and appended-event fixtures
|
|
107
|
+
|
|
108
|
+
`read-workspace` `view: "source-map"` pages the compiler's semantic entries (ordered
|
|
109
|
+
by semantic id) with role, identity origin, document id, path and an exact UTF-16
|
|
110
|
+
span. Compilation must have succeeded for entries to exist (`available`).
|
|
111
|
+
`find-fixtures` roles are `givenEvent`, `whenAppendedEvent`,
|
|
112
|
+
`whenAppendedEventDestination` and `thenEvent` (and others for commands and
|
|
113
|
+
queries): a `when append` payload is labeled `whenAppendedEvent`, not `thenEvent`,
|
|
114
|
+
in `declaration-details`, `find-fixtures`, references and dependencies.
|
|
115
|
+
|
|
84
116
|
## Revision and ownership rules
|
|
85
117
|
|
|
86
118
|
- A source query's `sourceRevision` binds its pages. Use `expectedSourceRevision`
|
|
@@ -93,6 +125,14 @@ not host these production-repair transactions. Use MCP for production repairs.
|
|
|
93
125
|
meaning. Rename all required fragments through the model-aware operation.
|
|
94
126
|
- IDs are opaque values. Never create replacements from similar names, paths or
|
|
95
127
|
line numbers. Keep root-local `.screenplay/identities.json` with the model.
|
|
128
|
+
- Proposals are connection-local, at most 16 outstanding, and are cleared by
|
|
129
|
+
`open-workspace`, a successful `apply` and a root change. They cannot cross
|
|
130
|
+
sessions: a non-owner returns an edit request, never a proposal id.
|
|
131
|
+
- `apply` persists identity state with the source; a text edit of an
|
|
132
|
+
identity-affecting declaration (rename, move, remove, event contract change)
|
|
133
|
+
in a model that has `identities.json` breaks continuity silently. Use
|
|
134
|
+
`propose-rename` or a reviewed `propose-ast`. `id` pins alone do not protect the
|
|
135
|
+
catalog.
|
|
96
136
|
|
|
97
137
|
## Refusals are useful information
|
|
98
138
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Copyright (c) Cratis. All rights reserved. -->
|
|
2
|
+
<!-- Licensed under the MIT license. See LICENSE file in the project root for full license information. -->
|
|
3
|
+
|
|
4
|
+
# Provenance
|
|
5
|
+
|
|
6
|
+
| Content | Source | How it is used |
|
|
7
|
+
| --- | --- | --- |
|
|
8
|
+
| `mcp-loop.md` (ownership, edit-request shape, edit routes, failure handling) | The project's own earlier event-modeling toolkit draft (MCP loop reference) | Restructured and re-verified against Screenplay v4.64.0 source and documentation; the roots-bug workaround and the identity rule (`id` pins are not enough when `identities.json` exists) were corrected or tightened |
|
|
9
|
+
| Connection facts (29/30 tools, `notifications/initialized`, 16 connection-local proposals, fixed root) | Screenplay `v4.64.0` `Source/DotNET/Screenplay.Mcp/McpToolCatalog.cs`, `McpConnection.cs`, `McpWorkspaces.cs`, `Documentation/screenplay/mcp/reference.md`, `install.md` | Read at the tag and probed against the standalone 4.64.0 tool (4.63.1 for the roots behavior) |
|
|
10
|
+
| Disposition table (personas, generated values, operations, streams, automation) | Screenplay `v4.64.0` `SemanticModelBinder.cs`, `commands.md`, `operations.md`, `event-sources.md`, `Versions.cs` | Probed through the MCP `executable-diagnostics` view of the 4.64.0 tool |
|
|
11
|
+
|
|
12
|
+
No TrogonStack or Nebulit text is reproduced here: neither covers the Screenplay
|
|
13
|
+
MCP surface.
|
|
@@ -3,13 +3,46 @@
|
|
|
3
3
|
"input": "Author and organize a Screenplay model in a repository.",
|
|
4
4
|
"fixtures": [],
|
|
5
5
|
"assertions": [
|
|
6
|
-
{
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
{
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
{
|
|
7
|
+
"kind": "skill-contains",
|
|
8
|
+
"value": "main `fd18129`"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"kind": "skill-contains",
|
|
12
|
+
"value": "Never ask the user which folder to use before trying"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"kind": "skill-contains",
|
|
16
|
+
"value": "`readiness.authoringAccepted`"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"kind": "skill-contains",
|
|
20
|
+
"value": "It follows the files"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"kind": "skill-contains",
|
|
24
|
+
"value": "view: \"repairs\""
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"kind": "skill-contains",
|
|
28
|
+
"value": "propose-repair"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"kind": "skill-contains",
|
|
32
|
+
"value": "propose-extract-inline-event"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"kind": "skill-contains",
|
|
36
|
+
"value": "eventNeverPersisted: true"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"kind": "skill-contains",
|
|
40
|
+
"value": "No automatic generation-evolution repair ships"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"kind": "skill-contains",
|
|
44
|
+
"value": "`PLAY0479`: migrate optionality spelling with `PreserveTrivia`"
|
|
45
|
+
},
|
|
13
46
|
{
|
|
14
47
|
"kind": "skill-contains",
|
|
15
48
|
"value": ".cratis/screenplay/"
|
|
@@ -69,6 +102,30 @@
|
|
|
69
102
|
{
|
|
70
103
|
"kind": "skill-contains",
|
|
71
104
|
"value": "Each level above the slices is a barrel file"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"kind": "skill-contains",
|
|
108
|
+
"value": "**Prefer a fixed root.**"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"kind": "skill-contains",
|
|
112
|
+
"value": "29 tools (30 on MCP-Apps hosts)"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"kind": "skill-contains",
|
|
116
|
+
"value": "**One edit strategy.**"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"kind": "skill-contains",
|
|
120
|
+
"value": "an `id` pin is not enough for a rename or move"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"kind": "skill-contains",
|
|
124
|
+
"value": "never a way around an MCP refusal"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"kind": "skill-contains",
|
|
128
|
+
"value": "`PLAY0282`-`PLAY0294`"
|
|
72
129
|
}
|
|
73
130
|
]
|
|
74
131
|
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
Licensed under the MIT license. See LICENSE file in the canonical Cratis/AI repository for the full license text.
|
|
3
|
+
|
|
4
|
+
Third-party notices
|
|
5
|
+
|
|
6
|
+
Parts of this skill (the phase-by-phase validation checklist, its per-check output
|
|
7
|
+
format, the anti-pattern entries, the entity and state-transition checks, the
|
|
8
|
+
field-traceability and step-contract checks and the review questions) are adapted from
|
|
9
|
+
the TrogonStack event modeling skills in https://github.com/TrogonStack/agentskills
|
|
10
|
+
(commit 7b249d3ee42d8b7e11fa564141ebd5fbc37aadf1): eventmodeling-validating-event-models-checklist,
|
|
11
|
+
eventmodeling-validating-event-models and eventmodeling-checking-completeness.
|
|
12
|
+
See references/provenance.md for the list of adapted material.
|
|
13
|
+
|
|
14
|
+
MIT License
|
|
15
|
+
|
|
16
|
+
Copyright (c) 2025 Straw Hat, LLC
|
|
17
|
+
|
|
18
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
19
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
20
|
+
in the Software without restriction, including without limitation the rights
|
|
21
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
22
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
23
|
+
furnished to do so, subject to the following conditions:
|
|
24
|
+
|
|
25
|
+
The above copyright notice and this permission notice shall be included in all
|
|
26
|
+
copies or substantial portions of the Software.
|
|
27
|
+
|
|
28
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
29
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
30
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
31
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
32
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
33
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
34
|
+
SOFTWARE.
|