/trogonstack-eventmodeling:eventmodeling-validating-event-models-checklistfrom trogonstack-eventmodeling
Validates event-sourced CQRS models against 16 architectural checks across 7 phases. Identifies anti-patterns like calculations as events and non-entity streams. Use for production-readiness review of completed event models.
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.
Purpose: Validate any event-sourced CQRS event model against 16 architectural checks across 7 phases. Identifies anti-patterns and confirms compliance with event sourcing principles.
Applies To: Any domain - e-commerce, banking, SaaS, marketplace, healthcare, etc.
When to Use:
What It Does:
Anti-pattern to catch: Sharing state across handlers or treating state as persistent aggregate
Anti-pattern to catch: Storing computed/aggregated data as events
Anti-pattern to catch: Confusing projections/calculations with domain facts
Anti-pattern to catch: Business rules scattered across handlers or encoded in event stream structure
Anti-pattern to catch: Command inputs that disappear or read model fields without source
Anti-pattern to catch: Events that can occur in invalid state combinations
Anti-pattern to catch: Hard dependencies between streams
The skill returns a validation report with:
Check 1.2: Stream Root is Business Entity, Not Calculation
Status: PASS
Evidence: [Specific examples from your model]
CRITICAL: [Anti-pattern description]
Problem: [Why it violates event sourcing]
Violates: [Which checks fail]
Fix: [Recommended action]
Status: PASS (or PASS WITH WARNINGS or FAIL)
Implementation Ready: YES (or NO - fix issues first)
Confidence: [percentage]
ANTI-PATTERN:
CalculationPerformed {
metric: 4.5 ← Mutable/recalculated
timestamp: T
}
CORRECT:
- Event: SomeActionOccurred (immutable fact)
- ReadModel: MetricView (recalculated from events)
Why: Calculations change multiple times as source data changes. Events are immutable.
ANTI-PATTERN:
One shared "OrderAggregate" class used by all handlers
- ConfirmOrderHandler shares OrderAggregate state
- ShipOrderHandler modifies same OrderAggregate
- Result: Tight coupling, hard to parallelize
CORRECT:
Each handler owns its own [CommandHandler]State class
- ConfirmOrderState (only ConfirmOrderHandler uses)
- ShipOrderState (only ShipOrderHandler uses)
- CancelOrderState (only CancelOrderHandler uses)
- All reconstruct state from same events, but independently
Why: Each handler is a micro-slice. Separate state classes maintain isolation, enable parallel teams, prevent merge conflicts.
ANTI-PATTERN:
StreamA → EventA → affects
StreamB → EventB → affects
StreamA (circular!)
CORRECT:
StreamA → EventA → Event Bus
StreamB → EventB → Event Bus
ReadModels ← consume (one-way only)
No feedback loops
Why: Circular dependencies make the system hard to reason about and test.
ANTI-PATTERN:
Treat [CommandHandler]State as persistent entity
- Save SubmitReviewState to database after command
- Load it again next time
- Result: Duplicates event sourcing, loses audit trail
CORRECT:
Reconstruct [CommandHandler]State on-demand
- Load events from stream
- Replay via evolve() to rebuild state
- Process command, emit outcome events
- Discard state (it's ephemeral, not persisted)
Why: State is derived from events, never stored. Events are source of truth. This enables consistent replay, audit trails, and time-travel debugging.
For each event stream:
For each command handler:
For each read model:
For system architecture:
Model is validated when:
Model needs fixes when:
Model should be redesigned when:
When you see something like "CalculationDone" or "ReviewRatingUpdated":
When you see "ReviewAggregate" used by multiple handlers:
When state is saved to database after a command:
When a read model field appears without source:
Recommended timing:
Step 1: Brainstorm Events
Step 2: The Plot (Sequence)
↓
→ RUN eventmodeling-validating-event-models-checklist (catch structural issues early)
↓
Fix any violations
↓
Step 3-7: Complete remaining steps
↓
→ RUN eventmodeling-validating-event-models-checklist again (final validation)
↓
PASS → Code generation
FAIL → Fix identified issues
Running the checklist after Step 2 prevents wasting time on later steps if core events are flawed.
The skill applies the same 16 checks regardless of domain. Here's how to think about it in different contexts:
E-commerce domain:
Banking domain:
SaaS domain:
Healthcare domain:
The principle is the same across all domains: immutable facts as events, calculated results as read models.
The 16-point checklist is defined in the Validation Phases section above. Each check includes the anti-pattern to catch and questions to ask when evaluating your model.
What SKILL.md sets; muted values are Claude Code's defaults
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)./eventmodeling-designing-event-modelsDesigns event-sourced domain models. Maps business processes to immutable events and state projections. Events are the source of truth; state is derived from events for command validation. Use when designing event streaming architectures from domain analysis. Do not use for: brainstorming events from scratch (use eventmodeling-brainstorming-events), optimizing stream sizing or snapshotting (use eventmodeling-optimizing-stream-design), or translating external system events (use eventmodeling-translating-external-events)./eventmodeling-elaborating-scenariosStep 7 of Event Modeling - Elaborate scenarios using Given-When-Then format. Specify behavior of commands and views. Each spec tied to exactly one command or view. Use after defining systems and boundaries. Do not use for: architectural validation (use eventmodeling-validating-event-models) or verifying field completeness across the model (use eventmodeling-checking-completeness)./eventmodeling-identifying-inputsStep 4 of Event Modeling - Identify Commands/Inputs from UI and Processor actions. Map user actions to commands and data. Use after storyboarding UI. Do not use for: identifying read models or outputs (use eventmodeling-identifying-outputs) or elaborating behavior specifications (use eventmodeling-elaborating-scenarios).Other plugins' skills for the same job