@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-identifying-inputs/SKILL.md
CHANGED
|
@@ -88,220 +88,40 @@ Given UI storyboards and event timeline, identify all inputs.
|
|
|
88
88
|
|
|
89
89
|
**PREREQUISITE**: The **Role Catalog** from Step 1 (eventmodeling-brainstorming-events) must exist. Every command identified below MUST be attributed to a specific role or system actor from that catalog.
|
|
90
90
|
|
|
91
|
-
|
|
92
|
-
For each user action in storyboard, create a command attributed to a specific role:
|
|
91
|
+
> **Scope note**: This step only places the AUTOMATION actor and its COMMAND (per the Timeline Alignment Rules in `eventmodeling-orchestrating-event-modeling`). Do not attempt to design an automation's todo-list READMODEL here, and do not resolve an externally-triggered automation into a translation chain here — that is Step 4b (`eventmodeling-designing-automation-chains`), which runs immediately after this step completes, before Step 5. **Do not place anything at all** for a command whose only trigger is an EVENT node already sitting in another swimlane (see "Identify Processor Triggers" below) — leave that entire case, node placement included, to Step 4b.
|
|
93
92
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
User action: Click "Create Order" button
|
|
97
|
-
↓
|
|
98
|
-
Command: CreateOrder
|
|
99
|
-
Input data from form:
|
|
100
|
-
- customerId
|
|
101
|
-
- items[] (product selections + quantities)
|
|
102
|
-
- shippingAddress
|
|
103
|
-
Validation:
|
|
104
|
-
- customerId must exist
|
|
105
|
-
- items must not be empty
|
|
106
|
-
- quantities must be > 0
|
|
107
|
-
Produces event: OrderCreated
|
|
108
|
-
```
|
|
93
|
+
### 1. Extract Commands from UI Actions
|
|
94
|
+
For each user action in storyboard, create a command attributed to a specific role: name the command, list the input fields the form captures, state the validation rules that apply, and record the event it produces. A full worked example (Order Creation → CreateOrder) is in `references/examples.md`.
|
|
109
95
|
|
|
110
96
|
### 2. Identify Processor Triggers
|
|
111
|
-
Identify automation-triggered commands:
|
|
97
|
+
Identify automation-triggered commands: for each processor-triggered action (a webhook, a scheduled job), create a command attributed to the source system, documenting its input data, validation rules, and the event it produces. A full worked example (a payment webhook → AuthorizePayment) is in `references/examples.md`.
|
|
112
98
|
|
|
113
|
-
|
|
114
|
-
Processor trigger: Payment gateway webhook received
|
|
115
|
-
↓
|
|
116
|
-
Command: AuthorizePayment (from Processor, not UI)
|
|
117
|
-
Input data from webhook:
|
|
118
|
-
- orderId
|
|
119
|
-
- paymentId
|
|
120
|
-
- authorizationCode
|
|
121
|
-
Validation:
|
|
122
|
-
- orderId must exist and be in Confirmed state
|
|
123
|
-
- authorizationCode must be valid
|
|
124
|
-
Produces event: PaymentAuthorized
|
|
125
|
-
```
|
|
99
|
+
**Stop and check before placing any of these**: is the "processor trigger" already a placed EVENT node in a second (external) swimlane — e.g. a `CopyReserved (ext)` event from Step 1's brainstorming — rather than an unmodeled webhook with no board node? The two cases are handled completely differently:
|
|
126
100
|
|
|
127
|
-
|
|
128
|
-
|
|
101
|
+
- **No pre-existing EVENT node** (a genuine webhook/API call, like `AuthorizePayment` above): proceed as written below — place the AUTOMATION+COMMAND in one column, wire `COMMAND → EVENT` normally.
|
|
102
|
+
- **A pre-existing EVENT node in another swimlane**: do **not** place the AUTOMATION/COMMAND in that event's column, and do **not** wire `COMMAND → EVENT` to it — that event already happened in another system; this chapter's command cannot be the thing that produces it. List the command in the Command Catalog as *deferred to Step 4b* and stop there. `eventmodeling-designing-automation-chains` places the correct multi-column translation-chain-plus-worker shape from scratch; anything placed here for this case would only have to be deleted and redone there.
|
|
129
103
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
PaymentAuthorized → triggers Inventory system
|
|
133
|
-
|
|
134
|
-
Processor: InventoryReserver
|
|
135
|
-
|
|
136
|
-
Todo List:
|
|
137
|
-
When PaymentAuthorized event arrives:
|
|
138
|
-
1. Add item to todo: "Reserve inventory for order-123"
|
|
139
|
-
|
|
140
|
-
Processor Logic (continuously):
|
|
141
|
-
FOR EACH todo item IN todo_list:
|
|
142
|
-
- Check if inventory available
|
|
143
|
-
- If yes: Reserve inventory, produce InventoryReserved event, mark done
|
|
144
|
-
- If no: Produce InventoryFailed event, mark failed
|
|
145
|
-
- If error: Keep in todo for retry
|
|
146
|
-
|
|
147
|
-
Example:
|
|
148
|
-
Event: PaymentAuthorized(orderId=order-123, items=[{prodId: P1, qty: 2}])
|
|
149
|
-
↓
|
|
150
|
-
Todo added: Reserve P1 qty 2
|
|
151
|
-
↓
|
|
152
|
-
Processor checks: P1 has 5 available, need 2
|
|
153
|
-
↓
|
|
154
|
-
Action: Reserve 2 units
|
|
155
|
-
↓
|
|
156
|
-
Event produced: InventoryReserved(orderId=order-123, reserved=[...])
|
|
157
|
-
↓
|
|
158
|
-
Todo marked done
|
|
159
|
-
```
|
|
104
|
+
### 2b. Understand the Processor "Todo List" Pattern
|
|
105
|
+
Processors don't directly process events—they maintain a todo list driven by events: a triggering event adds an item to the processor's todo list, and the processor continuously walks that list, checking a condition for each item and either succeeding (producing a success event, marking the item done) or failing (producing a failure event or leaving it for retry). A full worked example (PaymentAuthorized → InventoryReserver's todo list) is in `references/examples.md`.
|
|
160
106
|
|
|
161
107
|
**Key insight**: Processors are reactive. They listen for events and create todo items, then execute those todos by issuing commands that produce new events.
|
|
162
108
|
|
|
163
109
|
### 2c. Document Processor Automation (Gears Symbol)
|
|
164
|
-
Show which commands come from automation vs. user actions:
|
|
165
|
-
|
|
166
|
-
```
|
|
167
|
-
Command Catalog with Role Attribution (from Role Catalog):
|
|
168
|
-
|
|
169
|
-
UI-Issued Commands (attributed to specific human roles):
|
|
170
|
-
1. CreateOrder (Order Entry screen) [ Customer]
|
|
171
|
-
2. ConfirmOrder (Confirmation screen) [ Customer]
|
|
172
|
-
3. CancelOrder (Status screen) [ Customer]
|
|
173
|
-
4. RequestReturn (Order page) [ Customer]
|
|
174
|
-
5. OverrideOrderStatus (Admin panel) [ Support Agent]
|
|
175
|
-
|
|
176
|
-
Processor-Issued Commands (attributed to system actors):
|
|
177
|
-
6. AuthorizePayment (Payment gateway webhook) [ Payment Gateway]
|
|
178
|
-
7. ReserveInventory (Triggered by PaymentAuthorized) [ Inventory System]
|
|
179
|
-
8. CreateShipment (Triggered by InventoryReserved) [ Fulfillment System]
|
|
180
|
-
9. NotifyCustomer (Triggered by multiple events) [ Notification Service]
|
|
181
|
-
```
|
|
110
|
+
Show which commands come from automation vs. user actions: catalog every command with its role/actor attribution, separating UI-issued commands (attributed to specific human roles) from processor-issued commands (attributed to system actors/services). A full worked example is in `references/examples.md`.
|
|
182
111
|
|
|
183
112
|
**Validation**: Every command MUST have a role/actor attribution. If a command says `[ User]` instead of a specific role name, it's incomplete — go back to the Role Catalog and assign the correct role.
|
|
184
113
|
|
|
185
114
|
### 3. Document Command Specifics
|
|
186
|
-
For each command, define structure:
|
|
187
|
-
|
|
188
|
-
```
|
|
189
|
-
Command: ConfirmOrder
|
|
190
|
-
Source: UI (user clicks button)
|
|
191
|
-
Input:
|
|
192
|
-
orderId: string (from URL/context)
|
|
193
|
-
paymentMethod: enum ('card' | 'transfer')
|
|
194
|
-
[paymentDetails]: depends on method
|
|
195
|
-
|
|
196
|
-
Validation rules:
|
|
197
|
-
- Order must exist
|
|
198
|
-
- Order must be in Draft state
|
|
199
|
-
- Payment method must be supported
|
|
200
|
-
- Funds must be available (pre-check)
|
|
201
|
-
|
|
202
|
-
Preconditions (from stream state):
|
|
203
|
-
- OrderCreated event exists
|
|
204
|
-
- No ConfirmOrder previously processed
|
|
205
|
-
|
|
206
|
-
Success result: OrderConfirmed event
|
|
207
|
-
|
|
208
|
-
Failure results:
|
|
209
|
-
- "Order not found" → Command rejected, no event
|
|
210
|
-
- "Order already confirmed" → Command rejected, no event
|
|
211
|
-
- "Payment method not supported" → Command rejected, no event
|
|
212
|
-
```
|
|
115
|
+
For each command, define structure: its source, its typed input fields, the validation rules it enforces, the preconditions it checks against stream state, the success event it produces, and each distinct failure outcome. A full worked example (ConfirmOrder) is in `references/examples.md`.
|
|
213
116
|
|
|
214
117
|
### 4. Create Command Catalog
|
|
215
|
-
List all commands the system accepts
|
|
216
|
-
|
|
217
|
-
```
|
|
218
|
-
Command Catalog: Order System
|
|
219
|
-
|
|
220
|
-
### UI-Issued Commands
|
|
221
|
-
|
|
222
|
-
1. CreateOrder
|
|
223
|
-
Source: User (Order Entry screen)
|
|
224
|
-
Input: customerId, items[], shippingAddress
|
|
225
|
-
Produces: OrderCreated event
|
|
226
|
-
|
|
227
|
-
2. ConfirmOrder
|
|
228
|
-
Source: User (Confirmation screen)
|
|
229
|
-
Input: orderId, paymentMethod
|
|
230
|
-
Produces: OrderConfirmed event
|
|
231
|
-
|
|
232
|
-
3. CancelOrder
|
|
233
|
-
Source: User (Status screen)
|
|
234
|
-
Input: orderId, reason
|
|
235
|
-
Produces: OrderCancelled event
|
|
236
|
-
|
|
237
|
-
### Processor-Issued Commands
|
|
238
|
-
|
|
239
|
-
4. AuthorizePayment
|
|
240
|
-
Source: Payment Processor (webhook)
|
|
241
|
-
Input: orderId, paymentId, authCode
|
|
242
|
-
Produces: PaymentAuthorized event
|
|
243
|
-
|
|
244
|
-
5. FailPayment
|
|
245
|
-
Source: Payment Processor (webhook)
|
|
246
|
-
Input: orderId, paymentId, reason
|
|
247
|
-
Produces: PaymentFailed event
|
|
248
|
-
|
|
249
|
-
6. ReserveInventory
|
|
250
|
-
Source: Inventory Processor (triggered by PaymentAuthorized)
|
|
251
|
-
Input: orderId, items[]
|
|
252
|
-
Produces: InventoryReserved event
|
|
253
|
-
|
|
254
|
-
7. CreateShipment
|
|
255
|
-
Source: Fulfillment Processor (triggered by InventoryReserved)
|
|
256
|
-
Input: orderId, items[]
|
|
257
|
-
Produces: OrderShipped event
|
|
258
|
-
```
|
|
118
|
+
List all commands the system accepts, grouped into UI-issued and processor-issued sections, each with its source, input fields, and the event it produces. A full worked example is in `references/examples.md`.
|
|
259
119
|
|
|
260
120
|
### 5. Map Data Sources
|
|
261
|
-
Document where each command input comes from
|
|
262
|
-
|
|
263
|
-
```
|
|
264
|
-
Command: ConfirmOrder
|
|
265
|
-
|
|
266
|
-
Data origin matrix:
|
|
267
|
-
orderId
|
|
268
|
-
↑ Source: UI context (from OrderCreated, displayed to user)
|
|
269
|
-
↑ Captured: Hidden in URL or session
|
|
270
|
-
↑ Validation: Must match Order from stream
|
|
271
|
-
|
|
272
|
-
paymentMethod
|
|
273
|
-
↑ Source: UI form selection
|
|
274
|
-
↑ Captured: User selects checkbox/radio
|
|
275
|
-
↑ Validation: Must be in allowed list
|
|
276
|
-
|
|
277
|
-
[paymentDetails] (conditional)
|
|
278
|
-
↑ Source: Depends on paymentMethod
|
|
279
|
-
↑ For 'card': Card number, CVV, expiry (from payment form)
|
|
280
|
-
↑ For 'transfer': Bank account, routing number (from form)
|
|
281
|
-
↑ Validation: Format and validity checks
|
|
282
|
-
```
|
|
121
|
+
Document where each command input comes from — UI context, a form selection, a conditional field that depends on another field's value — and how it's validated. A full worked example is in `references/examples.md`.
|
|
283
122
|
|
|
284
123
|
### 6. Identify Implicit Context
|
|
285
|
-
Document what comes from stream state:
|
|
286
|
-
|
|
287
|
-
```
|
|
288
|
-
Command: ShipOrder
|
|
289
|
-
Explicit input (from UI/Processor):
|
|
290
|
-
orderId
|
|
291
|
-
shipmentId (from fulfillment system)
|
|
292
|
-
|
|
293
|
-
Implicit context (from stream state):
|
|
294
|
-
Order must exist
|
|
295
|
-
Order must be in InventoryReserved state
|
|
296
|
-
Payment must be authorized (from PaymentAuthorized event)
|
|
297
|
-
Inventory must be reserved (from InventoryReserved event)
|
|
298
|
-
|
|
299
|
-
These implicit checks use stream state:
|
|
300
|
-
currentState.orderId === orderId
|
|
301
|
-
currentState.status === 'InventoryReserved'
|
|
302
|
-
currentState.paymentId exists
|
|
303
|
-
currentState.shipmentId can be set
|
|
304
|
-
```
|
|
124
|
+
Document what comes from stream state beyond the command's explicit input: the preconditions the command implicitly relies on (e.g. prior events that must already exist, a required prior status) that its validation logic checks against. A full worked example is in `references/examples.md`.
|
|
305
125
|
|
|
306
126
|
## Output Format
|
|
307
127
|
|
|
@@ -402,53 +222,7 @@ mcp__eventmodelers__submit_node_events {
|
|
|
402
222
|
}
|
|
403
223
|
```
|
|
404
224
|
|
|
405
|
-
**Fallback (no MCP)
|
|
406
|
-
|
|
407
|
-
**Step A — Find the event's column ID.** Query the event node to read its current cell:
|
|
408
|
-
```bash
|
|
409
|
-
curl -s -H "x-token: $TOKEN" -H "x-board-id: $BOARD_ID" \
|
|
410
|
-
"$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/nodes/$EVENT_NODE_ID"
|
|
411
|
-
# → node.meta.cellId is "<someRowId>-<columnId>" — extract the columnId part
|
|
412
|
-
```
|
|
413
|
-
|
|
414
|
-
**Step B — Fetch the chapter to find the interaction row ID:**
|
|
415
|
-
```bash
|
|
416
|
-
curl -s -H "x-token: $TOKEN" -H "x-board-id: $BOARD_ID" \
|
|
417
|
-
"$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/nodes/$CHAPTER_ID"
|
|
418
|
-
# → timelineData.rows — find the row where type === "interaction"
|
|
419
|
-
```
|
|
420
|
-
Save `interactionRow.id`.
|
|
421
|
-
|
|
422
|
-
**Step C — Compute the cell ID:**
|
|
423
|
-
```
|
|
424
|
-
cellId = interactionRow.id + "-" + columnId
|
|
425
|
-
```
|
|
426
|
-
|
|
427
|
-
**Step D — Create the command with `cellId`:**
|
|
428
|
-
|
|
429
|
-
```bash
|
|
430
|
-
curl -X POST "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/nodes/events" \
|
|
431
|
-
-H "x-token: $TOKEN" -H "x-board-id: $BOARD_ID" -H "x-user-id: identifying-inputs" \
|
|
432
|
-
-H "Content-Type: application/json" \
|
|
433
|
-
-d '[{
|
|
434
|
-
"id": "<event-uuid>",
|
|
435
|
-
"eventType": "node:created",
|
|
436
|
-
"nodeId": "<node-uuid>",
|
|
437
|
-
"boardId": "<boardId>",
|
|
438
|
-
"timestamp": 1234567890,
|
|
439
|
-
"chapterId": "<chapterId>",
|
|
440
|
-
"cellId": "<interactionRowId>-<columnId>",
|
|
441
|
-
"meta": {
|
|
442
|
-
"type": "COMMAND",
|
|
443
|
-
"title": "ReserveBike",
|
|
444
|
-
"fields": [
|
|
445
|
-
{"name": "customerId", "type": "String", "example": "cust-42", "mapping": "session:customerId"},
|
|
446
|
-
{"name": "bikeId", "type": "String", "example": "bike-17", "mapping": "user-input"},
|
|
447
|
-
{"name": "startTime", "type": "DateTime", "example": "2026-06-01T09:00:00Z","mapping": "user-input"}
|
|
448
|
-
]
|
|
449
|
-
}
|
|
450
|
-
}]'
|
|
451
|
-
```
|
|
225
|
+
**Fallback (no MCP):** see `references/api-fallback.md` — "Creating a COMMAND node — full manual sequence (Steps A–D)".
|
|
452
226
|
|
|
453
227
|
> **Never call `drop` after using `cellId` in `node:created`.** The drop endpoint adds a second cell reference without removing the first. `node:created + cellId` is the only placement step needed.
|
|
454
228
|
|
|
@@ -470,133 +244,46 @@ After `place-element` returns the COMMAND node ID, create the arrows that comple
|
|
|
470
244
|
|
|
471
245
|
1. **SCREEN → COMMAND** — find the SCREEN node in the actor row of the same column.
|
|
472
246
|
|
|
473
|
-
**Prefer MCP** — there is no `cellId` filter on `get_nodes` (see note below), so read the chapter's cell map instead:
|
|
247
|
+
**Prefer MCP** — there is no `cellId` filter on `get_nodes` (see note below), so read the chapter's cell map instead — `projection: "cells"` returns just `{rows, columns, cells}`, not the whole chapter node:
|
|
474
248
|
```
|
|
475
|
-
mcp__eventmodelers__get_node { "boardId": "<BOARD_ID>", "nodeId": "<CHAPTER_ID>" }
|
|
249
|
+
mcp__eventmodelers__get_node { "boardId": "<BOARD_ID>", "nodeId": "<CHAPTER_ID>", "projection": "cells" }
|
|
476
250
|
```
|
|
477
|
-
Read `
|
|
251
|
+
Read `cells["<actorRowId>-<columnId>"]` for the occupying node id (a cell id absent from that sparse array is empty — no SCREEN placed yet). Then connect with the type-checked edge tool, which auto-corrects direction and skips duplicates:
|
|
478
252
|
```
|
|
479
253
|
mcp__eventmodelers__set_connection { "boardId": "<BOARD_ID>", "source": "<screenNodeId>", "target": "<commandNodeId>", "action": "connect" }
|
|
480
254
|
```
|
|
255
|
+
If wiring more than one COMMAND in the same pass, prefer batching every SCREEN→COMMAND and COMMAND→EVENT pair across all of them into one `set_connections` call (see step 2 below) instead of one `set_connection` per pair.
|
|
481
256
|
|
|
482
|
-
**Fallback (no MCP):**
|
|
483
|
-
```bash
|
|
484
|
-
curl -s "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/nodes?cellId=<actorRowId>-<columnId>" \
|
|
485
|
-
-H "x-token: $TOKEN" -H "x-board-id: $BOARD_ID" -H "x-user-id: eventmodeling-identifying-inputs"
|
|
486
|
-
```
|
|
487
|
-
If a SCREEN node exists, connect it:
|
|
488
|
-
```bash
|
|
489
|
-
curl -s -X POST "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/connections" \
|
|
490
|
-
-H "x-token: $TOKEN" -H "x-board-id: $BOARD_ID" -H "x-user-id: eventmodeling-identifying-inputs" \
|
|
491
|
-
-H "Content-Type: application/json" \
|
|
492
|
-
-d '{"source":"<screenNodeId>","target":"<commandNodeId>"}'
|
|
493
|
-
```
|
|
257
|
+
**Fallback (no MCP):** see `references/api-fallback.md` — "Wire connections — Step 1: SCREEN → COMMAND".
|
|
494
258
|
|
|
495
259
|
2. **COMMAND → EVENT** — find the EVENT node in the swimlane row of the same column.
|
|
496
260
|
|
|
261
|
+
**Guard**: if the occupying EVENT node belongs to a different (external) swimlane than this chapter's own default swimlane, stop — do not create this connection. An external system's own event cannot be the thing this chapter's command produces; that case belongs entirely to Step 4b's translation chain. (This should not arise if the "Identify Processor Triggers" check above was followed, but re-check here before connecting, since it's the point of no return for a wrong edge.)
|
|
262
|
+
|
|
497
263
|
**Prefer MCP** — same cell-map lookup, then connect:
|
|
498
264
|
```
|
|
499
|
-
mcp__eventmodelers__get_node { "boardId": "<BOARD_ID>", "nodeId": "<CHAPTER_ID>" }
|
|
265
|
+
mcp__eventmodelers__get_node { "boardId": "<BOARD_ID>", "nodeId": "<CHAPTER_ID>", "projection": "cells" }
|
|
500
266
|
```
|
|
501
|
-
Read `
|
|
267
|
+
Read `cells["<swimlaneRowId>-<columnId>"]` for the occupying node id, then:
|
|
502
268
|
```
|
|
503
269
|
mcp__eventmodelers__set_connection { "boardId": "<BOARD_ID>", "source": "<commandNodeId>", "target": "<eventNodeId>", "action": "connect" }
|
|
504
270
|
```
|
|
505
271
|
|
|
506
|
-
**Fallback (no MCP):**
|
|
507
|
-
```bash
|
|
508
|
-
curl -s "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/nodes?cellId=<swimlaneRowId>-<columnId>" \
|
|
509
|
-
-H "x-token: $TOKEN" -H "x-board-id: $BOARD_ID" -H "x-user-id: eventmodeling-identifying-inputs"
|
|
510
|
-
```
|
|
511
|
-
Connect command to its resulting event:
|
|
512
|
-
```bash
|
|
513
|
-
curl -s -X POST "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/connections" \
|
|
514
|
-
-H "x-token: $TOKEN" -H "x-board-id: $BOARD_ID" -H "x-user-id: eventmodeling-identifying-inputs" \
|
|
515
|
-
-H "Content-Type: application/json" \
|
|
516
|
-
-d '{"source":"<commandNodeId>","target":"<eventNodeId>"}'
|
|
517
|
-
```
|
|
272
|
+
**Fallback (no MCP):** see `references/api-fallback.md` — "Wire connections — Step 2: COMMAND → EVENT".
|
|
518
273
|
|
|
519
|
-
*Note:* `get_nodes` has no `cellId` filter (only `type`) — the `get_node`-on-CHAPTER + `
|
|
274
|
+
*Note:* `get_nodes` has no `cellId` filter (only `type`) — the `get_node`-on-CHAPTER (`projection: "cells"`) + `cells` lookup above is the only way to check single-cell occupancy via MCP.
|
|
520
275
|
|
|
521
276
|
Skip a connection silently if the target cell is empty (the element may be placed in a later step). Log each created arrow: `→ connected SCREEN→COMMAND "PlaceOrder"` or `→ connected COMMAND→EVENT "PlaceOrder"→"OrderPlaced"`.
|
|
522
277
|
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
---
|
|
526
|
-
|
|
527
|
-
For reference, the full markdown structure is:
|
|
528
|
-
|
|
529
|
-
```markdown
|
|
530
|
-
# Inputs: [Domain Name]
|
|
278
|
+
If wiring more than one COMMAND in this pass, send all the SCREEN→COMMAND and COMMAND→EVENT edges in one `set_connections` call with `compact: true` — you author every edge here deliberately, so the `{connected, existed, removed, notFound, failed, errors}` tally is enough.
|
|
531
279
|
|
|
532
|
-
|
|
280
|
+
**After wiring, run `validate_model` (`{boardId, chapterId}`).** Its `command-issuers` finding flags any COMMAND that ended up with two issuers — the classic symptom of the platform's auto-connect cross-wiring a previous-column SCREEN into a command that an AUTOMATION already drives (or vice versa). Fix each by removing the wrong edge. If you already know a placement sits next to an unrelated column whose SCREEN/AUTOMATION would be mis-wired, place that COMMAND with `autoConnect: false` and wire its single real issuer yourself.
|
|
533
281
|
|
|
534
|
-
|
|
535
|
-
|---------|------------|--------|---------|-------|-------|
|
|
536
|
-
| CreateOrder | Customer | UI | User action | customerId, items, address | OrderCreated |
|
|
537
|
-
| ConfirmOrder | Customer | UI | User action | orderId, paymentMethod | OrderConfirmed |
|
|
538
|
-
| CancelOrder | Customer | UI | User action | orderId, reason | OrderCancelled |
|
|
539
|
-
| AuthorizePayment | Payment Gateway | Processor | Webhook | orderId, paymentId | PaymentAuthorized |
|
|
540
|
-
| ReserveInventory | Inventory System | Processor | PaymentAuthorized event | orderId, items | InventoryReserved |
|
|
541
|
-
| ShipOrder | Fulfillment System | Processor | InventoryReserved event | orderId, shipmentId | OrderShipped |
|
|
542
|
-
|
|
543
|
-
---
|
|
544
|
-
|
|
545
|
-
## Detailed Commands
|
|
546
|
-
|
|
547
|
-
### Command: CreateOrder
|
|
548
|
-
|
|
549
|
-
**Source**: User (Order Entry screen)
|
|
550
|
-
|
|
551
|
-
**Input Data**:
|
|
552
|
-
- customerId: string
|
|
553
|
-
- items: Array<{productId: string, quantity: number}>
|
|
554
|
-
- shippingAddress: {street, city, state, zip}
|
|
555
|
-
|
|
556
|
-
**Validation**:
|
|
557
|
-
- customerId must exist in system
|
|
558
|
-
- items array must not be empty
|
|
559
|
-
- quantities must be > 0
|
|
560
|
-
- address fields must be non-empty
|
|
561
|
-
|
|
562
|
-
**Preconditions** (from stream state):
|
|
563
|
-
- Stream Order:X does not exist yet
|
|
564
|
-
|
|
565
|
-
**Success**: Produces OrderCreated event
|
|
566
|
-
|
|
567
|
-
**Failure**: Command rejected, no event
|
|
568
|
-
- "Customer not found"
|
|
569
|
-
- "Items invalid"
|
|
570
|
-
- "Address incomplete"
|
|
571
|
-
|
|
572
|
-
--- [Repeat for each command]
|
|
573
|
-
|
|
574
|
-
---
|
|
575
|
-
|
|
576
|
-
## Data Completeness Check
|
|
577
|
-
|
|
578
|
-
### Data Input → Event
|
|
579
|
-
|
|
580
|
-
Verify every command input becomes event data:
|
|
581
|
-
|
|
582
|
-
| Command Input | Event Data | Status |
|
|
583
|
-
|---------------|-----------|--------|
|
|
584
|
-
| customerId | orderId | Stored in OrderCreated |
|
|
585
|
-
| items | items | Stored in OrderCreated |
|
|
586
|
-
| shippingAddress | shippingAddress | Stored in OrderCreated |
|
|
587
|
-
|
|
588
|
-
### Missing Data
|
|
589
|
-
|
|
590
|
-
Document any input that doesn't make it to events:
|
|
591
|
-
- None identified
|
|
282
|
+
After all commands are placed and wired, present the Command Catalog summary as text to the user.
|
|
592
283
|
|
|
593
284
|
---
|
|
594
285
|
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
Document all processor-triggered commands:
|
|
598
|
-
[List each with source system and trigger condition]
|
|
599
|
-
```
|
|
286
|
+
Older versions of this skill wrote the command catalog as a markdown document rather than placing nodes on the board — that legacy template is kept in `references/examples.md` for reference only; it is not the actual output mechanism.
|
|
600
287
|
|
|
601
288
|
## Quality Checklist
|
|
602
289
|
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Identifying Inputs — curl Fallback Calls
|
|
2
|
+
|
|
3
|
+
Only needed when MCP is not connected. Every call below has an MCP equivalent in the main SKILL.md — always prefer that.
|
|
4
|
+
|
|
5
|
+
## Creating a COMMAND node — full manual sequence (Steps A–D)
|
|
6
|
+
|
|
7
|
+
**Step A — Find the event's column ID.** Query the event node to read its current cell:
|
|
8
|
+
```bash
|
|
9
|
+
curl -s -H "x-token: $TOKEN" -H "x-board-id: $BOARD_ID" \
|
|
10
|
+
"$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/nodes/$EVENT_NODE_ID"
|
|
11
|
+
# → node.meta.cellId is "<someRowId>-<columnId>" — extract the columnId part
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
**Step B — Fetch the chapter to find the interaction row ID:**
|
|
15
|
+
```bash
|
|
16
|
+
curl -s -H "x-token: $TOKEN" -H "x-board-id: $BOARD_ID" \
|
|
17
|
+
"$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/nodes/$CHAPTER_ID"
|
|
18
|
+
# → timelineData.rows — find the row where type === "interaction"
|
|
19
|
+
```
|
|
20
|
+
Save `interactionRow.id`.
|
|
21
|
+
|
|
22
|
+
**Step C — Compute the cell ID:**
|
|
23
|
+
```
|
|
24
|
+
cellId = interactionRow.id + "-" + columnId
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
**Step D — Create the command with `cellId`:**
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
curl -X POST "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/nodes/events" \
|
|
31
|
+
-H "x-token: $TOKEN" -H "x-board-id: $BOARD_ID" -H "x-user-id: identifying-inputs" \
|
|
32
|
+
-H "Content-Type: application/json" \
|
|
33
|
+
-d '[{
|
|
34
|
+
"id": "<event-uuid>",
|
|
35
|
+
"eventType": "node:created",
|
|
36
|
+
"nodeId": "<node-uuid>",
|
|
37
|
+
"boardId": "<boardId>",
|
|
38
|
+
"timestamp": 1234567890,
|
|
39
|
+
"chapterId": "<chapterId>",
|
|
40
|
+
"cellId": "<interactionRowId>-<columnId>",
|
|
41
|
+
"meta": {
|
|
42
|
+
"type": "COMMAND",
|
|
43
|
+
"title": "ReserveBike",
|
|
44
|
+
"fields": [
|
|
45
|
+
{"name": "customerId", "type": "String", "example": "cust-42", "mapping": "session:customerId"},
|
|
46
|
+
{"name": "bikeId", "type": "String", "example": "bike-17", "mapping": "user-input"},
|
|
47
|
+
{"name": "startTime", "type": "DateTime", "example": "2026-06-01T09:00:00Z","mapping": "user-input"}
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
}]'
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Wire connections — Step 1: SCREEN → COMMAND
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
curl -s "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/nodes?cellId=<actorRowId>-<columnId>" \
|
|
57
|
+
-H "x-token: $TOKEN" -H "x-board-id: $BOARD_ID" -H "x-user-id: eventmodeling-identifying-inputs"
|
|
58
|
+
```
|
|
59
|
+
If a SCREEN node exists, connect it:
|
|
60
|
+
```bash
|
|
61
|
+
curl -s -X POST "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/connections" \
|
|
62
|
+
-H "x-token: $TOKEN" -H "x-board-id: $BOARD_ID" -H "x-user-id: eventmodeling-identifying-inputs" \
|
|
63
|
+
-H "Content-Type: application/json" \
|
|
64
|
+
-d '{"source":"<screenNodeId>","target":"<commandNodeId>"}'
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Wire connections — Step 2: COMMAND → EVENT
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
curl -s "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/nodes?cellId=<swimlaneRowId>-<columnId>" \
|
|
71
|
+
-H "x-token: $TOKEN" -H "x-board-id: $BOARD_ID" -H "x-user-id: eventmodeling-identifying-inputs"
|
|
72
|
+
```
|
|
73
|
+
Connect command to its resulting event:
|
|
74
|
+
```bash
|
|
75
|
+
curl -s -X POST "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/connections" \
|
|
76
|
+
-H "x-token: $TOKEN" -H "x-board-id: $BOARD_ID" -H "x-user-id: eventmodeling-identifying-inputs" \
|
|
77
|
+
-H "Content-Type: application/json" \
|
|
78
|
+
-d '{"source":"<commandNodeId>","target":"<eventNodeId>"}'
|
|
79
|
+
```
|