@cratis/pi 7.21.0 → 7.23.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/skills/cratis-screenplay-automations-and-translations/SKILL.md +31 -15
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/audit-format.md +4 -3
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/automation-patterns.md +13 -15
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/cases-to-specify.md +4 -4
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/effects-and-idempotency.md +21 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/provenance.md +4 -2
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/todo-list-example.md +7 -4
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/verification.json +4 -4
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/SKILL.md +41 -38
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/complete-examples.md +1 -1
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/invocation-identity.md +84 -0
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/refusals-and-redelivery.md +102 -0
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/references/specifying-triggers-and-clock.md +4 -2
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/verification.json +1 -1
- package/package/corpus/skills/cratis-screenplay-command-surface/SKILL.md +57 -44
- package/package/corpus/skills/cratis-screenplay-command-surface/references/compliance.md +154 -0
- package/package/corpus/skills/cratis-screenplay-command-surface/references/context.md +57 -0
- package/package/corpus/skills/cratis-screenplay-command-surface/references/generated-values-and-responses.md +15 -13
- package/package/corpus/skills/cratis-screenplay-command-surface/references/operations.md +80 -0
- package/package/corpus/skills/cratis-screenplay-command-surface/references/policy-persona-seed.md +23 -1
- package/package/corpus/skills/cratis-screenplay-command-surface/verification.json +8 -2
- package/package/corpus/skills/cratis-screenplay-discovery/SKILL.md +19 -9
- package/package/corpus/skills/cratis-screenplay-discovery/references/interview-questions.md +1 -1
- package/package/corpus/skills/cratis-screenplay-discovery/references/storming-loop.md +6 -5
- package/package/corpus/skills/cratis-screenplay-event-modeling/SKILL.md +10 -8
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/naming-primitives.md +5 -3
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/nine-steps.md +6 -5
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/parsed-not-runnable.md +41 -49
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/SKILL.md +15 -5
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/generate-notes.md +48 -8
- package/package/corpus/skills/cratis-screenplay-model-authoring/SKILL.md +47 -42
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/language-reference.md +79 -15
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-loop.md +49 -11
- package/package/corpus/skills/cratis-screenplay-model-authoring/references/mcp-tools.md +155 -14
- package/package/corpus/skills/cratis-screenplay-model-authoring/verification.json +3 -3
- package/package/corpus/skills/cratis-screenplay-model-review/SKILL.md +19 -7
- package/package/corpus/skills/cratis-screenplay-model-review/references/anti-patterns.md +1 -1
- package/package/corpus/skills/cratis-screenplay-model-review/references/checklist.md +11 -2
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/SKILL.md +3 -3
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/completeness-self-check.md +1 -1
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/verdicts-and-modes.md +1 -1
- package/package/corpus/skills/cratis-screenplay-read-surface/SKILL.md +17 -0
- package/package/corpus/skills/cratis-screenplay-read-surface/references/guarded-actions.md +79 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +11 -9
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/gap-fill-handoff.md +6 -3
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/renderability-gate.md +1 -1
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/verification.json +2 -2
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/SKILL.md +3 -2
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/spec-forms-by-mode.md +13 -2
- package/package/corpus/skills/cratis-screenplay-slice-design/SKILL.md +13 -3
- package/package/corpus/skills/cratis-screenplay-slice-design/references/command-inventory.md +5 -3
- package/package/corpus/skills/cratis-screenplay-slice-design/references/review-questions.md +2 -1
- package/package/corpus/skills/cratis-screenplay-slice-design/references/rule-layers.md +4 -3
- package/package/corpus/skills/cratis-screenplay-slice-design/references/slicing.md +40 -0
- package/package/corpus/skills/cratis-screenplay-specifications/SKILL.md +24 -16
- package/package/corpus/skills/cratis-screenplay-specifications/references/examples-and-routes.md +111 -0
- package/package/corpus/skills/cratis-screenplay-specifications/references/reactions-and-cascades.md +5 -6
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +22 -8
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/chronicle-boundaries.md +8 -4
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/consistency-and-concurrency.md +10 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/stream-patterns.md +13 -2
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/streams-example.md +3 -3
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/verification.json +2 -2
- package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +44 -35
- package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet-example.md +3 -3
- package/package/corpus/skills/cratis-screenplay-toolchain/references/cheat-sheet.md +58 -2
- package/package/corpus/skills/cratis-screenplay-toolchain/references/diagnostics.md +128 -10
- package/package/corpus/skills/cratis-screenplay-toolchain/references/doc-contradictions.md +13 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/executable-subset.md +37 -13
- package/package/corpus/skills/cratis-screenplay-toolchain/references/provenance.md +10 -2
- package/package/corpus/skills/cratis-screenplay-toolchain/references/renderable-subset.md +23 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/sources-and-streams.md +111 -27
- package/package/corpus/skills/cratis-screenplay-toolchain/references/traps.md +27 -6
- package/package/corpus/skills/cratis-screenplay-toolchain/references/verdicts.md +34 -16
- package/package/corpus/skills/cratis-screenplay-toolchain/references/versions.md +98 -136
- package/package/corpus/skills/cratis-screenplay-toolchain/verification.json +13 -5
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/screen-composition-contract.md +20 -0
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/SKILL.md +10 -6
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/references/admission.md +8 -1
- package/package/corpus/skills/cratis-stage-rendering-and-sandbox/verification.json +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,80 @@
|
|
|
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
|
+
# Systems and operation intent
|
|
5
|
+
|
|
6
|
+
## Contents
|
|
7
|
+
|
|
8
|
+
- Declare and produce
|
|
9
|
+
- Phases and ordered work
|
|
10
|
+
- Specification intent
|
|
11
|
+
|
|
12
|
+
## Declare and produce
|
|
13
|
+
|
|
14
|
+
A top-level `system` names an external business system. A slice-owned `operation`
|
|
15
|
+
declares exactly one `uses <System>`, typed inputs, optional description and
|
|
16
|
+
execute/compensate phases. Operations and their specification steps are
|
|
17
|
+
**authoring-only** at Screenplay 4.125.0: compile acceptance is not execution;
|
|
18
|
+
binding refuses the whole model with PLAY0268. Source: released `operations.md`.
|
|
19
|
+
|
|
20
|
+
`produces operation <Name>` declares an inline slice-owned operation with typed
|
|
21
|
+
input mappings. Plain `produces <Name>` references an existing event or operation;
|
|
22
|
+
it never creates one from a typo. Event and operation names share resolution:
|
|
23
|
+
collisions/ambiguity refuse, not event-first guessing. Standalone operation
|
|
24
|
+
references can be qualified across slices; that does not broaden event-production
|
|
25
|
+
grammar. Operations are produced by commands, not reactions, and take no `for`,
|
|
26
|
+
tags or event routing metadata. Inputs cannot be identifier/generated properties.
|
|
27
|
+
|
|
28
|
+
## Phases and ordered work
|
|
29
|
+
|
|
30
|
+
Keep mixed event/operation productions in their authored sequence. The intended
|
|
31
|
+
future transaction contract enrolls events first, executes operations in authored
|
|
32
|
+
order before commit, and compensates according to commit disposition. It does
|
|
33
|
+
not promise reverse compensation order, rollback or post-commit delivery.
|
|
34
|
+
|
|
35
|
+
Each phase accepts a description and one direct file/tagged body or an
|
|
36
|
+
`implementation` wrapper with ordered nonblank hints and optional source.
|
|
37
|
+
Direct/wrapped sources cannot mix; duplicate phases/payloads refuse.
|
|
38
|
+
Description-only/hints-only phases are pending intent, not executable code.
|
|
39
|
+
Typed `execute Type` remains an input; bare `execute` opens a phase. Escape an
|
|
40
|
+
input named uses as `@uses`, and event-metadata input names where needed.
|
|
41
|
+
No automatic operation extraction ships: moving an inline declaration manually
|
|
42
|
+
must preserve its production sequence, mappings, comments and attachment paths.
|
|
43
|
+
|
|
44
|
+
## Specification intent
|
|
45
|
+
|
|
46
|
+
This complete authoring-only model compiles with `--warnaserror` at 4.125.0.
|
|
47
|
+
`screenplay test` intentionally returns exit 3/unbound with PLAY0268; it proves
|
|
48
|
+
no failure/compensation behavior today:
|
|
49
|
+
|
|
50
|
+
```screenplay
|
|
51
|
+
system Accounting
|
|
52
|
+
concept ProjectId : Uuid
|
|
53
|
+
module Projects
|
|
54
|
+
feature Registration
|
|
55
|
+
slice StateChange Register
|
|
56
|
+
operation OpenCostCenter
|
|
57
|
+
uses Accounting
|
|
58
|
+
projectId ProjectId
|
|
59
|
+
execute
|
|
60
|
+
description "Open a provisional cost center"
|
|
61
|
+
compensate
|
|
62
|
+
description "Close it if registration does not commit"
|
|
63
|
+
command RegisterProject
|
|
64
|
+
projectId ProjectId identifier
|
|
65
|
+
produces OpenCostCenter
|
|
66
|
+
projectId = projectId
|
|
67
|
+
specification Compensating
|
|
68
|
+
given operation OpenCostCenter fails
|
|
69
|
+
when RegisterProject
|
|
70
|
+
projectId = "3fa85f64-5717-4562-b3fc-2c963f66afa6"
|
|
71
|
+
then operation OpenCostCenter
|
|
72
|
+
projectId = "3fa85f64-5717-4562-b3fc-2c963f66afa6"
|
|
73
|
+
then compensated OpenCostCenter
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
`given operation ... fails` and `then compensated ...` are leaves. A requested
|
|
77
|
+
`then operation` can state a partial input subset, with unique fields and
|
|
78
|
+
compatible concrete values. References resolve against declared operations;
|
|
79
|
+
compensation intent needs a declared compensate phase. Provider execution is a
|
|
80
|
+
separate future admission, never implied by a source fixture.
|
package/package/corpus/skills/cratis-screenplay-command-surface/references/policy-persona-seed.md
CHANGED
|
@@ -20,7 +20,7 @@ persona Accountant
|
|
|
20
20
|
policy IsAccountant
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
Condition atoms: `authenticated`, `role "<name>"`, and
|
|
24
24
|
`claim "<name>" matches subject | "<value>" | <path>`. A policy has **exactly one**
|
|
25
25
|
`require` line — continue the condition on deeper-indented lines instead of adding
|
|
26
26
|
a second (`PLAY0441`) — **or** one implementation (a tagged ` ```csharp ` block or
|
|
@@ -29,6 +29,28 @@ runner; a code policy binds as opaque ESM v3 and needs a target to evaluate it.
|
|
|
29
29
|
A `persona` is authoring metadata: the binder reports it as information `PLAY0270`
|
|
30
30
|
(report-only) and it does not block binding; an unknown policy it lists is an error.
|
|
31
31
|
|
|
32
|
+
## Policy negation
|
|
33
|
+
|
|
34
|
+
At Screenplay 4.125.0, `not <condition>` is a portable ESM v7 policy-condition
|
|
35
|
+
form (decision 0027), not a named-policy operator in `authorize`. It can negate
|
|
36
|
+
atoms/groups, not an opaque inline/file implementation. Precedence is `not`,
|
|
37
|
+
then `and`, then `or`; parentheses override grouping. Double negation restores
|
|
38
|
+
a known value, not an unknown target.
|
|
39
|
+
|
|
40
|
+
Missing caller claims compared to a known text target have no match (false),
|
|
41
|
+
so their negation is true. A missing/null/non-text comparison target or absent
|
|
42
|
+
subject is instead **unknown**. `not unknown` stays unknown; final unknown denies.
|
|
43
|
+
Kleene combinations preserve known decisive values: true OR unknown is true,
|
|
44
|
+
false AND unknown is false; false OR unknown and true AND unknown stay unknown.
|
|
45
|
+
`not role "Service"` alone does not require authentication: retain an explicit
|
|
46
|
+
`authenticated` condition when a signed-in caller is required.
|
|
47
|
+
|
|
48
|
+
Opaque predicates reached in authored short-circuit order return unsupported,
|
|
49
|
+
never false or permission under negation. Binding warns with PLAY0546 when a
|
|
50
|
+
negated claim's target is optional, non-string, or a subject without a command
|
|
51
|
+
identifier. This C# semantic check does not come from ordinary editor validation.
|
|
52
|
+
Source: `v4.125.0:Documentation/screenplay/policies.md`.
|
|
53
|
+
|
|
32
54
|
## `seed`
|
|
33
55
|
|
|
34
56
|
Excerpt: `CustomerRegistered` is declared in a slice.
|
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
"input": "Declare a Screenplay command with validation, authorization, a uniqueness constraint and a state-dependent rule.",
|
|
4
4
|
"fixtures": [],
|
|
5
5
|
"assertions": [
|
|
6
|
+
{ "kind": "skill-contains", "value": "PLAY0653" },
|
|
7
|
+
{ "kind": "skill-contains", "value": "personal` is an alias of `pii", "file": "references/compliance.md" },
|
|
8
|
+
{ "kind": "skill-contains", "value": "report-only (PLAY0270)", "file": "references/compliance.md" },
|
|
9
|
+
{ "kind": "skill-contains", "value": "--check purposes", "file": "references/compliance.md" },
|
|
10
|
+
{ "kind": "skill-contains", "value": "PLAY0633–0646", "file": "references/context.md" },
|
|
11
|
+
{ "kind": "skill-contains", "value": "The block is **authoring metadata**", "file": "references/context.md" },
|
|
6
12
|
{ "kind": "skill-contains", "value": "main `fd18129`" },
|
|
7
13
|
{ "kind": "skill-contains", "value": "produces event ProjectRenamed", "file": "references/inline-events.md" },
|
|
8
14
|
{ "kind": "skill-contains", "value": "name ProjectName = name", "file": "references/inline-events.md" },
|
|
@@ -75,13 +81,13 @@
|
|
|
75
81
|
},
|
|
76
82
|
{
|
|
77
83
|
"kind": "skill-contains",
|
|
78
|
-
"value": "
|
|
84
|
+
"value": "streams and command/specification routes instead bind and reference-execute as", "file": "references/generated-values-and-responses.md"
|
|
79
85
|
},
|
|
80
86
|
{ "kind": "skill-contains", "value": "Generated values and responses (ESM v7)" },
|
|
81
87
|
{ "kind": "skill-contains", "value": "A generated value is not a request input", "file": "references/generated-values-and-responses.md" },
|
|
82
88
|
{ "kind": "skill-contains", "value": "(`PLAY0273`), and a concept with any validation rule cannot back a\n generated property (`PLAY0268`)", "file": "references/generated-values-and-responses.md" },
|
|
83
89
|
{ "kind": "skill-contains", "value": "A response exists only on acceptance", "file": "references/generated-values-and-responses.md" },
|
|
84
|
-
{ "kind": "skill-contains", "value": "
|
|
90
|
+
{ "kind": "skill-contains", "value": "STAGE-ESM-028/029", "file": "references/generated-values-and-responses.md" },
|
|
85
91
|
{ "kind": "skill-contains", "value": "4.68.0" }
|
|
86
92
|
]
|
|
87
93
|
}
|
|
@@ -48,12 +48,13 @@ Statements here were checked at those tags:
|
|
|
48
48
|
|
|
49
49
|
| Fact used here | Source |
|
|
50
50
|
| --- | --- |
|
|
51
|
-
| Persona syntax, report-only, policies must be declared
|
|
51
|
+
| Persona syntax, report-only, policies must be declared | Screenplay `v4.66.0:Documentation/screenplay/personas.md` |
|
|
52
|
+
| Description order; authored/import board order and order-preserving MCP layouts | Screenplay `v4.125.0:Documentation/screenplay/grammar.md`, `folders.md`, `imports.md` |
|
|
52
53
|
| Single-line and fenced `description` (`FencedText`) | `v4.66.0:Documentation/screenplay/slices.md#descriptions`, `grammar.md:1084-1088` |
|
|
53
54
|
| `<Type>[]`, shapes must be declared; `@pii` and `reason` on concepts | `v4.66.0:Documentation/screenplay/events.md`, `concepts.md` |
|
|
54
55
|
| `then denied`, `given caller`, `then error` | `v4.66.0:Documentation/screenplay/specifications.md` |
|
|
55
56
|
| PII on an event-source id is rejected by Chronicle (CHR0034); nullable event properties warn (CHR0012) | Chronicle `v19.32.0:Source/Clients/DotNET.CodeAnalysis/DiagnosticIds.cs` |
|
|
56
|
-
| Any `@pii` or `@sensitive` on a concept fails binding (PLAY0268) | `v4.66.0:Source/DotNET/Screenplay/Semantics/SemanticModelBinder.Concepts.cs:21-24` |
|
|
57
|
+
| Any `@pii` or `@sensitive` on a concept fails binding (PLAY0268) at 4.66.0; current markers are in `cratis-screenplay-command-surface` | `v4.66.0:Source/DotNET/Screenplay/Semantics/SemanticModelBinder.Concepts.cs:21-24` |
|
|
57
58
|
|
|
58
59
|
Every complete `screenplay` fence in this skill compiles with the standalone compiler
|
|
59
60
|
4.68.0 (`--warnaserror`) and with `cratis screenplay validate --warnings-as-errors` 3.28.2.
|
|
@@ -122,8 +123,15 @@ decided apart from what you assumed. Never guess silently.
|
|
|
122
123
|
two business facts that make it meaningful. A simple state transition may carry no payload
|
|
123
124
|
beyond its identity: do not pad events with fields just to reach a count. Domain names; `<Type>[]` for collections (declare the `type`); a
|
|
124
125
|
`concept` for a value with its own meaning; classify personal data on the concept with
|
|
125
|
-
|
|
126
|
-
|
|
126
|
+
bare `pii` and a reason now; operational secrets use `secret` (4.127.0).
|
|
127
|
+
Either blocks binding (PLAY0268); record the gap, never drop protection.
|
|
128
|
+
Ask what use, lawful basis, retention, recipient/transfer and erasure needs the
|
|
129
|
+
data serves; declare those in a `purpose`, not a concept reason. Special/criminal
|
|
130
|
+
qualifiers describe the value, not legal permission. See command-surface
|
|
131
|
+
`references/compliance.md` for purpose coverage checks and the processing record.
|
|
132
|
+
For who-is-calling details, distinguish token claims from a keyed single-result
|
|
133
|
+
identity-source query or opaque implementation. The `identity` block is metadata;
|
|
134
|
+
executable detail reads remain unsupported. See `references/context.md` in command-surface.
|
|
127
135
|
7. **Validate, gate, hand off.** After a coherent batch of edits (not every sentence) run V1
|
|
128
136
|
with the tool and version named (`cratis-screenplay-toolchain`). Stop storming a workflow
|
|
129
137
|
when the user says it is complete or both closing questions return nothing new; unattended,
|
|
@@ -136,12 +144,14 @@ decided apart from what you assumed. Never guess silently.
|
|
|
136
144
|
- Slice types are a closed set: `StateChange`, `StateView`, `Automation`, `Translate`. In
|
|
137
145
|
discovery an event lives in the `StateChange` slice that will produce it, named after the
|
|
138
146
|
probable command; a slice with only an `event` compiles.
|
|
139
|
-
- A `persona` names declared policies only (unknown policy = error); `description`
|
|
140
|
-
|
|
147
|
+
- A `persona` names declared policies only (unknown policy = error); `description` appears
|
|
148
|
+
at most once, anywhere in its body.
|
|
141
149
|
- Declare each event once in the whole application; other slices refer to it by name.
|
|
142
|
-
-
|
|
143
|
-
|
|
144
|
-
|
|
150
|
+
- Boards keep authored declaration and import order: imports expand depth-first, glob
|
|
151
|
+
matches alphabetically. Unimported folder files remain visible after ranked siblings.
|
|
152
|
+
MCP `expand-layout` preserves this order with import barrels; an import-less
|
|
153
|
+
`PlayFileWriter.Expand` layout falls back to path order. Order is presentation, not
|
|
154
|
+
execution or identity. Keep causes and branches in the feature `description` and STATE.md.
|
|
145
155
|
- A misspelt keyword inside a slice is only warning PLAY0029 and the block disappears: always
|
|
146
156
|
validate with warnings as errors.
|
|
147
157
|
|
|
@@ -21,7 +21,7 @@ assumption you take instead of asking.
|
|
|
21
21
|
| Outside | Which outside parties or systems send or receive information here? | Later translations and contracts | they send facts we rely on: ask how we recognise which of our records it concerns |
|
|
22
22
|
| Corrections | Can a recorded fact turn out wrong? How is it put right today? | Correction and reversal events instead of edits | "we just edit it": ask who needs to know it was changed |
|
|
23
23
|
| History | What would an auditor, a regulator or an angry customer ask to see later? | Finds facts that look like detail but must be kept | a calculation must be shown later: treat it as a fact |
|
|
24
|
-
| People's data | Which values identify or describe a person?
|
|
24
|
+
| People's data | Which values identify or describe a person? For what use, basis, retention, recipients/transfers and erasure exceptions? | bare `pii` on concepts; purpose declarations separate from reasons | special/criminal data needs declared safeguards; two people in one fact may need separate facts |
|
|
25
25
|
| Volume | How often does this happen, and how long does one instance live? | Informs stream design later; never a reason to drop a fact | an instance lives for years: note it for stream review |
|
|
26
26
|
| Input | What do we have to go on: written rules, a rough list, word of mouth, a running system? | Sets how hard to sweep | only word of mouth: run every sweep lens |
|
|
27
27
|
| Who decides | Who has the final word on what this means for the business? | Separates decisions from assumptions | no one present: mark meaning as assumption to confirm |
|
|
@@ -29,7 +29,7 @@ then reports what changed and asks one question. The user should always be able
|
|
|
29
29
|
| rename | better business name for an existing fact | identity-affecting once persisted: see SKILL.md |
|
|
30
30
|
| split | one name was covering two facts | keep the original if it is persisted; add the second |
|
|
31
31
|
| merge | two names for one fact | only when they truly mean the same thing |
|
|
32
|
-
| reorder | the story order changed | update the feature `description`/STATE.md
|
|
32
|
+
| reorder | the story order changed | change declaration/import order for the board; update the feature `description`/STATE.md for causes and branches |
|
|
33
33
|
| drop | not a fact after all | record why in STATE.md |
|
|
34
34
|
| none | already modeled | say so briefly |
|
|
35
35
|
|
|
@@ -65,10 +65,11 @@ open, start the sweep (`divergent-sweep.md`).
|
|
|
65
65
|
## A discovery skeleton
|
|
66
66
|
|
|
67
67
|
What a model looks like after the first workflow has been stormed: no commands, read models
|
|
68
|
-
or screens yet. Slices are named after the command expected to produce each event
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
or screens yet. Slices are named after the command expected to produce each event. At
|
|
69
|
+
Screenplay 4.125.0, boards use authored declaration/import order, and MCP `expand-layout`
|
|
70
|
+
preserves it with imports. An import-less `PlayFileWriter.Expand` layout still falls back to
|
|
71
|
+
path order. Order is presentation only; the feature `description` records causes and branches.
|
|
72
|
+
Persona `description` text holds Does / Reads / Cannot on one quoted line here; the multi-line fenced
|
|
72
73
|
form is in `personas-and-causes.md`.
|
|
73
74
|
|
|
74
75
|
```screenplay
|
|
@@ -53,7 +53,7 @@ Framework repositories and brownfield work that has not opted in stay code-first
|
|
|
53
53
|
handlers, adapters, and scope Stage cannot render yet (the model stays the contract).
|
|
54
54
|
- **Never:** use code as a shortcut around the model; change the model to match
|
|
55
55
|
existing code; edit Stage-managed output; leave a modeled rule living only in
|
|
56
|
-
code; weaken protection (authorization,
|
|
56
|
+
code; weaken protection (authorization, `pii`, rules) so a model compiles or renders.
|
|
57
57
|
|
|
58
58
|
**2. Run the lifecycle.** Load `cratis-screenplay-modeling-lifecycle` for modes, the
|
|
59
59
|
independent verdicts V1-V5, the P0-P9 phases with their gates, stop-or-assume,
|
|
@@ -131,14 +131,16 @@ What binds depends on **which tool** you ask, so name the tool and its version:
|
|
|
131
131
|
- `reads` and `concurrency` on a command do not bind (`PLAY0271`), so no decision is
|
|
132
132
|
protected against stale state. A reaction trigger's `reads` that only `invokes` is
|
|
133
133
|
report-only intent (`PLAY0270`); one that `produces` directly fails binding (`PLAY0268`).
|
|
134
|
-
- `persona` declarations are report-only and never block;
|
|
134
|
+
- `persona` declarations are report-only and never block; bare `pii` and `secret`
|
|
135
135
|
concepts do block binding (`PLAY0268`). Keep them anyway: the classification is
|
|
136
136
|
part of the model. Report the block.
|
|
137
|
-
- Generated values
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
137
|
+
- Generated values/responses bind and reference-execute as v7; sources, streams
|
|
138
|
+
and command/specification routes as v8; reaction `runs as` identity as v10 on
|
|
139
|
+
standalone 4.125.0. Use `screenplay test` or MCP `run-specifications` for V4.
|
|
140
|
+
Operations/systems, exact numbers and refusal/redelivery remain unadmitted.
|
|
141
|
+
CLI 3.41.0 bundles older syntax and renders through v7 only: its parser rejects
|
|
142
|
+
`runs as`, and Stage refuses generated values/responses with STAGE-ESM-028/029.
|
|
143
|
+
Source/binding admission and target realization are separate gates.
|
|
142
144
|
|
|
143
145
|
The ESM versions, the full disposition table and the Step 7 clock example's binding
|
|
144
146
|
result are in [references/parsed-not-runnable.md](references/parsed-not-runnable.md)
|
|
@@ -241,7 +243,7 @@ compile or will not be safe. Both are deliberate.
|
|
|
241
243
|
## Naming the primitives is the highest-value work
|
|
242
244
|
|
|
243
245
|
Name concepts before events, classify personal data at the concept, keep events past tense and single-purpose, and never put the event-source identity in an event payload.
|
|
244
|
-
Read [references/naming-primitives.md](references/naming-primitives.md) when declaring concepts,
|
|
246
|
+
Read [references/naming-primitives.md](references/naming-primitives.md) when declaring concepts, `pii` classification, event shapes, `identifier`, inline events or `id "<old name>"` pins.
|
|
245
247
|
|
|
246
248
|
## Quick gate - before specifications are called done
|
|
247
249
|
|
package/package/corpus/skills/cratis-screenplay-event-modeling/references/naming-primitives.md
CHANGED
|
@@ -5,10 +5,12 @@
|
|
|
5
5
|
`Decimal`, `Bool`, `Date` and `DateTime`; `Enum` is a separate concept kind,
|
|
6
6
|
with its values indented beneath.
|
|
7
7
|
- **Classify personal data at the concept**, with a reason:
|
|
8
|
-
`concept PersonName : String
|
|
8
|
+
`concept PersonName : String pii` plus an indented `pii reason "..."`. Every
|
|
9
9
|
usage inherits it; a reason for an attribute the concept does not declare is an
|
|
10
|
-
error. Decide this before fixing event shapes
|
|
11
|
-
|
|
10
|
+
error. Decide this before fixing event shapes; purpose/basis/retention belong in
|
|
11
|
+
processing-purpose declarations, not a reason. An event subject defaults to the
|
|
12
|
+
source unless supplied; the trailing event-property `subject` mark is report-only
|
|
13
|
+
at 4.127.0, not runtime lineage. See command-surface `references/compliance.md`.
|
|
12
14
|
- **Events are past tense and self-describing** - `InvoiceRegistered`, never
|
|
13
15
|
`Created`. One purpose per event; an event needing an optional property to cover
|
|
14
16
|
two situations is two events.
|
|
@@ -32,8 +32,8 @@ module Invoicing
|
|
|
32
32
|
description "Registering and managing the lifecycle of invoices"
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
`description` is
|
|
36
|
-
|
|
35
|
+
`description` is optional on a module, feature, slice, persona or command;
|
|
36
|
+
at most one, anywhere in its body. Use a fenced block tagged ` ```text ` when one line
|
|
37
37
|
is not enough (a bare fence warns with `PLAY0397`).
|
|
38
38
|
|
|
39
39
|
## Step 2 — Brainstorm events
|
|
@@ -59,9 +59,10 @@ Phase skill: `cratis-screenplay-discovery`.
|
|
|
59
59
|
Arrange into the timeline — the plot. *"What happens first? And then what
|
|
60
60
|
happens?"* Identify the happy path **and** the alternative and error paths.
|
|
61
61
|
|
|
62
|
-
**Output:** the
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
**Output:** the authored declaration/import order for the board, with causes
|
|
63
|
+
and branches documented. Screenplay 4.125.0 MCP layouts preserve this presentation
|
|
64
|
+
order with imports; an import-less `PlayFileWriter.Expand` layout uses path order.
|
|
65
|
+
Timeline position does not impose execution order or change identities.
|
|
65
66
|
|
|
66
67
|
## Step 4 — Create wireframes
|
|
67
68
|
|
package/package/corpus/skills/cratis-screenplay-event-modeling/references/parsed-not-runnable.md
CHANGED
|
@@ -1,63 +1,55 @@
|
|
|
1
1
|
# Parsed is not runnable: ESM versions and dispositions
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
`
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
Current evidence: Screenplay v4.125.0 `SemanticModelBinder.cs`, `Versions.cs`,
|
|
4
|
+
`Documentation/screenplay/{commands,operations,event-sources,reactions,tool}.md`.
|
|
5
|
+
The binder selects v8 for event routes and v10 for declared reaction identity.
|
|
6
|
+
Pins and consumer boundaries: toolchain `references/versions.md`.
|
|
7
7
|
|
|
8
8
|
## Which ESM version a model needs
|
|
9
9
|
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
absence assertions (`then no readmodel`).
|
|
20
|
-
- **v6** for reactions, captures, application triggers and the clock (and so `Automation` and
|
|
21
|
-
`Translate` slices).
|
|
22
|
-
- **v7** for generated command properties, `returns` responses, generated fixtures and `then returns`
|
|
23
|
-
expectations, and only when one is used (standalone 4.68.0 or later; decision 0026).
|
|
24
|
-
- Operations, event sources and streams, decision reads and exact numbers are **not admitted by any
|
|
25
|
-
supported ESM version**; they have no number until a release-ready admission (decision 0025).
|
|
10
|
+
- v1 by default; v2 for typed event-source facts and admitted occurrence/audit mappings.
|
|
11
|
+
- v3 for opaque code requirements. Reference execution cannot execute their bodies.
|
|
12
|
+
- v4 for event-contract lineage; v5 for keyed read-model absence assertions.
|
|
13
|
+
- v6 for admitted reactions, captures, application triggers and clock.
|
|
14
|
+
- v7 for generated command values, responses, fixtures/return assertions and policy negation.
|
|
15
|
+
- v8 for sources/streams and command/specification routes.
|
|
16
|
+
- v9 for public-event contracts; v10 for reaction `runs as system` identity.
|
|
17
|
+
- Operations/systems, exact numeric mode and refusal/redelivery remain unadmitted
|
|
18
|
+
(PLAY0268). Version allocation is not inferred from an older planning decision.
|
|
26
19
|
|
|
27
20
|
## Dispositions to keep apart
|
|
28
21
|
|
|
29
|
-
| Construct |
|
|
30
|
-
| --- | --- |
|
|
31
|
-
| `persona
|
|
32
|
-
|
|
|
33
|
-
|
|
|
34
|
-
|
|
|
35
|
-
|
|
|
36
|
-
|
|
|
37
|
-
| Generated
|
|
38
|
-
|
|
|
39
|
-
|
|
|
40
|
-
|
|
|
41
|
-
| UI
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
22
|
+
| Construct | Current standalone disposition |
|
|
23
|
+
| --- | --- |
|
|
24
|
+
| `persona`, domain/authentication metadata | Report-only; unknown named policies remain source defects |
|
|
25
|
+
| Compliance concepts | Bare `pii`/`secret` (4.127.0); binding still refuses PLAY0268, never remove protection |
|
|
26
|
+
| Identity details / processing purposes / event subject | Report-only metadata (4.127.0); executable detail reads refuse PLAY0268, not source declaration errors |
|
|
27
|
+
| Composite stream ids | v8 routing; complete named parts/canonical comparisons, PLAY0515 refuses protected keys/sources; not a legacy text split |
|
|
28
|
+
| Command reads/concurrency | Legacy unprotected decisions, PLAY0271 |
|
|
29
|
+
| Invokes-only trigger reads | Report-only, not protected state; direct production with reads refuses |
|
|
30
|
+
| Generated values/responses | v7 binding/reference execution; Stage 4.51.3 member refusals STAGE-ESM-028/029 |
|
|
31
|
+
| Sources/streams and command/specification routes | v8 binding/reference execution; CLI 3.41.0 render boundary is v7 |
|
|
32
|
+
| Declared reaction invocation actor | v10 binding/reference execution; older CLI parser PLAY0137; Stage planner refuses v10 |
|
|
33
|
+
| Operations/systems, exact numbers, refusal/redelivery | Source accepted; whole binding refuses PLAY0268 |
|
|
34
|
+
| UI | Authoring/deferred metadata; runtime support is a separate consumer contract |
|
|
35
|
+
|
|
36
|
+
Run standalone `screenplay test` or MCP `run-specifications` for V4. Compile
|
|
37
|
+
success alone is not execution; unbound/unsupported is not passed. Preserve
|
|
38
|
+
source that a narrower renderer cannot realize and report the addressed gap.
|
|
39
|
+
Routing and actor checked examples: toolchain `references/sources-and-streams.md`
|
|
40
|
+
and captures-and-reactions `references/invocation-identity.md`.
|
|
46
41
|
|
|
47
42
|
## The Step 7 clock example
|
|
48
43
|
|
|
49
|
-
The complete example in [nine-steps.md](nine-steps.md) (Step 7)
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
(Screenplay 4.60.1, ESM v1 to v5) compiled it but rejected the Automation slice at binding. Report reaction
|
|
55
|
-
specifications as authored, not as run, unless a V4 run says otherwise.
|
|
44
|
+
The complete example in [nine-steps.md](nine-steps.md) (Step 7) had historical
|
|
45
|
+
4.66.0 compile/binding evidence (zero errors/warnings, executableReady true).
|
|
46
|
+
Its invokes-only reads still record intent rather than execute the overdue
|
|
47
|
+
selection. Run its admitted specifications with the current reference route
|
|
48
|
+
before claiming a V4 pass; no overdue-selection proof follows from binding.
|
|
56
49
|
|
|
57
50
|
## Decision 0006 and shipped generations
|
|
58
51
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
decision as implemented: check the construct's own page and the versions table.
|
|
52
|
+
Trigger reads do not enforce decision consistency. Event generations and typed repairs now ship,
|
|
53
|
+
but historical schemas do not supply deployed migrations.
|
|
54
|
+
Check actual binder, runner and consumer admission instead of equating an
|
|
55
|
+
accepted decision or parsed node with a running application.
|
|
@@ -44,7 +44,7 @@ v19.32.0): `cratis-screenplay-toolchain` `references/versions.md`. Checked at th
|
|
|
44
44
|
| `prologue start` is an interactive wizard that writes `cratis-prologue.json`; `interpret` resolves its language model from the Prologue file, then the global CLI configuration (cli#241 open) | cli `v3.28.2:Source/Cli/Commands/Prologue/{StartPrologueCommand,LlmOptionsResolver}.cs`, `Documentation/reference/prologue.md` |
|
|
45
45
|
| Extractor effects (CDC enable, publication and replication slot), POST/PUT/DELETE only, 2 s correlation window, interpret payload (uncapped model outline and names, observed lists capped at 50, schema tables capped per schema observation), existing slot/publication reused; cleanup missing (Prologue#37) | Prologue `ad4bbe7:Source/Extractor/Sources/**`, `Source/Configuration/*`, `Source/Interpretation/EvidenceFormatter.cs` |
|
|
46
46
|
| `then error`, `then denied`, `unique ... released by` | Screenplay `v4.66.0:Documentation/screenplay/{specifications,constraints}.md` |
|
|
47
|
-
|
|
|
47
|
+
| MCP semantic-diff compares canonical workspace exports; structural comparison is not execution equivalence | Screenplay `v4.125.0:Documentation/screenplay/mcp/reference.md` |
|
|
48
48
|
|
|
49
49
|
Every complete `screenplay` fence here compiles with the standalone compiler 4.68.0 (`--warnaserror`) and
|
|
50
50
|
`cratis screenplay validate --warnings-as-errors` 3.28.2.
|
|
@@ -153,7 +153,15 @@ chain per slice before handoff (evidence template); never manufacture references
|
|
|
153
153
|
in the model today**, target named; a unique index with business meaning becomes
|
|
154
154
|
`unique ... on <every event that sets it>` with `released by`
|
|
155
155
|
(`references/rule-modeling.md`);
|
|
156
|
-
-
|
|
156
|
+
- preserve personal-data/secret protection and authorization found in code,
|
|
157
|
+
using bare `pii` / `secret` (4.127.0); deprecated marker repairs keep legal
|
|
158
|
+
notes intact, never guess a purpose or basis. Derive purpose/use/retention
|
|
159
|
+
declarations only from evidence or expert decisions; run `--check purposes`
|
|
160
|
+
and inspect the processing record as prompts, not a legal verdict. Keep
|
|
161
|
+
hand-joined legacy ids scalar; never infer composite parts by splitting text.
|
|
162
|
+
Event `subject` is report-only; distinguish observed lineage from runtime
|
|
163
|
+
realization. See command-surface `references/compliance.md`.
|
|
164
|
+
Every role gate has `authorize`
|
|
157
165
|
plus a `then denied` spec, else a recorded gap; rules you cannot express truthfully are
|
|
158
166
|
recorded one by one, never fabricated.
|
|
159
167
|
3. Cite evidence ids in each slice `description` ("Evidence: E3, E7"). Read `references/intent-example.md` when authoring the intentional candidate to check the complete example of evidence citations, re-slicing, constraints, authorization and recorded state-dependent rules.
|
|
@@ -191,9 +199,11 @@ handoff packet appended, first line `Outcome:`; no prose reports in the model ro
|
|
|
191
199
|
ask again only when target or consequence expands): capture setup and Extractor runs, traffic
|
|
192
200
|
re-routing, load or scenario runs that write data, cleanup DDL, hosted language-model use.
|
|
193
201
|
Production needs DBA sign-off (`rules/capability-is-not-authority.md`).
|
|
194
|
-
- No claims of equivalence
|
|
195
|
-
|
|
196
|
-
|
|
202
|
+
- No claims of execution equivalence from structure. MCP `semantic-diff` compares
|
|
203
|
+
same-application canonical exports with authoritative catalogs; it does not guess
|
|
204
|
+
rename continuity, run specifications or prove recovered behavior. Inspect
|
|
205
|
+
incomplete sections and exclusions before using the result in the loss report.
|
|
206
|
+
- Never weaken protection (authorization, `pii`, rules) to make the candidate compile.
|
|
197
207
|
|
|
198
208
|
## Gate
|
|
199
209
|
|
package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/generate-notes.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# `cratis screenplay generate` notes
|
|
2
2
|
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- Command
|
|
6
|
+
- Preconditions
|
|
7
|
+
- Coverage (what a provider reads)
|
|
8
|
+
- Diagnostics are the loss list
|
|
9
|
+
- Arc recovery and authoring-only options
|
|
10
|
+
- Reading the output cheaply
|
|
11
|
+
|
|
3
12
|
Flags verified with `cratis screenplay generate --help` on the version recorded in
|
|
4
13
|
cratis-screenplay-toolchain `references/versions.md`; behaviour from the cratis CLI
|
|
5
14
|
(`v3.28.2:Source/Cli/Commands/Screenplay/`; the generate files are unchanged since `v3.27.1`), Arc `v22.50.5`
|
|
@@ -8,6 +17,12 @@ cratis-screenplay-toolchain `references/versions.md`; behaviour from the cratis
|
|
|
8
17
|
Screenplay.CritterStack `v0.24.0`. Version-specific capability facts belong in cratis-screenplay-toolchain
|
|
9
18
|
`references/versions.md`.
|
|
10
19
|
|
|
20
|
+
Current CLI is 3.41.0, with Arc.Screenplay 22.54.0 (`references/versions.md` in
|
|
21
|
+
the toolchain). Current option/admission evidence: CLI released
|
|
22
|
+
`GenerateScreenplaySettings.cs`, `ArcScreenplayGeneration.cs`, v7 planning specs
|
|
23
|
+
and `Documentation/reference/screenplay.md`; older diagnostic probes below keep
|
|
24
|
+
their original labels. Arc#3054 and CLI#270 describe the recovered-source expansion.
|
|
25
|
+
|
|
11
26
|
## Command
|
|
12
27
|
```
|
|
13
28
|
cratis screenplay generate <solution|project|folder> \
|
|
@@ -56,14 +71,39 @@ cratis screenplay generate <solution|project|folder> \
|
|
|
56
71
|
persistence, stream ownership or authorization.
|
|
57
72
|
- "Success" only means no error diagnostic was produced. Read warnings and information too.
|
|
58
73
|
|
|
59
|
-
##
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
74
|
+
## Arc recovery and authoring-only options
|
|
75
|
+
|
|
76
|
+
`--authoring-only-constructs` maps to `ScreenplayOptions.AuthoringOnlyConstructs`
|
|
77
|
+
in the Arc adapter (false by default). It includes operations/systems, source and
|
|
78
|
+
stream declarations/routes, and reads/requirements recovered from Provide/Handle.
|
|
79
|
+
Other providers warn CLI0014 and do not apply it. Added syntax does not realize
|
|
80
|
+
code or waive admission: operations refuse PLAY0268 and legacy reads PLAY0271.
|
|
81
|
+
Source/stream routes themselves bind as v8 on the current standalone compiler;
|
|
82
|
+
older blanket authoring-only route caveats are not its current disposition.
|
|
83
|
+
|
|
84
|
+
The expanded Arc recovery surface includes:
|
|
85
|
+
- Proven command identifiers and event `for` destinations.
|
|
86
|
+
- Inline events where one unconditional complete production uniquely owns them.
|
|
87
|
+
- Event description/documentation and generation-1 stored-name rename pins.
|
|
88
|
+
- Unconditional named Must(Method) rules with implementation-file provenance,
|
|
89
|
+
where no specification exercises the command.
|
|
90
|
+
- Event scenarios as `when append`, and event-source-faithful `for` fixtures.
|
|
91
|
+
Scenarios whose sources cannot be stated faithfully are omitted with SP0039;
|
|
92
|
+
record the omission as a loss, never fabricate identities to retain a scenario.
|
|
93
|
+
- Supported generated UUID command values and scalar/record responses by default,
|
|
94
|
+
without the authoring-only flag, for commands without successful scenarios.
|
|
95
|
+
Commands with successful scenarios retain the legacy representation until
|
|
96
|
+
deterministic generation fixtures and response expectations can be recovered.
|
|
97
|
+
Unsupported shapes/pre-generation protection remain code with SP0052.
|
|
98
|
+
|
|
99
|
+
Generated values/responses select ESM v7. CLI 3.41.0 admits v7 to planning, but
|
|
100
|
+
Stage refuses those members with STAGE-ESM-028/029. CLI#261 is closed; do not say
|
|
101
|
+
the compiler or CLI version gate universally refuses v7. Above v7 remains
|
|
102
|
+
CLI-RENDER-004. A generated source model is evidence, not guaranteed render output.
|
|
103
|
+
|
|
104
|
+
Handler/reaction bodies, unresolved conditions and unproven origins still need
|
|
105
|
+
source review. Do not infer generation/evolution/absence-assertion coverage from
|
|
106
|
+
a package upgrade; read diagnostics and reconcile each recovered scenario.
|
|
67
107
|
|
|
68
108
|
## Reading the output cheaply
|
|
69
109
|
1. V1 on `.ai-work/screenplay/<model-slug>/legacy/static` (folder mode) with the tool and
|