@eventmodelers/cli 1.0.37 → 1.0.38
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 +10 -3
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-applying-conways-law/SKILL.md +3 -61
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-brainstorming-events/SKILL.md +24 -93
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-checking-completeness/SKILL.md +2 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-core-rules/SKILL.md +182 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-designing-automation-chains/SKILL.md +23 -7
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-designing-event-models/SKILL.md +50 -223
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-designing-event-models/references/examples.md +30 -120
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-elaborating-scenarios/SKILL.md +3 -78
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-identifying-inputs/SKILL.md +3 -50
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-identifying-outputs/SKILL.md +3 -54
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-interview-protocol/SKILL.md +31 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-optimizing-stream-design/SKILL.md +27 -67
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-optimizing-stream-design/references/domain-patterns.md +15 -15
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-optimizing-stream-design/references/patterns.md +44 -52
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-orchestrating-event-modeling/SKILL.md +14 -15
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-plotting-events/SKILL.md +4 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-slicing-event-models/SKILL.md +3 -15
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-storyboarding-events/SKILL.md +3 -50
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-translating-external-events/SKILL.md +4 -56
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-validating-event-models/SKILL.md +58 -97
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-validating-event-models-checklist/SKILL.md +72 -127
- package/stacks/modeling-kit/templates/.claude/skills/place-element/SKILL.md +15 -1
- package/stacks/modeling-kit/templates/.claude/skills/place-element/references/api-fallback.md +11 -1
|
@@ -11,6 +11,8 @@ allowed-tools:
|
|
|
11
11
|
|
|
12
12
|
> **Before doing anything else**, invoke the `connect` skill — if not already connected — to resolve `TOKEN`, `BOARD_ID`, `ORG_ID`, and `BASE_URL`. Do not proceed until it has completed. Consult `learn-eventmodelers-api` only if you need to look up a specific endpoint or field this file doesn't cover — don't load it eagerly.
|
|
13
13
|
|
|
14
|
+
This step applies the shared element rules in **`eventmodeling-core-rules`** — read it once per session if you haven't already; it defines what a COMMAND/EVENT/READMODEL/SCREEN/AUTOMATION is, how each is named, and the anti-patterns to reject, so this step doesn't restate them.
|
|
15
|
+
|
|
14
16
|
Prefer `mcp__eventmodelers__*` tools when available (registered by the `connect` skill) — the curl blocks below are the fallback for sessions without MCP connected.
|
|
15
17
|
|
|
16
18
|
Coordinates the 11-step Event Modeling workflow. Each step delegates to a
|
|
@@ -183,7 +185,7 @@ scope, and stated output goal (code, design, learning, docs).
|
|
|
183
185
|
Confirm understanding before proceeding: "So we're modeling [domain], goal is
|
|
184
186
|
[goal], constraints are [constraints]. Starting from [step]. Does that match?"
|
|
185
187
|
|
|
186
|
-
**Capture findings** —
|
|
188
|
+
**Capture findings** — create `.trogonai/interviews/[project-name]/EVENTMODELING.md` with this header (this step is what creates the file; every later step appends to it per `eventmodeling-interview-protocol`):
|
|
187
189
|
|
|
188
190
|
```markdown
|
|
189
191
|
# Event Modeling: [Project Name]
|
|
@@ -197,10 +199,9 @@ Confirm understanding before proceeding: "So we're modeling [domain], goal is
|
|
|
197
199
|
|
|
198
200
|
| Step | Skill | Status | Key Output |
|
|
199
201
|
|------|-------|--------|------------|
|
|
200
|
-
| Orchestration | eventmodeling-orchestrating-event-modeling | Done | Domain scoped, starting point confirmed |
|
|
201
202
|
```
|
|
202
203
|
|
|
203
|
-
|
|
204
|
+
Then follow **`eventmodeling-interview-protocol`** to record this step's own findings and add its Interview Trail row ("Orchestration" / `eventmodeling-orchestrating-event-modeling` / domain scoped, starting point confirmed). Every later step updates the same file as it completes.
|
|
204
205
|
|
|
205
206
|
---
|
|
206
207
|
|
|
@@ -377,12 +378,11 @@ Invoke `eventmodeling-validating-event-models`.
|
|
|
377
378
|
|
|
378
379
|
If FAIL: address findings and re-invoke `eventmodeling-validating-event-models`.
|
|
379
380
|
|
|
380
|
-
**Optional —
|
|
381
|
-
`eventmodeling-validating-event-models-checklist`
|
|
382
|
-
|
|
381
|
+
**Optional — Structural Checklist**: Invoke
|
|
382
|
+
`eventmodeling-validating-event-models-checklist` for a second, mechanical
|
|
383
|
+
pass. It runs 12 structural checks across 6 phases and returns a
|
|
383
384
|
PASS / PASS WITH WARNINGS / FAIL verdict independently of Step 9. A PASS on
|
|
384
|
-
Step 9 does not substitute for this checklist
|
|
385
|
-
required.
|
|
385
|
+
Step 9 does not substitute for this checklist.
|
|
386
386
|
|
|
387
387
|
---
|
|
388
388
|
|
|
@@ -443,7 +443,7 @@ Not delegated to a separate skill — performed directly by this orchestrating s
|
|
|
443
443
|
The note's body lives in **`meta.description`** as plain markdown source — headings, lists, bold, code fences, tables all render. **Not `meta.content`** — that field is accepted and stored without error but never rendered by the board UI, producing a visibly empty note; this was caught by comparing against a note authored directly in the UI, so treat it as confirmed, not a guess. There is no separate render/sketch call (unlike SCREEN/HTML_SCREEN) and no `fields[]` array on this element type.
|
|
444
444
|
|
|
445
445
|
**What the note should actually contain** — write for the next person (or next session) who opens this board cold, not for whoever just built it:
|
|
446
|
-
- **Scope**: what business process this chapter covers, and its
|
|
446
|
+
- **Scope**: what business process this chapter covers, and its entities (identity keys).
|
|
447
447
|
- **Assumptions added beyond the literal brief** — anything invented to fill a gap the requirements left open, and why (e.g. adding a resolution event so a state isn't a one-way trap door).
|
|
448
448
|
- **Business rules deliberately encoded as scenarios, not new events** — so a reader doesn't mistake a missing event for an oversight.
|
|
449
449
|
- **Sequencing or design corrections made mid-workflow** — e.g. a column reorder because an event's original placement implied the wrong causality.
|
|
@@ -475,13 +475,12 @@ A complete, sliced event model consisting of:
|
|
|
475
475
|
These skills are not part of the 11-step main path but extend the model for
|
|
476
476
|
specific needs:
|
|
477
477
|
|
|
478
|
-
- **`eventmodeling-designing-event-models`** — Use when
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
after Step 1.
|
|
478
|
+
- **`eventmodeling-designing-event-models`** — Use when the Command/Event/Read-Model
|
|
479
|
+
structure or event causality need detailed design work. Can be applied at
|
|
480
|
+
any step where those decisions arise, most commonly during or after Step 1.
|
|
482
481
|
- **`eventmodeling-optimizing-stream-design`** — Use after the model is
|
|
483
|
-
complete to validate that every
|
|
484
|
-
identity, not a disguised collection or event log.
|
|
482
|
+
complete to validate that every entity's event timeline is anchored on a
|
|
483
|
+
single business identity, not a disguised collection or event log.
|
|
485
484
|
- **`eventmodeling-translating-external-events`** — Use when external systems
|
|
486
485
|
(webhooks, IoT, third-party APIs) need to feed into the domain model.
|
|
487
486
|
|
|
@@ -10,6 +10,8 @@ allowed-tools:
|
|
|
10
10
|
|
|
11
11
|
> **Before doing anything else**, invoke the `connect` skill — if not already connected — to resolve `TOKEN`, `BOARD_ID`, `ORG_ID`, and `BASE_URL`. Do not proceed until it has completed. Consult `learn-eventmodelers-api` only if you need to look up a specific endpoint or field this file doesn't cover — don't load it eagerly.
|
|
12
12
|
|
|
13
|
+
This step applies the shared element rules in **`eventmodeling-core-rules`** — read it once per session if you haven't already; it defines what a COMMAND/EVENT/READMODEL/SCREEN/AUTOMATION is, how each is named, and the anti-patterns to reject, so this step doesn't restate them.
|
|
14
|
+
|
|
13
15
|
Prefer `mcp__eventmodelers__*` tools when available (registered by the `connect` skill) — the curl blocks below are the fallback for sessions without MCP connected.
|
|
14
16
|
|
|
15
17
|
Arrange all brainstormed events chronologically to create a logical sequence that makes sense as a narrative timeline. Show how events flow and depend on each other.
|
|
@@ -78,6 +80,8 @@ Path A: Payment succeeds → PaymentProcessed
|
|
|
78
80
|
Path B: Payment fails → PaymentFailed → OrderCancelled
|
|
79
81
|
```
|
|
80
82
|
|
|
83
|
+
**Every path here is a decision point, not a divergent journey** — by the time plotting runs, chapter structure is already fixed (Step 1), so a path in this step is always one trigger resolving to one of several outcomes within *this* timeline's story, shown as branching columns. If a "path" you're documenting actually starts a different story with its own screens/commands rather than just deciding how this one ends, it was mis-grouped in Step 1 — stop and send it back to `eventmodeling-brainstorming-events`'s chapter grouping (see its "Divergent journey vs. a decision point" note) rather than modeling it as a branch here.
|
|
84
|
+
|
|
81
85
|
### 4. Create Timeline Diagram
|
|
82
86
|
Visual representation of event flow:
|
|
83
87
|
|
package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-slicing-event-models/SKILL.md
CHANGED
|
@@ -11,6 +11,8 @@ allowed-tools:
|
|
|
11
11
|
|
|
12
12
|
> **Before doing anything else**, invoke the `connect` skill — if not already connected — to resolve `TOKEN`, `BOARD_ID`, `ORG_ID`, and `BASE_URL`. Do not proceed until it has completed. Consult `learn-eventmodelers-api` (in particular the **Slices** section) only if you need to look up a specific endpoint or field this file doesn't cover — don't load it eagerly.
|
|
13
13
|
|
|
14
|
+
This step applies the shared element and slice rules in **`eventmodeling-core-rules`** — read it once per session if you haven't already; its "Slices" section defines the state-change/state-view/automation slice types this step derives, so this step doesn't restate them.
|
|
15
|
+
|
|
14
16
|
> Prefer `mcp__eventmodelers__*` tools when available (registered by the `connect` skill) — the curl blocks below are the fallback for sessions without MCP connected.
|
|
15
17
|
|
|
16
18
|
**Purpose**: Turn a completed event model's timeline into explicit slice definitions on the board, and note the event dependencies between them.
|
|
@@ -24,21 +26,7 @@ allowed-tools:
|
|
|
24
26
|
|
|
25
27
|
## Core Concept: A Slice Is One Command, One Read Model, or One Automation — Never Combined
|
|
26
28
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
```
|
|
30
|
-
state-change slice = SCREEN/Processor → COMMAND → EVENT(s)
|
|
31
|
-
state-view slice = EVENT(s) → READMODEL → SCREEN/Processor
|
|
32
|
-
automation slice = EVENT(s) → AUTOMATION → COMMAND → EVENT(s)
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
A slice never mixes a COMMAND and a READMODEL — the platform models these as two distinct slice types (`state-change` and `state-view`). If a "feature" needs both a command and a read model (e.g. "place an order" needs the `PlaceOrder` command *and* an `OrderDetailView` read model), that's **two slices**, not one.
|
|
36
|
-
|
|
37
|
-
**Key characteristics**:
|
|
38
|
-
- Exactly one COMMAND (state-change), exactly one READMODEL (state-view), or one AUTOMATION's command — never combined
|
|
39
|
-
- Named after that command, read model, or automation
|
|
40
|
-
- Independently deployable
|
|
41
|
-
- Communicates with other slices via events only
|
|
29
|
+
See `eventmodeling-core-rules`'s "Slices" section for the definition (state-change / state-view / automation, never combined) and why a feature needing both a command and a read model is two slices, not one.
|
|
42
30
|
|
|
43
31
|
---
|
|
44
32
|
|
package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-storyboarding-events/SKILL.md
CHANGED
|
@@ -11,18 +11,16 @@ allowed-tools:
|
|
|
11
11
|
|
|
12
12
|
> **Before doing anything else**, invoke the `connect` skill — if not already connected — to resolve `TOKEN`, `BOARD_ID`, `ORG_ID`, and `BASE_URL`. Do not proceed until it has completed. Consult `learn-eventmodelers-api` only if you need to look up a specific endpoint or field this file doesn't cover — don't load it eagerly.
|
|
13
13
|
|
|
14
|
+
This step applies the shared element rules in **`eventmodeling-core-rules`** — read it once per session if you haven't already; it defines what a COMMAND/EVENT/READMODEL/SCREEN/AUTOMATION is, how each is named, and the anti-patterns to reject, so this step doesn't restate them.
|
|
15
|
+
|
|
14
16
|
Prefer `mcp__eventmodelers__*` tools when available (registered by the `connect` skill) — the curl blocks below are the fallback for sessions without MCP connected.
|
|
15
17
|
|
|
16
18
|
## Interview Phase (Optional)
|
|
17
19
|
|
|
18
20
|
**When to Interview**: Skip if the user has already specified: existing UI patterns or mockups to reference, critical data fields, and UI/UX preferences. Interview when these details haven't been discussed or when the user wants guidance on storyboarding depth.
|
|
19
21
|
|
|
20
|
-
**Interview Strategy**: Clarify UI needs, data priorities, and existing patterns to guide storyboard design. This ensures mockups capture all necessary fields without over-designing.
|
|
21
|
-
|
|
22
22
|
### Critical Questions
|
|
23
23
|
|
|
24
|
-
When UI design guidance is needed:
|
|
25
|
-
|
|
26
24
|
1. **Current UI State** (Impact: Determines if you're designing from scratch or enhancing existing)
|
|
27
25
|
- Question: "Do you have: (A) Existing UI/wireframes to reference, (B) Rough sketches, (C) Starting from scratch?"
|
|
28
26
|
- Why it matters: Existing UI provides constraints and patterns; starting fresh allows more design freedom
|
|
@@ -38,52 +36,7 @@ When UI design guidance is needed:
|
|
|
38
36
|
- Why it matters: Platform and fidelity affect storyboard detail; mobile has different constraints than web
|
|
39
37
|
- Follow-up triggers: If (C) → ask about prototype tool; if minimal → discuss what level of detail is enough
|
|
40
38
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
**Conditional Entry**:
|
|
44
|
-
```
|
|
45
|
-
If user has provided:
|
|
46
|
-
- Existing UI patterns or references
|
|
47
|
-
- AND identified critical data fields
|
|
48
|
-
- AND specified storyboard detail level
|
|
49
|
-
|
|
50
|
-
Then: Skip interview, proceed directly to storyboarding
|
|
51
|
-
|
|
52
|
-
Else: Conduct interview
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
**Phase 1: Context Assessment** (Questions 1-2)
|
|
56
|
-
- Understand existing UI context
|
|
57
|
-
- Identify data priorities
|
|
58
|
-
- Establish storyboard scope
|
|
59
|
-
|
|
60
|
-
**Phase 2: Design Guidance** (Question 3)
|
|
61
|
-
- Determine platform and fidelity
|
|
62
|
-
- Adjust storyboard detail accordingly
|
|
63
|
-
|
|
64
|
-
### Capturing Interview Findings
|
|
65
|
-
|
|
66
|
-
Document findings to guide storyboard creation:
|
|
67
|
-
|
|
68
|
-
```markdown
|
|
69
|
-
## Interview Findings: [Domain Name] UI
|
|
70
|
-
|
|
71
|
-
**Existing UI Context**: [Starting from scratch / Enhancing / Matching pattern]
|
|
72
|
-
**Most Critical Data**: [List fields in priority order]
|
|
73
|
-
**Platform**: [Web / Mobile / Both]
|
|
74
|
-
**Storyboard Detail**: [Minimal wireframes / Detailed mockups]
|
|
75
|
-
|
|
76
|
-
**Key UI Interactions**:
|
|
77
|
-
- [Action 1]: [What data triggers it]
|
|
78
|
-
- [Action 2]: [What data triggers it]
|
|
79
|
-
|
|
80
|
-
**Storyboard Focus**:
|
|
81
|
-
- Prioritize showing [most critical fields]
|
|
82
|
-
- Ensure [specific interactions] are clear
|
|
83
|
-
- Reference [existing patterns] for consistency
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
Optional: Write to `.trogonai/interviews/[timestamp]-storyboarding-events.interview.internal.trogonai.md`.
|
|
39
|
+
Follow **`eventmodeling-interview-protocol`** to run this interview and record its findings — label this step "**3. Storyboarding** (`eventmodeling-storyboarding-events`)". Findings should cover: existing UI context, most critical data fields (priority order), platform and detail-level preferences, key UI interactions, and storyboard focus.
|
|
87
40
|
|
|
88
41
|
---
|
|
89
42
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: eventmodeling-translating-external-events
|
|
3
|
-
description: "Translate external system events (webhooks, APIs, IoT) into domain events. Map technical data to business concepts. Use when integrating with external systems that emit events your domain needs to react to. Do not use for: designing
|
|
3
|
+
description: "Translate external system events (webhooks, APIs, IoT) into domain events. Map technical data to business concepts. Use when integrating with external systems that emit events your domain needs to react to. Do not use for: designing the commands/read models for the translated events (use eventmodeling-designing-event-models)."
|
|
4
4
|
allowed-tools:
|
|
5
5
|
- AskUserQuestion
|
|
6
6
|
- Write
|
|
@@ -11,12 +11,12 @@ allowed-tools:
|
|
|
11
11
|
|
|
12
12
|
> **Before doing anything else**, invoke the `connect` skill — if not already connected — to resolve `TOKEN`, `BOARD_ID`, `ORG_ID`, and `BASE_URL`. Do not proceed until it has completed. Consult `learn-eventmodelers-api` only if you need to look up a specific endpoint or field this file doesn't cover — don't load it eagerly.
|
|
13
13
|
|
|
14
|
+
This step applies the shared element rules in **`eventmodeling-core-rules`** — read it once per session if you haven't already; it defines what a COMMAND/EVENT/READMODEL/SCREEN/AUTOMATION is, how each is named, and the anti-patterns to reject, so this step doesn't restate them.
|
|
15
|
+
|
|
14
16
|
## Interview Phase (Optional)
|
|
15
17
|
|
|
16
18
|
**When to Interview**: Skip if the user has specified: external systems involved, webhook/API formats, and domain mapping. Interview when external systems haven't been fully cataloged or translation rules are unclear.
|
|
17
19
|
|
|
18
|
-
**Interview Strategy**: Catalog all external systems and understand their event formats before defining translation rules. Missing correlation strategies — how external IDs map back to domain entities — are the most common source of integration failures, so surface them early.
|
|
19
|
-
|
|
20
20
|
### Critical Questions
|
|
21
21
|
|
|
22
22
|
1. **External System Details** (Impact: Determines what translation rules to create)
|
|
@@ -29,59 +29,7 @@ allowed-tools:
|
|
|
29
29
|
- Why it matters: Simple 1-to-1 mappings vs. complex multi-source translations affect design
|
|
30
30
|
- Follow-up triggers: If (B) or (C) → ask "What data must you look up from your own system to complete the translation? How do you handle arrival before that data exists?"
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
**Conditional Entry**:
|
|
35
|
-
```
|
|
36
|
-
If user has provided:
|
|
37
|
-
- Full list of external systems with event types
|
|
38
|
-
- AND sample payload formats for each event type
|
|
39
|
-
- AND correlation strategy (how to link external IDs to domain entity IDs)
|
|
40
|
-
|
|
41
|
-
Then: Skip interview, proceed directly to translation rule design
|
|
42
|
-
|
|
43
|
-
Else: Conduct interview
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
**Phase 1: External System Catalog** (Question 1)
|
|
47
|
-
- Enumerate all systems that send events into the domain
|
|
48
|
-
- Document event types and payload formats for each
|
|
49
|
-
- Identify authentication and delivery mechanisms (webhook, polling, streaming)
|
|
50
|
-
|
|
51
|
-
**Phase 2: Mapping Complexity Assessment** (Question 2)
|
|
52
|
-
- Identify which integrations require enrichment from domain data
|
|
53
|
-
- Surface correlation gaps (external ID ≠ domain ID)
|
|
54
|
-
- Flag multi-source aggregations for deeper design attention
|
|
55
|
-
|
|
56
|
-
### Capturing Interview Findings
|
|
57
|
-
|
|
58
|
-
Append findings to the project's event modeling file:
|
|
59
|
-
|
|
60
|
-
**File**: `.trogonai/interviews/[project-name]/EVENTMODELING.md`
|
|
61
|
-
|
|
62
|
-
Use Write tool to add/update this section:
|
|
63
|
-
|
|
64
|
-
```markdown
|
|
65
|
-
## Translating External Events (eventmodeling-translating-external-events)
|
|
66
|
-
|
|
67
|
-
### External Systems Catalog
|
|
68
|
-
[From Q1: System names, event types, formats, auth mechanisms]
|
|
69
|
-
|
|
70
|
-
### Mapping Complexity
|
|
71
|
-
[From Q2: Direct mappings vs. complex enrichment needs, correlation gaps]
|
|
72
|
-
|
|
73
|
-
### Correlation Strategies
|
|
74
|
-
- [System A]: correlates via [reference field / lookup table]
|
|
75
|
-
- [System B]: correlates via [metadata in external payload]
|
|
76
|
-
|
|
77
|
-
### High-Risk Integrations
|
|
78
|
-
- [System needing multi-source data]: [risk description]
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
Update Interview Trail:
|
|
82
|
-
```markdown
|
|
83
|
-
| Ext. Events | eventmodeling-translating-external-events | Done | External systems cataloged, correlation strategies defined |
|
|
84
|
-
```
|
|
32
|
+
Follow **`eventmodeling-interview-protocol`** to run this interview and record its findings — label this step "**Translating External Events** (`eventmodeling-translating-external-events`)". Findings should cover: the external systems catalog (names, event types, formats, auth), mapping complexity, correlation strategies (how external IDs map to domain entity IDs), and any high-risk integrations needing multi-source data.
|
|
85
33
|
|
|
86
34
|
---
|
|
87
35
|
|
package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-validating-event-models/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: eventmodeling-validating-event-models
|
|
3
|
-
description: "Step 9 of Event Modeling - Validate
|
|
3
|
+
description: "Step 9 of Event Modeling - Validate the model for completeness and consistency. Ensures events are immutable facts, read models are deterministic projections, and commands are traceable decisions. Identifies gaps before the model is declared done. Use when reviewing a model before it's considered final. Do not use for: the structured 12-check checklist (use eventmodeling-validating-event-models-checklist) or field-level completeness verification (use eventmodeling-checking-completeness)."
|
|
4
4
|
allowed-tools:
|
|
5
5
|
- Write
|
|
6
6
|
- Bash
|
|
@@ -10,6 +10,8 @@ allowed-tools:
|
|
|
10
10
|
|
|
11
11
|
> **Before doing anything else**, invoke the `connect` skill — if not already connected — to resolve `TOKEN`, `BOARD_ID`, `ORG_ID`, and `BASE_URL`. Do not proceed until it has completed. Consult `learn-eventmodelers-api` only if you need to look up a specific endpoint or field this file doesn't cover — don't load it eagerly.
|
|
12
12
|
|
|
13
|
+
This step applies the shared element rules in **`eventmodeling-core-rules`** — read it once per session if you haven't already; it defines what a COMMAND/EVENT/READMODEL/SCREEN/AUTOMATION is, how each is named, and the anti-patterns to reject, so this step doesn't restate them.
|
|
14
|
+
|
|
13
15
|
Prefer `mcp__eventmodelers__*` tools when available (registered by the `connect` skill) — the curl blocks below are the fallback for sessions without MCP connected.
|
|
14
16
|
|
|
15
17
|
For validation you treat the Event Model as read only. The only thing you are allowed to change is comments.
|
|
@@ -38,7 +40,8 @@ mcp__eventmodelers__get_nodes { "boardId": "$BOARD_ID", "type": "READMODEL" }
|
|
|
38
40
|
After validation, use the `handle-comment` skill to post findings on the relevant nodes — `TASK` for critical violations that must be fixed, `QUESTION` for warnings and recommendations. (That skill already handles the `add_comment` MCP-vs-curl choice internally — no separate rewrite needed here.)
|
|
39
41
|
|
|
40
42
|
## Purpose
|
|
41
|
-
|
|
43
|
+
|
|
44
|
+
Ensures the event model is complete, correct, and internally consistent.
|
|
42
45
|
|
|
43
46
|
## Workflow
|
|
44
47
|
|
|
@@ -54,12 +57,12 @@ mcp__eventmodelers__validate_model { "boardId": "$BOARD_ID", "chapterId": "<chap
|
|
|
54
57
|
|
|
55
58
|
It returns a compact `findings` list (no node dumps) covering: unplaced nodes, backward arrows among the forward-only pairs (with the todo-list `EVENT → READMODEL` exception already applied), COMMANDs with zero or multiple issuers, READMODELs with no inbound EVENT, columns with more than one screen, and COMMAND/READMODEL columns with no SCENARIO. This replaces the per-type `get_nodes` scans and the `get_node` `projection: "edges"` spot-checks those manual checks would otherwise need — start from its `findings`, then use the sections below for the semantic checks it can't make (naming, immutability, field-source traceability, scenario coverage depth). A `verdict` of `PASS` on `validate_model` is necessary but not sufficient — still do the semantic pass.
|
|
56
59
|
|
|
57
|
-
### 1.
|
|
60
|
+
### 1. Entity/Timeline Completeness Check
|
|
58
61
|
|
|
59
|
-
Verify each
|
|
62
|
+
Verify each entity's timeline has:
|
|
60
63
|
- Clear name (identity)
|
|
61
64
|
- At least one event type
|
|
62
|
-
-
|
|
65
|
+
- An initial event (what starts the entity's story)
|
|
63
66
|
- State transitions documented
|
|
64
67
|
|
|
65
68
|
**For each event:**
|
|
@@ -68,142 +71,115 @@ Verify each swimlane has:
|
|
|
68
71
|
- All data is **immutable**
|
|
69
72
|
- Unique semantics (no duplicates)
|
|
70
73
|
|
|
71
|
-
**For each
|
|
72
|
-
- Can be deterministically
|
|
73
|
-
-
|
|
74
|
+
**For each read model:**
|
|
75
|
+
- Can be deterministically derived from events
|
|
76
|
+
- No side effects in how it's built
|
|
74
77
|
|
|
75
78
|
**For each command:**
|
|
76
79
|
- Clear input parameters
|
|
77
|
-
-
|
|
80
|
+
- Preconditions defined in scenarios
|
|
78
81
|
- Resulting events specified (or rejection reason)
|
|
79
|
-
- Pure logic (no side effects except event appending)
|
|
80
82
|
|
|
81
83
|
### 2. Consistency Checks
|
|
82
84
|
|
|
83
|
-
- [ ] **Event-
|
|
85
|
+
- [ ] **Event-Entity Mapping**: Every event belongs to exactly one lane/entity
|
|
84
86
|
- [ ] **Single Command Issuer**: Every command is issued by exactly one SCREEN or AUTOMATION — never two. Check each COMMAND node's inbound edges; more than one SCREEN/AUTOMATION wired into the same command is a CRITICAL violation (commonly an auto-connect artifact — see `place-element` Step 7c)
|
|
85
|
-
- [ ] **Command Outcomes**: Every command produces events OR documents rejection
|
|
86
|
-
- [ ] **Deterministic
|
|
87
|
-
- [ ] **No Side Effects in Projections**: Pure state reconstruction logic
|
|
87
|
+
- [ ] **Command Outcomes**: Every command produces events OR documents a rejection
|
|
88
|
+
- [ ] **Deterministic Read Models**: A read model can only be derived one way from its events
|
|
88
89
|
- [ ] **Event Immutability**: No event data is ever modified
|
|
89
90
|
- [ ] **Naming Consistency**: Are naming patterns consistent?
|
|
90
|
-
- Commands:
|
|
91
|
-
- Events:
|
|
91
|
+
- Commands: present-tense verb (CreateOrder, ConfirmPayment)
|
|
92
|
+
- Events: past-tense verb (OrderCreated, PaymentConfirmed)
|
|
92
93
|
|
|
93
|
-
### 3. Event
|
|
94
|
+
### 3. Event Modeling Principles Compliance
|
|
94
95
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
- [ ] **Events are Facts**: Events describe what happened, not potential futures
|
|
96
|
+
- [ ] **Events are Facts**: describe what happened, not potential futures
|
|
98
97
|
- "OrderMayBeConfirmed" → "OrderConfirmed"
|
|
99
|
-
- "PaymentPending" (
|
|
98
|
+
- "PaymentPending" (as an event) → "PaymentInitiated", "PaymentAuthorized"
|
|
100
99
|
|
|
101
|
-
- [ ] **Events are Immutable**:
|
|
100
|
+
- [ ] **Events are Immutable**: no modification of event data
|
|
102
101
|
- "Update OrderCreated event with new total" → "Append OrderTotalCorrected event"
|
|
103
102
|
|
|
104
|
-
- [ ] **Complete Event Data**:
|
|
105
|
-
- Event
|
|
106
|
-
|
|
107
|
-
- [ ] **No Computed Fields in Events**: Only raw captured facts
|
|
108
|
-
- OrderCreated includes "totalTax" (computed) → Includes items + amounts, tax computed in projection
|
|
103
|
+
- [ ] **Complete Event Data**: events contain all facts a read model needs to project them
|
|
104
|
+
- Event "OrderConfirmed" missing paymentId → Event includes paymentId
|
|
109
105
|
|
|
110
|
-
- [ ] **
|
|
111
|
-
-
|
|
112
|
-
- Projection uses: external API call during replay
|
|
106
|
+
- [ ] **No Computed Fields in Events**: only raw captured facts
|
|
107
|
+
- OrderCreated includes "totalTax" (computed) → Includes items + amounts; tax computed in the read model
|
|
113
108
|
|
|
114
|
-
- [ ] **
|
|
115
|
-
- "Load state: replay all events for Order:123"
|
|
116
|
-
- "Load state: query database Orders table"
|
|
109
|
+
- [ ] **Deterministic Read Models**: replaying the same events always produces the same read model
|
|
117
110
|
|
|
118
111
|
### 4. Event Flow Validation
|
|
119
112
|
|
|
120
|
-
- [ ] **Command → Event Mapping**:
|
|
121
|
-
- [ ] **No Zombie Commands**:
|
|
113
|
+
- [ ] **Command → Event Mapping**: clear what each command produces
|
|
114
|
+
- [ ] **No Zombie Commands**: commands that never produce events (read-only commands are fine if documented as such)
|
|
122
115
|
|
|
123
116
|
### 5. Role & Actor Attribution Validation
|
|
124
117
|
|
|
125
118
|
Verify that every command has explicit actor attribution from the Role Catalog:
|
|
126
119
|
|
|
127
|
-
- [ ] **Role Catalog exists**:
|
|
128
|
-
- CRITICAL:
|
|
120
|
+
- [ ] **Role Catalog exists**: a Role Catalog was defined in Step 1 (eventmodeling-brainstorming-events)
|
|
121
|
+
- CRITICAL: no Role Catalog found — commands have no actor attribution
|
|
129
122
|
- PASS: Role Catalog with human roles and system actors defined
|
|
130
123
|
|
|
131
|
-
- [ ] **Every command has actor attribution**:
|
|
124
|
+
- [ ] **Every command has actor attribution**: no command uses generic "User"
|
|
132
125
|
- CRITICAL: `CreateOrder` attributed to "User" (which user? Customer? Admin? Seller?)
|
|
133
126
|
- PASS: `CreateOrder` attributed to "Customer" (specific role from catalog)
|
|
134
127
|
|
|
135
|
-
### 6. Command
|
|
128
|
+
### 6. Command Validation
|
|
136
129
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
-
|
|
142
|
-
-
|
|
130
|
+
- [ ] **Preconditions Clear**: when can each command execute?
|
|
131
|
+
- "Can only confirm if state is Draft"
|
|
132
|
+
- "Can sometimes confirm"
|
|
133
|
+
- [ ] **Rejection Handling**: what happens if a precondition fails?
|
|
134
|
+
- "Reject, no events appended"
|
|
135
|
+
- "Append a rejection/failure event and continue" (if that's the modeled outcome)
|
|
136
|
+
- [ ] **Valid State Transitions**: document what state changes are allowed
|
|
143
137
|
```text
|
|
144
138
|
Draft → Confirmed (ConfirmOrder)
|
|
145
139
|
Draft → Cancelled (CancelOrder)
|
|
146
140
|
Confirmed → Shipped (ShipOrder)
|
|
147
141
|
Confirmed ↛ Draft (invalid)
|
|
148
142
|
```
|
|
149
|
-
- [ ] **Preconditions Clear**: When can each command execute?
|
|
150
|
-
- "Can only confirm if state is Draft"
|
|
151
|
-
- "Can sometimes confirm"
|
|
152
|
-
- [ ] **Error Handling**: What happens if validation fails?
|
|
153
|
-
- "Reject with ValidationError, no events appended"
|
|
154
|
-
- "Append ErrorEvent and continue"
|
|
155
143
|
|
|
156
|
-
###
|
|
144
|
+
### 7. Read Model Validation
|
|
157
145
|
|
|
158
|
-
- [ ] **Read Models**:
|
|
159
|
-
- [ ] **Read Models Optional**:
|
|
160
|
-
- [ ] **Regenerable**:
|
|
146
|
+
- [ ] **Read Models**: are rich projections shaped for their query
|
|
147
|
+
- [ ] **Read Models Optional**: are they needed, or just convenience?
|
|
148
|
+
- [ ] **Regenerable**: could be rebuilt from events at any time
|
|
161
149
|
|
|
162
|
-
###
|
|
150
|
+
### 8. Issues & Recommendations Report
|
|
163
151
|
|
|
164
152
|
Format findings as comments:
|
|
165
153
|
|
|
166
154
|
```markdown
|
|
167
|
-
|
|
168
155
|
## Validation Summary
|
|
169
156
|
|
|
170
157
|
**Overall Status**: Ready with recommendations
|
|
171
158
|
|
|
172
|
-
**Blockers
|
|
159
|
+
**Blockers**: 0 critical issues
|
|
173
160
|
|
|
174
161
|
**Recommended Fixes**:
|
|
175
162
|
1. Add missing OrderCancelled event
|
|
176
|
-
2.
|
|
177
|
-
3. Document all implicit invariants explicitly
|
|
178
|
-
|
|
179
|
-
**Ready for Code Generation**: Yes, after implementing recommendations
|
|
163
|
+
2. Document all implicit preconditions explicitly
|
|
180
164
|
|
|
181
165
|
## Next Steps
|
|
182
166
|
1. Review recommendations with domain expert
|
|
183
167
|
2. Update model with critical fixes
|
|
184
|
-
3. Proceed to code generation
|
|
185
168
|
```
|
|
186
169
|
|
|
187
170
|
## Common Issues to Flag
|
|
188
171
|
|
|
189
172
|
| Issue | Pattern | Fix |
|
|
190
173
|
|-------|---------|-----|
|
|
191
|
-
| Missing cancellation flows | No "Cancelled" events | Add
|
|
192
|
-
| Implicit
|
|
193
|
-
|
|
|
194
|
-
|
|
|
195
|
-
| No read models | Commands reading query/read models for validation | Add separate query read models; keep command state minimal |
|
|
196
|
-
| Circular dependencies | Projection A depends on B, B on A | Redesign stream boundaries |
|
|
174
|
+
| Missing cancellation flows | No "Cancelled" events | Add the missing outcome slices |
|
|
175
|
+
| Implicit preconditions | "Obviously can't do X" | Make preconditions explicit |
|
|
176
|
+
| Orphaned events | Events no one reads | Link to a read model or command |
|
|
177
|
+
| No read models | Commands validated against raw event replay with no documented read model | Add a read model documenting what the command actually reads |
|
|
197
178
|
| Command issued by multiple things | COMMAND node has 2+ inbound SCREEN/AUTOMATION edges | Keep the deliberate same-column issuer, remove the rest via `set_connection` (`action: "remove"`) — see `place-element` Step 7c |
|
|
198
179
|
|
|
199
|
-
## Key Principles
|
|
180
|
+
## Key Principles
|
|
200
181
|
|
|
201
|
-
|
|
202
|
-
2. **Immutable event log**: Events never change, only appended
|
|
203
|
-
3. **State is a projection**: Current state is built by replaying events
|
|
204
|
-
4. **Commands are pure decisions**: Validate against state, produce events or reject
|
|
205
|
-
5. **Projections are optional**: Can be rebuilt at any time
|
|
206
|
-
6. **Stream per entity**: Each entity has one append-only event stream
|
|
182
|
+
See `eventmodeling-core-rules` for the element definitions this validation checks against (events as immutable facts, read models as optional projections, commands as decisions against documented preconditions).
|
|
207
183
|
|
|
208
184
|
## Success Criteria
|
|
209
185
|
|
|
@@ -211,39 +187,24 @@ Your event model validation is successful when:
|
|
|
211
187
|
|
|
212
188
|
- All requirements are captured in events
|
|
213
189
|
- Commands clearly trigger events
|
|
214
|
-
-
|
|
215
|
-
-
|
|
216
|
-
- Read models serve actual query needs (not used by commands)
|
|
217
|
-
- Command state is minimal and command-specific (not shared across multiple commands)
|
|
190
|
+
- Business rules are explicit preconditions (not hidden assumptions)
|
|
191
|
+
- Read models serve actual query needs
|
|
218
192
|
- Events are immutable facts (past tense, no computed fields)
|
|
219
|
-
- State can be deterministically rebuilt from events
|
|
220
193
|
- All command-to-event mappings are documented
|
|
221
194
|
- Critical issues are resolved or documented as known limitations
|
|
222
|
-
|
|
223
|
-
A model is **ready for code generation** if:
|
|
224
|
-
- No critical issues remain
|
|
225
|
-
- All command state follows naming convention (e.g., `[CommandName]State`)
|
|
226
|
-
- No state is shared between different commands
|
|
227
|
-
- All events are immutable facts
|
|
228
|
-
- All business rules are explicit
|
|
229
|
-
- A Role Catalog exists with all human roles and system actors
|
|
230
|
-
- Every command has explicit actor attribution from the Role Catalog
|
|
195
|
+
- A Role Catalog exists with all human roles and system actors, and every command has explicit actor attribution
|
|
231
196
|
|
|
232
197
|
## Quality Checklist
|
|
233
198
|
|
|
234
199
|
- [ ] All events are immutable facts (past tense)
|
|
235
200
|
- [ ] No computed fields stored in events
|
|
236
|
-
- [ ]
|
|
237
|
-
- [ ] Commands
|
|
201
|
+
- [ ] Read models are derived deterministically from events
|
|
202
|
+
- [ ] Commands are checked against documented preconditions
|
|
238
203
|
- [ ] Each command either produces events or rejects (no silent failures)
|
|
239
204
|
- [ ] **No command has more than one inbound SCREEN/AUTOMATION edge (a command is never issued by more than one thing)**
|
|
240
205
|
- [ ] Event causality/command-event mapping is clear
|
|
241
206
|
- [ ] State transitions are documented
|
|
242
|
-
- [ ]
|
|
243
|
-
- [ ] Projections serve specific query needs (or are removed)
|
|
244
|
-
- [ ] Everything can be rebuilt from the event stream
|
|
245
|
-
- [ ] No state is shared between different commands
|
|
246
|
-
- [ ] All command state is minimal (only fields needed for validation)
|
|
207
|
+
- [ ] Read models serve specific query needs (or are removed)
|
|
247
208
|
- [ ] **Role Catalog exists with human roles and system actors**
|
|
248
209
|
- [ ] **Every command attributed to a specific role/actor (no generic "User")**
|
|
249
210
|
- [ ] **Every human role has at least one command and one read model**
|