event-modeling
Adam Dymitruk's Event Modeling methodology with swimlanes
What this skill does
# Event Modeling Skill
## When to Use This Skill
Use this skill when:
- **Event Modeling tasks** - Working on adam dymitruk's event modeling methodology with swimlanes
- **Planning or design** - Need guidance on Event Modeling approaches
- **Best practices** - Want to follow established patterns and standards
## Overview
Create Event Models using Adam Dymitruk's visual methodology for designing event-driven systems.
## MANDATORY: Documentation-First Approach
Before creating Event Models:
1. **Invoke `docs-management` skill** for Event Modeling patterns
2. **Verify methodology** via MCP servers (perplexity, eventmodeling.org)
3. **Base guidance on Adam Dymitruk's original methodology**
## Event Modeling Fundamentals
```text
Event Modeling Structure:
TIME FLOWS LEFT TO RIGHT ───────────────────────────────────────────►
┌─────────────────────────────────────────────────────────────────────┐
│ BLUE: UI / Commands / External Triggers │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ Screen/ │ │ Button │ │ API │ │
│ │ Wireframe│ │ Click │ │ Call │ │
│ └────┬─────┘ └────┬─────┘ └────┬─────┘ │
├──────┼─────────────┼─────────────┼──────────────────────────────────┤
│ ▼ ▼ ▼ │
│ ORANGE: Domain Events (State Changes) │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ OrderPlaced │ │ OrderPaid │ │ OrderShipped │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
│ │ │ │ │
├──────┼─────────────────┼───────────────┼────────────────────────────┤
│ ▼ ▼ ▼ │
│ GREEN: Read Models / Projections │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Order List │ │ Payment │ │ Shipping │ │
│ │ View │ │ Status │ │ Dashboard │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
└─────────────────────────────────────────────────────────────────────┘
```
## Four Types of Specifications
### 1. Commands (Blue Lane - Top)
```text
Commands: User intentions that may cause state changes
CHARACTERISTICS:
- Represent user actions or external triggers
- May succeed or fail (validation)
- Produce one or more events on success
- Include wireframes/mockups for UI commands
EXAMPLES:
┌─────────────────────────────┐
│ PlaceOrder │
├─────────────────────────────┤
│ • Customer ID │
│ • Items: [ProductId, Qty] │
│ • Shipping Address │
│ • Payment Method │
└─────────────────────────────┘
```
### 2. Events (Orange Lane - Middle)
```text
Events: Facts that have happened (past tense, immutable)
CHARACTERISTICS:
- Past tense naming (OrderPlaced, not PlaceOrder)
- Immutable once recorded
- Capture what happened and when
- Single source of truth
NAMING CONVENTION:
✓ OrderPlaced
✓ PaymentReceived
✓ ShipmentDispatched
✗ PlaceOrder (command, not event)
✗ OrderUpdate (too vague)
EXAMPLE:
┌─────────────────────────────┐
│ OrderPlaced │
├─────────────────────────────┤
│ • OrderId: guid │
│ • CustomerId: guid │
│ • Items: [...] │
│ • PlacedAt: timestamp │
│ • TotalAmount: decimal │
└─────────────────────────────┘
```
### 3. Read Models (Green Lane - Bottom)
```text
Read Models: Projections optimized for queries
CHARACTERISTICS:
- Built from events
- Optimized for specific query patterns
- Can be rebuilt from event stream
- Eventually consistent
TYPES:
- List views (showing multiple items)
- Detail views (single item details)
- Dashboards (aggregations)
- Search indexes
EXAMPLE:
┌─────────────────────────────┐
│ OrderSummaryView │
├─────────────────────────────┤
│ • OrderId │
│ • CustomerName │
│ • Status (derived) │
│ • ItemCount │
│ • TotalAmount │
│ • LastUpdated │
└─────────────────────────────┘
```
### 4. Automations (Policies/Reactions)
```text
Automations: Processes triggered by events
CHARACTERISTICS:
- React to events automatically
- May produce commands or integrate external systems
- Represent business policies
- Handle async processing
NOTATION:
┌─────────────────────────────┐
│ ⚡ PaymentReceivedPolicy │
├─────────────────────────────┤
│ WHEN: PaymentReceived │
│ THEN: InitiateShipment │
└─────────────────────────────┘
```
## Event Modeling Process
### Step 1: Brain Dump Events
```text
Brainstorm all domain events (orange stickies):
1. Gather stakeholders
2. Ask: "What happens in this process?"
3. Write events in past tense
4. Don't worry about order yet
5. Include all significant state changes
Example Output:
- OrderPlaced
- OrderConfirmed
- PaymentReceived
- PaymentFailed
- InventoryReserved
- ShipmentCreated
- ShipmentDispatched
- OrderDelivered
```
### Step 2: Arrange Timeline
```text
Organize events chronologically:
1. Find the "happy path" events
2. Arrange left to right
3. Group related events vertically
4. Identify parallel flows
5. Note temporal dependencies
Timeline:
OrderPlaced → OrderConfirmed → PaymentReceived → InventoryReserved → ShipmentCreated → ShipmentDispatched → OrderDelivered
│
└→ PaymentFailed → OrderCancelled
```
### Step 3: Add Commands (Blue)
```text
What triggers each event?
For each event, ask:
- What user action caused this?
- What external system triggered it?
- Is there a UI screen involved?
Add commands above events they produce:
[PlaceOrder] → OrderPlaced
[ProcessPayment] → PaymentReceived
[DispatchShipment] → ShipmentDispatched
```
### Step 4: Add Read Models (Green)
```text
What information is needed for each command?
For each command, ask:
- What data does the user need to see?
- What validation data is required?
- What views enable this action?
Add read models below events that populate them:
OrderPlaced → [OrderConfirmationView]
ShipmentDispatched → [TrackingDashboard]
```
### Step 5: Identify Automations
```text
What happens automatically?
Look for:
- Events that trigger other events
- Integration with external systems
- Time-based rules
- Business policies
Example:
PaymentReceived → ⚡ ReserveInventoryPolicy → InventoryReserved
```
## Event Model Template
```markdown
# Event Model: [Process Name]
## Overview
[What this process accomplishes]
## Actors
- [User type 1]
- [User type 2]
- [External system]
## Event Model Diagram
```text
TIME ──────────────────────────────────────────────────────────────►
COMMANDS (Blue)
┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐
│ Cmd 1 │ │ Cmd 2 │ │ Cmd 3 │ │ Cmd 4 │
└────┬────┘ └────┬────┘ └────┬────┘ └────┬────┘
│ │ │ │
▼ ▼ ▼ ▼
EVENTS (Orange)
┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐
│ Event1 │───►│ Event2 │───►│ Event3 │───►│ Event4 │
└─────────┘ └─────────┘ └─────────┘ └─────────┘
│ │ │ │
▼ ▼ ▼ ▼
READ MODELS (Green)
┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐
│ View 1 │ │ View 2 │ │ View 3 │ │ View 4 │
└─────────┘ └─────────┘ └─────────┘ └─────────┘
```
## Commands Detail
| Command | Input | Produces Events | Read Model Needed |
|---------|-------|-----------------|-------------------|
| [Name] | [Data] | [Events] | [View] |
## Events Detail
| Event | Data | Triggered By | Updates |
|-------|------|--------------|---------|
| [Name] | [FRelated in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.