Events event storming

From Intense-Visions/harness-engineering · View interactive version

Events event storming is an AI agent skill from the GitHub repository Intense-Visions/harness-engineering. > Run event storming workshops to discover domain events, commands, and bounded contexts.

How to use this skill

Skill file

Events: Event Storming

Run event storming workshops to discover domain events, commands, and bounded contexts.

When to Use

Instructions

Event storming process — Big Picture format:

Phase 1: Chaotic exploration (30-60 min)

Phase 2: Enforce timeline (20-30 min)

Phase 3: Identify pain points (10-15 min)

Phase 4: Commands (blue stickies)

Phase 5: Aggregates (yellow stickies)

Phase 6: Bounded contexts (pink/purple lines)

Event map template:

[Command] → [Aggregate] → [Domain Event] → [Read Model]
    ↓              ↓
[Policy/Rule]   [External System]

Translating storming output to code:

// From event storming: "Order" aggregate with events
// Commands discovered: PlaceOrder, CancelOrder, ShipOrder

// Aggregate root
class Order {
  private events: DomainEvent[] = [];

  static place(data: PlaceOrderInput): Order {
    const order = new Order(data);
    order.record(new OrderPlaced({ orderId: order.id, ...data }));
    return order;
  }

  cancel(reason: string): void {
    if (this.status === 'SHIPPED') throw new Error('Cannot cancel shipped order');
    this.status = 'CANCELLED';
    this.record(new OrderCancelled({ orderId: this.id, reason }));
  }

  ship(trackingNumber: string): void {
    if (this.status !== 'PAID') throw new Error('Order must be paid before shipping');
    this.status = 'SHIPPED';
    this.record(new OrderShipped({ orderId: this.id, trackingNumber }));
  }

  pullEvents(): DomainEvent[] {
    const events = [...this.events];
    this.events = [];
    return events;
  }

  private record(event: DomainEvent): void {
    this.events.push(event);
  }
}

// Domain events discovered in storming
class OrderPlaced implements DomainEvent {
  readonly type = 'order.placed';
  constructor(public readonly payload: { orderId: string; userId: string; items: Item[] }) {}
}

class OrderCancelled implements DomainEvent {
  readonly type = 'order.cancelled';
  constructor(public readonly payload: { orderId: string; reason: string }) {}
}

class OrderShipped implements DomainEvent {
  readonly type = 'order.shipped';
  constructor(public readonly payload: { orderId: string; trackingNumber: string }) {}
}

Bounded context communication:

// Events that cross bounded context boundaries become integration events
// Integration event from Order context → Inventory context
interface OrderPlacedIntegrationEvent {
  eventId: string;
  type: 'order.placed';
  occurredAt: string;
  // Only include data the consuming context needs
  orderId: string;
  items: { productId: string; quantity: number }[];
}

// Inventory context maps this to its own domain language
class InventoryContext {
  handleOrderPlaced(event: OrderPlacedIntegrationEvent): void {
    // Translate to Inventory language: "stock reservation request"
    const reservationRequest: StockReservationRequest = {
      referenceId: event.orderId,
      items: event.items.map((i) => ({
        sku: this.mapProductToSKU(i.productId),
        quantity: i.quantity,
      })),
    };
    this.reserveStock(reservationRequest);
  }
}

Details

Sticky note color convention:

Bounded context warning signs:

Remote workshop tools: Miro, Mural, FigJam. Use virtual stickies with the same color coding. Allow async contribution before live sessions.

Transition to code: Each bounded context maps to:

Anti-patterns:

Source

eventstorming.com/

Process

  1. Read the instructions and examples in this document.
  2. Apply the patterns to your implementation, adapting to your specific context.
  3. Verify your implementation against the details and edge cases listed above.

Harness Integration

Success Criteria

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.