@cratis/pi 2.28.0 → 2.29.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-captures-and-reactions/SKILL.md +11 -0
- package/package/corpus/skills/cratis-screenplay-captures-and-reactions/verification.json +2 -0
- package/package/corpus/skills/cratis-screenplay-command-surface/SKILL.md +11 -0
- package/package/corpus/skills/cratis-screenplay-command-surface/verification.json +8 -0
- package/package/corpus/skills/cratis-screenplay-event-modeling/SKILL.md +28 -7
- package/package/corpus/skills/cratis-screenplay-event-modeling/verification.json +12 -0
- package/package/corpus/skills/cratis-screenplay-model-authoring/SKILL.md +33 -1
- package/package/corpus/skills/cratis-screenplay-model-authoring/verification.json +27 -0
- package/package/corpus/skills/cratis-screenplay-projections/SKILL.md +11 -0
- package/package/corpus/skills/cratis-screenplay-projections/verification.json +2 -0
- package/package/corpus/skills/cratis-screenplay-read-surface/SKILL.md +11 -0
- package/package/corpus/skills/cratis-screenplay-read-surface/verification.json +2 -0
- package/package/corpus/skills/cratis-screenplay-specifications/SKILL.md +11 -0
- package/package/corpus/skills/cratis-screenplay-specifications/verification.json +8 -0
- package/package/corpus/skills/cratis-screenplay-ui-composition/SKILL.md +11 -0
- package/package/corpus/skills/cratis-screenplay-ui-composition/verification.json +2 -0
- package/package.json +1 -1
|
@@ -10,6 +10,17 @@ The two slice types that run without anyone pressing a button. A `capture` in a
|
|
|
10
10
|
`Translate` slice turns outside data into events; a `reaction` in an `Automation`
|
|
11
11
|
slice runs when something happens.
|
|
12
12
|
|
|
13
|
+
## Locate the model
|
|
14
|
+
|
|
15
|
+
Look first in `.cratis/screenplay/` at the repository root. This is the
|
|
16
|
+
conventional home for consumer-owned `.play` source; do not invent another
|
|
17
|
+
location or search the whole repository before checking it.
|
|
18
|
+
|
|
19
|
+
`cratis ai install` manages `.cratis/ai/`, not `.cratis/screenplay/`. Never
|
|
20
|
+
hand-copy Screenplay source between repositories. Keep Markdown that explains,
|
|
21
|
+
questions or navigates the model in the repository's documentation; the `.play`
|
|
22
|
+
source is the single flow model.
|
|
23
|
+
|
|
13
24
|
## Verified product sources
|
|
14
25
|
|
|
15
26
|
| Package | Version | Purpose |
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
"input": "Translate external data into events and declare a reaction.",
|
|
4
4
|
"fixtures": [],
|
|
5
5
|
"assertions": [
|
|
6
|
+
{ "kind": "skill-contains", "value": ".cratis/screenplay/" },
|
|
7
|
+
{ "kind": "skill-contains", "value": "`cratis ai install` manages `.cratis/ai/`, not `.cratis/screenplay/`" },
|
|
6
8
|
{ "kind": "skill-contains", "value": "cannot be mixed in one clause" },
|
|
7
9
|
{ "kind": "skill-contains", "value": "`where` belongs to the reaction, not to one trigger" },
|
|
8
10
|
{ "kind": "skill-contains", "value": "Startup` and `Shutdown" }
|
|
@@ -10,6 +10,17 @@ Everything that changes the system: the `command` that expresses intent, the
|
|
|
10
10
|
`event` it appends, the rules that can refuse it, and the strongly-typed values
|
|
11
11
|
they are all built from.
|
|
12
12
|
|
|
13
|
+
## Locate the model
|
|
14
|
+
|
|
15
|
+
Look first in `.cratis/screenplay/` at the repository root. This is the
|
|
16
|
+
conventional home for consumer-owned `.play` source; do not invent another
|
|
17
|
+
location or search the whole repository before checking it.
|
|
18
|
+
|
|
19
|
+
`cratis ai install` manages `.cratis/ai/`, not `.cratis/screenplay/`. Never
|
|
20
|
+
hand-copy Screenplay source between repositories. Keep Markdown that explains,
|
|
21
|
+
questions or navigates the model in the repository's documentation; the `.play`
|
|
22
|
+
source is the single flow model.
|
|
23
|
+
|
|
13
24
|
## Verified product sources
|
|
14
25
|
|
|
15
26
|
| Package | Version | Purpose |
|
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
"input": "Declare a Screenplay command with validation, authorization and concurrency.",
|
|
4
4
|
"fixtures": [],
|
|
5
5
|
"assertions": [
|
|
6
|
+
{
|
|
7
|
+
"kind": "skill-contains",
|
|
8
|
+
"value": ".cratis/screenplay/"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"kind": "skill-contains",
|
|
12
|
+
"value": "`cratis ai install` manages `.cratis/ai/`, not `.cratis/screenplay/`"
|
|
13
|
+
},
|
|
6
14
|
{
|
|
7
15
|
"kind": "skill-contains",
|
|
8
16
|
"value": "A second `identifier` on the same command is an error"
|
|
@@ -17,6 +17,17 @@ assumptions. Keep asking *"and then what happens?"* after every event, every
|
|
|
17
17
|
command, every answer. Use business language. Do not discuss databases, APIs, or
|
|
18
18
|
frameworks during modeling.
|
|
19
19
|
|
|
20
|
+
## Locate the model
|
|
21
|
+
|
|
22
|
+
Look first in `.cratis/screenplay/` at the repository root. This is the
|
|
23
|
+
conventional home for consumer-owned `.play` source; do not invent another
|
|
24
|
+
location or search the whole repository before checking it.
|
|
25
|
+
|
|
26
|
+
`cratis ai install` manages `.cratis/ai/`, not `.cratis/screenplay/`. Never
|
|
27
|
+
hand-copy Screenplay source between repositories. Keep Markdown that explains,
|
|
28
|
+
questions or navigates the model in the repository's documentation; the `.play`
|
|
29
|
+
source is the single flow model.
|
|
30
|
+
|
|
20
31
|
## Verified product sources
|
|
21
32
|
|
|
22
33
|
| Package | Version | Purpose |
|
|
@@ -131,14 +142,24 @@ When one is found, ask the user to clarify, create the missing element, re-valid
|
|
|
131
142
|
instances — ask *"can there be more than one of these at once?"* for each field.
|
|
132
143
|
8. No cross-cutting infrastructure is modeled as a `Translate` slice.
|
|
133
144
|
|
|
134
|
-
##
|
|
145
|
+
## Choose a file layout
|
|
146
|
+
|
|
147
|
+
Treat `.cratis/screenplay/` as one application and choose the coarsest layout
|
|
148
|
+
that keeps both the source and its diffs readable:
|
|
149
|
+
|
|
150
|
+
- Keep one `application.play` while it stays readable top to bottom.
|
|
151
|
+
- Use one file per module when modules are simple.
|
|
152
|
+
- Use one file per feature when features have sub-features.
|
|
153
|
+
- Use one file per slice when the model is large enough that a change must be
|
|
154
|
+
reviewable in isolation.
|
|
135
155
|
|
|
136
|
-
|
|
137
|
-
|
|
156
|
+
Reviewability, not an arbitrary line count, triggers the next split. In a large
|
|
157
|
+
model, one slice per file makes a scripted edit's blast radius visible in the
|
|
158
|
+
diff instead of hiding cross-reference defects in a single enormous file.
|
|
138
159
|
|
|
139
|
-
|
|
140
|
-
at the root (`domain`, `import`, `concept`, `type`, `policy`,
|
|
141
|
-
`authentication`, `seed`), then `<Module>/<Module>.play`,
|
|
160
|
+
At the most granular layout, folders mirror the language, one folder per level:
|
|
161
|
+
`application.play` at the root (`domain`, `import`, `concept`, `type`, `policy`,
|
|
162
|
+
`persona`, `authentication`, `seed`), then `<Module>/<Module>.play`,
|
|
142
163
|
`<Module>/…/<Feature>/<Feature>.play`, and `<Module>/…/<Slice>/<Slice>.play` for
|
|
143
164
|
one slice, whole. A slice file restates its `module` and `feature`; nothing is
|
|
144
165
|
written twice.
|
|
@@ -155,7 +176,7 @@ and slices come back sorted by name. Never encode meaning in order.
|
|
|
155
176
|
## Verify
|
|
156
177
|
|
|
157
178
|
```shell
|
|
158
|
-
screenplay
|
|
179
|
+
screenplay .cratis/screenplay/ --warnaserror
|
|
159
180
|
```
|
|
160
181
|
|
|
161
182
|
- [ ] Zero errors **and zero warnings**. An unrecognized construct inside a slice
|
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
"input": "Facilitate an event modeling session and land the model as .play source.",
|
|
4
4
|
"fixtures": [],
|
|
5
5
|
"assertions": [
|
|
6
|
+
{
|
|
7
|
+
"kind": "skill-contains",
|
|
8
|
+
"value": ".cratis/screenplay/"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"kind": "skill-contains",
|
|
12
|
+
"value": "`cratis ai install` manages `.cratis/ai/`, not `.cratis/screenplay/`"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"kind": "skill-contains",
|
|
16
|
+
"value": "Use one file per slice"
|
|
17
|
+
},
|
|
6
18
|
{
|
|
7
19
|
"kind": "skill-contains",
|
|
8
20
|
"value": "expected StateChange, StateView, Automation or Translate"
|
|
@@ -18,6 +18,17 @@ application.** Nothing in it emits C#, TypeScript or any target artifact — tha
|
|
|
18
18
|
is Stage's job, and Stage admits less than Screenplay parses. Author against that
|
|
19
19
|
reality, not against the ecosystem diagram.
|
|
20
20
|
|
|
21
|
+
## Locate the model
|
|
22
|
+
|
|
23
|
+
Look first in `.cratis/screenplay/` at the repository root. This is the
|
|
24
|
+
conventional home for consumer-owned `.play` source; do not invent another
|
|
25
|
+
location or search the whole repository before checking it.
|
|
26
|
+
|
|
27
|
+
`cratis ai install` manages `.cratis/ai/`, not `.cratis/screenplay/`. Never
|
|
28
|
+
hand-copy Screenplay source between repositories. Keep Markdown that explains,
|
|
29
|
+
questions or navigates the model in the repository's documentation; the `.play`
|
|
30
|
+
source is the single flow model.
|
|
31
|
+
|
|
21
32
|
## Verified product sources
|
|
22
33
|
|
|
23
34
|
| Package | Version | Purpose |
|
|
@@ -29,11 +40,32 @@ reality, not against the ecosystem diagram.
|
|
|
29
40
|
Behavior below is read from the repository at tag `v4.12.1`. Reverify before
|
|
30
41
|
claiming another version behaves the same.
|
|
31
42
|
|
|
43
|
+
## Choose a file layout
|
|
44
|
+
|
|
45
|
+
Treat `.cratis/screenplay/` as one application and choose the coarsest layout
|
|
46
|
+
that keeps both the source and its diffs readable:
|
|
47
|
+
|
|
48
|
+
- Keep one `application.play` while it stays readable top to bottom.
|
|
49
|
+
- Use one file per module when modules are simple.
|
|
50
|
+
- Use one file per feature when features have sub-features.
|
|
51
|
+
- Use one file per slice when the model is large enough that a change must be
|
|
52
|
+
reviewable in isolation.
|
|
53
|
+
|
|
54
|
+
Reviewability, not an arbitrary line count, triggers the next split. In a large
|
|
55
|
+
model, one slice per file makes a scripted edit's blast radius visible in the
|
|
56
|
+
diff instead of hiding cross-reference defects in a single enormous file.
|
|
57
|
+
When files are split, restate their parent `module` and `feature`; the folder
|
|
58
|
+
compiler merges declarations by name before resolving references.
|
|
59
|
+
|
|
60
|
+
Always verify `.cratis/screenplay/` as a folder after a change. Verifying one
|
|
61
|
+
split file alone produces false unknown-name diagnostics for declarations held
|
|
62
|
+
in its siblings.
|
|
63
|
+
|
|
32
64
|
## Verify a model
|
|
33
65
|
|
|
34
66
|
```shell
|
|
35
67
|
dotnet tool install -g Cratis.Screenplay.Tool
|
|
36
|
-
screenplay
|
|
68
|
+
screenplay .cratis/screenplay/ --warnaserror
|
|
37
69
|
```
|
|
38
70
|
|
|
39
71
|
The tool takes **one positional argument** — a directory or a single `.play`
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"skill": "cratis-screenplay-model-authoring",
|
|
3
|
+
"input": "Author and organize a Screenplay model in a repository.",
|
|
4
|
+
"fixtures": [],
|
|
5
|
+
"assertions": [
|
|
6
|
+
{
|
|
7
|
+
"kind": "skill-contains",
|
|
8
|
+
"value": ".cratis/screenplay/"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"kind": "skill-contains",
|
|
12
|
+
"value": "`cratis ai install` manages `.cratis/ai/`, not `.cratis/screenplay/`"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"kind": "skill-contains",
|
|
16
|
+
"value": "source is the single flow model"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"kind": "skill-contains",
|
|
20
|
+
"value": "Use one file per module"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"kind": "skill-contains",
|
|
24
|
+
"value": "Use one file per slice"
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
}
|
|
@@ -10,6 +10,17 @@ A `projection` folds events into a read model. Its body is the **Projection
|
|
|
10
10
|
Declaration Language**, an embedded sub-grammar with its own parser — not free
|
|
11
11
|
text. This is half of every event model, and the half most easily got wrong.
|
|
12
12
|
|
|
13
|
+
## Locate the model
|
|
14
|
+
|
|
15
|
+
Look first in `.cratis/screenplay/` at the repository root. This is the
|
|
16
|
+
conventional home for consumer-owned `.play` source; do not invent another
|
|
17
|
+
location or search the whole repository before checking it.
|
|
18
|
+
|
|
19
|
+
`cratis ai install` manages `.cratis/ai/`, not `.cratis/screenplay/`. Never
|
|
20
|
+
hand-copy Screenplay source between repositories. Keep Markdown that explains,
|
|
21
|
+
questions or navigates the model in the repository's documentation; the `.play`
|
|
22
|
+
source is the single flow model.
|
|
23
|
+
|
|
13
24
|
## Verified product sources
|
|
14
25
|
|
|
15
26
|
| Package | Version | Purpose |
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
"input": "Build a read model from events with the Projection Declaration Language.",
|
|
4
4
|
"fixtures": [],
|
|
5
5
|
"assertions": [
|
|
6
|
+
{ "kind": "skill-contains", "value": ".cratis/screenplay/" },
|
|
7
|
+
{ "kind": "skill-contains", "value": "`cratis ai install` manages `.cratis/ai/`, not `.cratis/screenplay/`" },
|
|
6
8
|
{ "kind": "skill-contains", "value": "AutoMap is on by default" },
|
|
7
9
|
{ "kind": "skill-contains", "value": "PLAY0191" },
|
|
8
10
|
{ "kind": "skill-contains", "value": "every event type in the system" },
|
|
@@ -9,6 +9,17 @@ license: MIT
|
|
|
9
9
|
What the system can be asked, and what a user sees. The `readmodel` declares the
|
|
10
10
|
shape, the `query` is the entry point, and the `screen` renders it.
|
|
11
11
|
|
|
12
|
+
## Locate the model
|
|
13
|
+
|
|
14
|
+
Look first in `.cratis/screenplay/` at the repository root. This is the
|
|
15
|
+
conventional home for consumer-owned `.play` source; do not invent another
|
|
16
|
+
location or search the whole repository before checking it.
|
|
17
|
+
|
|
18
|
+
`cratis ai install` manages `.cratis/ai/`, not `.cratis/screenplay/`. Never
|
|
19
|
+
hand-copy Screenplay source between repositories. Keep Markdown that explains,
|
|
20
|
+
questions or navigates the model in the repository's documentation; the `.play`
|
|
21
|
+
source is the single flow model.
|
|
22
|
+
|
|
12
23
|
## Verified product sources
|
|
13
24
|
|
|
14
25
|
| Package | Version | Purpose |
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
"input": "Declare a Screenplay query and the screen that binds to it.",
|
|
4
4
|
"fixtures": [],
|
|
5
5
|
"assertions": [
|
|
6
|
+
{ "kind": "skill-contains", "value": ".cratis/screenplay/" },
|
|
7
|
+
{ "kind": "skill-contains", "value": "`cratis ai install` manages `.cratis/ai/`, not `.cratis/screenplay/`" },
|
|
6
8
|
{ "kind": "skill-contains", "value": "The tenant is the default and stays unstated" },
|
|
7
9
|
{ "kind": "skill-contains", "value": "belongs on a `from` parameter, never on a `filter`" },
|
|
8
10
|
{ "kind": "skill-contains", "value": "warnings, not errors" }
|
|
@@ -10,6 +10,17 @@ A `specification` is the acceptance criterion for a slice, written in the same
|
|
|
10
10
|
document as the behavior it pins. Given/when/then, in business language, with
|
|
11
11
|
concrete data.
|
|
12
12
|
|
|
13
|
+
## Locate the model
|
|
14
|
+
|
|
15
|
+
Look first in `.cratis/screenplay/` at the repository root. This is the
|
|
16
|
+
conventional home for consumer-owned `.play` source; do not invent another
|
|
17
|
+
location or search the whole repository before checking it.
|
|
18
|
+
|
|
19
|
+
`cratis ai install` manages `.cratis/ai/`, not `.cratis/screenplay/`. Never
|
|
20
|
+
hand-copy Screenplay source between repositories. Keep Markdown that explains,
|
|
21
|
+
questions or navigates the model in the repository's documentation; the `.play`
|
|
22
|
+
source is the single flow model.
|
|
23
|
+
|
|
13
24
|
## Verified product sources
|
|
14
25
|
|
|
15
26
|
| Package | Version | Purpose |
|
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
"input": "Write given/when/then specifications for a Screenplay slice.",
|
|
4
4
|
"fixtures": [],
|
|
5
5
|
"assertions": [
|
|
6
|
+
{
|
|
7
|
+
"kind": "skill-contains",
|
|
8
|
+
"value": ".cratis/screenplay/"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"kind": "skill-contains",
|
|
12
|
+
"value": "`cratis ai install` manages `.cratis/ai/`, not `.cratis/screenplay/`"
|
|
13
|
+
},
|
|
6
14
|
{
|
|
7
15
|
"kind": "skill-contains",
|
|
8
16
|
"value": "**`then` contains either events or an error \u2014 never both.**"
|
|
@@ -10,6 +10,17 @@ Event Modeling's wireframe step is a first-class part of the language. The shell
|
|
|
10
10
|
the reusable shapes inside it, the forms bound to commands, and the navigation
|
|
11
11
|
entries other modules contribute are all declared in the `.play` model.
|
|
12
12
|
|
|
13
|
+
## Locate the model
|
|
14
|
+
|
|
15
|
+
Look first in `.cratis/screenplay/` at the repository root. This is the
|
|
16
|
+
conventional home for consumer-owned `.play` source; do not invent another
|
|
17
|
+
location or search the whole repository before checking it.
|
|
18
|
+
|
|
19
|
+
`cratis ai install` manages `.cratis/ai/`, not `.cratis/screenplay/`. Never
|
|
20
|
+
hand-copy Screenplay source between repositories. Keep Markdown that explains,
|
|
21
|
+
questions or navigates the model in the repository's documentation; the `.play`
|
|
22
|
+
source is the single flow model.
|
|
23
|
+
|
|
13
24
|
## Verified product sources
|
|
14
25
|
|
|
15
26
|
| Package | Version | Purpose |
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
"input": "Declare the application shell, a screen template and a command form.",
|
|
4
4
|
"fixtures": [],
|
|
5
5
|
"assertions": [
|
|
6
|
+
{ "kind": "skill-contains", "value": ".cratis/screenplay/" },
|
|
7
|
+
{ "kind": "skill-contains", "value": "`cratis ai install` manages `.cratis/ai/`, not `.cratis/screenplay/`" },
|
|
6
8
|
{ "kind": "skill-contains", "value": "A form is discovered, not referenced" },
|
|
7
9
|
{ "kind": "skill-contains", "value": "declares no\n`fits slot`" },
|
|
8
10
|
{ "kind": "skill-contains", "value": "override-priority order" }
|