@eventmodelers/cli 1.0.36 → 1.0.37
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 +12 -10
- 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 +9 -319
- 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 +23 -199
- 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 +13 -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-designing-automation-chains/SKILL.md +132 -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 +9 -236
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-designing-event-models/references/examples.md +257 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-elaborating-scenarios/SKILL.md +28 -302
- 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 +30 -343
- 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 +51 -400
- 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-optimizing-stream-design/SKILL.md +45 -152
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-optimizing-stream-design/references/domain-patterns.md +49 -90
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-optimizing-stream-design/references/patterns.md +64 -137
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-orchestrating-event-modeling/SKILL.md +74 -65
- 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 +1 -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 +19 -36
- 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 +26 -332
- 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 +9 -294
- 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 +12 -11
- 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 +6 -36
- 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 +23 -183
- package/stacks/modeling-kit/templates/.claude/skills/place-element/references/api-fallback.md +193 -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
package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-applying-conways-law/SKILL.md
CHANGED
|
@@ -100,339 +100,29 @@ Update Interview Trail:
|
|
|
100
100
|
|
|
101
101
|
Given all events, inputs, and outputs, organize by ownership:
|
|
102
102
|
|
|
103
|
-
|
|
104
|
-
Determine what constitutes a separate system/bounded context:
|
|
105
|
-
|
|
106
|
-
```
|
|
107
|
-
System Boundaries:
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
Order Management System
|
|
111
|
-
- Owns: Order entity and its lifecycle
|
|
112
|
-
- Events: OrderCreated, OrderConfirmed, Cancelled
|
|
113
|
-
- Owns: Order state machine
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
Payment Processing System
|
|
118
|
-
- Owns: Payment authorization and processing
|
|
119
|
-
- Events: PaymentAuthorized, PaymentFailed
|
|
120
|
-
- Owns: Payment state machine
|
|
103
|
+
> **This step's "swimlane" is the same boundary `eventmodeling-brainstorming-events` governs, described from the ownership angle instead of the board-mechanics angle.** That skill's Swimlane Rules restrict the board's actual `swimlane`-type lane to marking integration with another system — this step doesn't loosen that cap or add a lane per team. Under Conway's Law, "team" and "system" name the same boundary: a system this chapter's process integrates with is, by definition, owned by some other team. The diagrams below are a narrative/analysis device for documenting *who owns what* across those boundaries — not an instruction to create one board swimlane lane per team named here.
|
|
121
104
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
Inventory System
|
|
125
|
-
- Owns: Stock levels and reservations
|
|
126
|
-
- Events: InventoryReserved, InventoryAllocated
|
|
127
|
-
- Owns: Inventory state machine
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
Fulfillment System
|
|
132
|
-
- Owns: Shipments and delivery
|
|
133
|
-
- Events: OrderShipped, DeliveryConfirmed
|
|
134
|
-
- Owns: Shipment state machine
|
|
135
|
-
|
|
136
|
-
```
|
|
105
|
+
### 1. Identify System Boundaries
|
|
106
|
+
Determine what constitutes a separate system/bounded context: for each candidate system, name what it owns, list the events it produces, and note the state machine it's responsible for. A full worked example (Order/Payment/Inventory/Fulfillment domain) is in `references/examples.md`.
|
|
137
107
|
|
|
138
108
|
### 2. Create Swimlane Diagram
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
```
|
|
142
|
-
Event Stream Timeline
|
|
143
|
-
→
|
|
144
|
-
|
|
145
|
-
Order Team OrderCreated OrderConfirmed OrderCancelled
|
|
146
|
-
|
|
147
|
-
Payment Team PaymentAuthorized PaymentFailed
|
|
148
|
-
|
|
149
|
-
Inventory Team InventoryReserved
|
|
150
|
-
|
|
151
|
-
Fulfillment Team OrderShipped DeliveryConfirmed
|
|
152
|
-
|
|
153
|
-
Each team owns their swimlane events
|
|
154
|
-
Coordination via events crossing swimlanes
|
|
155
|
-
```
|
|
109
|
+
Lay the events out on a timeline with one row per team, showing which events each team owns and where coordination crosses from one team's row into another's. A full worked example is in `references/examples.md`.
|
|
156
110
|
|
|
157
111
|
### 3. Map Team Responsibilities
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
```
|
|
161
|
-
Order Management Team
|
|
162
|
-
Commands they handle:
|
|
163
|
-
- CreateOrder
|
|
164
|
-
- ConfirmOrder
|
|
165
|
-
- CancelOrder
|
|
166
|
-
Events they produce:
|
|
167
|
-
- OrderCreated
|
|
168
|
-
- OrderConfirmed
|
|
169
|
-
- OrderCancelled
|
|
170
|
-
Read Models they maintain:
|
|
171
|
-
- OrderStatusView
|
|
172
|
-
- OrderListView
|
|
173
|
-
Systems they call:
|
|
174
|
-
- Payment System (to confirm payment)
|
|
175
|
-
- Inventory System (to check stock)
|
|
176
|
-
|
|
177
|
-
Payment Processing Team
|
|
178
|
-
Commands they handle:
|
|
179
|
-
- AuthorizePayment
|
|
180
|
-
- ProcessPayment
|
|
181
|
-
- RefundPayment
|
|
182
|
-
Events they produce:
|
|
183
|
-
- PaymentAuthorized
|
|
184
|
-
- PaymentFailed
|
|
185
|
-
- PaymentRefunded
|
|
186
|
-
Read Models they maintain:
|
|
187
|
-
- PaymentStatusView
|
|
188
|
-
- TransactionHistory
|
|
189
|
-
Systems they depend on:
|
|
190
|
-
- Payment Gateway (external)
|
|
191
|
-
- Order System (for context)
|
|
192
|
-
|
|
193
|
-
Inventory Team
|
|
194
|
-
Commands they handle:
|
|
195
|
-
- ReserveInventory
|
|
196
|
-
- ReleaseReservation
|
|
197
|
-
- AllocateStock
|
|
198
|
-
Events they produce:
|
|
199
|
-
- InventoryReserved
|
|
200
|
-
- ReservationReleased
|
|
201
|
-
- StockAllocated
|
|
202
|
-
Read Models they maintain:
|
|
203
|
-
- InventoryLevelView
|
|
204
|
-
- ReservationView
|
|
205
|
-
Systems they depend on:
|
|
206
|
-
- Order System (triggers)
|
|
207
|
-
- Warehouse System (stock source)
|
|
208
|
-
|
|
209
|
-
Fulfillment Team
|
|
210
|
-
Commands they handle:
|
|
211
|
-
- CreateShipment
|
|
212
|
-
- MarkShipped
|
|
213
|
-
- ConfirmDelivery
|
|
214
|
-
Events they produce:
|
|
215
|
-
- ShipmentCreated
|
|
216
|
-
- OrderShipped
|
|
217
|
-
- DeliveryConfirmed
|
|
218
|
-
Read Models they maintain:
|
|
219
|
-
- ShipmentTrackingView
|
|
220
|
-
- DeliveryScheduleView
|
|
221
|
-
Systems they depend on:
|
|
222
|
-
- Inventory System (items to ship)
|
|
223
|
-
- Carrier APIs (tracking)
|
|
224
|
-
```
|
|
112
|
+
For each team, define: the commands they handle, the events they produce, the read models they maintain, and the other systems they call or depend on. A full worked example (Order/Payment/Inventory/Fulfillment teams) is in `references/examples.md`.
|
|
225
113
|
|
|
226
114
|
### 4. Identify Inter-System Communication
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
```
|
|
230
|
-
Communication Patterns:
|
|
231
|
-
|
|
232
|
-
Order System → Payment System
|
|
233
|
-
Order System produces: OrderConfirmed event
|
|
234
|
-
Payment System consumes: OrderConfirmed
|
|
235
|
-
Payment System reacts: Issues AuthorizePayment command
|
|
236
|
-
Payment System produces: PaymentAuthorized event
|
|
237
|
-
|
|
238
|
-
Order System → Inventory System
|
|
239
|
-
Order System produces: PaymentAuthorized event (indirectly)
|
|
240
|
-
Inventory System consumes: PaymentAuthorized
|
|
241
|
-
Inventory System reacts: Issues ReserveInventory command
|
|
242
|
-
Inventory System produces: InventoryReserved event
|
|
243
|
-
|
|
244
|
-
Inventory System → Fulfillment System
|
|
245
|
-
Inventory System produces: InventoryReserved event
|
|
246
|
-
Fulfillment System consumes: InventoryReserved
|
|
247
|
-
Fulfillment System reacts: Issues CreateShipment command
|
|
248
|
-
Fulfillment System produces: OrderShipped event
|
|
249
|
-
```
|
|
115
|
+
For each pair of systems that interact, document the triggering event, what the consuming system does in reaction (which command it issues), and the event that results. A full worked example is in `references/examples.md`.
|
|
250
116
|
|
|
251
117
|
### 5. Define System Interfaces
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
```
|
|
255
|
-
Order System Interface
|
|
256
|
-
Commands it accepts:
|
|
257
|
-
- CreateOrder (from UI)
|
|
258
|
-
- ConfirmOrder (from UI)
|
|
259
|
-
- CancelOrder (from UI or Processors)
|
|
260
|
-
Events it produces:
|
|
261
|
-
- OrderCreated
|
|
262
|
-
- OrderConfirmed
|
|
263
|
-
- OrderCancelled
|
|
264
|
-
Read Models it provides:
|
|
265
|
-
- OrderStatusView
|
|
266
|
-
- OrderListView
|
|
267
|
-
|
|
268
|
-
Payment System Interface
|
|
269
|
-
Commands it accepts:
|
|
270
|
-
- AuthorizePayment (from Payment Processor/Order System)
|
|
271
|
-
- ProcessPayment (from Order System)
|
|
272
|
-
Events it produces:
|
|
273
|
-
- PaymentAuthorized
|
|
274
|
-
- PaymentFailed
|
|
275
|
-
- PaymentProcessed
|
|
276
|
-
|
|
277
|
-
Inventory System Interface
|
|
278
|
-
Commands it accepts:
|
|
279
|
-
- ReserveInventory (triggered by PaymentAuthorized event)
|
|
280
|
-
Events it produces:
|
|
281
|
-
- InventoryReserved
|
|
282
|
-
- InventoryFailed
|
|
283
|
-
```
|
|
118
|
+
For each system, list the commands it accepts (and from where — UI, another system, a processor) and the events/read models it produces or provides to others. A full worked example is in `references/examples.md`.
|
|
284
119
|
|
|
285
120
|
### 6. Identify Processors vs Systems
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
```
|
|
289
|
-
Processors (autonomous automation):
|
|
290
|
-
|
|
291
|
-
1. PaymentProcessor
|
|
292
|
-
Triggered by: OrderConfirmed event
|
|
293
|
-
Logic: Calls external payment gateway
|
|
294
|
-
Produces: AuthorizePayment command
|
|
295
|
-
Lives in: Payment System
|
|
296
|
-
|
|
297
|
-
2. InventoryProcessor
|
|
298
|
-
Triggered by: PaymentAuthorized event
|
|
299
|
-
Logic: Checks stock, reserves inventory
|
|
300
|
-
Produces: ReserveInventory command
|
|
301
|
-
Lives in: Inventory System
|
|
302
|
-
|
|
303
|
-
3. FulfillmentProcessor
|
|
304
|
-
Triggered by: InventoryReserved event
|
|
305
|
-
Logic: Creates shipment records
|
|
306
|
-
Produces: CreateShipment command
|
|
307
|
-
Lives in: Fulfillment System
|
|
308
|
-
|
|
309
|
-
4. NotificationProcessor
|
|
310
|
-
Triggered by: OrderCreated, OrderConfirmed, OrderShipped events
|
|
311
|
-
Logic: Sends emails/SMS
|
|
312
|
-
Produces: No commands (info-only)
|
|
313
|
-
Lives in: Notification System (cross-cutting)
|
|
314
|
-
```
|
|
121
|
+
For each autonomous processor/automation, document what triggers it, its logic, the command(s) it produces, and which system it lives in. A full worked example (Payment/Inventory/Fulfillment/Notification processors) is in `references/examples.md`.
|
|
315
122
|
|
|
316
123
|
## Output Format
|
|
317
124
|
|
|
318
|
-
Present as:
|
|
319
|
-
|
|
320
|
-
```markdown
|
|
321
|
-
# System Organization: [Domain Name]
|
|
322
|
-
|
|
323
|
-
## System Boundaries
|
|
324
|
-
|
|
325
|
-
### System: Order Management
|
|
326
|
-
- **Team**: Order Team
|
|
327
|
-
- **Responsibilities**: Create, confirm, cancel orders
|
|
328
|
-
- **Commands**: CreateOrder, ConfirmOrder, CancelOrder
|
|
329
|
-
- **Events Produced**: OrderCreated, OrderConfirmed, OrderCancelled
|
|
330
|
-
- **Events Consumed**: PaymentAuthorized, InventoryReserved (for state updates)
|
|
331
|
-
- **Read Models**: OrderStatusView, OrderListView
|
|
332
|
-
- **Scope**: One stream type (Order)
|
|
333
|
-
|
|
334
|
-
### System: Payment Processing
|
|
335
|
-
- **Team**: Payment Team
|
|
336
|
-
- **Responsibilities**: Authorize and process payments
|
|
337
|
-
- **Commands**: AuthorizePayment, ProcessPayment, RefundPayment
|
|
338
|
-
- **Events Produced**: PaymentAuthorized, PaymentFailed, PaymentRefunded
|
|
339
|
-
- **Events Consumed**: OrderConfirmed (from Order System)
|
|
340
|
-
- **Read Models**: PaymentStatusView, TransactionHistory
|
|
341
|
-
- **Dependencies**: External payment gateway
|
|
342
|
-
- **Scope**: One stream type (Payment)
|
|
343
|
-
|
|
344
|
-
### System: Inventory Management
|
|
345
|
-
- **Team**: Inventory Team
|
|
346
|
-
- **Responsibilities**: Stock management and reservations
|
|
347
|
-
- **Commands**: ReserveInventory, ReleaseReservation, AllocateStock
|
|
348
|
-
- **Events Produced**: InventoryReserved, ReservationReleased, StockAllocated
|
|
349
|
-
- **Events Consumed**: PaymentAuthorized (from Payment System)
|
|
350
|
-
- **Read Models**: InventoryLevelView, ReservationView
|
|
351
|
-
- **Dependencies**: Warehouse system
|
|
352
|
-
- **Scope**: One stream type (InventoryReservation)
|
|
353
|
-
|
|
354
|
-
[Continue for each system]
|
|
355
|
-
|
|
356
|
-
---
|
|
357
|
-
|
|
358
|
-
## Event Flow Across System Boundaries
|
|
359
|
-
|
|
360
|
-
### Flow: Order → Payment → Inventory → Fulfillment
|
|
361
|
-
|
|
362
|
-
```
|
|
363
|
-
Time →
|
|
364
|
-
|
|
365
|
-
Order System
|
|
366
|
-
OrderCreated →
|
|
367
|
-
OrderConfirmed →
|
|
368
|
-
(triggers)
|
|
369
|
-
Payment System
|
|
370
|
-
PaymentAuthorized →
|
|
371
|
-
(triggers)
|
|
372
|
-
Inventory System
|
|
373
|
-
InventoryReserved →
|
|
374
|
-
(triggers)
|
|
375
|
-
Fulfillment System
|
|
376
|
-
OrderShipped
|
|
377
|
-
DeliveryConfirmed
|
|
378
|
-
```
|
|
379
|
-
|
|
380
|
-
---
|
|
381
|
-
|
|
382
|
-
## Team Responsibilities Matrix
|
|
383
|
-
|
|
384
|
-
| Team | Creates Commands | Produces Events | Owns Read Models |
|
|
385
|
-
|------|-----------------|-----------------|------------------|
|
|
386
|
-
| Order | CreateOrder, ConfirmOrder | OrderCreated, OrderConfirmed | OrderStatusView |
|
|
387
|
-
| Payment | AuthorizePayment | PaymentAuthorized | PaymentStatusView |
|
|
388
|
-
| Inventory | ReserveInventory | InventoryReserved | InventoryLevelView |
|
|
389
|
-
| Fulfillment | CreateShipment | OrderShipped | ShipmentTrackingView |
|
|
390
|
-
|
|
391
|
-
---
|
|
392
|
-
|
|
393
|
-
## Inter-System Communication
|
|
394
|
-
|
|
395
|
-
### Order → Payment
|
|
396
|
-
- Trigger: OrderConfirmed event
|
|
397
|
-
- Action: Payment System listens via Processor
|
|
398
|
-
- Result: AuthorizePayment command issued
|
|
399
|
-
|
|
400
|
-
### Payment → Inventory
|
|
401
|
-
- Trigger: PaymentAuthorized event
|
|
402
|
-
- Action: Inventory System listens via Processor
|
|
403
|
-
- Result: ReserveInventory command issued
|
|
404
|
-
|
|
405
|
-
[Document all communication patterns]
|
|
406
|
-
|
|
407
|
-
---
|
|
408
|
-
|
|
409
|
-
## Dependencies
|
|
410
|
-
|
|
411
|
-
### External Systems
|
|
412
|
-
|
|
413
|
-
| System | Owns | Called By | Purpose |
|
|
414
|
-
|--------|------|-----------|---------|
|
|
415
|
-
| Payment Gateway | Payment provider | Payment System | Authorization |
|
|
416
|
-
| Warehouse | Inventory source | Inventory System | Stock info |
|
|
417
|
-
| Carrier API | Shipping | Fulfillment System | Tracking |
|
|
418
|
-
|
|
419
|
-
---
|
|
420
|
-
|
|
421
|
-
## Independent Development
|
|
422
|
-
|
|
423
|
-
Each system can:
|
|
424
|
-
- Develop independently
|
|
425
|
-
- Use different tech stacks
|
|
426
|
-
- Scale independently
|
|
427
|
-
- Deploy independently
|
|
428
|
-
- Own their events
|
|
429
|
-
- Maintain their read models
|
|
430
|
-
|
|
431
|
-
Coordination via:
|
|
432
|
-
- Events (async messaging)
|
|
433
|
-
- Processors (listen and react)
|
|
434
|
-
- Read models (shared views)
|
|
435
|
-
```
|
|
125
|
+
Present the analysis as a markdown document titled "System Organization: [Domain Name]" with these sections: **System Boundaries** (one entry per system, giving its owning team, responsibilities, commands, events produced/consumed, read models, dependencies, and scope); **Event Flow Across System Boundaries** (a time-ordered diagram showing which system's events trigger the next system downstream); a **Team Responsibilities Matrix** (one row per team: commands, events, read models); **Inter-System Communication** (one entry per system pair: triggering event, reacting system/action, resulting command); a **Dependencies** table of external systems (what they're called for); and a closing **Independent Development** note on how the boundaries let each team build, scale, and deploy independently, coordinating only via events, processors, and shared read models. A full worked example of this document (Order/Payment/Inventory/Fulfillment domain) is in `references/examples.md`.
|
|
436
126
|
|
|
437
127
|
## Quality Checklist
|
|
438
128
|
|
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
# Applying Conway's Law — Worked Examples
|
|
2
|
+
|
|
3
|
+
These are conceptual worked examples of the team/system-boundary reasoning this skill applies — useful for understanding the reasoning, but the actual analysis steps are the numbered Workflow steps in the main SKILL.md.
|
|
4
|
+
|
|
5
|
+
## 1. Identify System Boundaries
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
System Boundaries:
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
Order Management System
|
|
12
|
+
- Owns: Order entity and its lifecycle
|
|
13
|
+
- Events: OrderCreated, OrderConfirmed, Cancelled
|
|
14
|
+
- Owns: Order state machine
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
Payment Processing System
|
|
19
|
+
- Owns: Payment authorization and processing
|
|
20
|
+
- Events: PaymentAuthorized, PaymentFailed
|
|
21
|
+
- Owns: Payment state machine
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
Inventory System
|
|
26
|
+
- Owns: Stock levels and reservations
|
|
27
|
+
- Events: InventoryReserved, InventoryAllocated
|
|
28
|
+
- Owns: Inventory state machine
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
Fulfillment System
|
|
33
|
+
- Owns: Shipments and delivery
|
|
34
|
+
- Events: OrderShipped, DeliveryConfirmed
|
|
35
|
+
- Owns: Shipment state machine
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## 2. Create Swimlane Diagram
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
Event Stream Timeline
|
|
43
|
+
→
|
|
44
|
+
|
|
45
|
+
Order Team OrderCreated OrderConfirmed OrderCancelled
|
|
46
|
+
|
|
47
|
+
Payment Team PaymentAuthorized PaymentFailed
|
|
48
|
+
|
|
49
|
+
Inventory Team InventoryReserved
|
|
50
|
+
|
|
51
|
+
Fulfillment Team OrderShipped DeliveryConfirmed
|
|
52
|
+
|
|
53
|
+
Each team owns their swimlane events
|
|
54
|
+
Coordination via events crossing swimlanes
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## 3. Map Team Responsibilities
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
Order Management Team
|
|
61
|
+
Commands they handle:
|
|
62
|
+
- CreateOrder
|
|
63
|
+
- ConfirmOrder
|
|
64
|
+
- CancelOrder
|
|
65
|
+
Events they produce:
|
|
66
|
+
- OrderCreated
|
|
67
|
+
- OrderConfirmed
|
|
68
|
+
- OrderCancelled
|
|
69
|
+
Read Models they maintain:
|
|
70
|
+
- OrderStatusView
|
|
71
|
+
- OrderListView
|
|
72
|
+
Systems they call:
|
|
73
|
+
- Payment System (to confirm payment)
|
|
74
|
+
- Inventory System (to check stock)
|
|
75
|
+
|
|
76
|
+
Payment Processing Team
|
|
77
|
+
Commands they handle:
|
|
78
|
+
- AuthorizePayment
|
|
79
|
+
- ProcessPayment
|
|
80
|
+
- RefundPayment
|
|
81
|
+
Events they produce:
|
|
82
|
+
- PaymentAuthorized
|
|
83
|
+
- PaymentFailed
|
|
84
|
+
- PaymentRefunded
|
|
85
|
+
Read Models they maintain:
|
|
86
|
+
- PaymentStatusView
|
|
87
|
+
- TransactionHistory
|
|
88
|
+
Systems they depend on:
|
|
89
|
+
- Payment Gateway (external)
|
|
90
|
+
- Order System (for context)
|
|
91
|
+
|
|
92
|
+
Inventory Team
|
|
93
|
+
Commands they handle:
|
|
94
|
+
- ReserveInventory
|
|
95
|
+
- ReleaseReservation
|
|
96
|
+
- AllocateStock
|
|
97
|
+
Events they produce:
|
|
98
|
+
- InventoryReserved
|
|
99
|
+
- ReservationReleased
|
|
100
|
+
- StockAllocated
|
|
101
|
+
Read Models they maintain:
|
|
102
|
+
- InventoryLevelView
|
|
103
|
+
- ReservationView
|
|
104
|
+
Systems they depend on:
|
|
105
|
+
- Order System (triggers)
|
|
106
|
+
- Warehouse System (stock source)
|
|
107
|
+
|
|
108
|
+
Fulfillment Team
|
|
109
|
+
Commands they handle:
|
|
110
|
+
- CreateShipment
|
|
111
|
+
- MarkShipped
|
|
112
|
+
- ConfirmDelivery
|
|
113
|
+
Events they produce:
|
|
114
|
+
- ShipmentCreated
|
|
115
|
+
- OrderShipped
|
|
116
|
+
- DeliveryConfirmed
|
|
117
|
+
Read Models they maintain:
|
|
118
|
+
- ShipmentTrackingView
|
|
119
|
+
- DeliveryScheduleView
|
|
120
|
+
Systems they depend on:
|
|
121
|
+
- Inventory System (items to ship)
|
|
122
|
+
- Carrier APIs (tracking)
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## 4. Identify Inter-System Communication
|
|
126
|
+
|
|
127
|
+
```
|
|
128
|
+
Communication Patterns:
|
|
129
|
+
|
|
130
|
+
Order System → Payment System
|
|
131
|
+
Order System produces: OrderConfirmed event
|
|
132
|
+
Payment System consumes: OrderConfirmed
|
|
133
|
+
Payment System reacts: Issues AuthorizePayment command
|
|
134
|
+
Payment System produces: PaymentAuthorized event
|
|
135
|
+
|
|
136
|
+
Order System → Inventory System
|
|
137
|
+
Order System produces: PaymentAuthorized event (indirectly)
|
|
138
|
+
Inventory System consumes: PaymentAuthorized
|
|
139
|
+
Inventory System reacts: Issues ReserveInventory command
|
|
140
|
+
Inventory System produces: InventoryReserved event
|
|
141
|
+
|
|
142
|
+
Inventory System → Fulfillment System
|
|
143
|
+
Inventory System produces: InventoryReserved event
|
|
144
|
+
Fulfillment System consumes: InventoryReserved
|
|
145
|
+
Fulfillment System reacts: Issues CreateShipment command
|
|
146
|
+
Fulfillment System produces: OrderShipped event
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## 5. Define System Interfaces
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
Order System Interface
|
|
153
|
+
Commands it accepts:
|
|
154
|
+
- CreateOrder (from UI)
|
|
155
|
+
- ConfirmOrder (from UI)
|
|
156
|
+
- CancelOrder (from UI or Processors)
|
|
157
|
+
Events it produces:
|
|
158
|
+
- OrderCreated
|
|
159
|
+
- OrderConfirmed
|
|
160
|
+
- OrderCancelled
|
|
161
|
+
Read Models it provides:
|
|
162
|
+
- OrderStatusView
|
|
163
|
+
- OrderListView
|
|
164
|
+
|
|
165
|
+
Payment System Interface
|
|
166
|
+
Commands it accepts:
|
|
167
|
+
- AuthorizePayment (from Payment Processor/Order System)
|
|
168
|
+
- ProcessPayment (from Order System)
|
|
169
|
+
Events it produces:
|
|
170
|
+
- PaymentAuthorized
|
|
171
|
+
- PaymentFailed
|
|
172
|
+
- PaymentProcessed
|
|
173
|
+
|
|
174
|
+
Inventory System Interface
|
|
175
|
+
Commands it accepts:
|
|
176
|
+
- ReserveInventory (triggered by PaymentAuthorized event)
|
|
177
|
+
Events it produces:
|
|
178
|
+
- InventoryReserved
|
|
179
|
+
- InventoryFailed
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
## 6. Identify Processors vs Systems
|
|
183
|
+
|
|
184
|
+
```
|
|
185
|
+
Processors (autonomous automation):
|
|
186
|
+
|
|
187
|
+
1. PaymentProcessor
|
|
188
|
+
Triggered by: OrderConfirmed event
|
|
189
|
+
Logic: Calls external payment gateway
|
|
190
|
+
Produces: AuthorizePayment command
|
|
191
|
+
Lives in: Payment System
|
|
192
|
+
|
|
193
|
+
2. InventoryProcessor
|
|
194
|
+
Triggered by: PaymentAuthorized event
|
|
195
|
+
Logic: Checks stock, reserves inventory
|
|
196
|
+
Produces: ReserveInventory command
|
|
197
|
+
Lives in: Inventory System
|
|
198
|
+
|
|
199
|
+
3. FulfillmentProcessor
|
|
200
|
+
Triggered by: InventoryReserved event
|
|
201
|
+
Logic: Creates shipment records
|
|
202
|
+
Produces: CreateShipment command
|
|
203
|
+
Lives in: Fulfillment System
|
|
204
|
+
|
|
205
|
+
4. NotificationProcessor
|
|
206
|
+
Triggered by: OrderCreated, OrderConfirmed, OrderShipped events
|
|
207
|
+
Logic: Sends emails/SMS
|
|
208
|
+
Produces: No commands (info-only)
|
|
209
|
+
Lives in: Notification System (cross-cutting)
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
## Output Format — full worked example (Order/Payment/Inventory/Fulfillment domain)
|
|
213
|
+
|
|
214
|
+
```markdown
|
|
215
|
+
# System Organization: [Domain Name]
|
|
216
|
+
|
|
217
|
+
## System Boundaries
|
|
218
|
+
|
|
219
|
+
### System: Order Management
|
|
220
|
+
- **Team**: Order Team
|
|
221
|
+
- **Responsibilities**: Create, confirm, cancel orders
|
|
222
|
+
- **Commands**: CreateOrder, ConfirmOrder, CancelOrder
|
|
223
|
+
- **Events Produced**: OrderCreated, OrderConfirmed, OrderCancelled
|
|
224
|
+
- **Events Consumed**: PaymentAuthorized, InventoryReserved (for state updates)
|
|
225
|
+
- **Read Models**: OrderStatusView, OrderListView
|
|
226
|
+
- **Scope**: One stream type (Order)
|
|
227
|
+
|
|
228
|
+
### System: Payment Processing
|
|
229
|
+
- **Team**: Payment Team
|
|
230
|
+
- **Responsibilities**: Authorize and process payments
|
|
231
|
+
- **Commands**: AuthorizePayment, ProcessPayment, RefundPayment
|
|
232
|
+
- **Events Produced**: PaymentAuthorized, PaymentFailed, PaymentRefunded
|
|
233
|
+
- **Events Consumed**: OrderConfirmed (from Order System)
|
|
234
|
+
- **Read Models**: PaymentStatusView, TransactionHistory
|
|
235
|
+
- **Dependencies**: External payment gateway
|
|
236
|
+
- **Scope**: One stream type (Payment)
|
|
237
|
+
|
|
238
|
+
### System: Inventory Management
|
|
239
|
+
- **Team**: Inventory Team
|
|
240
|
+
- **Responsibilities**: Stock management and reservations
|
|
241
|
+
- **Commands**: ReserveInventory, ReleaseReservation, AllocateStock
|
|
242
|
+
- **Events Produced**: InventoryReserved, ReservationReleased, StockAllocated
|
|
243
|
+
- **Events Consumed**: PaymentAuthorized (from Payment System)
|
|
244
|
+
- **Read Models**: InventoryLevelView, ReservationView
|
|
245
|
+
- **Dependencies**: Warehouse system
|
|
246
|
+
- **Scope**: One stream type (InventoryReservation)
|
|
247
|
+
|
|
248
|
+
[Continue for each system]
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
## Event Flow Across System Boundaries
|
|
253
|
+
|
|
254
|
+
### Flow: Order → Payment → Inventory → Fulfillment
|
|
255
|
+
|
|
256
|
+
```
|
|
257
|
+
Time →
|
|
258
|
+
|
|
259
|
+
Order System
|
|
260
|
+
OrderCreated →
|
|
261
|
+
OrderConfirmed →
|
|
262
|
+
(triggers)
|
|
263
|
+
Payment System
|
|
264
|
+
PaymentAuthorized →
|
|
265
|
+
(triggers)
|
|
266
|
+
Inventory System
|
|
267
|
+
InventoryReserved →
|
|
268
|
+
(triggers)
|
|
269
|
+
Fulfillment System
|
|
270
|
+
OrderShipped
|
|
271
|
+
DeliveryConfirmed
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
---
|
|
275
|
+
|
|
276
|
+
## Team Responsibilities Matrix
|
|
277
|
+
|
|
278
|
+
| Team | Creates Commands | Produces Events | Owns Read Models |
|
|
279
|
+
|------|-----------------|-----------------|------------------|
|
|
280
|
+
| Order | CreateOrder, ConfirmOrder | OrderCreated, OrderConfirmed | OrderStatusView |
|
|
281
|
+
| Payment | AuthorizePayment | PaymentAuthorized | PaymentStatusView |
|
|
282
|
+
| Inventory | ReserveInventory | InventoryReserved | InventoryLevelView |
|
|
283
|
+
| Fulfillment | CreateShipment | OrderShipped | ShipmentTrackingView |
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
## Inter-System Communication
|
|
288
|
+
|
|
289
|
+
### Order → Payment
|
|
290
|
+
- Trigger: OrderConfirmed event
|
|
291
|
+
- Action: Payment System listens via Processor
|
|
292
|
+
- Result: AuthorizePayment command issued
|
|
293
|
+
|
|
294
|
+
### Payment → Inventory
|
|
295
|
+
- Trigger: PaymentAuthorized event
|
|
296
|
+
- Action: Inventory System listens via Processor
|
|
297
|
+
- Result: ReserveInventory command issued
|
|
298
|
+
|
|
299
|
+
[Document all communication patterns]
|
|
300
|
+
|
|
301
|
+
---
|
|
302
|
+
|
|
303
|
+
## Dependencies
|
|
304
|
+
|
|
305
|
+
### External Systems
|
|
306
|
+
|
|
307
|
+
| System | Owns | Called By | Purpose |
|
|
308
|
+
|--------|------|-----------|---------|
|
|
309
|
+
| Payment Gateway | Payment provider | Payment System | Authorization |
|
|
310
|
+
| Warehouse | Inventory source | Inventory System | Stock info |
|
|
311
|
+
| Carrier API | Shipping | Fulfillment System | Tracking |
|
|
312
|
+
|
|
313
|
+
---
|
|
314
|
+
|
|
315
|
+
## Independent Development
|
|
316
|
+
|
|
317
|
+
Each system can:
|
|
318
|
+
- Develop independently
|
|
319
|
+
- Use different tech stacks
|
|
320
|
+
- Scale independently
|
|
321
|
+
- Deploy independently
|
|
322
|
+
- Own their events
|
|
323
|
+
- Maintain their read models
|
|
324
|
+
|
|
325
|
+
Coordination via:
|
|
326
|
+
- Events (async messaging)
|
|
327
|
+
- Processors (listen and react)
|
|
328
|
+
- Read models (shared views)
|
|
329
|
+
```
|