@eventmodelers/cli 0.0.1
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/README.md +175 -0
- package/cli.js +676 -0
- package/package.json +35 -0
- package/shared/build-kit/code-export.mjs +560 -0
- package/shared/build-kit/lib/ollama-agent.js +147 -0
- package/shared/build-kit/package.json +11 -0
- package/shared/build-kit/ralph-ollama.js +39 -0
- package/shared/build-kit/realtime-agent.js +18 -0
- package/stacks/axon/templates/.claude/skills/build-automation/SKILL.md +407 -0
- package/stacks/axon/templates/.claude/skills/build-automation/references/feature-flag-patterns.md +114 -0
- package/stacks/axon/templates/.claude/skills/build-automation-workflow/SKILL.md +496 -0
- package/stacks/axon/templates/.claude/skills/build-automation-workflow/references/axon-workflow-api.md +279 -0
- package/stacks/axon/templates/.claude/skills/build-automation-workflow/references/feature-flag-patterns.md +114 -0
- package/stacks/axon/templates/.claude/skills/build-state-change/SKILL.md +396 -0
- package/stacks/axon/templates/.claude/skills/build-state-change/references/axon-test-fixture-patterns.md +162 -0
- package/stacks/axon/templates/.claude/skills/build-state-change/references/feature-flag-patterns.md +56 -0
- package/stacks/axon/templates/.claude/skills/build-state-change/references/rest-api-patterns.md +115 -0
- package/stacks/axon/templates/.claude/skills/build-state-view/SKILL.md +282 -0
- package/stacks/axon/templates/.claude/skills/connect/SKILL.md +178 -0
- package/stacks/axon/templates/.claude/skills/learn-eventmodelers-api/SKILL.md +611 -0
- package/stacks/axon/templates/.claude/skills/load-slice/SKILL.md +141 -0
- package/stacks/axon/templates/.claude/skills/update-slice-status/SKILL.md +105 -0
- package/stacks/axon/templates/build-kit/lib/AGENT.md +47 -0
- package/stacks/axon/templates/build-kit/lib/agent.sh +20 -0
- package/stacks/axon/templates/build-kit/lib/backend-prompt.md +158 -0
- package/stacks/axon/templates/build-kit/lib/prompt.md +126 -0
- package/stacks/axon/templates/build-kit/lib/ralph.js +369 -0
- package/stacks/axon/templates/build-kit/ralph-claude.js +44 -0
- package/stacks/axon/templates/build-kit/ralph.sh +98 -0
- package/stacks/axon/templates/root/.env.example +5 -0
- package/stacks/axon/templates/root/CLAUDE.md +60 -0
- package/stacks/axon/templates/root/README.md +44 -0
- package/stacks/axon/templates/root/docker-compose.yml +64 -0
- package/stacks/axon/templates/root/mvnw +259 -0
- package/stacks/axon/templates/root/mvnw.cmd +149 -0
- package/stacks/axon/templates/root/pom.xml +125 -0
- package/stacks/axon/templates/root/src/main/java/io/axoniq/quickstart/QuickstartApplication.java +128 -0
- package/stacks/axon/templates/root/src/main/java/io/axoniq/quickstart/config/WebConfig.java +155 -0
- package/stacks/axon/templates/root/src/main/resources/application.properties +2 -0
- package/stacks/axon/templates/root/src/main/resources/static/bg-body.png +0 -0
- package/stacks/axon/templates/root/src/main/resources/static/bg-header.png +0 -0
- package/stacks/axon/templates/root/src/main/resources/static/index.html +596 -0
- package/stacks/cratis-csharp/templates/.claude/skills/_shared/cratis-conventions.md +251 -0
- package/stacks/cratis-csharp/templates/.claude/skills/build-automation/SKILL.md +99 -0
- package/stacks/cratis-csharp/templates/.claude/skills/build-automation/references/patterns.md +115 -0
- package/stacks/cratis-csharp/templates/.claude/skills/build-state-change/SKILL.md +163 -0
- package/stacks/cratis-csharp/templates/.claude/skills/build-state-change/references/patterns.md +234 -0
- package/stacks/cratis-csharp/templates/.claude/skills/build-state-view/SKILL.md +120 -0
- package/stacks/cratis-csharp/templates/.claude/skills/build-state-view/references/patterns.md +166 -0
- package/stacks/cratis-csharp/templates/.claude/skills/connect/SKILL.md +169 -0
- package/stacks/cratis-csharp/templates/.claude/skills/learn-eventmodelers-api/SKILL.md +609 -0
- package/stacks/cratis-csharp/templates/.claude/skills/load-slice/SKILL.md +141 -0
- package/stacks/cratis-csharp/templates/.claude/skills/update-slice-status/SKILL.md +105 -0
- package/stacks/cratis-csharp/templates/build-kit/lib/AGENT.md +58 -0
- package/stacks/cratis-csharp/templates/build-kit/lib/agent.sh +20 -0
- package/stacks/cratis-csharp/templates/build-kit/lib/backend-prompt.md +129 -0
- package/stacks/cratis-csharp/templates/build-kit/lib/prompt.md +124 -0
- package/stacks/cratis-csharp/templates/build-kit/lib/ralph.js +302 -0
- package/stacks/cratis-csharp/templates/build-kit/ralph-claude.js +37 -0
- package/stacks/cratis-csharp/templates/build-kit/ralph.sh +98 -0
- package/stacks/cratis-csharp/templates/root/.frontend/index.css +29 -0
- package/stacks/cratis-csharp/templates/root/.frontend/index.html +17 -0
- package/stacks/cratis-csharp/templates/root/.frontend/main.tsx +18 -0
- package/stacks/cratis-csharp/templates/root/.frontend/tsconfig.json +42 -0
- package/stacks/cratis-csharp/templates/root/.frontend/tsconfig.node.json +11 -0
- package/stacks/cratis-csharp/templates/root/.frontend/vite.config.ts +56 -0
- package/stacks/cratis-csharp/templates/root/App.tsx +23 -0
- package/stacks/cratis-csharp/templates/root/CLAUDE.md +62 -0
- package/stacks/cratis-csharp/templates/root/CratisApp.csproj +25 -0
- package/stacks/cratis-csharp/templates/root/CratisApp.sln +18 -0
- package/stacks/cratis-csharp/templates/root/GlobalUsings.cs +3 -0
- package/stacks/cratis-csharp/templates/root/Home.tsx +102 -0
- package/stacks/cratis-csharp/templates/root/Program.cs +26 -0
- package/stacks/cratis-csharp/templates/root/README.md +192 -0
- package/stacks/cratis-csharp/templates/root/SomeModule/SomeFeature/Listing/AllListings.ts +47 -0
- package/stacks/cratis-csharp/templates/root/SomeModule/SomeFeature/Listing/Listing.cs +11 -0
- package/stacks/cratis-csharp/templates/root/SomeModule/SomeFeature/Listing/Listing.ts +12 -0
- package/stacks/cratis-csharp/templates/root/SomeModule/SomeFeature/Listing/ListingDataTable.tsx +17 -0
- package/stacks/cratis-csharp/templates/root/SomeModule/SomeFeature/Listing/index.ts +1 -0
- package/stacks/cratis-csharp/templates/root/SomeModule/SomeFeature/Registration/Register.ts +51 -0
- package/stacks/cratis-csharp/templates/root/SomeModule/SomeFeature/Registration/RegisterDialog.tsx +18 -0
- package/stacks/cratis-csharp/templates/root/SomeModule/SomeFeature/Registration/Registration.cs +27 -0
- package/stacks/cratis-csharp/templates/root/SomeModule/SomeFeature/Registration/index.ts +1 -0
- package/stacks/cratis-csharp/templates/root/SomeModule/SomeFeature/SomeFeature.tsx +22 -0
- package/stacks/cratis-csharp/templates/root/SomeModule/SomeFeature/SomeName.cs +3 -0
- package/stacks/cratis-csharp/templates/root/SomeModule/SomeFeature/index.ts +1 -0
- package/stacks/cratis-csharp/templates/root/appsettings.Development.json +9 -0
- package/stacks/cratis-csharp/templates/root/appsettings.json +26 -0
- package/stacks/cratis-csharp/templates/root/docker-compose.yml +23 -0
- package/stacks/cratis-csharp/templates/root/package.json +33 -0
- package/stacks/cratis-csharp/templates/root/tsconfig.json +3 -0
- package/stacks/modeling-kit/templates/.claude/settings.local.json +13 -0
- package/stacks/modeling-kit/templates/.claude/skills/analyze-existing-model/SKILL.md +215 -0
- package/stacks/modeling-kit/templates/.claude/skills/attributes/SKILL.md +176 -0
- package/stacks/modeling-kit/templates/.claude/skills/connect/SKILL.md +182 -0
- package/stacks/modeling-kit/templates/.claude/skills/discover-storyboard/SKILL.md +383 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-applying-conways-law/SKILL.md +465 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-brainstorming-events/SKILL.md +587 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-brainstorming-events/references/facilitating-event-modeling-workshops.md +626 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-checking-completeness/SKILL.md +542 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-designing-event-models/SKILL.md +497 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-elaborating-scenarios/SKILL.md +783 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-identifying-inputs/SKILL.md +604 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-identifying-outputs/SKILL.md +699 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-integrating-legacy-systems/SKILL.md +674 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-optimizing-stream-design/SKILL.md +231 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-optimizing-stream-design/references/domain-patterns.md +150 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-optimizing-stream-design/references/patterns.md +329 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-optimizing-stream-design/references/snapshotting.md +204 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-orchestrating-event-modeling/SKILL.md +352 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-orchestrating-event-modeling/references/project-planning-with-event-modeling.md +341 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-plotting-events/SKILL.md +153 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-slicing-event-models/SKILL.md +136 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-slicing-event-models/references/examples.md +78 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-slicing-event-models/references/patterns.md +85 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-storyboarding-events/SKILL.md +655 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-translating-external-events/SKILL.md +479 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-validating-event-models/SKILL.md +234 -0
- package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-validating-event-models-checklist/SKILL.md +353 -0
- package/stacks/modeling-kit/templates/.claude/skills/examples/SKILL.md +200 -0
- package/stacks/modeling-kit/templates/.claude/skills/handle-comment/SKILL.md +94 -0
- package/stacks/modeling-kit/templates/.claude/skills/learn-eventmodelers-api/SKILL.md +441 -0
- package/stacks/modeling-kit/templates/.claude/skills/place-element/SKILL.md +290 -0
- package/stacks/modeling-kit/templates/.claude/skills/storyboard/SKILL.md +212 -0
- package/stacks/modeling-kit/templates/.claude/skills/storyboard-screen/SKILL.md +123 -0
- package/stacks/modeling-kit/templates/.claude/skills/timeline/SKILL.md +353 -0
- package/stacks/modeling-kit/templates/.claude/skills/update-slice-status/SKILL.md +110 -0
- package/stacks/modeling-kit/templates/.claude/skills/wdyt/SKILL.md +134 -0
- package/stacks/modeling-kit/templates/kit/lib/agent.sh +20 -0
- package/stacks/modeling-kit/templates/kit/lib/ollama-agent.js +147 -0
- package/stacks/modeling-kit/templates/kit/lib/ralph.js +286 -0
- package/stacks/modeling-kit/templates/kit/package.json +12 -0
- package/stacks/modeling-kit/templates/kit/ralph-claude.js +50 -0
- package/stacks/modeling-kit/templates/kit/ralph-ollama.js +38 -0
- package/stacks/modeling-kit/templates/kit/ralph.sh +61 -0
- package/stacks/modeling-kit/templates/kit/realtime-agent.js +18 -0
- package/stacks/modeling-kit/templates/root/CLAUDE.md +56 -0
- package/stacks/node/templates/.claude/skills/build-automation/SKILL.md +266 -0
- package/stacks/node/templates/.claude/skills/build-state-change/SKILL.md +344 -0
- package/stacks/node/templates/.claude/skills/build-state-view/SKILL.md +412 -0
- package/stacks/node/templates/.claude/skills/connect/SKILL.md +178 -0
- package/stacks/node/templates/.claude/skills/learn-eventmodelers-api/SKILL.md +628 -0
- package/stacks/node/templates/.claude/skills/load-slice/SKILL.md +143 -0
- package/stacks/node/templates/.claude/skills/update-slice-status/SKILL.md +110 -0
- package/stacks/node/templates/build-kit/README.md +86 -0
- package/stacks/node/templates/build-kit/lib/AGENT.md +47 -0
- package/stacks/node/templates/build-kit/lib/agent.sh +20 -0
- package/stacks/node/templates/build-kit/lib/backend-prompt.md +152 -0
- package/stacks/node/templates/build-kit/lib/prompt.md +122 -0
- package/stacks/node/templates/build-kit/lib/ralph.js +369 -0
- package/stacks/node/templates/build-kit/ralph-claude.js +44 -0
- package/stacks/node/templates/build-kit/ralph.sh +98 -0
- package/stacks/node/templates/root/.env.example +15 -0
- package/stacks/node/templates/root/CLAUDE.md +60 -0
- package/stacks/node/templates/root/docker-compose.yml +15 -0
- package/stacks/node/templates/root/flyway.conf +17 -0
- package/stacks/node/templates/root/migrations/V1__schema.sql.example +12 -0
- package/stacks/node/templates/root/package.json +50 -0
- package/stacks/node/templates/root/server.ts +130 -0
- package/stacks/node/templates/root/setup-env.sh +53 -0
- package/stacks/node/templates/root/src/common/assertions.ts +6 -0
- package/stacks/node/templates/root/src/common/db.ts +32 -0
- package/stacks/node/templates/root/src/common/loadPostgresEventstore.ts +23 -0
- package/stacks/node/templates/root/src/common/parseEndpoint.ts +51 -0
- package/stacks/node/templates/root/src/common/processorDlq.ts +28 -0
- package/stacks/node/templates/root/src/common/realtimeBroadcast.ts +12 -0
- package/stacks/node/templates/root/src/common/replay.ts +16 -0
- package/stacks/node/templates/root/src/common/routes.ts +19 -0
- package/stacks/node/templates/root/src/common/testHelpers.ts +44 -0
- package/stacks/node/templates/root/src/swagger.ts +34 -0
- package/stacks/node/templates/root/src/util/assertions.ts +6 -0
- package/stacks/node/templates/root/src/util/hash.ts +9 -0
- package/stacks/node/templates/root/src/util/sanitize.ts +23 -0
- package/stacks/node/templates/root/tsconfig.json +32 -0
- package/stacks/node/templates/root/vercel.json +8 -0
- package/stacks/supabase/templates/.claude/skills/build-automation/SKILL.md +266 -0
- package/stacks/supabase/templates/.claude/skills/build-state-change/SKILL.md +344 -0
- package/stacks/supabase/templates/.claude/skills/build-state-view/SKILL.md +390 -0
- package/stacks/supabase/templates/.claude/skills/build-webhook/SKILL.md +303 -0
- package/stacks/supabase/templates/.claude/skills/connect/SKILL.md +178 -0
- package/stacks/supabase/templates/.claude/skills/learn-eventmodelers-api/SKILL.md +628 -0
- package/stacks/supabase/templates/.claude/skills/load-slice/SKILL.md +143 -0
- package/stacks/supabase/templates/.claude/skills/update-slice-status/SKILL.md +110 -0
- package/stacks/supabase/templates/build-kit/README.md +86 -0
- package/stacks/supabase/templates/build-kit/lib/AGENT.md +47 -0
- package/stacks/supabase/templates/build-kit/lib/agent.sh +20 -0
- package/stacks/supabase/templates/build-kit/lib/backend-prompt.md +152 -0
- package/stacks/supabase/templates/build-kit/lib/prompt.md +123 -0
- package/stacks/supabase/templates/build-kit/lib/ralph.js +369 -0
- package/stacks/supabase/templates/build-kit/ralph-claude.js +44 -0
- package/stacks/supabase/templates/build-kit/ralph.sh +98 -0
- package/stacks/supabase/templates/root/.env.example +22 -0
- package/stacks/supabase/templates/root/CLAUDE.md +61 -0
- package/stacks/supabase/templates/root/flyway.conf +17 -0
- package/stacks/supabase/templates/root/package.json +52 -0
- package/stacks/supabase/templates/root/server.ts +177 -0
- package/stacks/supabase/templates/root/setup-env.sh +53 -0
- package/stacks/supabase/templates/root/src/common/assertions.ts +6 -0
- package/stacks/supabase/templates/root/src/common/db.ts +32 -0
- package/stacks/supabase/templates/root/src/common/loadPostgresEventstore.ts +23 -0
- package/stacks/supabase/templates/root/src/common/parseEndpoint.ts +51 -0
- package/stacks/supabase/templates/root/src/common/processorDlq.ts +28 -0
- package/stacks/supabase/templates/root/src/common/realtimeBroadcast.ts +19 -0
- package/stacks/supabase/templates/root/src/common/replay.ts +16 -0
- package/stacks/supabase/templates/root/src/common/routes.ts +23 -0
- package/stacks/supabase/templates/root/src/common/testHelpers.ts +54 -0
- package/stacks/supabase/templates/root/src/supabase/README.md +141 -0
- package/stacks/supabase/templates/root/src/supabase/api.ts +56 -0
- package/stacks/supabase/templates/root/src/supabase/requireOrgaAdmin.ts +32 -0
- package/stacks/supabase/templates/root/src/supabase/requireSysUser.ts +40 -0
- package/stacks/supabase/templates/root/src/supabase/requireUser.ts +72 -0
- package/stacks/supabase/templates/root/src/swagger.ts +34 -0
- package/stacks/supabase/templates/root/src/util/assertions.ts +6 -0
- package/stacks/supabase/templates/root/src/util/hash.ts +9 -0
- package/stacks/supabase/templates/root/src/util/sanitize.ts +23 -0
- package/stacks/supabase/templates/root/supabase/config.toml +295 -0
- package/stacks/supabase/templates/root/supabase/migrations/V1__schema.sql.example +12 -0
- package/stacks/supabase/templates/root/supabase/seed.sql +1 -0
- package/stacks/supabase/templates/root/tsconfig.json +32 -0
- package/stacks/supabase/templates/root/vercel.json +8 -0
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
# Snapshotting Strategy
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
- Criteria for Snapshotting
|
|
5
|
+
- Context-Based Decision Thresholds
|
|
6
|
+
- Snapshotting Downsides
|
|
7
|
+
- Snapshot Frequency & Versioning
|
|
8
|
+
- Snapshot Cleanup Strategies
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## When Snapshotting is Actually Needed
|
|
13
|
+
|
|
14
|
+
### Conservative First Approach: Keep Streams Short
|
|
15
|
+
|
|
16
|
+
**Default Principle**: Prefer shorter streams over snapshotting
|
|
17
|
+
- Shorter streams = simpler code, easier debugging, fewer bugs
|
|
18
|
+
- Snapshotting = added complexity that's hard to get right
|
|
19
|
+
- Most systems don't actually need snapshotting if designed well
|
|
20
|
+
|
|
21
|
+
### Criteria: Snapshotting Only When ALL Are True
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
1. Stream length > 100 events (conservative default) AND
|
|
25
|
+
2. You've measured latency and it exceeds SLA AND
|
|
26
|
+
3. The latency problem IS stream replay (not read model) AND
|
|
27
|
+
4. Aggregate boundary is already optimal (can't split further) AND
|
|
28
|
+
5. You have operational capability to maintain snapshots
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
**If ANY criteria fail**: Don't snapshot. Redesign instead.
|
|
32
|
+
|
|
33
|
+
### Context-Based Thresholds (Ask These Questions)
|
|
34
|
+
|
|
35
|
+
Instead of assuming a fixed number, ask about your actual business context:
|
|
36
|
+
|
|
37
|
+
**Question 1: How is this aggregate read?**
|
|
38
|
+
```
|
|
39
|
+
"From stream replay" (loaded every time)
|
|
40
|
+
→ Conservative threshold: 50-100 events
|
|
41
|
+
→ Reason: Replay latency compounds
|
|
42
|
+
|
|
43
|
+
"From read model/cache" (projection loaded once)
|
|
44
|
+
→ Conservative threshold: Not relevant (stream size doesn't matter!)
|
|
45
|
+
→ Reason: You're not replaying on each read
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**Question 2: What's your read latency requirement?**
|
|
49
|
+
```
|
|
50
|
+
"Immediate/real-time" (< 50ms, user-facing)
|
|
51
|
+
→ Conservative threshold: 50 events max
|
|
52
|
+
→ Reason: Strict SLA, no room for slowness
|
|
53
|
+
|
|
54
|
+
"Normal web response" (100-500ms, typical page load)
|
|
55
|
+
→ Conservative threshold: 100-300 events
|
|
56
|
+
→ Reason: Some latency acceptable if not critical path
|
|
57
|
+
|
|
58
|
+
"Background/batch operations" (seconds to minutes)
|
|
59
|
+
→ Conservative threshold: Not a concern
|
|
60
|
+
→ Reason: Speed doesn't matter for batch work
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**Question 3: How often is this aggregate read?**
|
|
64
|
+
```
|
|
65
|
+
"Very frequent" (> 100 reads/second)
|
|
66
|
+
→ Use threshold ÷ 5 (contention matters more)
|
|
67
|
+
→ Reason: Concurrent replays degrade badly
|
|
68
|
+
|
|
69
|
+
"Normal frequency" (1-10 reads/second)
|
|
70
|
+
→ Use stated threshold
|
|
71
|
+
→ Reason: Single-digit concurrency manageable
|
|
72
|
+
|
|
73
|
+
"Rare" (< 1 read per minute)
|
|
74
|
+
→ Use threshold × 2-3 (who cares about latency?)
|
|
75
|
+
→ Reason: Speed doesn't matter if rarely accessed
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### If User Doesn't Know (Most Common Case)
|
|
79
|
+
|
|
80
|
+
**Guidance**: Be conservative AND use conversation context
|
|
81
|
+
```
|
|
82
|
+
Default position:
|
|
83
|
+
→ Start with 100 events as safe threshold
|
|
84
|
+
→ This prevents 90% of problems
|
|
85
|
+
→ Better to redesign early than add snapshotting later
|
|
86
|
+
|
|
87
|
+
If user says "I don't know my requirements":
|
|
88
|
+
→ Use context from earlier conversation
|
|
89
|
+
→ Review: What did domain analysis say?
|
|
90
|
+
→ Check: What's the business criticality?
|
|
91
|
+
→ Ask: Is this user-facing or backend?
|
|
92
|
+
|
|
93
|
+
Example Decision Logic:
|
|
94
|
+
Domain: E-commerce (user-facing) + No explicit SLA
|
|
95
|
+
→ Use 100-event threshold (conservative for user-facing)
|
|
96
|
+
|
|
97
|
+
Domain: Bank transfers (critical) + No explicit SLA
|
|
98
|
+
→ Use 50-event threshold (very conservative, safety margin)
|
|
99
|
+
|
|
100
|
+
Domain: Analytics (batch) + No explicit SLA
|
|
101
|
+
→ Use 1000+ threshold (performance doesn't matter)
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Snapshotting Downsides to Consider
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
Complexity Cost:
|
|
110
|
+
- Extra code path (snapshot loading logic)
|
|
111
|
+
- Testing complexity (snapshot + delta replay)
|
|
112
|
+
- Snapshot versioning challenges
|
|
113
|
+
- Potential for bugs in snapshot recovery
|
|
114
|
+
|
|
115
|
+
Operational Cost:
|
|
116
|
+
- Storage overhead (original events + snapshots)
|
|
117
|
+
- Cleanup and archival strategies
|
|
118
|
+
- Debugging difficulty (was it the snapshot?)
|
|
119
|
+
- Migration burden if snapshot format changes
|
|
120
|
+
|
|
121
|
+
Performance Cost:
|
|
122
|
+
- Snapshot creation cost
|
|
123
|
+
- Storage I/O for snapshots
|
|
124
|
+
- Memory usage during snapshot loading
|
|
125
|
+
- Synchronization between events and snapshots
|
|
126
|
+
|
|
127
|
+
Rule of Thumb:
|
|
128
|
+
Complexity of snapshotting ≈ 2-3x complexity of solving with better design
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Snapshotting Strategy (When Actually Needed)
|
|
134
|
+
|
|
135
|
+
### If You Decide Snapshotting is Necessary:
|
|
136
|
+
|
|
137
|
+
#### Snapshot Frequency Decision:
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
Rule: Snapshot every N events where N = √(Total Estimated Events)
|
|
141
|
+
|
|
142
|
+
Example:
|
|
143
|
+
If stream will eventually reach 10,000 events:
|
|
144
|
+
N = √10,000 = 100
|
|
145
|
+
Snapshot every 100 events
|
|
146
|
+
Result: 100 snapshots + max 100 events to replay = manageable
|
|
147
|
+
|
|
148
|
+
If stream reaches 100,000 events (red flag):
|
|
149
|
+
N = √100,000 = 316
|
|
150
|
+
Snapshot every 316 events
|
|
151
|
+
Result: 316 snapshots = storage issue, redesign needed
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
**Better Rule**: Snapshot when read latency exceeds acceptable threshold
|
|
155
|
+
|
|
156
|
+
```
|
|
157
|
+
Measure:
|
|
158
|
+
1. Measure event replay time for current stream length
|
|
159
|
+
2. If > acceptable latency (e.g., 50ms), snapshot
|
|
160
|
+
3. Snapshot frequency = whatever makes latency acceptable
|
|
161
|
+
4. Re-measure after snapshot implementation
|
|
162
|
+
|
|
163
|
+
Example:
|
|
164
|
+
- Stream: 2000 events
|
|
165
|
+
- Replay time: 120ms (acceptable if reads are occasional)
|
|
166
|
+
- Snapshot needed? NO
|
|
167
|
+
- Decision: Monitor, implement snapshotting only if latency > 200ms
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
#### Snapshot Versioning:
|
|
171
|
+
|
|
172
|
+
```
|
|
173
|
+
DON'T: Version snapshots, migrate old formats
|
|
174
|
+
DO: Version aggregates instead
|
|
175
|
+
|
|
176
|
+
Pattern:
|
|
177
|
+
Aggregate Version 1: Stream 1
|
|
178
|
+
Aggregate Version 2: New Stream with different structure
|
|
179
|
+
|
|
180
|
+
Reason: Snapshots are just optimization, not part of model
|
|
181
|
+
If snapshot format needs to change, it means your aggregate changed
|
|
182
|
+
→ Create new aggregate version with new stream instead
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
#### Snapshot Cleanup:
|
|
186
|
+
|
|
187
|
+
```
|
|
188
|
+
Good Strategy: Snapshot + Event Log
|
|
189
|
+
- Keep original events (immutable, source of truth)
|
|
190
|
+
- Keep snapshots (performance optimization)
|
|
191
|
+
- No special cleanup needed (both are authoritative together)
|
|
192
|
+
|
|
193
|
+
Bad Strategy: Snapshot + Purge Old Events
|
|
194
|
+
- Destroys event history
|
|
195
|
+
- Makes auditing impossible
|
|
196
|
+
- Complicates recovery
|
|
197
|
+
- Only do if regulatory rules require it
|
|
198
|
+
|
|
199
|
+
Alternative: Archive Old Events
|
|
200
|
+
- Keep all events for audit trail
|
|
201
|
+
- Archive to slower storage if needed
|
|
202
|
+
- Snapshot in hot storage for performance
|
|
203
|
+
- Best of both worlds
|
|
204
|
+
```
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: eventmodeling-orchestrating-event-modeling
|
|
3
|
+
description: "Orchestrates complete event modeling workflow from requirements to code generation. Models architecture as UI/Processor → Command → Event → Read Model. Use when modeling a domain end-to-end from requirements. Do not use for: executing a single step in isolation (invoke the named step skill directly, e.g., eventmodeling-brainstorming-events for Step 1 or eventmodeling-elaborating-scenarios for Step 7), validating an already-completed model (use eventmodeling-validating-event-models), or modernizing legacy systems (use eventmodeling-integrating-legacy-systems)."
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- AskUserQuestion
|
|
6
|
+
- Write
|
|
7
|
+
- Bash
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Orchestrating Event Modeling
|
|
11
|
+
|
|
12
|
+
> **Before doing anything else**, invoke the `connect` skill to resolve `TOKEN`, `BOARD_ID`, `ORG_ID`, and `BASE_URL`. Then invoke the `learn-eventmodelers-api` skill to load the full API reference. Do not proceed until both skills have been loaded.
|
|
13
|
+
|
|
14
|
+
Coordinates the 10-step Event Modeling workflow. Each step delegates to a
|
|
15
|
+
specialized skill — this skill holds the sequence, transition conditions, and
|
|
16
|
+
what to carry forward between steps.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Timeline Alignment Rules
|
|
21
|
+
|
|
22
|
+
These rules govern how every element is placed on the board. Enforce them throughout the workflow.
|
|
23
|
+
|
|
24
|
+
### State-change slice (SCREEN → COMMAND → EVENT)
|
|
25
|
+
- COMMAND and EVENT go in **the same column** — the command produces the event.
|
|
26
|
+
- SCREEN (input/command screen) goes in the **actor row of that same column**.
|
|
27
|
+
|
|
28
|
+
### State-view slice (EVENT → READ MODEL → SCREEN)
|
|
29
|
+
- READ MODEL goes in the **interaction row** of a column that is **immediately after the primary source event's column** — never at the end of the timeline.
|
|
30
|
+
- SCREEN (view/output screen) goes in the **actor row of the same column as the READ MODEL**.
|
|
31
|
+
- If the primary source event's column already has a COMMAND in the interaction row, insert a **new column immediately after** (using `index = currentColumnIndex + 1`) and place the READ MODEL there.
|
|
32
|
+
|
|
33
|
+
### Never stack read models at the end
|
|
34
|
+
Placing all read models in new columns at the very end of the timeline severs the visual connection to the events they're derived from. The board must show a coherent left-to-right narrative where each slice is self-contained.
|
|
35
|
+
|
|
36
|
+
### No unplaced elements (0,0 nodes)
|
|
37
|
+
|
|
38
|
+
After each step that creates elements (Steps 1–5), scan for any nodes that have no cell reference and are stranded at the default canvas position (0,0). These arise when `node:created` is called without `cellId`.
|
|
39
|
+
|
|
40
|
+
For each timeline in scope, check all node types that should be in cells:
|
|
41
|
+
```bash
|
|
42
|
+
for TYPE in EVENT COMMAND READMODEL SCREEN AUTOMATION; do
|
|
43
|
+
curl -s -H "x-token: $TOKEN" -H "x-board-id: $BOARD_ID" \
|
|
44
|
+
"$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/nodes?type=$TYPE"
|
|
45
|
+
done
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
For each returned node, check whether it has a valid cell assignment. A node without a `cellId` (or with `chapterId` missing) is unplaced.
|
|
49
|
+
|
|
50
|
+
**For each unplaced node:**
|
|
51
|
+
- **If it belongs in the current model** → compute the correct `cellId` and call `node:changed` to assign it:
|
|
52
|
+
```bash
|
|
53
|
+
curl -s -X POST "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/nodes/events" \
|
|
54
|
+
-H "x-token: $TOKEN" -H "x-board-id: $BOARD_ID" -H "x-user-id: orchestrator" \
|
|
55
|
+
-H "Content-Type: application/json" \
|
|
56
|
+
-d '[{"id":"<uuid>","eventType":"node:changed","nodeId":"<nodeId>","boardId":"<BOARD_ID>",
|
|
57
|
+
"timestamp":1234567890,"chapterId":"<chapterId>","cellId":"<rowId>-<colId>",
|
|
58
|
+
"meta":{"type":"<TYPE>","title":"<title>"}}]'
|
|
59
|
+
```
|
|
60
|
+
- **If it is an orphan (duplicate or no longer needed)** → delete it:
|
|
61
|
+
```bash
|
|
62
|
+
curl -s -X DELETE "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/nodes/<nodeId>" \
|
|
63
|
+
-H "x-token: $TOKEN" -H "x-board-id: $BOARD_ID"
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Never leave an unplaced node on the board when proceeding to the next step.
|
|
67
|
+
|
|
68
|
+
### No backward arrows
|
|
69
|
+
The timeline must always progress left-to-right. Every connection arrow — SCREEN→COMMAND, COMMAND→EVENT, EVENT→READMODEL, READMODEL→SCREEN — must point to the right or downward (within the same column). A right-to-left arrow is always a layout error.
|
|
70
|
+
|
|
71
|
+
Before wiring any connection, verify that `column(source) ≤ column(target)`. If this is violated:
|
|
72
|
+
- Move the earlier-placed element to the correct column, OR
|
|
73
|
+
- Insert a new column at the right position to restore the correct order.
|
|
74
|
+
|
|
75
|
+
Screens placed during Step 3 (Storyboarding) are provisional positions. Steps 4 and 5 may need to move them to align with the commands or read models placed later.
|
|
76
|
+
|
|
77
|
+
### Column insertion
|
|
78
|
+
Use `POST /timelines/:tl/columns` with `{"index": N}` to insert a column at a specific position (shifts existing columns right). Do not use `{}` (append) when placing read models or view screens — always target the correct position.
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Interview Phase
|
|
83
|
+
|
|
84
|
+
**Skip if**: user has provided a clear domain description, requirements or
|
|
85
|
+
scope, and stated output goal (code, design, learning, docs).
|
|
86
|
+
|
|
87
|
+
**When interviewing**, use AskUserQuestion:
|
|
88
|
+
|
|
89
|
+
1. **Domain** — "What are you modeling? Describe the business process in 2-3
|
|
90
|
+
sentences."
|
|
91
|
+
2. **Requirements state** — "(A) Written requirements/user stories, (B) Rough
|
|
92
|
+
ideas, (C) Existing system to reverse-engineer?"
|
|
93
|
+
3. **Goal** — "(A) Learning event modeling, (B) Generate production code,
|
|
94
|
+
(C) Design validation, (D) Team documentation?"
|
|
95
|
+
4. **Constraints** — "Any constraints? (timeline, external integrations, team
|
|
96
|
+
size, target language/framework)"
|
|
97
|
+
5. **Starting point** — "Are you starting from scratch, or do you already have
|
|
98
|
+
outputs from earlier steps (event list, commands, scenarios)?"
|
|
99
|
+
|
|
100
|
+
Confirm understanding before proceeding: "So we're modeling [domain], goal is
|
|
101
|
+
[goal], constraints are [constraints]. Starting from [step]. Does that match?"
|
|
102
|
+
|
|
103
|
+
**Capture findings** — write to `.trogonai/interviews/[project-name]/EVENTMODELING.md`:
|
|
104
|
+
|
|
105
|
+
```markdown
|
|
106
|
+
# Event Modeling: [Project Name]
|
|
107
|
+
|
|
108
|
+
**Project**: [project-name]
|
|
109
|
+
**Started**: [ISO date]
|
|
110
|
+
**Goal**: [learning / production code / design validation / documentation]
|
|
111
|
+
**Constraints**: [timeline, integrations, team size, language]
|
|
112
|
+
|
|
113
|
+
## Interview Trail
|
|
114
|
+
|
|
115
|
+
| Step | Skill | Status | Key Output |
|
|
116
|
+
|------|-------|--------|------------|
|
|
117
|
+
| Orchestration | eventmodeling-orchestrating-event-modeling | Done | Domain scoped, starting point confirmed |
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Update this file as each step completes.
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Phase Transition Protocol (Mandatory After Every Step)
|
|
125
|
+
|
|
126
|
+
After each step completes, before invoking the next skill:
|
|
127
|
+
|
|
128
|
+
### 1. Write a phase summary to memory
|
|
129
|
+
|
|
130
|
+
Append a summary block to `.trogonai/interviews/[project-name]/EVENTMODELING.md`:
|
|
131
|
+
|
|
132
|
+
```markdown
|
|
133
|
+
### Step N complete — [Skill Name]
|
|
134
|
+
- **What was done**: [2-4 bullet points — key artifacts created, decisions made, gates passed]
|
|
135
|
+
- **Carry-forward**: [what the next step needs from this step]
|
|
136
|
+
- **Open questions**: [anything unresolved or deferred]
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Also update the Interview Trail table row for this step (Status → Done, Key Output → one-line summary).
|
|
140
|
+
|
|
141
|
+
### 2. Compact the context
|
|
142
|
+
|
|
143
|
+
After writing the summary, run `/compact` to clear the accumulated context before loading the next skill. The summary written above is the handoff — the next skill reads it from the file, not from the conversation history.
|
|
144
|
+
|
|
145
|
+
This keeps each step's context lean and prevents token bloat from accumulating across all 9 steps.
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## Mid-Workflow Entry
|
|
150
|
+
|
|
151
|
+
If the user already has outputs from earlier steps, start from where they are.
|
|
152
|
+
Ask which steps are complete and what artifacts exist. Do not re-run completed
|
|
153
|
+
steps — pick up from the first incomplete step.
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Workflow
|
|
158
|
+
|
|
159
|
+
### Step 1: Brainstorm Events
|
|
160
|
+
|
|
161
|
+
Invoke `eventmodeling-brainstorming-events`.
|
|
162
|
+
|
|
163
|
+
**Input**: Domain requirements and any existing knowledge about the domain.
|
|
164
|
+
**Output to carry forward**: Event list + Role Catalog + dedicated timelines
|
|
165
|
+
(one chapter per workflow / bounded context) with events already placed in
|
|
166
|
+
their correct timeline. The Role Catalog (all human roles and system actors)
|
|
167
|
+
feeds into every subsequent step. Timeline discovery happens here — it does
|
|
168
|
+
not happen in Step 2.
|
|
169
|
+
**Gate**: Do not proceed until the Role Catalog exists, events cover all known
|
|
170
|
+
business processes, and every event is placed into a named chapter.
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
### Step 2: Plot Events
|
|
175
|
+
|
|
176
|
+
Invoke `eventmodeling-plotting-events`.
|
|
177
|
+
|
|
178
|
+
**Input**: Events already placed in their timelines from Step 1. This step
|
|
179
|
+
focuses on **one timeline at a time** — ask the user which timeline to
|
|
180
|
+
sequence first if multiple exist.
|
|
181
|
+
**Output to carry forward**: Chronological event ordering within the chosen
|
|
182
|
+
timeline showing causal dependencies between events.
|
|
183
|
+
**Gate**: The chosen timeline reads as a coherent narrative before proceeding.
|
|
184
|
+
Repeat for each additional timeline before moving to Step 3.
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
### Step 3: Storyboard
|
|
189
|
+
|
|
190
|
+
Invoke `eventmodeling-storyboarding-events`.
|
|
191
|
+
|
|
192
|
+
**Input**: Event timeline + Role Catalog.
|
|
193
|
+
**Output to carry forward**: UI mockups/wireframes with one swimlane per
|
|
194
|
+
human role, showing what data each screen displays and collects.
|
|
195
|
+
**Gate**: Every human role from the Role Catalog has at least one screen.
|
|
196
|
+
|
|
197
|
+
Use the Story-Board-Screen skill to sketch and provide Mockups.
|
|
198
|
+
|
|
199
|
+
You can reuse columns if screens can be matched to existing events, place the screen in the same
|
|
200
|
+
column as the event in the actor lane
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
### Step 4: Identify Inputs
|
|
206
|
+
|
|
207
|
+
Invoke `eventmodeling-identifying-inputs`.
|
|
208
|
+
|
|
209
|
+
**Input**: Storyboards + Role Catalog.
|
|
210
|
+
**Output to carry forward**: Command definitions, each attributed to a specific
|
|
211
|
+
role or system processor.
|
|
212
|
+
**Gate**: Every UI action in the storyboards maps to a named command.
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
### Step 5: Identify Outputs
|
|
217
|
+
|
|
218
|
+
Invoke `eventmodeling-identifying-outputs`.
|
|
219
|
+
|
|
220
|
+
**Input**: Event list + Commands from Step 4.
|
|
221
|
+
**Output to carry forward**: Read model definitions — projections of events
|
|
222
|
+
optimized for UI and processor queries.
|
|
223
|
+
**Gate**: Every screen data need from the storyboards is satisfied by a read
|
|
224
|
+
model.
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
### Step 6: Apply Conway's Law
|
|
229
|
+
|
|
230
|
+
Invoke `eventmodeling-applying-conways-law`.
|
|
231
|
+
|
|
232
|
+
**Input**: Full event model so far (events, commands, read models).
|
|
233
|
+
**Output to carry forward**: System swimlanes mapping events and commands to
|
|
234
|
+
team boundaries.
|
|
235
|
+
**Gate**: Each boundary can be independently owned by a team. Skip this step
|
|
236
|
+
if Conway's Law boundaries are not relevant to the project.
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
### Step 7: Elaborate Scenarios
|
|
241
|
+
|
|
242
|
+
Invoke `eventmodeling-elaborating-scenarios`.
|
|
243
|
+
|
|
244
|
+
**Input**: Commands and read models.
|
|
245
|
+
**Output to carry forward**: Given-When-Then specifications for each command
|
|
246
|
+
and view, posted to the board spec cells.
|
|
247
|
+
**Gate**: Every command has scenarios covering **all applicable types** from the elaborating-scenarios workflow — not just happy path + one error case. See the gate checklist below.
|
|
248
|
+
|
|
249
|
+
> **Do not reduce scenarios to a simple good-case / bad-case pair.** The `eventmodeling-elaborating-scenarios` skill defines a structured scenario workshop covering seven scenario types per command. All applicable types must be written before this step is complete.
|
|
250
|
+
|
|
251
|
+
**Scenario types to work through for each command** — which apply is determined by the domain, not by a fixed rule:
|
|
252
|
+
1. **Happy Path** — the normal success case
|
|
253
|
+
2. **Validation Failure** — invalid or missing input
|
|
254
|
+
3. **State Violation** — command issued when system is in an invalid state
|
|
255
|
+
4. **Duplicate Action** — command issued again after it already succeeded
|
|
256
|
+
5. **Alternative Path** — different valid outcomes depending on context
|
|
257
|
+
6. **External Failure** — external system or scheduler fails
|
|
258
|
+
7. **Compensation** — rollback or undo flow
|
|
259
|
+
|
|
260
|
+
For each type, ask the relevant question against the business case and write a scenario if the situation can occur. Do not decide based on brevity — decide based on the domain.
|
|
261
|
+
|
|
262
|
+
> The `eventmodeling-elaborating-scenarios` skill designs scenarios **and** posts them to the board. It uses `GET /timelines/$TL/spec-info` to resolve node IDs, then `POST /timelines/$TL/columns/$COL/scenarios` with all scenarios for that column in one call (array body). The SCENARIO spec node is created automatically. Ensure the timeline and column IDs are resolved and passed to the skill before invoking it.
|
|
263
|
+
|
|
264
|
+
---
|
|
265
|
+
|
|
266
|
+
### Step 8: Check Completeness
|
|
267
|
+
|
|
268
|
+
Invoke `eventmodeling-checking-completeness`.
|
|
269
|
+
|
|
270
|
+
**Input**: Full model — events, commands, read models, scenarios, Role Catalog.
|
|
271
|
+
**Output to carry forward**: Field traceability matrix confirming every field
|
|
272
|
+
has an origin and a destination. List of any gaps found.
|
|
273
|
+
**Gate**: All gaps resolved or explicitly accepted before proceeding.
|
|
274
|
+
|
|
275
|
+
---
|
|
276
|
+
|
|
277
|
+
### Step 9: Validate
|
|
278
|
+
|
|
279
|
+
Invoke `eventmodeling-validating-event-models`.
|
|
280
|
+
|
|
281
|
+
**Input**: Complete event model.
|
|
282
|
+
**Output**: Validation report with PASS / PASS WITH WARNINGS / FAIL verdict.
|
|
283
|
+
**Gate**: PASS verdict before declaring the model ready for implementation.
|
|
284
|
+
|
|
285
|
+
If FAIL: address findings and re-invoke `eventmodeling-validating-event-models`.
|
|
286
|
+
|
|
287
|
+
**Optional — Production Readiness Checklist**: Invoke
|
|
288
|
+
`eventmodeling-validating-event-models-checklist` when the model is destined
|
|
289
|
+
for production. It runs 23 architectural checks across 7 phases and returns a
|
|
290
|
+
PASS / PASS WITH WARNINGS / FAIL verdict independently of Step 9. A PASS on
|
|
291
|
+
Step 9 does not substitute for this checklist when production readiness is
|
|
292
|
+
required.
|
|
293
|
+
|
|
294
|
+
---
|
|
295
|
+
|
|
296
|
+
### Step 10: Slice the Model
|
|
297
|
+
|
|
298
|
+
Invoke `eventmodeling-slicing-event-models`.
|
|
299
|
+
|
|
300
|
+
**Input**: Complete, validated event model (PASS from Step 9).
|
|
301
|
+
**Output to carry forward**: One slice definition per COMMAND (state-change),
|
|
302
|
+
per READMODEL (state-view), and per AUTOMATION on the board — the model's
|
|
303
|
+
independently deployable feature boundaries, ready for implementation.
|
|
304
|
+
**Gate**: Every COMMAND, READMODEL, and AUTOMATION on the timeline has a
|
|
305
|
+
matching slice definition; no duplicates were created for elements that
|
|
306
|
+
already had one.
|
|
307
|
+
|
|
308
|
+
---
|
|
309
|
+
|
|
310
|
+
## Final Output
|
|
311
|
+
|
|
312
|
+
A complete, sliced event model consisting of:
|
|
313
|
+
- Role Catalog (human roles and system actors with permissions)
|
|
314
|
+
- Chronological event timeline
|
|
315
|
+
- UI storyboards with role-based swimlanes
|
|
316
|
+
- Command definitions with actor attribution
|
|
317
|
+
- Read model designs
|
|
318
|
+
- System boundaries (if Conway's Law applied)
|
|
319
|
+
- Given-When-Then scenarios
|
|
320
|
+
- Completeness verification
|
|
321
|
+
- Validation report with readiness verdict
|
|
322
|
+
- Slice definitions marking every independently deployable feature boundary
|
|
323
|
+
|
|
324
|
+
### Optional Follow-on Skills
|
|
325
|
+
|
|
326
|
+
These skills are not part of the 10-step main path but extend the model for
|
|
327
|
+
specific needs:
|
|
328
|
+
|
|
329
|
+
- **`eventmodeling-designing-event-models`** — Use when stream identity,
|
|
330
|
+
per-command state shapes, or event causality need detailed design work. Can
|
|
331
|
+
be applied at any step where those decisions arise, most commonly during or
|
|
332
|
+
after Step 1.
|
|
333
|
+
- **`eventmodeling-optimizing-stream-design`** — Use after the model is
|
|
334
|
+
complete to validate stream growth estimates and snapshotting decisions.
|
|
335
|
+
- **`eventmodeling-translating-external-events`** — Use when external systems
|
|
336
|
+
(webhooks, IoT, third-party APIs) need to feed into the domain model.
|
|
337
|
+
|
|
338
|
+
---
|
|
339
|
+
|
|
340
|
+
## Quality Checklist
|
|
341
|
+
|
|
342
|
+
- [ ] No elements stranded at 0,0 — every EVENT, COMMAND, READMODEL, SCREEN, and AUTOMATION has a valid `cellId` in its chapter
|
|
343
|
+
- [ ] All 10 modeling steps completed — no step skipped without explicit reason
|
|
344
|
+
- [ ] Every COMMAND, READMODEL, and AUTOMATION has a matching slice definition on the board
|
|
345
|
+
- [ ] Role Catalog exists with named human roles and system processors
|
|
346
|
+
- [ ] Every command is attributed to a specific role from the Role Catalog
|
|
347
|
+
- [ ] Every read model satisfies at least one UI or processor query need
|
|
348
|
+
- [ ] At least one Given-When-Then scenario exists per command
|
|
349
|
+
- [ ] Completeness check shows no unresolved field traceability gaps
|
|
350
|
+
- [ ] Validation returns PASS or PASS WITH WARNINGS with all critical issues resolved
|
|
351
|
+
- [ ] Interview trail in `.trogonai/` updated with status of each completed step
|
|
352
|
+
- [ ] Phase summary written to memory and `/compact` run after every completed step before loading the next skill
|