/trogonstack-eventmodeling:eventmodeling-identifying-inputsfrom trogonstack-eventmodeling
Step 4 of Event Modeling: identifies commands and inputs from UI actions and processor triggers. Maps user actions to commands after storyboarding.
Ships in trogonstack-eventmodeling. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
When to Interview: Skip if the user has already identified UI actions/commands and processor triggers. Interview when it's unclear which actions are user-initiated vs. processor-automated.
Interview Strategy: Separate UI-driven commands from processor-driven commands before cataloging inputs. Mixing them leads to incorrect role attribution, which breaks the Role Catalog traceability that downstream steps depend on.
Automation Level (Impact: Determines which commands are UI-triggered vs. processor-triggered)
External System Triggers (Impact: Determines if there are processor commands from webhooks/integrations)
Conditional Entry:
If user has provided:
- UI actions already listed per storyboard screen
- AND processor triggers identified with source systems named
- AND it's clear which role/actor initiates each action
Then: Skip interview, proceed directly to command identification
Else: Conduct interview
Phase 1: Trigger Classification (Question 1)
Phase 2: External Triggers (Question 2)
Append findings to the project's event modeling file:
File: .trogonai/interviews/[project-name]/EVENTMODELING.md
Use Write tool to add/update this section:
## 4. Identifying Inputs (eventmodeling-identifying-inputs)
### Automation Classification
[From Q1: Which actions are user-initiated vs. processor-automated?]
### External System Triggers
[From Q2: Which external systems trigger commands? Webhook formats?]
### Command Attribution Summary
- UI-issued commands: [list with role from Role Catalog]
- Processor-issued commands: [list with source system]
Update Interview Trail:
| 4 | eventmodeling-identifying-inputs | Done | UI commands, processor commands, role attribution |
Given UI storyboards and event timeline, identify all inputs.
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.
For each user action in storyboard, create a command attributed to a specific role:
Storyboard: Order Creation Screen
User action: Click "Create Order" button
↓
Command: CreateOrder
Input data from form:
- customerId
- items[] (product selections + quantities)
- shippingAddress
Validation:
- customerId must exist
- items must not be empty
- quantities must be > 0
Produces event: OrderCreated
Identify automation-triggered commands:
Processor trigger: Payment gateway webhook received
↓
Command: AuthorizePayment (from Processor, not UI)
Input data from webhook:
- orderId
- paymentId
- authorizationCode
Validation:
- orderId must exist and be in Confirmed state
- authorizationCode must be valid
Produces event: PaymentAuthorized
Processors don't directly process events—they maintain a todo list driven by events:
Event Stream (Domain events):
PaymentAuthorized → triggers Inventory system
Processor: InventoryReserver
Todo List:
When PaymentAuthorized event arrives:
1. Add item to todo: "Reserve inventory for order-123"
Processor Logic (continuously):
FOR EACH todo item IN todo_list:
- Check if inventory available
- If yes: Reserve inventory, produce InventoryReserved event, mark done
- If no: Produce InventoryFailed event, mark failed
- If error: Keep in todo for retry
Example:
Event: PaymentAuthorized(orderId=order-123, items=[{prodId: P1, qty: 2}])
↓
Todo added: Reserve P1 qty 2
↓
Processor checks: P1 has 5 available, need 2
↓
Action: Reserve 2 units
↓
Event produced: InventoryReserved(orderId=order-123, reserved=[...])
↓
Todo marked done
Key insight: Processors are reactive. They listen for events and create todo items, then execute those todos by issuing commands that produce new events.
Show which commands come from automation vs. user actions:
Command Catalog with Role Attribution (from Role Catalog):
UI-Issued Commands (attributed to specific human roles):
1. CreateOrder (Order Entry screen) [ Customer]
2. ConfirmOrder (Confirmation screen) [ Customer]
3. CancelOrder (Status screen) [ Customer]
4. RequestReturn (Order page) [ Customer]
5. OverrideOrderStatus (Admin panel) [ Support Agent]
Processor-Issued Commands (attributed to system actors):
6. AuthorizePayment (Payment gateway webhook) [ Payment Gateway]
7. ReserveInventory (Triggered by PaymentAuthorized) [ Inventory System]
8. CreateShipment (Triggered by InventoryReserved) [ Fulfillment System]
9. NotifyCustomer (Triggered by multiple events) [ Notification Service]
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.
For each command, define structure:
Command: ConfirmOrder
Source: UI (user clicks button)
Input:
orderId: string (from URL/context)
paymentMethod: enum ('card' | 'transfer')
[paymentDetails]: depends on method
Validation rules:
- Order must exist
- Order must be in Draft state
- Payment method must be supported
- Funds must be available (pre-check)
Preconditions (from stream state):
- OrderCreated event exists
- No ConfirmOrder previously processed
Success result: OrderConfirmed event
Failure results:
- "Order not found" → Command rejected, no event
- "Order already confirmed" → Command rejected, no event
- "Payment method not supported" → Command rejected, no event
List all commands the system accepts:
Command Catalog: Order System
### UI-Issued Commands
1. CreateOrder
Source: User (Order Entry screen)
Input: customerId, items[], shippingAddress
Produces: OrderCreated event
2. ConfirmOrder
Source: User (Confirmation screen)
Input: orderId, paymentMethod
Produces: OrderConfirmed event
3. CancelOrder
Source: User (Status screen)
Input: orderId, reason
Produces: OrderCancelled event
### Processor-Issued Commands
4. AuthorizePayment
Source: Payment Processor (webhook)
Input: orderId, paymentId, authCode
Produces: PaymentAuthorized event
5. FailPayment
Source: Payment Processor (webhook)
Input: orderId, paymentId, reason
Produces: PaymentFailed event
6. ReserveInventory
Source: Inventory Processor (triggered by PaymentAuthorized)
Input: orderId, items[]
Produces: InventoryReserved event
7. CreateShipment
Source: Fulfillment Processor (triggered by InventoryReserved)
Input: orderId, items[]
Produces: OrderShipped event
Document where each command input comes from:
Command: ConfirmOrder
Data origin matrix:
orderId
↑ Source: UI context (from OrderCreated, displayed to user)
↑ Captured: Hidden in URL or session
↑ Validation: Must match Order from stream
paymentMethod
↑ Source: UI form selection
↑ Captured: User selects checkbox/radio
↑ Validation: Must be in allowed list
[paymentDetails] (conditional)
↑ Source: Depends on paymentMethod
↑ For 'card': Card number, CVV, expiry (from payment form)
↑ For 'transfer': Bank account, routing number (from form)
↑ Validation: Format and validity checks
Document what comes from stream state:
Command: ShipOrder
Explicit input (from UI/Processor):
orderId
shipmentId (from fulfillment system)
Implicit context (from stream state):
Order must exist
Order must be in InventoryReserved state
Payment must be authorized (from PaymentAuthorized event)
Inventory must be reserved (from InventoryReserved event)
These implicit checks use stream state:
currentState.orderId === orderId
currentState.status === 'InventoryReserved'
currentState.paymentId exists
currentState.shipmentId can be set
Present as:
# Inputs: [Domain Name]
## Commands Summary
| Command | Role/Actor | Source | Trigger | Input | Event |
|---------|------------|--------|---------|-------|-------|
| CreateOrder | Customer | UI | User action | customerId, items, address | OrderCreated |
| ConfirmOrder | Customer | UI | User action | orderId, paymentMethod | OrderConfirmed |
| CancelOrder | Customer | UI | User action | orderId, reason | OrderCancelled |
| AuthorizePayment | Payment Gateway | Processor | Webhook | orderId, paymentId | PaymentAuthorized |
| ReserveInventory | Inventory System | Processor | PaymentAuthorized event | orderId, items | InventoryReserved |
| ShipOrder | Fulfillment System | Processor | InventoryReserved event | orderId, shipmentId | OrderShipped |
---
## Detailed Commands
### Command: CreateOrder
**Source**: User (Order Entry screen)
**Input Data**:
- customerId: string
- items: Array<{productId: string, quantity: number}>
- shippingAddress: {street, city, state, zip}
**Validation**:
- customerId must exist in system
- items array must not be empty
- quantities must be > 0
- address fields must be non-empty
**Preconditions** (from stream state):
- Stream Order:X does not exist yet
**Success**: Produces OrderCreated event
**Failure**: Command rejected, no event
- "Customer not found"
- "Items invalid"
- "Address incomplete"
--- [Repeat for each command]
---
## Data Completeness Check
### Data Input → Event
Verify every command input becomes event data:
| Command Input | Event Data | Status |
|---------------|-----------|--------|
| customerId | orderId | Stored in OrderCreated |
| items | items | Stored in OrderCreated |
| shippingAddress | shippingAddress | Stored in OrderCreated |
### Missing Data
Document any input that doesn't make it to events:
- None identified
---
## Processor Commands
Document all processor-triggered commands:
[List each with source system and trigger condition]
User action on UI screen
↓
Captures form/selection data
↓
Validation checks
↓
Command issued
↓
Event created or rejection
External event/webhook received
↓
Triggers processor logic
↓
Processor validates and decides
↓
Command issued (if valid)
↓
Event created or decision recorded
Command: PaymentConfirm
Input:
- paymentMethod (user selected)
- paymentDetails (conditional on method)
If method='card': cardNumber, CVV, expiry
If method='transfer': bankAccount, routingNumber
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub trogonstack/agentskills --plugin trogonstack-eventmodeling16 skills in this plugin
/eventmodeling-applying-conways-lawStep 6 of Event Modeling - Apply Conway's Law with swimlanes. Organize events into autonomous system parts that different teams can independently own. Use after defining inputs/outputs. Do not use for: planning feature slice implementation order (use eventmodeling-slicing-event-models) or defining command/read model boundaries (use eventmodeling-designing-event-models)./eventmodeling-brainstorming-eventsStep 1 of Event Modeling - Brainstorm all domain events from requirements. Extract every state-changing event the system could have. Use when starting event modeling from requirements or a new domain. Do not use for: arranging events in sequence (use eventmodeling-plotting-events), designing commands or read models (use eventmodeling-designing-event-models), or when a complete event list already exists./eventmodeling-checking-completenessStep 8 of Event Modeling - Completeness Check. Verify every field has origin and destination. Ensure complete event model before code generation. Use after all scenarios defined. Do not use for: architectural validation against event sourcing principles (use eventmodeling-validating-event-models) or elaborating Given-When-Then specs (use eventmodeling-elaborating-scenarios).Other plugins' skills for the same job