@eventmodelers/cli 1.0.36 → 1.0.38
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.json +1 -1
- package/shared/skills/learn-eventmodelers-api/SKILL.md +22 -13
- package/stacks/modeling-kit/templates/.claude/skills/add-next-slice/SKILL.md +2 -23
- package/stacks/modeling-kit/templates/.claude/skills/add-next-slice/references/api-fallback.md +11 -0
- package/stacks/modeling-kit/templates/.claude/skills/analyze-existing-model/SKILL.md +6 -57
- package/stacks/modeling-kit/templates/.claude/skills/analyze-existing-model/references/api-fallback.md +68 -0
- package/stacks/modeling-kit/templates/.claude/skills/attributes/SKILL.md +4 -61
- package/stacks/modeling-kit/templates/.claude/skills/attributes/references/api-fallback.md +39 -0
- package/stacks/modeling-kit/templates/.claude/skills/discover-storyboard/SKILL.md +9 -53
- package/stacks/modeling-kit/templates/.claude/skills/discover-storyboard/references/api-fallback.md +63 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-applying-conways-law/SKILL.md +12 -380
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-applying-conways-law/references/examples.md +329 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-brainstorming-events/SKILL.md +45 -290
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-brainstorming-events/references/api-fallback.md +97 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-brainstorming-events/references/examples.md +35 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-checking-completeness/SKILL.md +15 -410
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-checking-completeness/references/api-fallback.md +22 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-checking-completeness/references/examples.md +397 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-core-rules/SKILL.md +182 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-designing-automation-chains/SKILL.md +148 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-designing-automation-chains/references/api-fallback.md +21 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-designing-event-models/SKILL.md +48 -448
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-designing-event-models/references/examples.md +167 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-elaborating-scenarios/SKILL.md +31 -380
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-elaborating-scenarios/references/api-fallback.md +31 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-elaborating-scenarios/references/examples.md +216 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-identifying-inputs/SKILL.md +33 -393
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-identifying-inputs/references/api-fallback.md +79 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-identifying-inputs/references/examples.md +282 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-identifying-outputs/SKILL.md +54 -454
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-identifying-outputs/references/api-fallback.md +67 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-identifying-outputs/references/examples.md +273 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-interview-protocol/SKILL.md +31 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-optimizing-stream-design/SKILL.md +37 -184
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-optimizing-stream-design/references/domain-patterns.md +58 -99
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-optimizing-stream-design/references/patterns.md +82 -163
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-orchestrating-event-modeling/SKILL.md +86 -78
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-orchestrating-event-modeling/references/api-fallback.md +51 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-plotting-events/SKILL.md +5 -5
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-plotting-events/references/api-fallback.md +10 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-slicing-event-models/SKILL.md +22 -51
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-slicing-event-models/references/api-fallback.md +41 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-slicing-event-models/references/examples.md +12 -9
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-slicing-event-models/references/patterns.md +1 -10
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-storyboarding-events/SKILL.md +29 -382
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-storyboarding-events/references/api-fallback.md +77 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-storyboarding-events/references/examples.md +271 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-translating-external-events/SKILL.md +12 -349
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-translating-external-events/references/examples.md +306 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-validating-event-models/SKILL.md +69 -107
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-validating-event-models/references/api-fallback.md +14 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-validating-event-models-checklist/SKILL.md +75 -160
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-validating-event-models-checklist/references/api-fallback.md +14 -0
- package/stacks/modeling-kit/templates/.claude/skills/examples/SKILL.md +3 -110
- package/stacks/modeling-kit/templates/.claude/skills/examples/references/api-fallback.md +118 -0
- package/stacks/modeling-kit/templates/.claude/skills/handle-comment/SKILL.md +5 -25
- package/stacks/modeling-kit/templates/.claude/skills/handle-comment/references/api-fallback.md +35 -0
- package/stacks/modeling-kit/templates/.claude/skills/html-screen/SKILL.md +9 -44
- package/stacks/modeling-kit/templates/.claude/skills/html-screen/references/api-fallback.md +51 -0
- package/stacks/modeling-kit/templates/.claude/skills/place-element/SKILL.md +34 -180
- package/stacks/modeling-kit/templates/.claude/skills/place-element/references/api-fallback.md +203 -0
- package/stacks/modeling-kit/templates/.claude/skills/storyboard/SKILL.md +14 -81
- package/stacks/modeling-kit/templates/.claude/skills/storyboard/references/api-fallback.md +74 -0
- package/stacks/modeling-kit/templates/.claude/skills/storyboard-screen/SKILL.md +4 -45
- package/stacks/modeling-kit/templates/.claude/skills/storyboard-screen/references/api-fallback.md +44 -0
- package/stacks/modeling-kit/templates/.claude/skills/timeline/SKILL.md +19 -88
- package/stacks/modeling-kit/templates/.claude/skills/timeline/references/api-fallback.md +91 -0
- package/stacks/modeling-kit/templates/.claude/skills/update-prompt-status/SKILL.md +1 -9
- package/stacks/modeling-kit/templates/.claude/skills/update-prompt-status/references/api-fallback.md +14 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-integrating-legacy-systems/SKILL.md +0 -674
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-optimizing-stream-design/references/snapshotting.md +0 -204
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
# Checking Completeness — Worked Examples
|
|
2
|
+
|
|
3
|
+
These are conceptual worked examples (Order/Payment domain) illustrating the completeness-check reasoning this skill applies — useful for understanding the reasoning, but the actual mechanics live in the numbered Workflow sections of the main SKILL.md (reading board state and posting `TASK`/`QUESTION` comments via `handle-comment`), not in writing a document like this.
|
|
4
|
+
|
|
5
|
+
## 1. Field Origin & Destination Matrix
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
Event: OrderCreated
|
|
9
|
+
|
|
10
|
+
Field: orderId
|
|
11
|
+
Origin: Generated by system (UUID)
|
|
12
|
+
Destinations:
|
|
13
|
+
OrderConfirmed event (references)
|
|
14
|
+
OrderStatusView (displays)
|
|
15
|
+
OrderListView (displays)
|
|
16
|
+
OrderShipped event (references)
|
|
17
|
+
Status: Complete
|
|
18
|
+
|
|
19
|
+
Field: customerId
|
|
20
|
+
Origin: CreateOrder command (from UI)
|
|
21
|
+
Destinations:
|
|
22
|
+
OrderStatusView (displays)
|
|
23
|
+
OrderListView (displays)
|
|
24
|
+
Inventory System (knows who ordered)
|
|
25
|
+
Status: Complete
|
|
26
|
+
|
|
27
|
+
Field: items[]
|
|
28
|
+
Origin: CreateOrder command (user selects)
|
|
29
|
+
Destinations:
|
|
30
|
+
OrderStatusView (displays)
|
|
31
|
+
Inventory System (what to reserve)
|
|
32
|
+
Fulfillment System (what to ship)
|
|
33
|
+
Status: Complete
|
|
34
|
+
|
|
35
|
+
Field: total
|
|
36
|
+
Origin: Calculated from items[] and unit prices
|
|
37
|
+
Destinations:
|
|
38
|
+
OrderStatusView (displays)
|
|
39
|
+
OrderListView (displays)
|
|
40
|
+
PaymentSystem (amount to charge)
|
|
41
|
+
Accounting (for reconciliation)
|
|
42
|
+
Status: Complete
|
|
43
|
+
|
|
44
|
+
Field: shippingAddress
|
|
45
|
+
Origin: CreateOrder command (user enters)
|
|
46
|
+
Destinations:
|
|
47
|
+
OrderStatusView (displays)
|
|
48
|
+
Fulfillment System (where to ship)
|
|
49
|
+
Carrier (delivery address)
|
|
50
|
+
Status: Complete
|
|
51
|
+
|
|
52
|
+
Field: createdAt
|
|
53
|
+
Origin: System timestamp when event created
|
|
54
|
+
Destinations:
|
|
55
|
+
OrderStatusView (displays)
|
|
56
|
+
OrderListView (displays)
|
|
57
|
+
Metrics (average order age)
|
|
58
|
+
Status: Complete
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## 2. Check All Commands
|
|
62
|
+
|
|
63
|
+
```text
|
|
64
|
+
Command: CreateOrder
|
|
65
|
+
Input: customerId, items[], shippingAddress
|
|
66
|
+
customerId → OrderCreated.customerId
|
|
67
|
+
items[] → OrderCreated.items
|
|
68
|
+
shippingAddress → OrderCreated.shippingAddress
|
|
69
|
+
Status: All inputs captured
|
|
70
|
+
|
|
71
|
+
Command: ConfirmOrder
|
|
72
|
+
Input: orderId, paymentMethod
|
|
73
|
+
orderId → OrderConfirmed.orderId (implicit)
|
|
74
|
+
paymentMethod → OrderConfirmed.paymentMethod
|
|
75
|
+
Status: All inputs captured
|
|
76
|
+
|
|
77
|
+
Command: AuthorizePayment
|
|
78
|
+
Input: orderId, paymentId, authCode
|
|
79
|
+
orderId → PaymentAuthorized.orderId (implicit)
|
|
80
|
+
paymentId → PaymentAuthorized.paymentId
|
|
81
|
+
authCode → PaymentAuthorized.authCode
|
|
82
|
+
Status: All inputs captured
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## 3. Check All Read Models
|
|
86
|
+
|
|
87
|
+
```text
|
|
88
|
+
ReadModel: OrderStatusView
|
|
89
|
+
Needs to display:
|
|
90
|
+
orderId ← OrderCreated
|
|
91
|
+
customerId ← OrderCreated
|
|
92
|
+
status ← OrderConfirmed, PaymentAuthorized, etc.
|
|
93
|
+
items ← OrderCreated
|
|
94
|
+
total ← OrderCreated
|
|
95
|
+
createdAt ← OrderCreated
|
|
96
|
+
confirmedAt ← OrderConfirmed
|
|
97
|
+
paymentId ← PaymentAuthorized
|
|
98
|
+
paymentMethod ← OrderConfirmed
|
|
99
|
+
shipmentId ← OrderShipped
|
|
100
|
+
trackingNumber ← OrderShipped
|
|
101
|
+
Status: All fields sourced
|
|
102
|
+
|
|
103
|
+
ReadModel: OrderListView
|
|
104
|
+
Needs to display:
|
|
105
|
+
orderId ← OrderCreated
|
|
106
|
+
customerId ← OrderCreated
|
|
107
|
+
total ← OrderCreated
|
|
108
|
+
status ← OrderConfirmed, OrderCancelled, etc.
|
|
109
|
+
createdAt ← OrderCreated
|
|
110
|
+
Status: All fields sourced
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## 4. Check Slice Coverage
|
|
114
|
+
|
|
115
|
+
```text
|
|
116
|
+
Column: CreateOrder (COMMAND)
|
|
117
|
+
Slice defined? Yes — "Place Order"
|
|
118
|
+
Status: Covered
|
|
119
|
+
|
|
120
|
+
Column: OrderStatusView (READMODEL)
|
|
121
|
+
Slice defined? No
|
|
122
|
+
Status: Missing slice — flag as gap
|
|
123
|
+
|
|
124
|
+
Column: ConfirmOrder (COMMAND, linkedTo set — copy of the original in another column)
|
|
125
|
+
Slice defined? N/A — linked copy, exempt
|
|
126
|
+
Status: Skip
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## 5. Check Event Stream Completeness
|
|
130
|
+
|
|
131
|
+
```text
|
|
132
|
+
Scenario: Order from creation to delivery
|
|
133
|
+
|
|
134
|
+
Timeline:
|
|
135
|
+
1. OrderCreated (from CreateOrder command)
|
|
136
|
+
2. OrderConfirmed (from ConfirmOrder command)
|
|
137
|
+
3. PaymentAuthorized (from AuthorizePayment processor command)
|
|
138
|
+
4. InventoryReserved (from ReserveInventory processor command)
|
|
139
|
+
5. OrderShipped (from CreateShipment processor command)
|
|
140
|
+
6. DeliveryConfirmed (from MarkDelivered processor command)
|
|
141
|
+
|
|
142
|
+
Missing events? None identified
|
|
143
|
+
|
|
144
|
+
Alternative paths:
|
|
145
|
+
- OrderCancelled (can happen after OrderCreated or OrderConfirmed)
|
|
146
|
+
- PaymentFailed (can happen during PaymentAuthorized)
|
|
147
|
+
- RefundInitiated (can happen after PaymentFailed or OrderCancelled)
|
|
148
|
+
|
|
149
|
+
Status: All paths covered
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
## 6. Check System Boundaries
|
|
153
|
+
|
|
154
|
+
```text
|
|
155
|
+
Order System
|
|
156
|
+
Events: OrderCreated, OrderConfirmed, OrderCancelled
|
|
157
|
+
Processor: None (triggers other systems)
|
|
158
|
+
Status: Clean ownership
|
|
159
|
+
|
|
160
|
+
Payment System
|
|
161
|
+
Events: PaymentAuthorized, PaymentFailed, PaymentRefunded
|
|
162
|
+
Processor: PaymentAuthorizer (listens to OrderConfirmed)
|
|
163
|
+
Status: Clean ownership
|
|
164
|
+
|
|
165
|
+
Inventory System
|
|
166
|
+
Events: InventoryReserved, InventoryReleased
|
|
167
|
+
Processor: InventoryReserver (listens to PaymentAuthorized)
|
|
168
|
+
Status: Clean ownership
|
|
169
|
+
|
|
170
|
+
Fulfillment System
|
|
171
|
+
Events: OrderShipped, DeliveryConfirmed
|
|
172
|
+
Processor: ShipmentCreator (listens to InventoryReserved)
|
|
173
|
+
Status: Clean ownership
|
|
174
|
+
|
|
175
|
+
Notification System
|
|
176
|
+
Events: None (no persistence, info-only)
|
|
177
|
+
Processor: Notifier (listens to all events)
|
|
178
|
+
Status: Cross-cutting concern
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
## 7. Define Workflow Step Contracts
|
|
182
|
+
|
|
183
|
+
```text
|
|
184
|
+
Workflow Step 1: CreateOrder (Step Owns: Order Creation)
|
|
185
|
+
|
|
186
|
+
Preconditions (what must exist before this step):
|
|
187
|
+
- Customer must exist
|
|
188
|
+
- Products must exist in catalog
|
|
189
|
+
- User must be authenticated
|
|
190
|
+
|
|
191
|
+
Postconditions (what exists after this step):
|
|
192
|
+
- OrderCreated event exists
|
|
193
|
+
- Event contains: orderId, customerId, items, total, shippingAddress, createdAt
|
|
194
|
+
|
|
195
|
+
Contract: Any system can assume if these postconditions are true,
|
|
196
|
+
the order has been properly created through this step.
|
|
197
|
+
|
|
198
|
+
--- Workflow Step 2: ConfirmOrder (Step Owns: Order Confirmation)
|
|
199
|
+
|
|
200
|
+
Preconditions (depends on Step 1 postcondition):
|
|
201
|
+
- OrderCreated event must exist ( from Step 1 contract)
|
|
202
|
+
- Customer must select payment method
|
|
203
|
+
|
|
204
|
+
Postconditions (what exists after this step):
|
|
205
|
+
- OrderConfirmed event exists
|
|
206
|
+
- Event contains: orderId, paymentMethod, confirmedAt
|
|
207
|
+
|
|
208
|
+
Contract: Any system can assume if these postconditions are true,
|
|
209
|
+
the order has been properly confirmed.
|
|
210
|
+
|
|
211
|
+
--- Workflow Step 3: AuthorizePayment (Step Owns: Payment Authorization)
|
|
212
|
+
|
|
213
|
+
Preconditions (depends on Step 2 postcondition):
|
|
214
|
+
- OrderConfirmed event must exist ( from Step 2 contract)
|
|
215
|
+
- Payment method must be valid
|
|
216
|
+
|
|
217
|
+
Postconditions (what exists after this step):
|
|
218
|
+
- PaymentAuthorized event exists
|
|
219
|
+
- Event contains: paymentId, authCode, amount
|
|
220
|
+
|
|
221
|
+
Contract: Once this postcondition is true, next steps can proceed
|
|
222
|
+
without re-checking payment (trust the contract).
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
## 8. Check Field Traceability
|
|
226
|
+
|
|
227
|
+
```markdown
|
|
228
|
+
| Field | Event | Command | Read Model | Processor |
|
|
229
|
+
|-------|-------|---------|-----------|-----------|
|
|
230
|
+
| orderId | OrderCreated | - | All views | All |
|
|
231
|
+
| customerId | OrderCreated | CreateOrder | OrderStatusView | - |
|
|
232
|
+
| items | OrderCreated | CreateOrder | List/Status views | Inventory |
|
|
233
|
+
| total | OrderCreated | - | List/Status views | - |
|
|
234
|
+
| paymentId | PaymentAuthorized | AuthorizePayment | StatusView | Inventory |
|
|
235
|
+
| shipmentId | OrderShipped | CreateShipment | StatusView | Notification |
|
|
236
|
+
| trackingNumber | OrderShipped | - | TrackingView | Notification |
|
|
237
|
+
|
|
238
|
+
Status: All fields traceable
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
## 9. Identify Gaps
|
|
242
|
+
|
|
243
|
+
```text
|
|
244
|
+
Analysis: Are there any missing fields?
|
|
245
|
+
- Estimated delivery date?
|
|
246
|
+
→ Need to add to OrderShipped event
|
|
247
|
+
→ Can be calculated from carrier
|
|
248
|
+
→ Add to ShipmentTrackingView
|
|
249
|
+
|
|
250
|
+
- Cancellation reason?
|
|
251
|
+
→ Already in OrderCancelled event
|
|
252
|
+
|
|
253
|
+
- Payment failure reason?
|
|
254
|
+
→ Already in PaymentFailed event
|
|
255
|
+
|
|
256
|
+
- Refund status?
|
|
257
|
+
→ Need to track in RefundInitiated event
|
|
258
|
+
→ Add to PaymentStatusView
|
|
259
|
+
|
|
260
|
+
Actions taken:
|
|
261
|
+
Add estimatedDelivery to OrderShipped
|
|
262
|
+
Add refundStatus to PaymentStatusView
|
|
263
|
+
Add refundInitiatedAt to OrderStatusView
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
## Legacy markdown-document format (superseded — kept for reference only)
|
|
267
|
+
|
|
268
|
+
Older versions of this skill wrote the completeness check as a markdown report. The actual mechanism today is reading board state and posting `TASK`/`QUESTION` comments via `handle-comment` (see "Board Context" in the main SKILL.md) — this template is kept only so the shape of the information (what a complete completeness report covers) stays documented somewhere.
|
|
269
|
+
|
|
270
|
+
```markdown
|
|
271
|
+
# Completeness Check: [Domain Name]
|
|
272
|
+
|
|
273
|
+
## Workflow Step Contracts
|
|
274
|
+
|
|
275
|
+
### Step 1: CreateOrder
|
|
276
|
+
|
|
277
|
+
**Preconditions**:
|
|
278
|
+
- Customer exists in system
|
|
279
|
+
- Products exist in catalog
|
|
280
|
+
|
|
281
|
+
**Postconditions**:
|
|
282
|
+
- OrderCreated event exists with fields: [list]
|
|
283
|
+
|
|
284
|
+
**Teams that depend on this contract**: [All downstream teams]
|
|
285
|
+
|
|
286
|
+
---
|
|
287
|
+
|
|
288
|
+
### Step 2: ConfirmOrder
|
|
289
|
+
|
|
290
|
+
**Preconditions** (depends on Step 1):
|
|
291
|
+
- OrderCreated event exists
|
|
292
|
+
|
|
293
|
+
**Postconditions**:
|
|
294
|
+
- OrderConfirmed event exists with fields: [list]
|
|
295
|
+
|
|
296
|
+
--- [Continue for each workflow step]
|
|
297
|
+
|
|
298
|
+
---
|
|
299
|
+
|
|
300
|
+
## Field Traceability Matrix
|
|
301
|
+
|
|
302
|
+
### Events
|
|
303
|
+
|
|
304
|
+
| Event | Field | Origin | Destinations | Status |
|
|
305
|
+
|-------|-------|--------|-------------|--------|
|
|
306
|
+
| OrderCreated | orderId | System | ConfirmOrder, Views | |
|
|
307
|
+
| OrderCreated | customerId | CreateOrder | All views | |
|
|
308
|
+
| OrderCreated | items | CreateOrder | Inventory, Views | |
|
|
309
|
+
| OrderCreated | total | Calculated | Views, Payment | |
|
|
310
|
+
| OrderConfirmed | paymentId | AuthorizePayment | Views, Accounting | |
|
|
311
|
+
| OrderShipped | trackingNumber | Carrier | TrackingView | |
|
|
312
|
+
|
|
313
|
+
---
|
|
314
|
+
|
|
315
|
+
## System Ownership Verification
|
|
316
|
+
|
|
317
|
+
### Order System
|
|
318
|
+
- Events owned: OrderCreated, OrderConfirmed, OrderCancelled
|
|
319
|
+
- Completeness: All order lifecycle events present
|
|
320
|
+
|
|
321
|
+
### Payment System
|
|
322
|
+
- Events owned: PaymentAuthorized, PaymentFailed, PaymentRefunded
|
|
323
|
+
- Completeness: All payment states covered
|
|
324
|
+
|
|
325
|
+
---
|
|
326
|
+
|
|
327
|
+
## Command → Event Verification
|
|
328
|
+
|
|
329
|
+
| Command | Input | Event | Captured |
|
|
330
|
+
|---------|-------|-------|----------|
|
|
331
|
+
| CreateOrder | customerId, items, address | OrderCreated | |
|
|
332
|
+
| ConfirmOrder | paymentMethod | OrderConfirmed | |
|
|
333
|
+
| AuthorizePayment | paymentId, authCode | PaymentAuthorized | |
|
|
334
|
+
|
|
335
|
+
---
|
|
336
|
+
|
|
337
|
+
## Slice Coverage
|
|
338
|
+
|
|
339
|
+
| Column | Node | Has Slice? | Status |
|
|
340
|
+
|--------|------|-----------|--------|
|
|
341
|
+
| 1 | CreateOrder (COMMAND) | Yes — "Place Order" | |
|
|
342
|
+
| 2 | OrderStatusView (READMODEL) | No | Missing slice |
|
|
343
|
+
| 3 | ConfirmOrder (COMMAND, linked copy) | N/A | Exempt (linkedTo set) |
|
|
344
|
+
|
|
345
|
+
---
|
|
346
|
+
|
|
347
|
+
## Read Model Coverage
|
|
348
|
+
|
|
349
|
+
### OrderStatusView
|
|
350
|
+
- All relevant event data included
|
|
351
|
+
- All user display needs met
|
|
352
|
+
- All processor decision fields present
|
|
353
|
+
|
|
354
|
+
### OrderListView
|
|
355
|
+
- Summary fields captured
|
|
356
|
+
- Filtering/sorting fields present
|
|
357
|
+
- Linked to OrderStatusView for details
|
|
358
|
+
|
|
359
|
+
---
|
|
360
|
+
|
|
361
|
+
## Gap Analysis
|
|
362
|
+
|
|
363
|
+
### Issues Found
|
|
364
|
+
1. Estimated delivery date missing
|
|
365
|
+
- Fix: Add to OrderShipped event
|
|
366
|
+
- Type: DateTime (ISO 8601)
|
|
367
|
+
- Source: Calculated from carrier API
|
|
368
|
+
- Status: Will add in next iteration
|
|
369
|
+
|
|
370
|
+
2. Refund tracking incomplete
|
|
371
|
+
- Fix: Add RefundInitiated event timestamp
|
|
372
|
+
- Fix: Add refund status to PaymentStatusView
|
|
373
|
+
- Status: Will add in next iteration
|
|
374
|
+
|
|
375
|
+
### No Critical Gaps
|
|
376
|
+
- All events properly sourced
|
|
377
|
+
- All command inputs captured
|
|
378
|
+
- All read models have data
|
|
379
|
+
- Event flow complete
|
|
380
|
+
- System boundaries clear
|
|
381
|
+
|
|
382
|
+
---
|
|
383
|
+
|
|
384
|
+
## Readiness Assessment
|
|
385
|
+
|
|
386
|
+
**Overall Completeness**: 95%
|
|
387
|
+
|
|
388
|
+
**Blockers**: None
|
|
389
|
+
|
|
390
|
+
**Ready for Code Generation**: YES
|
|
391
|
+
|
|
392
|
+
**Minor Improvements**:
|
|
393
|
+
- Add estimated delivery date (non-blocking)
|
|
394
|
+
- Enhance refund tracking (non-blocking)
|
|
395
|
+
|
|
396
|
+
**Recommendation**: Proceed to code generation phase.
|
|
397
|
+
```
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: eventmodeling-core-rules
|
|
3
|
+
description: Shared, foundational rules for every event-modeling step — what a COMMAND/EVENT/READMODEL/SCREEN/AUTOMATION is, how each is named, and the anti-patterns to reject. Not a step of its own — referenced upfront by every other eventmodeling-* skill instead of each restating its own copy. Do not use standalone.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Event Modeling — Core Rules
|
|
7
|
+
|
|
8
|
+
These rules apply to every step of event modeling, regardless of which step's SKILL.md you're currently following. Read this once per session — a step's own file only states what's specific to that step, not these fundamentals.
|
|
9
|
+
|
|
10
|
+
## Modes
|
|
11
|
+
|
|
12
|
+
Which step you're in sets the posture — don't mix them.
|
|
13
|
+
|
|
14
|
+
- **Modeling Mode** — `brainstorming-events`, `plotting-events`, `storyboarding-events`, `identifying-inputs`, `identifying-outputs`, `designing-automation-chains`, `elaborating-scenarios`, `translating-external-events`: explore and build. Capture the process as completely as you can. A naming slip or an incomplete precondition is something to flag and move past, not a reason to stall the whole step — don't over-correct early.
|
|
15
|
+
- **Critic Mode** — `validating-event-models`, `validating-event-models-checklist`, `checking-completeness`, `wdyt`, `optimizing-stream-design`: review what's already there. Apply every rule in this file strictly. Surface every violation, gap, and inconsistency — don't soften a finding because the model "mostly works." Post findings as comments (`handle-comment`) rather than silently fixing them, unless the step explicitly says to fix.
|
|
16
|
+
|
|
17
|
+
Don't mix them in one pass: a modeling step is not the place to run a full rules audit, and a critic step is not the place to quietly add missing structure on the model's behalf instead of flagging it.
|
|
18
|
+
|
|
19
|
+
## Lanes — What Lives Where
|
|
20
|
+
|
|
21
|
+
Every column on a timeline has (at most) four rows, and each element type belongs in exactly one:
|
|
22
|
+
|
|
23
|
+
| Lane type | Elements allowed | What it represents |
|
|
24
|
+
|---|---|---|
|
|
25
|
+
| `actor` | SCREEN, AUTOMATION | Who or what initiates — a human via a screen, or a system via an automation |
|
|
26
|
+
| `interaction` | COMMAND, READMODEL | The business intent going in (COMMAND), or the query result coming out (READMODEL) |
|
|
27
|
+
| `swimlane` | EVENT | The business fact recorded — which system/entity's own story this event belongs to |
|
|
28
|
+
| `spec` | SCENARIO | The Given/When/Then behavior spec for this column's COMMAND or READMODEL |
|
|
29
|
+
|
|
30
|
+
An EVENT never shares a column with another EVENT even across different swimlane rows — one column is one moment in time. See `place-element` for the full placement mechanics; this table is only "what belongs where," not "how to place it."
|
|
31
|
+
|
|
32
|
+
## Slices
|
|
33
|
+
|
|
34
|
+
A **slice** is the thinnest possible vertical cut through the model — exactly one COMMAND, one READMODEL, or one AUTOMATION's command, never combined:
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
state-change slice = SCREEN/AUTOMATION → COMMAND → EVENT(s)
|
|
38
|
+
state-view slice = EVENT(s) → READMODEL → SCREEN/AUTOMATION
|
|
39
|
+
automation slice = EVENT(s) → AUTOMATION → COMMAND → EVENT(s)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
A slice never mixes a COMMAND and a READMODEL — those are two different slice types (`state-change` and `state-view`), even when they belong to the same feature. Slices are independently deployable and only communicate with each other via events.
|
|
43
|
+
|
|
44
|
+
Slices are not placed directly — they're **derived** from a completed model. Every COMMAND on the board implies a `state-change` slice, every READMODEL implies a `state-view` slice, every AUTOMATION implies an `automation` slice. `eventmodeling-slicing-event-models` makes that implicit structure explicit on the board once modeling is done; it never invents a slice that isn't already implied by an element that's there.
|
|
45
|
+
|
|
46
|
+
## Elements
|
|
47
|
+
|
|
48
|
+
### EVENT
|
|
49
|
+
- Represents a business fact that already happened.
|
|
50
|
+
- Naming: past tense, business language.
|
|
51
|
+
- Valid: `OrderPlaced`, `PaymentAuthorized`, `UserRegistered`
|
|
52
|
+
- Invalid: `SidebarOpened`, `RequestCompleted`, `ApiCalled` — these describe machinery or UI state, not business facts
|
|
53
|
+
- Immutable — never modify or delete an event once created; a correction is a new event, not an edit.
|
|
54
|
+
- Contains only captured facts. No computed or derived values — those belong in a READMODEL.
|
|
55
|
+
|
|
56
|
+
### COMMAND
|
|
57
|
+
- Represents business intent — what an actor wants to do.
|
|
58
|
+
- Can be rejected; only succeeds if its documented preconditions hold.
|
|
59
|
+
- Naming: imperative, business language.
|
|
60
|
+
- Valid: `PlaceOrder`, `ConfirmPayment`, `CancelSubscription`
|
|
61
|
+
- Invalid: `LoadOrders`, `FetchData`, `OpenDialog` — these are queries or UI-only actions, not business intent
|
|
62
|
+
- Issued by exactly one SCREEN or AUTOMATION — never two. See `place-element`'s Step 7c for the mechanical check/fix; this rule is stated here, the fix lives there.
|
|
63
|
+
- Produces one or more EVENTs on success, or is rejected with no event.
|
|
64
|
+
|
|
65
|
+
### READMODEL
|
|
66
|
+
- A projection built from events, shaped for a specific query.
|
|
67
|
+
- Naming: noun phrase, business language, named for the data — not the machinery that produces it.
|
|
68
|
+
- Valid: `OrderSummary`, `InvoiceList`
|
|
69
|
+
- Invalid: `OrderSummaryProjector`, `InvoiceListRepository` — implementation detail leaking into the model
|
|
70
|
+
- Optional — nothing requires a READMODEL to exist for a COMMAND or a downstream consumer.
|
|
71
|
+
- Never drives COMMAND validation directly — a COMMAND is checked against its own documented preconditions, not a read model.
|
|
72
|
+
|
|
73
|
+
### SCREEN
|
|
74
|
+
- Represents what a user sees and can act on.
|
|
75
|
+
- Naming: what a user would call it, not its internals.
|
|
76
|
+
- Valid: `Dashboard`, `OrderOverviewPage`
|
|
77
|
+
- Invalid: `OrderOverviewComponent`, `ProjectorView`
|
|
78
|
+
|
|
79
|
+
### AUTOMATION
|
|
80
|
+
- Represents an automated actor — a processor, scheduler, or system reacting to events.
|
|
81
|
+
- Naming: what it does, in business language.
|
|
82
|
+
- Valid: `BillingScheduler`, `InventoryReserver`
|
|
83
|
+
- Invalid: `OrderServiceHandler` — implementation-flavored, not a business actor's name
|
|
84
|
+
|
|
85
|
+
## Causality
|
|
86
|
+
|
|
87
|
+
- Every EVENT traces to the COMMAND that produced it.
|
|
88
|
+
- Every COMMAND traces to the SCREEN or AUTOMATION that issued it — exactly one.
|
|
89
|
+
- A process starts with a read (SCREEN + READMODEL) or an AUTOMATION reacting to an existing EVENT — never with an unmotivated COMMAND.
|
|
90
|
+
|
|
91
|
+
## Role Catalog
|
|
92
|
+
|
|
93
|
+
Every event model needs one, established before brainstorming events (it's the first mandatory step) — without it, downstream steps have no way to say *who* does what:
|
|
94
|
+
|
|
95
|
+
- **Human roles** (Customer, Seller, Admin...) and **system actors** (Payment Gateway, Scheduler...), each with: a name in domain language, a one-line description, its key actions, and what it explicitly cannot do.
|
|
96
|
+
- No COMMAND may be attributed to a generic "User" — it must name a specific role or actor from the catalog.
|
|
97
|
+
- Every COMMAND is issued by exactly one role/actor (this is the same rule as the COMMAND single-issuer rule above, stated from the Role Catalog's side).
|
|
98
|
+
- Every human role needs at least one COMMAND and one READMODEL — a role in the catalog that never acts and never sees anything is decorative, not modeled.
|
|
99
|
+
|
|
100
|
+
See `eventmodeling-brainstorming-events` for how the catalog is built, `eventmodeling-identifying-inputs` for attributing commands to it, and `eventmodeling-validating-event-models` for re-checking it holds once the model is complete.
|
|
101
|
+
|
|
102
|
+
## Field Lineage
|
|
103
|
+
|
|
104
|
+
Every field on a COMMAND or READMODEL must carry a `mapping` that traces it back to where its value actually comes from — user input, the session, a prior event's field, a derived/computed value, or an external webhook payload. **A field with no mapping is a gap, not a detail to fill in later.**
|
|
105
|
+
|
|
106
|
+
See `eventmodeling-identifying-inputs` for the full COMMAND mapping vocabulary and `eventmodeling-identifying-outputs` for the READMODEL equivalent — this rule only states that every field must have one, not the mapping syntax itself.
|
|
107
|
+
|
|
108
|
+
## Connections Read Forward
|
|
109
|
+
|
|
110
|
+
A connection either goes **downward within the same column** (actor → interaction → swimlane → spec) or **forward to a later column** — never backward (right-to-left). This is why elements that belong together — a SCREEN and the READMODEL it queries, a SCREEN/AUTOMATION and the COMMAND it issues, a COMMAND and the EVENT it produces — should share a column whenever possible: the moment they don't, a backward arrow becomes a real risk.
|
|
111
|
+
|
|
112
|
+
When an element's natural column is already occupied by something else, insert a new column immediately before or after (whichever keeps every connection forward) rather than wiring across the gap. See `place-element` for the mechanical insertion rules and each step's own placement section for where "before" vs. "after" applies.
|
|
113
|
+
|
|
114
|
+
## Translation Chain
|
|
115
|
+
|
|
116
|
+
An AUTOMATION reacting to an event from another system — external (a webhook/API) or second-swimlane (another team's own timeline) — needs a two-stage shape, never a direct reaction:
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
external EVENT → todo-list READMODEL → translation AUTOMATION + COMMAND → internal EVENT → worker automation's own todo list
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
- The external/second-swimlane EVENT opens only a *translation* automation's todo list — never a *worker* automation's todo list directly.
|
|
123
|
+
- A translation automation's own todo list is opened by that external event and is never closed — it doesn't track "done," it only relays.
|
|
124
|
+
- Its resulting COMMAND produces the internal EVENT the domain actually works with — that's the moment external data becomes a business fact in this domain's own language, ready for a worker automation (or anything else) to react to.
|
|
125
|
+
|
|
126
|
+
Every AUTOMATION, translation or worker, needs its own todo-list READMODEL (opened by triggering events, closed by completion events) — no "pure relay" exemption. See `eventmodeling-designing-automation-chains` for the todo-list pattern and board placement mechanics, and `eventmodeling-translating-external-events` for mapping the external payload's raw fields to the internal EVENT's domain fields (correlation, idempotency, duplicate handling).
|
|
127
|
+
|
|
128
|
+
## Open Questions vs. Decided Failures
|
|
129
|
+
|
|
130
|
+
Two different things are easy to conflate, and conflating them corrupts completeness checking:
|
|
131
|
+
|
|
132
|
+
- **Open question** — something genuinely undecided. Post it as a `QUESTION`-type comment (`handle-comment`) on the relevant node. It stays open until someone actually answers it — resolving means answering, not deleting the comment.
|
|
133
|
+
- **Decided failure** — a rejection or error case whose behavior is already decided (e.g. "payment fails → reject, no event"). Model it as a SCENARIO with `expectError: true` and an `errorDescription` (see `eventmodeling-elaborating-scenarios`), never as a comment. It's permanent, specified behavior, not something waiting on an answer.
|
|
134
|
+
|
|
135
|
+
A decided failure left as a lingering `QUESTION` comment looks unresolved when it isn't. When counting completeness (`eventmodeling-checking-completeness`), only a genuinely unanswered `QUESTION` counts as a gap — a decided failure path needs its `expectError` scenario, not a comment standing in for one.
|
|
136
|
+
|
|
137
|
+
## Offline-First Thinking
|
|
138
|
+
|
|
139
|
+
Model the business process as it would work without any software first, then translate to elements:
|
|
140
|
+
|
|
141
|
+
- How would this work manually, with people, on paper?
|
|
142
|
+
- Who acts, and what triggers each action?
|
|
143
|
+
- What information do they need before they can act?
|
|
144
|
+
|
|
145
|
+
Question any step that exists only because of the system — a loading spinner, a cache refresh, a session check is not a business step and does not belong on the timeline. This is the discipline behind the Anti-Patterns below; the anti-patterns are what it looks like when this principle is skipped.
|
|
146
|
+
|
|
147
|
+
## Anti-Patterns
|
|
148
|
+
|
|
149
|
+
- **Data-loading commands**: `LoadOrders`/`FetchData` are queries, not business intent — model as a READMODEL, not a COMMAND.
|
|
150
|
+
- **UI-interaction events**: `SidebarOpened`/`ButtonClicked` are UI state, not business facts — don't model them unless the business genuinely cares.
|
|
151
|
+
- **Technical events**: `ApiCalled`/`ResponseReceived` describe machinery, not an outcome — find the business fact underneath.
|
|
152
|
+
- **Calculated events**: an event whose value is recomputed as source data changes (a running total, an average) is a READMODEL, not an EVENT.
|
|
153
|
+
|
|
154
|
+
## Flow & Causality
|
|
155
|
+
|
|
156
|
+
Model causality, not strict sequence:
|
|
157
|
+
|
|
158
|
+
- A timeline starts with a **state-view** (READMODEL feeding a SCREEN) or an **automation** reacting to an EVENT already on the board — never with an unmotivated COMMAND.
|
|
159
|
+
- Every COMMAND must be traceable to a trigger: a SCREEN (a user decision) or an AUTOMATION (a system reaction).
|
|
160
|
+
- A `state-change` slice must not follow another `state-change` slice without a trigger in between (a new SCREEN or AUTOMATION) — two COMMANDs in a row with nothing issuing the second one is a gap, not a shortcut.
|
|
161
|
+
|
|
162
|
+
Valid transitions between slices:
|
|
163
|
+
- state-view → state-change
|
|
164
|
+
- state-change → state-view
|
|
165
|
+
- state-change → automation
|
|
166
|
+
- automation → state-change
|
|
167
|
+
- automation → state-view
|
|
168
|
+
|
|
169
|
+
## Quick Self-Check
|
|
170
|
+
|
|
171
|
+
Before treating a model as done, verify:
|
|
172
|
+
|
|
173
|
+
- [ ] Every EVENT is past tense and describes a business fact, not machinery or UI state
|
|
174
|
+
- [ ] Every COMMAND is imperative business intent, not a data-loading query
|
|
175
|
+
- [ ] Every READMODEL is named for its data, not its implementation
|
|
176
|
+
- [ ] No EVENT holds a computed/aggregated value — that belongs in a READMODEL
|
|
177
|
+
- [ ] Every COMMAND has exactly one issuer (one inbound SCREEN or AUTOMATION edge)
|
|
178
|
+
- [ ] Every COMMAND traces back to a SCREEN (user decision) or AUTOMATION (system reaction)
|
|
179
|
+
- [ ] The timeline starts with a state-view or an automation reacting to an event — not a bare COMMAND
|
|
180
|
+
- [ ] No two `state-change`/`state-change` slices are chained without a new trigger between them
|
|
181
|
+
|
|
182
|
+
This is the fast pass — the full, deeper check is `eventmodeling-validating-event-models-checklist`.
|