@cratis/pi 7.7.1 → 7.9.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/screenplay-modeler.md +10 -2
- package/package/corpus/agents/screenplay-renderer.md +13 -0
- package/package/corpus/agents/screenplay-reviewer.md +10 -0
- package/package/corpus/agents/slice-implementer.md +16 -2
- package/package/corpus/skills/cratis-application-slice-conformance/LICENSE +7 -0
- package/package/corpus/skills/cratis-application-slice-conformance/SKILL.md +9 -3
- package/package/corpus/skills/cratis-application-slice-conformance/references/build-prompts.md +151 -0
- package/package/corpus/skills/cratis-application-slice-conformance/references/checklists.md +37 -2
- package/package/corpus/skills/cratis-application-slice-conformance/references/contract-and-precedence.md +4 -1
- package/package/corpus/skills/cratis-application-slice-conformance/references/provenance.md +15 -14
- package/package/corpus/skills/cratis-application-slice-conformance/verification.json +36 -7
- package/package/corpus/skills/cratis-application-slice-specifications/LICENSE +7 -0
- package/package/corpus/skills/cratis-application-slice-specifications/references/provenance.md +11 -13
- package/package/corpus/skills/cratis-arc-react-page/LICENSE +7 -0
- package/package/corpus/skills/cratis-arc-react-page/references/provenance.md +13 -6
- package/package/corpus/skills/cratis-chronicle-reactor/LICENSE +7 -0
- package/package/corpus/skills/cratis-chronicle-reactor/SKILL.md +1 -1
- package/package/corpus/skills/cratis-chronicle-reactor/references/provenance.md +7 -3
- package/package/corpus/skills/cratis-chronicle-read-model-specifications/LICENSE +7 -0
- package/package/corpus/skills/cratis-chronicle-read-model-specifications/references/provenance.md +13 -9
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/LICENSE +5 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/SKILL.md +4 -1
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/audit-format.md +17 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/automation-patterns.md +14 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/integration-contracts.md +30 -0
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/provenance.md +17 -10
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/references/translation-patterns.md +2 -2
- package/package/corpus/skills/cratis-screenplay-automations-and-translations/verification.json +3 -1
- package/package/corpus/skills/cratis-screenplay-discovery/LICENSE +5 -0
- package/package/corpus/skills/cratis-screenplay-discovery/SKILL.md +10 -7
- package/package/corpus/skills/cratis-screenplay-discovery/references/plotting-and-handoff.md +37 -0
- package/package/corpus/skills/cratis-screenplay-discovery/references/provenance.md +18 -9
- package/package/corpus/skills/cratis-screenplay-discovery/references/storming-loop.md +1 -1
- package/package/corpus/skills/cratis-screenplay-discovery/verification.json +5 -1
- package/package/corpus/skills/cratis-screenplay-event-modeling/LICENSE +7 -0
- package/package/corpus/skills/cratis-screenplay-event-modeling/SKILL.md +18 -0
- package/package/corpus/skills/cratis-screenplay-event-modeling/references/provenance.md +19 -0
- package/package/corpus/skills/cratis-screenplay-event-modeling/verification.json +8 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/LICENSE +5 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/SKILL.md +19 -20
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/candidate-inventory.md +101 -0
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/provenance.md +17 -1
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/references/ui-observation.md +65 -23
- package/package/corpus/skills/cratis-screenplay-legacy-extraction/verification.json +56 -10
- package/package/corpus/skills/cratis-screenplay-model-review/LICENSE +5 -0
- package/package/corpus/skills/cratis-screenplay-model-review/SKILL.md +22 -10
- package/package/corpus/skills/cratis-screenplay-model-review/references/business-questions.md +54 -3
- package/package/corpus/skills/cratis-screenplay-model-review/references/checklist.md +17 -3
- package/package/corpus/skills/cratis-screenplay-model-review/references/provenance.md +12 -7
- package/package/corpus/skills/cratis-screenplay-model-review/references/report-template.md +10 -1
- package/package/corpus/skills/cratis-screenplay-model-review/references/review-questions.md +11 -1
- package/package/corpus/skills/cratis-screenplay-model-review/verification.json +4 -1
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/LICENSE +5 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/SKILL.md +21 -21
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/completeness-self-check.md +37 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/per-turn-protocol.md +50 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/phases.md +12 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/provenance.md +22 -16
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/reasoning-notes.md +15 -1
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/references/stop-or-assume.md +16 -0
- package/package/corpus/skills/cratis-screenplay-modeling-lifecycle/verification.json +5 -1
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/LICENSE +7 -0
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/SKILL.md +7 -4
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/drift-and-ledger.md +1 -1
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/gap-fill-handoff.md +19 -4
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/references/provenance.md +11 -13
- package/package/corpus/skills/cratis-screenplay-render-and-gap-fill/verification.json +32 -7
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/LICENSE +7 -2
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/SKILL.md +14 -1
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/invoicing-dues-design.md +259 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/invoicing-dues-example.md +414 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/provenance.md +19 -10
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-catalogue.md +6 -2
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/scenario-examples.md +200 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/view-and-story-specs.md +54 -0
- package/package/corpus/skills/cratis-screenplay-scenario-coverage/verification.json +4 -1
- package/package/corpus/skills/cratis-screenplay-slice-design/LICENSE +5 -0
- package/package/corpus/skills/cratis-screenplay-slice-design/SKILL.md +45 -43
- package/package/corpus/skills/cratis-screenplay-slice-design/references/command-inventory.md +13 -1
- package/package/corpus/skills/cratis-screenplay-slice-design/references/field-lineage.md +4 -2
- package/package/corpus/skills/cratis-screenplay-slice-design/references/provenance.md +28 -7
- package/package/corpus/skills/cratis-screenplay-slice-design/references/read-model-design.md +69 -3
- package/package/corpus/skills/cratis-screenplay-slice-design/references/slicing.md +31 -3
- package/package/corpus/skills/cratis-screenplay-slice-design/verification.json +24 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/LICENSE +5 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/SKILL.md +6 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/boundaries.md +20 -1
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/provenance.md +15 -1
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/stream-patterns.md +69 -0
- package/package/corpus/skills/cratis-screenplay-streams-and-consistency/verification.json +3 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/LICENSE +7 -0
- package/package/corpus/skills/cratis-screenplay-toolchain/SKILL.md +3 -1
- package/package/corpus/skills/cratis-screenplay-toolchain/references/provenance.md +12 -3
- package/package/corpus/skills/cratis-screenplay-ui-composition/LICENSE +7 -0
- package/package/corpus/skills/cratis-screenplay-ui-composition/references/provenance.md +14 -7
- package/package.json +1 -1
package/package/corpus/skills/cratis-screenplay-scenario-coverage/references/view-and-story-specs.md
CHANGED
|
@@ -41,6 +41,60 @@ independent specs that share a cast and carry cumulative givens:
|
|
|
41
41
|
it rather than copying it.
|
|
42
42
|
- A command never gets a family. Commands get one spec per transition.
|
|
43
43
|
|
|
44
|
+
## Worked family: a todo list
|
|
45
|
+
A read model whose rows appear when work is opened and disappear when it is done is the prime
|
|
46
|
+
candidate for a family. Walk one row through three states (`OpenInvoices`: empty, one entry after
|
|
47
|
+
`InvoiceIssued`, empty again after `PaymentReceived`) as three independent specs, each with its
|
|
48
|
+
own full givens. The excerpt is copied from `invoicing-dues-example.md`; the last spec asserts
|
|
49
|
+
both that the stored row is gone and that the keyed query returns nothing. The whole-list query
|
|
50
|
+
(no key) is a design-mode expectation here: a list-query collection check does not run on the
|
|
51
|
+
reference route, so record it in the matrix rather than asserting it.
|
|
52
|
+
The source document also asserts the other terminal outcomes (`InvoiceVoided`, `InvoiceSettled`) the same way; they are not copied here.
|
|
53
|
+
```screenplay excerpt
|
|
54
|
+
specification OpenInvoicesLifecycle1Empty
|
|
55
|
+
given caller
|
|
56
|
+
authenticated
|
|
57
|
+
role "Accounts"
|
|
58
|
+
then query OpenInvoiceById
|
|
59
|
+
arguments
|
|
60
|
+
invoiceId = "9c1f0a52-6a4e-4b1c-9f55-0d2c7b8e1a01"
|
|
61
|
+
|
|
62
|
+
specification OpenInvoicesLifecycle2Issued
|
|
63
|
+
given caller
|
|
64
|
+
authenticated
|
|
65
|
+
role "Accounts"
|
|
66
|
+
given InvoiceIssued
|
|
67
|
+
for "9c1f0a52-6a4e-4b1c-9f55-0d2c7b8e1a01"
|
|
68
|
+
member = "6f1c2a8e-0b1d-4d55-9a3e-2f6a7c1d0e11"
|
|
69
|
+
amount = 130
|
|
70
|
+
then query OpenInvoiceById
|
|
71
|
+
arguments
|
|
72
|
+
invoiceId = "9c1f0a52-6a4e-4b1c-9f55-0d2c7b8e1a01"
|
|
73
|
+
result
|
|
74
|
+
invoiceId = "9c1f0a52-6a4e-4b1c-9f55-0d2c7b8e1a01"
|
|
75
|
+
member = "6f1c2a8e-0b1d-4d55-9a3e-2f6a7c1d0e11"
|
|
76
|
+
amount = 130
|
|
77
|
+
|
|
78
|
+
specification OpenInvoicesLifecycle3Paid
|
|
79
|
+
given caller
|
|
80
|
+
authenticated
|
|
81
|
+
role "Accounts"
|
|
82
|
+
given InvoiceIssued
|
|
83
|
+
for "9c1f0a52-6a4e-4b1c-9f55-0d2c7b8e1a01"
|
|
84
|
+
member = "6f1c2a8e-0b1d-4d55-9a3e-2f6a7c1d0e11"
|
|
85
|
+
amount = 130
|
|
86
|
+
when append PaymentReceived
|
|
87
|
+
for "9c1f0a52-6a4e-4b1c-9f55-0d2c7b8e1a01"
|
|
88
|
+
then no readmodel OpenInvoice for "9c1f0a52-6a4e-4b1c-9f55-0d2c7b8e1a01"
|
|
89
|
+
then query OpenInvoiceById
|
|
90
|
+
arguments
|
|
91
|
+
invoiceId = "9c1f0a52-6a4e-4b1c-9f55-0d2c7b8e1a01"
|
|
92
|
+
```
|
|
93
|
+
One walkthrough would assert the lifecycle; three specs assert each transition and, with the
|
|
94
|
+
same cast, read as one. Where a view also has single-transition specs, read the family first: a
|
|
95
|
+
single spec that repeats a state the family already asserts is redundant (link, do not copy), and
|
|
96
|
+
one that contradicts it is wrong.
|
|
97
|
+
|
|
44
98
|
## Removal is a positive obligation
|
|
45
99
|
`remove with` existing is not coverage. Establish the row with its real source events, append
|
|
46
100
|
the removing event, assert `then no readmodel <RM> for "<key>"`. Where a wrong key could remove
|
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
{ "kind": "skill-contains", "value": "Unauthorized is never `then error`" },
|
|
9
9
|
{ "kind": "skill-contains", "value": "Screenplay#390" },
|
|
10
10
|
{ "kind": "skill-contains", "value": "false PLAY0285" },
|
|
11
|
-
{ "kind": "skill-contains", "value": "One behaviour per spec" }
|
|
11
|
+
{ "kind": "skill-contains", "value": "One behaviour per spec" },
|
|
12
|
+
{ "kind": "skill-contains", "value": "No command has only two specs" },
|
|
13
|
+
{ "kind": "skill-contains", "value": "not scenario-complete" },
|
|
14
|
+
{ "kind": "skill-contains", "value": "per-view judgment was skipped" }
|
|
12
15
|
]
|
|
13
16
|
}
|
|
@@ -28,3 +28,8 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
28
28
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
29
29
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
30
30
|
SOFTWARE.
|
|
31
|
+
|
|
32
|
+
This skill also adapts material from agentic-engineer by Martin Dilger and Nebulit GmbH
|
|
33
|
+
(https://github.com/Nebulit-GmbH/agentic-engineer, commit 07b0f30648d663cb588d7e2c7aa031af9dfc21f2;
|
|
34
|
+
https://nebulit.de), used with the agreement of Martin Dilger and Nebulit GmbH. That repository
|
|
35
|
+
carries no licence file; the adapted material remains credited to Martin Dilger and Nebulit GmbH.
|
|
@@ -19,8 +19,8 @@ Lifecycle, modes and hand-offs: `cratis-screenplay-modeling-lifecycle`.
|
|
|
19
19
|
|
|
20
20
|
## When / when not
|
|
21
21
|
|
|
22
|
-
- Use after `cratis-screenplay-discovery`; for
|
|
23
|
-
|
|
22
|
+
- Use after `cratis-screenplay-discovery`; for a new capability, command inputs, rule placement,
|
|
23
|
+
read-model or query shape, screen data, lineage.
|
|
24
24
|
- Not for: which identity a fact belongs to and where invariants are enforced
|
|
25
25
|
(`cratis-screenplay-streams-and-consistency`); reactions, todo lists, captures
|
|
26
26
|
(`cratis-screenplay-automations-and-translations`); which scenarios to write
|
|
@@ -28,15 +28,17 @@ Lifecycle, modes and hand-offs: `cratis-screenplay-modeling-lifecycle`.
|
|
|
28
28
|
|
|
29
29
|
## Interview phase
|
|
30
30
|
|
|
31
|
-
Skip if the request already names the origins
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
1. **Origin of each action.** Is it
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
31
|
+
Skip if the request already names the command origins (screens, reactions, outside systems),
|
|
32
|
+
the decision behind each shown field, and how fresh each view must be. Otherwise ask, in one
|
|
33
|
+
batch, only what is missing. Unattended: assume visibly, record each assumption in the phase
|
|
34
|
+
report and the slice `description`, and continue.
|
|
35
|
+
|
|
36
|
+
1. **Origin of each action.** Is it (A) user-initiated only, (B) automated, (C) a mix, or
|
|
37
|
+
started by a clock or outside system (schedule, webhook, feed)? Impact: separates screen
|
|
38
|
+
commands from automation (and a trusted path); clocks and outside records are designed in
|
|
39
|
+
`cratis-screenplay-automations-and-translations` (trigger, capture, reaction over imports).
|
|
40
|
+
Follow-up: if a mix, which user actions start automation, and what does it decide on its
|
|
41
|
+
own? If outside systems, which one and what data does it send?
|
|
40
42
|
2. **Critical fields.** Which data matters most on each screen, and what decision does the
|
|
41
43
|
person make from each field? Impact: fields with no decision behind them are questions, not
|
|
42
44
|
requirements. Follow-up: for a field nobody can justify, ask whether it is history worth
|
|
@@ -44,7 +46,10 @@ assumption into the phase report and the slice `description`, and continue.
|
|
|
44
46
|
3. **Freshness and cost.** How stale may each view be, and what does a stale answer cost?
|
|
45
47
|
Impact: picks projection versus reducer, and one-shot versus `observable`. Follow-up: if a
|
|
46
48
|
wrong answer is expensive (a booking, a payment), that decision needs a protected read
|
|
47
|
-
(`references/rule-layers.md`), not a view.
|
|
49
|
+
(`references/rule-layers.md`), not a view. For every calculated or aggregated figure
|
|
50
|
+
(a total, a count, an average) ask whether it recalculates as source data changes ("so it
|
|
51
|
+
belongs in a view - does that match your expectation?") or whether someone agrees or
|
|
52
|
+
certifies a value (a fact, step 5).
|
|
48
53
|
4. **Granularity.** When someone changes these values, why? Impact: separates decisions from
|
|
49
54
|
forms. Follow-up: when a screen edits several values, ask for each who changes it and why.
|
|
50
55
|
5. **Existing UI or constraints.** Is there a screen or system to match? Impact: origins and
|
|
@@ -89,11 +94,13 @@ assumption into the phase report and the slice `description`, and continue.
|
|
|
89
94
|
or a separate event). No PII on the identifier; one data subject per stream. Add a field only
|
|
90
95
|
when something downstream needs it.
|
|
91
96
|
5. **Events or views?** For each value someone needs: was it decided or supplied (event), or
|
|
92
|
-
can it be worked out from facts already recorded (view)?
|
|
97
|
+
can it be worked out from facts already recorded (view)? Test, anti-patterns and where the
|
|
98
|
+
outputs of an automation go: `references/read-model-design.md` *Events or views*. Decided calculations (a quoted
|
|
93
99
|
price, a set fee) are facts. Running figures are views. Time-relative states ("overdue")
|
|
94
100
|
are not stored: store the deadline.
|
|
95
|
-
6. **Design the read side** (`references/read-model-design.md`).
|
|
96
|
-
|
|
101
|
+
6. **Design the read side** (`references/read-model-design.md`). Enumerate every screen and
|
|
102
|
+
automation first: one read model per screen component or automation need; the typical
|
|
103
|
+
slice is `read model -> screen -> command -> event`. Pick the builder (declarative projection first, reducer when
|
|
97
104
|
guards cannot be expressed). The query follows the business view: a list where people scan a
|
|
98
105
|
list, a keyed lookup where they open one thing. For **executable or renderable scope**, every
|
|
99
106
|
read model also needs one unambiguous key: keyed queries `query XById => RM optional` all
|
|
@@ -105,7 +112,9 @@ assumption into the phase report and the slice `description`, and continue.
|
|
|
105
112
|
can do there. Build each slice as read model, screen, command, event. A screen acting on an
|
|
106
113
|
existing instance also shows `data` from a view that supplies the identifier and the state
|
|
107
114
|
the user decides on; only a creation screen may lack `data` (say so in the slice
|
|
108
|
-
`description`). A screen with neither `data` nor `action` is a gap.
|
|
115
|
+
`description`). A screen with neither `data` nor `action` is a gap. A screen with several
|
|
116
|
+
components has one `data` line per component, each from its own read model
|
|
117
|
+
(`references/read-model-design.md`). One actor's point of view
|
|
109
118
|
per screen, at a real beat of the story, not one per persona for symmetry; know where the
|
|
110
119
|
actor sees each state change's result. Beyond Level 1: `cratis-screenplay-ui-composition`.
|
|
111
120
|
8. **Lineage pass.** Build the matrix in `references/field-lineage.md` from the `.play` files
|
|
@@ -116,14 +125,14 @@ assumption into the phase report and the slice `description`, and continue.
|
|
|
116
125
|
9. **Slice and continue** (`references/slicing.md`): state-transition table per entity; one
|
|
117
126
|
command per `StateChange` slice by default (required for renderable scope), one view per
|
|
118
127
|
`StateView` slice; record the events each slice consumes and which slice produces them. If
|
|
119
|
-
the request names the next capability, build that;
|
|
120
|
-
heuristic there, act, and state why you chose it.
|
|
128
|
+
the request names the next capability, build that; if the brief authorizes selecting one, use the heuristic there and state why (Not knowing the next capability is never a reason to stop); scope complete or no candidate left: close the turn.
|
|
121
129
|
10. **Validate** after the batch: V1 with warnings as errors, then V3 when the mode is
|
|
122
130
|
executable or renderable, with the tool and version named (`cratis-screenplay-toolchain`
|
|
123
131
|
`references/verdicts.md`). Hand off with the model root and source revision, the slices
|
|
124
|
-
touched, and **one line per element** (command
|
|
125
|
-
|
|
126
|
-
|
|
132
|
+
touched, and **one line per element** (command with origin classified [USER] or [AUTO]
|
|
133
|
+
and refusals, screen with `data`, read model with consumers, slice with events consumed),
|
|
134
|
+
not only problems; a new slice adds why it was chosen. Decided refusals go to
|
|
135
|
+
`cratis-screenplay-scenario-coverage`, never to open questions.
|
|
127
136
|
|
|
128
137
|
## Rules
|
|
129
138
|
|
|
@@ -154,9 +163,8 @@ assumption into the phase report and the slice `description`, and continue.
|
|
|
154
163
|
|
|
155
164
|
### Review questions
|
|
156
165
|
|
|
157
|
-
Ask
|
|
158
|
-
|
|
159
|
-
finding only with a domain consequence.
|
|
166
|
+
Ask `references/review-questions.md` (reachability, forms in disguise, secrets, fan-in,
|
|
167
|
+
collections, invariants, who sees which rows); report a finding only with a domain consequence.
|
|
160
168
|
|
|
161
169
|
## Identity-affecting edits on an existing model
|
|
162
170
|
|
|
@@ -173,7 +181,7 @@ around a refusal from the typed tools.
|
|
|
173
181
|
|
|
174
182
|
## Gate
|
|
175
183
|
|
|
176
|
-
Slice design is done when
|
|
184
|
+
Slice design is done when these hold; otherwise report what is open.
|
|
177
185
|
|
|
178
186
|
- [ ] Every command: origin reachable and authorized; every input traced; rules placed by
|
|
179
187
|
layer; stored-state rules recorded NOT enforced with a named target; no form-verb name.
|
|
@@ -187,8 +195,7 @@ Slice design is done when all of these hold; otherwise report what is open.
|
|
|
187
195
|
exemption.
|
|
188
196
|
- [ ] State-transition table per entity, including refused transitions; rule coverage listed
|
|
189
197
|
per rule-carrying value; slice dependencies recorded.
|
|
190
|
-
- [ ] V1 passed, and V3
|
|
191
|
-
ready), each naming the tool and version.
|
|
198
|
+
- [ ] V1 passed, and V3 (executable/renderable scope) with expected codes only, tool and version named.
|
|
192
199
|
|
|
193
200
|
## Verified product sources
|
|
194
201
|
|
|
@@ -196,29 +203,24 @@ Slice design is done when all of these hold; otherwise report what is open.
|
|
|
196
203
|
| --- | --- | --- |
|
|
197
204
|
| Screenplay | `v4.64.0` (`7e16162`) | `commands.md`, `constraints.md`, `specifications.md`, `diagnostics.md` (`PLAY0191`, `PLAY0268`, `PLAY0271`, `PLAY0350`, `PLAY0381`, `PLAY0397`), `projections/keys.md` |
|
|
198
205
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
`
|
|
202
|
-
the model is executable or renders.
|
|
206
|
+
Examples compile with `screenplay` 4.64.0 `--warnaserror` and `cratis screenplay validate
|
|
207
|
+
--warnings-as-errors` (cratis 3.27.1); other pins: `cratis-screenplay-toolchain`
|
|
208
|
+
`references/versions.md`. Compiling proves syntax, not that the model is executable or renders.
|
|
203
209
|
|
|
204
210
|
## Verify
|
|
205
211
|
|
|
206
|
-
- V1 passes
|
|
207
|
-
|
|
208
|
-
- Walk the Gate list above; the report lists every element as ok / exempt with reason / gap.
|
|
209
|
-
- Every persona `Cannot` line resolves to a gate plus a denied spec, or is recorded as a gap.
|
|
212
|
+
- V1 (V3 if executable/renderable) passes, naming tool and version. Walk the Gate (every element ok / exempt with reason / gap); each persona `Cannot` line has a
|
|
213
|
+
gate plus a denied spec, or is a gap.
|
|
210
214
|
- Worked reference: `references/worked-example.md` (design mode, compiles clean).
|
|
211
215
|
|
|
212
216
|
## Route near misses
|
|
213
217
|
|
|
214
218
|
- Grammar: `cratis-screenplay-command-surface`, `cratis-screenplay-read-surface`,
|
|
215
|
-
`cratis-screenplay-projections`.
|
|
216
|
-
- Streams
|
|
217
|
-
|
|
218
|
-
-
|
|
219
|
-
`cratis-screenplay-specifications`.
|
|
220
|
-
- Audit of a finished model: `cratis-screenplay-model-review`.
|
|
221
|
-
- Layout, forms, templates: `cratis-screenplay-ui-composition`.
|
|
219
|
+
`cratis-screenplay-projections`; layout and forms: `cratis-screenplay-ui-composition`.
|
|
220
|
+
- Streams and invariants: `cratis-screenplay-streams-and-consistency`; automations and captures:
|
|
221
|
+
`cratis-screenplay-automations-and-translations`.
|
|
222
|
+
- Scenarios and specification forms: `cratis-screenplay-scenario-coverage`,
|
|
223
|
+
`cratis-screenplay-specifications`; audit: `cratis-screenplay-model-review`.
|
|
222
224
|
|
|
223
225
|
## References (load on demand)
|
|
224
226
|
|
|
@@ -233,4 +235,4 @@ the model is executable or renders.
|
|
|
233
235
|
|
|
234
236
|
## Lineage
|
|
235
237
|
|
|
236
|
-
|
|
238
|
+
Attribution: `references/provenance.md`.
|
package/package/corpus/skills/cratis-screenplay-slice-design/references/command-inventory.md
CHANGED
|
@@ -13,7 +13,10 @@ durable rationale goes in the slice `description`.
|
|
|
13
13
|
|
|
14
14
|
```text
|
|
15
15
|
Command: <ImperativeBusinessName> (one decision)
|
|
16
|
-
Origins: <screen action / form / reaction invokes
|
|
16
|
+
Origins: <screen action / form / reaction invokes (event, clock or application trigger)>,
|
|
17
|
+
persona, gate chain; classify each as [USER] (a person on a screen) or [AUTO]
|
|
18
|
+
(a reaction; a capture only appends facts, a later command is reached through
|
|
19
|
+
a reaction)
|
|
17
20
|
Inputs: <property: Concept - who supplies it - why the caller decides it>
|
|
18
21
|
Identifier: <property naming the instance, or "allocation" with the reason>
|
|
19
22
|
Rules by layer: <concept validate | command validate/require | authorize | claim policy
|
|
@@ -38,6 +41,15 @@ Questions that fill it (ask them of the domain expert, or assume visibly when un
|
|
|
38
41
|
6. What new fact becomes true on success, and who reacts to it? If nobody can say, the event
|
|
39
42
|
may be a form in disguise (`slicing.md` *Generic edits*).
|
|
40
43
|
|
|
44
|
+
Group the commands of a slice set by origin: user-issued (each attributed to a named persona,
|
|
45
|
+
never a generic "user") and automation-issued (attributed to the reaction or integration, with
|
|
46
|
+
the trusted actor behind it). A command with no screen is started by a clock or application
|
|
47
|
+
trigger (a reaction trigger), or by a reaction over any modeled event: an ordinary local event,
|
|
48
|
+
an imported event or a translated event. A capture starts a process by appending facts and
|
|
49
|
+
issues no command; any later command is reached through a reaction. Design
|
|
50
|
+
these in `cratis-screenplay-automations-and-translations`. Every automation-issued command states
|
|
51
|
+
what happens when it fails or is retried.
|
|
52
|
+
|
|
41
53
|
## The inventory
|
|
42
54
|
|
|
43
55
|
One row per outcome. The layer says where the refusal is enforced; the spec column says
|
|
@@ -110,8 +110,10 @@ hop before editing:
|
|
|
110
110
|
An explicit mapping to a renamed-away target fails binding (V3, PLAY0273); a property AutoMap
|
|
111
111
|
used to fill and no longer matches is **not reported** - the field silently stays empty.
|
|
112
112
|
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
Skip a hop and log why when the field already exists there (add) or is not found on that
|
|
114
|
+
element (rename); never skip silently. Report the walk hop by hop: element, field, `updated`
|
|
115
|
+
or `skipped` with the reason (already present; not on this element); name the chain from
|
|
116
|
+
the consuming element back to the source. Run V1 after the chain edit; if a hop cannot be applied, stop
|
|
115
117
|
and report that hop. Rename only through the identity-aware path when any hop is persisted
|
|
116
118
|
(SKILL.md).
|
|
117
119
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Provenance
|
|
2
2
|
|
|
3
3
|
Sources are pinned. TrogonStack/agentskills is MIT, Copyright (c) 2025 Straw Hat, LLC (full
|
|
4
|
-
notice in this skill's `LICENSE`).
|
|
5
|
-
|
|
4
|
+
notice in this skill's `LICENSE`). agentic-engineer by Martin Dilger and Nebulit GmbH carries no licence file; its material is adapted with
|
|
5
|
+
the agreement of Martin Dilger and Nebulit GmbH (see *Adapted closely* below).
|
|
6
6
|
Event Modeling practice (Adam Dymitruk, Martin Dilger) is cited as practice; no text taken.
|
|
7
7
|
|
|
8
8
|
| Item | Source | Licence | Treatment | Where in this skill |
|
|
@@ -11,10 +11,31 @@ Event Modeling practice (Adam Dymitruk, Martin Dilger) is cited as practice; no
|
|
|
11
11
|
| Per-command specifics: source, inputs, validation, preconditions, success, each failure result | TrogonStack/agentskills@7b249d3:.../eventmodeling-identifying-inputs/SKILL.md (workflow 3) | MIT | ADAPT closely; failures become inventory rows with layer and spec | references/command-inventory.md |
|
|
12
12
|
| Conditional input pattern | same, *Conditional Input Pattern* | MIT | ADAPT: granularity question, implication rule | SKILL.md step 3; command-inventory.md |
|
|
13
13
|
| Common mistakes and quality checklists (screens, inputs, outputs, slices, design) | TrogonStack/agentskills@7b249d3:.../eventmodeling-{storyboarding-events,identifying-inputs,identifying-outputs,slicing-event-models,designing-event-models}/SKILL.md | MIT | ADAPT closely; merged into one Gate | SKILL.md *Gate*; command-inventory.md |
|
|
14
|
-
| Event versus read model test
|
|
14
|
+
| Event versus read model test, recalculated-state anti-pattern and processor-output categories | TrogonStack/agentskills@7b249d3:.../eventmodeling-identifying-outputs/SKILL.md | MIT | ADAPT; decided calculations stay facts | SKILL.md steps 4-5, `references/read-model-design.md` "Events or views" (including the processor-output categories) |
|
|
15
15
|
| Slice dependency record (events consumed, producing slice) | TrogonStack/agentskills@7b249d3:.../eventmodeling-slicing-event-models/SKILL.md | MIT | ADAPT as a table | references/slicing.md |
|
|
16
|
-
| Slice shape read model, screen, command, event; a screen acting on an instance needs a view; no screen per persona for symmetry; no empty placeholder screen | idea from Nebulit-GmbH/agentic-engineer@07b0f30:.claude/skills/eventmodeling-storyboarding-events, eventmodeling-identifying-outputs, written independently | none | IDEA | SKILL.md step 7 |
|
|
17
|
-
| Reason line per contributing event; build lineage from files, not memory; per-element results | idea from Nebulit-GmbH/agentic-engineer@07b0f30:.claude/skills/eventmodeling-identifying-outputs, written independently | none | IDEA | SKILL.md step 8; references/field-lineage.md |
|
|
18
|
-
| Next-slice heuristic: explicit request wins, act on a wrong guess, say why | idea from Nebulit-GmbH/agentic-engineer@07b0f30:.claude/skills/add-next-slice, written independently | none | IDEA | references/slicing.md *The next slice* |
|
|
19
|
-
| Per-hop chain report (updated, skipped with reason) | idea from Nebulit-GmbH/agentic-engineer@07b0f30:.claude/skills/attributes, written independently | none | IDEA | references/field-lineage.md |
|
|
20
16
|
| Generic-edit ban, rule coverage, state-transition table, rule layers, refusal inventory, worked example | Cratis/AI corpus (original) | MIT | original | references/*.md |
|
|
17
|
+
|
|
18
|
+
## Adapted closely (Martin Dilger and Nebulit GmbH, with agreement)
|
|
19
|
+
|
|
20
|
+
Source: https://github.com/Nebulit-GmbH/agentic-engineer at commit `07b0f30648d663cb588d7e2c7aa031af9dfc21f2`,
|
|
21
|
+
by Martin Dilger and Nebulit GmbH (https://nebulit.de). The repository carries no licence file; this material
|
|
22
|
+
is adapted with the agreement of Martin Dilger and Nebulit GmbH.
|
|
23
|
+
|
|
24
|
+
| Source file | Used in | How |
|
|
25
|
+
|---|---|---|
|
|
26
|
+
| `.claude/skills/eventmodeling-storyboarding-events/SKILL.md`, `eventmodeling-identifying-outputs/SKILL.md`: slice shape `READ MODEL -> SCREEN -> COMMAND -> EVENT`, command screens need a view, blank creation form the only exemption, no empty placeholder screen | `SKILL.md` steps 6-7, `references/read-model-design.md` "The typical slice pattern" | adapted closely; board layout dropped |
|
|
27
|
+
| `eventmodeling-storyboarding-events`: no screen per persona for symmetry; one actor's view | `SKILL.md` step 7, `references/review-questions.md` | idea; our own wording kept |
|
|
28
|
+
| `eventmodeling-identifying-outputs/SKILL.md`: events vs read models test, recalculated-state anti-pattern, processor outputs categorized (new event, view update, notification) | `references/read-model-design.md` "Events or views" | shared with TrogonStack's version, including the processor-output categories (row above); adapted closely; the "independent means event" and "no computed fields" rows dropped because decided calculations are facts in Screenplay |
|
|
29
|
+
| `eventmodeling-identifying-outputs/SKILL.md` Step 5a/5c: enumerate consumers, one component one read model, homogeneous list is one component, wide-fan-in versus cheap fields | `references/read-model-design.md` "Components" | adapted closely; "always split" softened to "split when you can name the consequence" (existing decision); screen copies become one `data` line per component |
|
|
30
|
+
| `eventmodeling-identifying-outputs/SKILL.md` Step 5d: build read models from the screen's field mappings, not from its title or a summary | `references/read-model-design.md` "Components"; `references/field-lineage.md` | adapted closely |
|
|
31
|
+
| `eventmodeling-identifying-outputs/SKILL.md` Step 5h.4, 5i: event-to-field reasoning note, per-node verification result list | `SKILL.md` step 8; `references/read-model-design.md` "Checks before handing off"; `references/field-lineage.md` | adapted closely; the note lives in the StateView slice `description` |
|
|
32
|
+
| `eventmodeling-identifying-outputs/SKILL.md` lines 378-379: before completion re-read every read model and recheck each field and every reason note (roll-ups, additions) | `references/read-model-design.md` "Checks before handing off" | adapted closely; Cratis named-consequence threshold kept instead of "always split" |
|
|
33
|
+
| `eventmodeling-identifying-outputs/SKILL.md` Interview: calculated fields confirmation wording | `SKILL.md` *Interview phase* question 3 | adapted closely |
|
|
34
|
+
| `eventmodeling-identifying-inputs/SKILL.md`: automation level and outside-trigger questions, user versus processor commands marked, conditional input pattern, processor failure/retry stated | `SKILL.md` *Interview phase* question 1; `references/command-inventory.md` | adapted closely; `[USER]`/`[AUTO]` kept as plain classification |
|
|
35
|
+
| `eventmodeling-identifying-inputs/SKILL.md`: per-command source, inputs, validation, preconditions, success, failures | `references/command-inventory.md` | translated to Screenplay (refusal inventory with layers); `session:` mappings rejected (caller identity is context) |
|
|
36
|
+
| `eventmodeling-slicing-event-models/SKILL.md`, its slicing patterns file: slice per command, view or automation; events-only dependencies; slice definition template (produces, consumes, upstream, downstream); name after the element | `references/slicing.md` "Slice dependencies" | adapted closely; board slice-definition calls dropped |
|
|
37
|
+
| `add-next-slice/SKILL.md`: never stop at a comment, a wrong guess is cheap, derive next capability from the story, unaddressed affordance, report what and why | `references/slicing.md` "The next slice"; `SKILL.md` step 9-10 | adapted closely; the CRUD gap hint corrected so a correction names what it corrects |
|
|
38
|
+
| `attributes/SKILL.md`: skip and log per hop, hop report naming the chain | `references/field-lineage.md` "Adding or renaming a field" | adapted closely; board cell walk dropped, identity-aware path kept |
|
|
39
|
+
| `eventmodeling-designing-event-models/SKILL.md`: events as past-tense business facts, causality, state transitions | `SKILL.md` step 4; `references/slicing.md` state-transition table | idea; our own wording kept (our table is stricter) |
|
|
40
|
+
| `storyboard-screen/SKILL.md`, `html-screen/SKILL.md`, `place-element/SKILL.md` | none | not adopted: board and HTML rendering mechanics; screen field mapping `derived:` already in `references/field-lineage.md` |
|
|
41
|
+
| `.build-kit/.slices/restaurant/*/slice.json` | none in this skill | patterns only; passed to scenario coverage (spec example values that vary one rule) |
|
package/package/corpus/skills/cratis-screenplay-slice-design/references/read-model-design.md
CHANGED
|
@@ -14,6 +14,47 @@ A screen that acts on an existing instance needs a view: it supplies the identif
|
|
|
14
14
|
needs and the state the person decides on. Only a creation screen with nothing to show is
|
|
15
15
|
exempt; state the exemption.
|
|
16
16
|
|
|
17
|
+
## The typical slice pattern
|
|
18
|
+
|
|
19
|
+
Most screens follow `read model -> screen -> command -> event`: the read model feeds the
|
|
20
|
+
screen, the screen triggers a command, the command produces an event. Not only status screens:
|
|
21
|
+
a command screen that shows current state before the person acts (a berth booking form that
|
|
22
|
+
shows the berth's availability, an invoice payment form that shows the amount still owed) also needs its view. A pure
|
|
23
|
+
view screen is the shorter `read model -> screen`. An automation whose work can wait, retry,
|
|
24
|
+
fail or need people is `read model -> automation -> command -> event`, where the read model is
|
|
25
|
+
its todo list; an immediate, internal, always-possible direct reaction needs no todo list when
|
|
26
|
+
its reason is recorded (`cratis-screenplay-automations-and-translations`). Treat a screen with
|
|
27
|
+
no incoming view as a gap; only a blank creation form with no prior state to show is exempt.
|
|
28
|
+
|
|
29
|
+
## Events or views
|
|
30
|
+
|
|
31
|
+
The most important distinction in event sourcing: events are immutable facts someone caused;
|
|
32
|
+
views are derived from them and may change every time a source event arrives. Ask in order:
|
|
33
|
+
|
|
34
|
+
| Question | Yes means | Example |
|
|
35
|
+
|---|---|---|
|
|
36
|
+
| Did an actor decide or do something? | event | a member confirmed the membership |
|
|
37
|
+
| Is it pure calculation from facts already recorded? | view | berths free, total invoiced |
|
|
38
|
+
| Does it recalculate whenever source facts change? | view | outstanding balance |
|
|
39
|
+
| Is it derived from several other events? | view | membership status |
|
|
40
|
+
|
|
41
|
+
A calculation is not the business act that adopts it. Running or recomputable figures (totals,
|
|
42
|
+
balances, counts, averages, search indexes) are views, never events. But a value someone agrees
|
|
43
|
+
or certifies stays a fact: an invoice total the customer accepted (`InvoiceIssued` carries it),
|
|
44
|
+
a balance an accountant certified (`BalanceCertified`), a quoted price, a set fee. Test: if the
|
|
45
|
+
source facts change, should the figure change with them (view) or stay as decided (fact)? Wrong:
|
|
46
|
+
`BerthsFreeRecalculated` with `free = 84` (it recalculates). Right: a `BerthAvailability` view
|
|
47
|
+
built from `BerthBooked`, `BookingCancelled` and `BerthAdded`. History of a running figure is
|
|
48
|
+
kept in a separate view, not as events.
|
|
49
|
+
|
|
50
|
+
Classify what an automation outputs. A new fact it establishes is an event (`PaymentTaken`). A
|
|
51
|
+
pure calculation is projection or reducer work, built from events with lineage
|
|
52
|
+
(`cratis-screenplay-projections`), never a direct write by the automation. A notification is an
|
|
53
|
+
external effect: it always gets a delivery outcome, a closing fact (sent, failed, abandoned)
|
|
54
|
+
and a recovery contract, or a pending-work view; only an immediate, internal, always-possible
|
|
55
|
+
effect may leave no trace
|
|
56
|
+
(`cratis-screenplay-automations-and-translations`).
|
|
57
|
+
|
|
17
58
|
## Components
|
|
18
59
|
|
|
19
60
|
- A component is an area of a screen a person would describe as one thing ("the locker list",
|
|
@@ -21,7 +62,19 @@ exempt; state the exemption.
|
|
|
21
62
|
- One read model per component. Split when a person would point at two areas and name them
|
|
22
63
|
differently, or when one area needs facts from many events and another needs only one or
|
|
23
64
|
two - they change for different reasons and at different speeds.
|
|
24
|
-
- A homogeneous list is one component
|
|
65
|
+
- A homogeneous list is one component, even when its rows draw on many event types (a berth
|
|
66
|
+
list whose status is set by booking, cancellation and maintenance events). Do not use that
|
|
67
|
+
as a reason to fold in fields without the same wide fan-in: a berth's name and pier (set by
|
|
68
|
+
one or two events) and its live availability (derived across its whole lifecycle) are two
|
|
69
|
+
kinds of computation even on one page. Split them when you can name the consequence; if
|
|
70
|
+
you keep one view, note which field has the irreducible fan-in and why (in the slice
|
|
71
|
+
`description`).
|
|
72
|
+
- A screen with several components has one `data` line per component, each
|
|
73
|
+
`data <RM> via query <Q>` from its own read model (several `data` lines per screen are
|
|
74
|
+
valid; `cratis-screenplay-read-surface`). A split component sits next to its own source
|
|
75
|
+
events instead of one view reaching across the whole timeline.
|
|
76
|
+
- Do not re-derive a view from a screen's title: take its fields, group them by the read model
|
|
77
|
+
each draws from, and build the read model from that grouping.
|
|
25
78
|
|
|
26
79
|
## Fan-in per field
|
|
27
80
|
|
|
@@ -192,8 +245,21 @@ module Berths
|
|
|
192
245
|
## Checks before handing off
|
|
193
246
|
|
|
194
247
|
- The StateView slice `description` gives, per contributing event, the fields it sets and why
|
|
195
|
-
(see `LockerBoard` in `worked-example.md`); extend it whenever a `from` is added.
|
|
196
|
-
|
|
248
|
+
(see `LockerBoard` in `worked-example.md`); extend it whenever a `from` is added. Shape of
|
|
249
|
+
the note: `BerthBooked sets bookingId, status="booked": the view's creation event; the booking
|
|
250
|
+
does not exist before it.` / `BoatArrived sets status="arrived", arrivedAt: the only
|
|
251
|
+
event carrying an arrival time.` / `BookingCancelled sets status="cancelled": terminal.`
|
|
252
|
+
Re-check every field against the fan-in signal each time a `from` is added; an earlier note
|
|
253
|
+
about one field does not clear the others.
|
|
254
|
+
- Before completing, re-read every read model in scope from the `.play` files and recheck each
|
|
255
|
+
field and each reason note, including roll-up views, AutoMap-supplied fields, joins and
|
|
256
|
+
fields added since: a note about one field never clears the others. Apply the named-
|
|
257
|
+
consequence threshold above, not a blanket split.
|
|
258
|
+
- Every screen and automation re-checked one by one, not from an earlier list: connected to a
|
|
259
|
+
view, exempt (blank creation form with reason stated; direct reaction with its documented
|
|
260
|
+
no-pending-work reason), or a gap fixed or reported.
|
|
261
|
+
- Every consumer that needs state has its read model (a blank creation form and a direct reaction
|
|
262
|
+
with a documented no-pending-work reason need none); every read model has a consumer.
|
|
197
263
|
- Every field traced (`field-lineage.md`).
|
|
198
264
|
- Executable/renderable scope: one unambiguous key per read model (one or more keyed queries,
|
|
199
265
|
all with the same `by` property), identifier equal to the projection's key (table above);
|
|
@@ -24,6 +24,24 @@ are built and checked independently. A command or reaction may consult another s
|
|
|
24
24
|
command except through `invokes`. Dependencies run in one direction; a cycle through events
|
|
25
25
|
means the story is a feedback loop that belongs in an `Automation` slice.
|
|
26
26
|
|
|
27
|
+
The contract between slices is events: slice B depends on slice A because B's command, rule
|
|
28
|
+
or view needs an event A produces. Two other edges are supported and recorded explicitly, never
|
|
29
|
+
implied: `reads <View>` from another slice (unprotected, so a stored-state rule over it stays
|
|
30
|
+
NOT enforced, `rule-layers.md`) and `invokes <Command>` from a reaction. No shared state or
|
|
31
|
+
other direct call. Name each
|
|
32
|
+
slice after its element (the command, the view, the automation, the translation (capture or translator reaction)), not a broader feature name
|
|
33
|
+
that spans several. Per slice, record:
|
|
34
|
+
|
|
35
|
+
```text
|
|
36
|
+
Slice: <CommandName | ViewName | AutomationName> (StateChange | StateView | Automation | Translate)
|
|
37
|
+
Produces: <events, and when they occur>
|
|
38
|
+
Consumes: <events from other slices, and why this slice needs them>
|
|
39
|
+
Upstream: <slice X: needed because it produces <Event>>
|
|
40
|
+
Downstream: <slice Y: consumes <Event> this slice produces>
|
|
41
|
+
Reads: <views of other slices, with the rule they feed; NOT enforced>
|
|
42
|
+
Invokes: <commands of other slices called by a reaction, and the trusted actor>
|
|
43
|
+
```
|
|
44
|
+
|
|
27
45
|
For `worked-example.md`:
|
|
28
46
|
|
|
29
47
|
| Slice | Consumes | Produced by | Also reads |
|
|
@@ -110,13 +128,23 @@ If the request names the capability, build that one. Otherwise, when the current
|
|
|
110
128
|
fully designed, read the slices in story order and choose, preferring in order:
|
|
111
129
|
|
|
112
130
|
1. the next stage of an existing lifecycle (a locker can be assigned; can it be released?);
|
|
113
|
-
2. an action a screen implies but nothing implements
|
|
114
|
-
view (in the example, the attendant needs a waiting-request view to pick a request);
|
|
131
|
+
2. an action a screen implies but nothing implements (a button with nothing behind it), or a
|
|
132
|
+
state change with no confirmation view (in the example, the attendant needs a waiting-request view to pick a request);
|
|
115
133
|
3. a missing ending, correction or reversal - a correction or reversal names what it corrects
|
|
116
134
|
or reverses (`CorrectLockerVolume`), never `Update<Entity>`;
|
|
117
135
|
4. a notification or follow-up the business expects.
|
|
118
136
|
|
|
119
|
-
|
|
137
|
+
Apply this heuristic only when the brief authorizes selecting another capability; when the
|
|
138
|
+
requested scope is complete or no supported candidate remains, close the turn without inventing
|
|
139
|
+
work (scope ownership: `cratis-screenplay-modeling-lifecycle`). Prefer what continues the
|
|
140
|
+
current story over a new thread. When selecting is authorized, not knowing the next capability
|
|
141
|
+
is never a reason to stop: a plausible next slice (the next lifecycle stage, an unaddressed
|
|
142
|
+
affordance, a missing confirmation or ending) usually exists, and a wrong guess is one slice
|
|
143
|
+
that is easy to rename or delete. Posting a question and ending the turn with no slice
|
|
144
|
+
written is not an acceptable outcome; flag the assumption and write the slice in the same
|
|
145
|
+
turn. Report the capability chosen and why, and the slice type and elements created. A
|
|
146
|
+
slice with a command and a view is two slices (`StateChange` and `StateView`): write them one
|
|
147
|
+
at a time. In a modeling session, act: write
|
|
120
148
|
the slice, note the assumption that chose it, and ask for correction afterwards. A wrong guess
|
|
121
149
|
costs one edit; an empty turn costs a round-trip. Record why the slice was chosen in the
|
|
122
150
|
handoff.
|
|
@@ -38,6 +38,30 @@
|
|
|
38
38
|
{
|
|
39
39
|
"kind": "skill-contains",
|
|
40
40
|
"value": "## Gate"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"kind": "skill-contains",
|
|
44
|
+
"value": "read model -> screen -> command -> event"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"kind": "skill-contains",
|
|
48
|
+
"value": "Events or views"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"kind": "skill-contains",
|
|
52
|
+
"value": "does that match your expectation"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"kind": "skill-contains",
|
|
56
|
+
"value": "Not knowing the next capability"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"kind": "skill-contains",
|
|
60
|
+
"value": "origin classified [USER] or [AUTO]"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"kind": "skill-contains",
|
|
64
|
+
"value": "one `data` line per component"
|
|
41
65
|
}
|
|
42
66
|
]
|
|
43
67
|
}
|
|
@@ -31,3 +31,8 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
31
31
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
32
32
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
33
33
|
SOFTWARE.
|
|
34
|
+
|
|
35
|
+
This skill also adapts material from agentic-engineer by Martin Dilger and Nebulit GmbH
|
|
36
|
+
(https://github.com/Nebulit-GmbH/agentic-engineer, commit 07b0f30648d663cb588d7e2c7aa031af9dfc21f2;
|
|
37
|
+
https://nebulit.de), used with the agreement of Martin Dilger and Nebulit GmbH. That repository
|
|
38
|
+
carries no licence file; the adapted material remains credited to Martin Dilger and Nebulit GmbH.
|
|
@@ -139,6 +139,10 @@ option, mark it `ASSUMED` in the slice or module `description` and in the sessio
|
|
|
139
139
|
- Match duplicate protection to scope. A property constraint lets a source re-claim its own
|
|
140
140
|
value; use `unique event` for a fact that is genuinely once-only in its lifecycle, without
|
|
141
141
|
blocking legitimate repeated operations just to make retries safe.
|
|
142
|
+
- No calculated events: a value recomputed as source data changes is a read model; a figure
|
|
143
|
+
the business recorded at a point in time (a quoted price) is a fact. Keep an unanswered
|
|
144
|
+
choice as an open question in `STATE.md`; write a decided rejection as `then error`
|
|
145
|
+
(`references/stream-patterns.md`, Core rules that bear on stream design).
|
|
142
146
|
- Prefer short business lifecycles (a new stream per period, case or attempt) over an eternal
|
|
143
147
|
stream, when the business has natural ends.
|
|
144
148
|
- Compatible change is a new generation; changed meaning is a new event. Corrections are new
|
|
@@ -149,6 +153,8 @@ option, mark it `ASSUMED` in the slice or module `description` and in the sessio
|
|
|
149
153
|
**Review questions** (findings only with a domain consequence)
|
|
150
154
|
- What single question does this stream answer? Does it grow for the right reason?
|
|
151
155
|
- What happens when two people do this at the same moment? When the reply is lost?
|
|
156
|
+
- Is any stream a collection or a log wearing an instance's name (decision tree and red flags in
|
|
157
|
+
`references/stream-patterns.md`)?
|
|
152
158
|
- Does an optional property cover two situations that the business names differently?
|
|
153
159
|
- Does a consumer in another module depend on an event we treat as internal?
|
|
154
160
|
- Could this calculated value matter historically (price, assessment)? Then it may be a fact.
|
package/package/corpus/skills/cratis-screenplay-streams-and-consistency/references/boundaries.md
CHANGED
|
@@ -47,6 +47,23 @@ and which slice produces them, for orientation, not as a build order. A command
|
|
|
47
47
|
consult another slice's view (`reads`; unprotected in `.play`, see `consistency-and-concurrency.md`
|
|
48
48
|
section 3); a slice calls another slice's command only through `invokes`.
|
|
49
49
|
|
|
50
|
+
### Responsibility matrix and ownership timeline
|
|
51
|
+
One compact matrix per feature shows who owns what; the timeline shows where a fact crosses.
|
|
52
|
+
Neither is a model element, and display order is not a global event order or a deployment
|
|
53
|
+
topology. Do not create a module per team name just to draw it.
|
|
54
|
+
|
|
55
|
+
```text
|
|
56
|
+
Boundary Commands handled Facts produced Views maintained Depends on
|
|
57
|
+
Harbour Office BookBerth, CancelStay BerthBooked (public) BerthAvailability none
|
|
58
|
+
Billing IssueStayInvoice StayInvoiceDue OutstandingInvoices BerthBooked
|
|
59
|
+
|
|
60
|
+
Time -> BerthBooked StayInvoiceDue StayPaymentRefused
|
|
61
|
+
Harbour [BerthBooked]
|
|
62
|
+
Billing [StayInvoiceDue] [StayPaymentRefused]
|
|
63
|
+
```
|
|
64
|
+
Check: each fact has one producing boundary, each command one owner, and each arrow crossing a
|
|
65
|
+
row is a published fact or interface, not a private event.
|
|
66
|
+
|
|
50
67
|
### Boundary record (compact output, one per boundary)
|
|
51
68
|
```text
|
|
52
69
|
Boundary: <module or context> Owner: <team/person or ASSUMED>
|
|
@@ -137,7 +154,9 @@ An acknowledgement returning to its initiator is not automatically a bad depende
|
|
|
137
154
|
|
|
138
155
|
Record the concrete consequence and proposed repair. Independent development, deployment and
|
|
139
156
|
scaling are separate claims; establish each only when the dependencies support it. A shared view
|
|
140
|
-
is a versioned interface and an availability dependency, not free decoupling.
|
|
157
|
+
is a versioned interface and an availability dependency, not free decoupling. Team and system
|
|
158
|
+
are not the same boundary by law: separate teams often own separate modules, but independence
|
|
159
|
+
is shown by the dependencies, not assumed from the org chart.
|
|
141
160
|
|
|
142
161
|
## Boundary checklist
|
|
143
162
|
- [ ] every boundary has a named owner or an `ASSUMED` mark in `STATE.md`
|