@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,341 @@
|
|
|
1
|
+
# Project Planning with Event Modeling
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
One of the most significant benefits of Event Modeling is the **flat cost curve** for features. Unlike traditional development where each new feature becomes increasingly complex and expensive, Event Modeling enables teams to deliver features at a consistent cost.
|
|
6
|
+
|
|
7
|
+
## The Flat Cost Curve
|
|
8
|
+
|
|
9
|
+
### Traditional Development Cost Pattern
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
Feature Cost
|
|
13
|
+
^
|
|
14
|
+
Feature 3 (hardest, most expensive)
|
|
15
|
+
/\
|
|
16
|
+
/ \
|
|
17
|
+
/ \
|
|
18
|
+
/ Feature 2 (harder, expensive)
|
|
19
|
+
/ /\
|
|
20
|
+
/ / \
|
|
21
|
+
/ / \
|
|
22
|
+
/ Feature 1 /
|
|
23
|
+
/____/\______/_____ Time
|
|
24
|
+
|
|
25
|
+
Problem: Cost increases with each feature
|
|
26
|
+
- Feature 1: 2 weeks, 2 people
|
|
27
|
+
- Feature 2: 4 weeks, 3 people
|
|
28
|
+
- Feature 3: 8 weeks, 5 people
|
|
29
|
+
|
|
30
|
+
Reason: Increasing technical debt and coupling
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Event Modeling Cost Pattern
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
Feature Cost
|
|
37
|
+
^
|
|
38
|
+
Feature 1 Feature 2 Feature 3 Feature 4
|
|
39
|
+
/\ /\ /\ /\
|
|
40
|
+
/ \ / \ / \ / \
|
|
41
|
+
/ \ / \ / \ / \
|
|
42
|
+
/______\ /______\ /______\ /______\___ Time
|
|
43
|
+
|
|
44
|
+
Consistent: Each feature = ~2 weeks, ~2 people
|
|
45
|
+
|
|
46
|
+
Reason: Clear contracts between steps enable parallel work
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Why the Flat Curve?
|
|
50
|
+
|
|
51
|
+
The article explains:
|
|
52
|
+
|
|
53
|
+
> "The biggest impact of using Event Modeling is the flat cost curve of the average feature cost. This is due to the fact that the effort of building each workflow step is not impacted by the development of other workflows."
|
|
54
|
+
|
|
55
|
+
**Key Insight**: When you have explicit contracts, teams can work independently.
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
Team A builds Step 1 (Create Order)
|
|
59
|
+
- Produces: OrderCreated event with specific fields
|
|
60
|
+
- Contract: "If OrderCreated exists, these fields are guaranteed"
|
|
61
|
+
|
|
62
|
+
Team B builds Step 2 (Confirm Order)
|
|
63
|
+
- Precondition: OrderCreated event exists
|
|
64
|
+
- Can start IMMEDIATELY while Team A finishes
|
|
65
|
+
- Mocks OrderCreated event in tests
|
|
66
|
+
- When Step 1 ready, tests pass immediately
|
|
67
|
+
|
|
68
|
+
Team C builds Step 3 (Authorize Payment)
|
|
69
|
+
- Precondition: OrderConfirmed event exists
|
|
70
|
+
- Can start immediately
|
|
71
|
+
- Works independently
|
|
72
|
+
|
|
73
|
+
Result: 3 features in parallel instead of sequential!
|
|
74
|
+
Cost per feature: Constant
|
|
75
|
+
Delivery speed: 3x faster
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Velocity-Based Estimation
|
|
79
|
+
|
|
80
|
+
Instead of story points, estimate using workflow steps.
|
|
81
|
+
|
|
82
|
+
### Measuring Velocity
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
Definition: Velocity = Number of workflow steps completed per sprint
|
|
86
|
+
|
|
87
|
+
Example Sprint:
|
|
88
|
+
Week 1:
|
|
89
|
+
Team A: Completed CreateOrder command (1 step)
|
|
90
|
+
Team B: Completed ConfirmOrder command (1 step)
|
|
91
|
+
Team C: Completed AuthorizePayment processor (1 step)
|
|
92
|
+
|
|
93
|
+
Velocity: 3 workflow steps per sprint
|
|
94
|
+
|
|
95
|
+
Historical data:
|
|
96
|
+
Sprint 1: 3 steps
|
|
97
|
+
Sprint 2: 3 steps
|
|
98
|
+
Sprint 3: 2 steps (one complex step slowed us down)
|
|
99
|
+
Sprint 4: 3 steps
|
|
100
|
+
|
|
101
|
+
Average velocity: ~3 steps per sprint
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Estimating Projects
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
New Feature: E-Commerce with Reviews
|
|
108
|
+
|
|
109
|
+
Event Model:
|
|
110
|
+
Workflow steps identified:
|
|
111
|
+
Step 1: Create Order
|
|
112
|
+
Step 2: Confirm Order
|
|
113
|
+
Step 3: Authorize Payment
|
|
114
|
+
Step 4: Reserve Inventory
|
|
115
|
+
Step 5: Create Shipment
|
|
116
|
+
Step 6: Deliver Package
|
|
117
|
+
Step 7: Submit Review
|
|
118
|
+
Step 8: Moderate Review
|
|
119
|
+
Step 9: Calculate Ratings (read model)
|
|
120
|
+
|
|
121
|
+
Total: 9 workflow steps
|
|
122
|
+
|
|
123
|
+
Team velocity: 3 steps per sprint
|
|
124
|
+
|
|
125
|
+
Estimate: 9 ÷ 3 = 3 sprints = ~12 weeks
|
|
126
|
+
|
|
127
|
+
Without Event Modeling:
|
|
128
|
+
- Estimate: 4-6 months (guess)
|
|
129
|
+
- Actual: Often 6-9 months due to coupling issues
|
|
130
|
+
|
|
131
|
+
With Event Modeling:
|
|
132
|
+
- Estimate: 3 sprints (confident)
|
|
133
|
+
- Actual: Usually matches or beats estimate
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Benefits of Velocity-Based Estimation
|
|
137
|
+
|
|
138
|
+
1. **Empirical**: Based on actual history, not guesses
|
|
139
|
+
2. **Objective**: Not influenced by opinion
|
|
140
|
+
3. **Consistent**: Same factors each time
|
|
141
|
+
4. **Scalable**: Works for teams and organizations
|
|
142
|
+
5. **Improvable**: You can identify and fix bottlenecks
|
|
143
|
+
|
|
144
|
+
## Project Planning Spreadsheet
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
Project: Order Management System
|
|
148
|
+
Team Velocity: 3 steps per sprint
|
|
149
|
+
|
|
150
|
+
Feature Planning:
|
|
151
|
+
|
|
152
|
+
Feature Steps Sprints Timeline
|
|
153
|
+
|
|
154
|
+
Core Order Flow 3 1 sprint Week 1-4
|
|
155
|
+
Payment Processing 2 1 sprint Week 5-8
|
|
156
|
+
Inventory Management 2 1 sprint Week 9-12
|
|
157
|
+
Fulfillment & Shipping 2 1 sprint Week 13-16
|
|
158
|
+
Order Tracking (read model) 1 0.3 spr Week 17
|
|
159
|
+
Customer Reviews 2 1 sprint Week 18-21
|
|
160
|
+
Analytics Dashboard 1 0.3 spr Week 22
|
|
161
|
+
|
|
162
|
+
TOTAL 13 4 sprints ~22 weeks
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
With parallel teams:
|
|
166
|
+
- Team A: Weeks 1-4 (Orders)
|
|
167
|
+
- Team B: Weeks 1-4 (Payments) ← Parallel!
|
|
168
|
+
- Team C: Weeks 1-4 (Inventory) ← Parallel!
|
|
169
|
+
- Team D: Weeks 5-8 (Fulfillment) ← After steps 1-3
|
|
170
|
+
|
|
171
|
+
Result: All work done in ~8 weeks with proper parallelization
|
|
172
|
+
Without parallelization: ~22 weeks (1 team, sequential delivery)
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
## Scaling to Organization Level
|
|
176
|
+
|
|
177
|
+
### Velocity per Team
|
|
178
|
+
|
|
179
|
+
```
|
|
180
|
+
Organization has 3 teams:
|
|
181
|
+
|
|
182
|
+
Team A (Order Processing): 3 steps/sprint
|
|
183
|
+
Team B (Payment): 2 steps/sprint
|
|
184
|
+
Team C (Fulfillment): 3 steps/sprint
|
|
185
|
+
|
|
186
|
+
Organization velocity: 8 steps/sprint
|
|
187
|
+
|
|
188
|
+
Can deliver projects worth 8 workflow steps in parallel per sprint!
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### Multi-Team Project Planning
|
|
192
|
+
|
|
193
|
+
```
|
|
194
|
+
Large Project: Complete E-Commerce Platform
|
|
195
|
+
|
|
196
|
+
Identify all workflow steps:
|
|
197
|
+
Phase 1 (must complete first):
|
|
198
|
+
- Create Order (Step 1)
|
|
199
|
+
- Confirm Order (Step 2)
|
|
200
|
+
- Authorize Payment (Step 3)
|
|
201
|
+
→ 3 steps, 1 sprint with 3 teams
|
|
202
|
+
|
|
203
|
+
Phase 2 (depends on Phase 1):
|
|
204
|
+
- Reserve Inventory (Step 4)
|
|
205
|
+
- Create Shipment (Step 5)
|
|
206
|
+
- Deliver Package (Step 6)
|
|
207
|
+
→ 3 steps, 1 sprint with 3 teams
|
|
208
|
+
|
|
209
|
+
Phase 3 (independent from 1-2):
|
|
210
|
+
- Customer Reviews (Step 7-8)
|
|
211
|
+
- Rating Calculations (Step 9)
|
|
212
|
+
→ 3 steps, 1 sprint with 3 teams
|
|
213
|
+
|
|
214
|
+
Total: 9 steps, 3 sprints, 3 teams working in parallel = 3 sprints total
|
|
215
|
+
|
|
216
|
+
Without parallelization: 9 steps × 1 team = 9 sprints sequential
|
|
217
|
+
With proper contracts: 3 sprints with 3 teams
|
|
218
|
+
Speedup: 3x faster!
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
## Handling Variable Complexity
|
|
222
|
+
|
|
223
|
+
Some workflow steps are more complex:
|
|
224
|
+
|
|
225
|
+
```
|
|
226
|
+
Typical workflow step: 1 week, 1 developer
|
|
227
|
+
Complex workflow step: 2 weeks, 1-2 developers
|
|
228
|
+
Simple workflow step (read model): 0.5 weeks, 1 developer
|
|
229
|
+
|
|
230
|
+
Velocity calculation (realistic):
|
|
231
|
+
Sprint 1:
|
|
232
|
+
- CreateOrder (typical): 1 step
|
|
233
|
+
- ComplexPaymentValidation (complex): 0.5 steps
|
|
234
|
+
- Notifications (simple): 1 step
|
|
235
|
+
→ Velocity: 2.5 steps/sprint
|
|
236
|
+
|
|
237
|
+
Using this more accurate velocity:
|
|
238
|
+
9-step project = 9 ÷ 2.5 = 3.6 sprints
|
|
239
|
+
More realistic estimate!
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
## Capacity Planning
|
|
243
|
+
|
|
244
|
+
```
|
|
245
|
+
Team has 1 developer available
|
|
246
|
+
Velocity: ~2.5 steps/sprint
|
|
247
|
+
|
|
248
|
+
Project needs 13 workflow steps delivered
|
|
249
|
+
Timeline: 13 ÷ 2.5 = 5.2 sprints = ~5.5 months
|
|
250
|
+
|
|
251
|
+
Add another developer:
|
|
252
|
+
Team velocity: ~5 steps/sprint
|
|
253
|
+
Timeline: 13 ÷ 5 = 2.6 sprints = ~2.5 months
|
|
254
|
+
Cost reduction: 50% reduction in calendar time
|
|
255
|
+
|
|
256
|
+
Add processes/tools:
|
|
257
|
+
Better test infrastructure: +0.5 steps/sprint
|
|
258
|
+
Better CI/CD: +0.5 steps/sprint
|
|
259
|
+
New velocity: ~6 steps/sprint
|
|
260
|
+
Timeline: 13 ÷ 6 = 2.2 sprints = ~2 months
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
## Common Estimation Mistakes
|
|
264
|
+
|
|
265
|
+
### Mistake 1: Counting All Features as Equal Weight
|
|
266
|
+
|
|
267
|
+
```
|
|
268
|
+
Wrong: "Feature A = 8 points, Feature B = 8 points" (same complexity?)
|
|
269
|
+
Right: "Feature A = 3 workflow steps, Feature B = 5 workflow steps"
|
|
270
|
+
(Different complexity reflected)
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
### Mistake 2: Including Non-Workflow-Step Work
|
|
274
|
+
|
|
275
|
+
```
|
|
276
|
+
Wrong: "8 points for order system" (includes meetings, planning, docs)
|
|
277
|
+
Right: "5 workflow steps for order system" (measure implementation only)
|
|
278
|
+
Add separate budget for: Planning (1 week), Testing (1 week), Deployment (0.5 week)
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
### Mistake 3: Ignoring Workflow Step Dependencies
|
|
282
|
+
|
|
283
|
+
```
|
|
284
|
+
Wrong: "Project = 10 steps, 2 teams, 5 sprints"
|
|
285
|
+
Right: Identify dependencies:
|
|
286
|
+
- Steps 1-3 can run in parallel (3 sprints)
|
|
287
|
+
- Steps 4-5 depend on 1-3 (sequential after)
|
|
288
|
+
- Steps 6-10 can run in parallel with 4-5
|
|
289
|
+
→ 5-6 sprints with proper dependency management
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
## Retrospectives & Velocity Improvement
|
|
293
|
+
|
|
294
|
+
Use completed projects to improve estimation:
|
|
295
|
+
|
|
296
|
+
```
|
|
297
|
+
Sprint Retrospective:
|
|
298
|
+
|
|
299
|
+
Planned: 3 workflow steps
|
|
300
|
+
Completed: 2.5 workflow steps
|
|
301
|
+
Blocking issue: "Couldn't start step C until step B was fully integrated"
|
|
302
|
+
|
|
303
|
+
Action: Better integration earlier → Next sprint, improve parallelization
|
|
304
|
+
|
|
305
|
+
Track over time:
|
|
306
|
+
Sprint 1 velocity: 2.5
|
|
307
|
+
Sprint 2 velocity: 2.8 (better parallelization)
|
|
308
|
+
Sprint 3 velocity: 3.2 (developers more comfortable with patterns)
|
|
309
|
+
Sprint 4 velocity: 3.0 (added new junior developer, slower)
|
|
310
|
+
|
|
311
|
+
Trend: Improving as team gets comfortable (minus new hires)
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
## Key Metrics
|
|
315
|
+
|
|
316
|
+
| Metric | Calculation | What It Tells You |
|
|
317
|
+
|--------|-----------|-------------------|
|
|
318
|
+
| **Velocity** | Workflow steps completed / sprint | Team throughput |
|
|
319
|
+
| **Step Complexity** | Actual time / 1 week | Which steps take longer |
|
|
320
|
+
| **Parallelization Rate** | Teams working on independent steps / total teams | How well we're using resources |
|
|
321
|
+
| **Estimation Accuracy** | Planned steps / completed steps | How good our estimates are |
|
|
322
|
+
|
|
323
|
+
## Summary: From Estimates to Reality
|
|
324
|
+
|
|
325
|
+
```
|
|
326
|
+
Traditional Approach:
|
|
327
|
+
Project scope → [Guess complexity] → Estimate → [Often wrong]
|
|
328
|
+
|
|
329
|
+
Event Modeling Approach:
|
|
330
|
+
Project scope → [Count workflow steps] → [Use historical velocity] →
|
|
331
|
+
Estimate → [Usually accurate] → Deliver on time
|
|
332
|
+
|
|
333
|
+
Traditional accuracy: ±50% (at best)
|
|
334
|
+
Event Modeling accuracy: ±10% (with historical data)
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
## Further Reading
|
|
338
|
+
|
|
339
|
+
- Article section: "Flat Cost Curve"
|
|
340
|
+
- Article section: "Estimates without Estimating"
|
|
341
|
+
- Article section: "Strong Contracts"
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: eventmodeling-plotting-events
|
|
3
|
+
description: "Step 2 of Event Modeling - Arrange events chronologically in logical narrative sequence. Create timeline showing event flow and dependencies. Use after brainstorming events. Do not use for: brainstorming new events (use eventmodeling-brainstorming-events) or designing command/read model architecture (use eventmodeling-designing-event-models)."
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Write
|
|
6
|
+
- Bash
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Plotting Events
|
|
10
|
+
|
|
11
|
+
> **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.
|
|
12
|
+
|
|
13
|
+
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.
|
|
14
|
+
|
|
15
|
+
## Workflow
|
|
16
|
+
|
|
17
|
+
Given a list of brainstormed events, create the chronological plot:
|
|
18
|
+
|
|
19
|
+
### 1. Sequence Events Chronologically
|
|
20
|
+
Order events in time-based narrative:
|
|
21
|
+
- What happens first?
|
|
22
|
+
- What depends on what?
|
|
23
|
+
- What's the causal chain?
|
|
24
|
+
|
|
25
|
+
Format:
|
|
26
|
+
```
|
|
27
|
+
Timeline: Order Processing
|
|
28
|
+
|
|
29
|
+
1. Customer initiates → OrderCreated
|
|
30
|
+
(Event: OrderCreated)
|
|
31
|
+
|
|
32
|
+
2. Order confirmed → OrderConfirmed
|
|
33
|
+
Depends on: OrderCreated happened
|
|
34
|
+
(Event: OrderConfirmed)
|
|
35
|
+
|
|
36
|
+
3. Payment processed → PaymentAuthorized
|
|
37
|
+
Depends on: OrderConfirmed happened
|
|
38
|
+
(Event: PaymentAuthorized)
|
|
39
|
+
|
|
40
|
+
4. Inventory reserved → InventoryReserved
|
|
41
|
+
Depends on: PaymentAuthorized happened
|
|
42
|
+
(Event: InventoryReserved)
|
|
43
|
+
|
|
44
|
+
5. Order shipped → OrderShipped
|
|
45
|
+
Depends on: InventoryReserved happened
|
|
46
|
+
(Event: OrderShipped)
|
|
47
|
+
|
|
48
|
+
6. Delivery confirmed → DeliveryConfirmed
|
|
49
|
+
Depends on: OrderShipped happened
|
|
50
|
+
(Event: DeliveryConfirmed)
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### 2. Show Dependencies and Causality
|
|
54
|
+
Document what triggers each event:
|
|
55
|
+
```
|
|
56
|
+
Event: OrderConfirmed
|
|
57
|
+
Can only happen after: OrderCreated
|
|
58
|
+
Triggered by: Customer confirms order
|
|
59
|
+
Precondition: Order in Draft state
|
|
60
|
+
|
|
61
|
+
Event: PaymentAuthorized
|
|
62
|
+
Can only happen after: OrderConfirmed
|
|
63
|
+
Triggered by: Payment gateway authorizes
|
|
64
|
+
Precondition: Order confirmed and payment submitted
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### 3. Identify Alternative Paths
|
|
68
|
+
Show events that can diverge:
|
|
69
|
+
```
|
|
70
|
+
After OrderCreated:
|
|
71
|
+
Path A: Customer confirms → OrderConfirmed
|
|
72
|
+
Path B: Customer cancels → OrderCancelled
|
|
73
|
+
|
|
74
|
+
After PaymentAuthorized:
|
|
75
|
+
Path A: Payment succeeds → PaymentProcessed
|
|
76
|
+
Path B: Payment fails → PaymentFailed → OrderCancelled
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### 4. Create Timeline Diagram
|
|
80
|
+
Visual representation of event flow:
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Time →
|
|
85
|
+
|
|
86
|
+
OrderCreated
|
|
87
|
+
↓
|
|
88
|
+
OrderConfirmed
|
|
89
|
+
→ PaymentAuthorized
|
|
90
|
+
→ InventoryReserved
|
|
91
|
+
→ OrderShipped
|
|
92
|
+
→ DeliveryConfirmed
|
|
93
|
+
→ PaymentFailed → OrderCancelled
|
|
94
|
+
→ OrderCancelled (rejected before payment)
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Chapters and Timelines
|
|
99
|
+
|
|
100
|
+
Timelines (chapters) are **created and assigned during Step 1 (Brainstorming)**. This step does not create new chapters. Each plotting pass operates on a **single timeline** — the one the user is currently focusing on.
|
|
101
|
+
|
|
102
|
+
Before placing events, resolve the target timeline:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
curl -s -H "x-token: $TOKEN" -H "x-board-id: $BOARD_ID" \
|
|
106
|
+
"$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/nodes?type=CHAPTER"
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
If multiple timelines exist, ask the user which one to work on now. Never reorder events across timelines in a single pass.
|
|
110
|
+
|
|
111
|
+
## Output Format
|
|
112
|
+
|
|
113
|
+
Instead of writing a markdown document, **place every event on the board** using the `place-element` skill.
|
|
114
|
+
|
|
115
|
+
Work within the chosen timeline only. For each event in the final chronological order, invoke `place-element` with:
|
|
116
|
+
|
|
117
|
+
| Parameter | Value |
|
|
118
|
+
|-----------|-------|
|
|
119
|
+
| `elementType` | `EVENT` |
|
|
120
|
+
| `title` | `<EventName>` |
|
|
121
|
+
| `boardId` | `BOARD_ID` |
|
|
122
|
+
| `timelineId` | the chapter this event belongs to |
|
|
123
|
+
|
|
124
|
+
Reuse existing empty columns, do not blindly create new ones.
|
|
125
|
+
|
|
126
|
+
Process events in order, one at a time. Do not skip any event.
|
|
127
|
+
|
|
128
|
+
After all events are placed, summarise to the user:
|
|
129
|
+
- Chapter(s)/timeline ID(s) with their titles
|
|
130
|
+
- Numbered list of events placed per chapter
|
|
131
|
+
- Key insights: critical path, decision points, terminal events
|
|
132
|
+
- Any errors
|
|
133
|
+
|
|
134
|
+
## Quality Checklist
|
|
135
|
+
|
|
136
|
+
- [ ] **Working on a single named timeline** — not mixing events from different chapters
|
|
137
|
+
- [ ] **No new chapters created here** — chapter structure was fixed in Step 1 (Brainstorming)
|
|
138
|
+
- [ ] Every event has clear predecessor
|
|
139
|
+
- [ ] Dependencies are explicitly documented
|
|
140
|
+
- [ ] Alternative paths are shown
|
|
141
|
+
- [ ] Flow forms a coherent narrative
|
|
142
|
+
- [ ] No events without trigger
|
|
143
|
+
- [ ] Terminal states are clear
|
|
144
|
+
- [ ] Compensation/cancellation flows are complete
|
|
145
|
+
- [ ] Timeline makes business sense
|
|
146
|
+
|
|
147
|
+
## Principles
|
|
148
|
+
|
|
149
|
+
1. **Narrative Coherence**: Events tell a story
|
|
150
|
+
2. **Dependency Clarity**: What must come before what
|
|
151
|
+
3. **Alternative Paths**: Show all possible flows (happy path + errors)
|
|
152
|
+
4. **Natural Sequence**: Order matches business domain logic
|
|
153
|
+
5. **Completeness**: Every brainstormed event appears
|
package/stacks/modeling-kit/templates/.claude/skills/eventmodeling-slicing-event-models/SKILL.md
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: eventmodeling-slicing-event-models
|
|
3
|
+
description: "Identify feature slices directly from a completed event model's timeline and create slice definitions on the board — each COMMAND becomes a state-change slice, each READMODEL becomes a state-view slice, each AUTOMATION becomes an automation slice. Use after completing event modeling to define slice boundaries and note event dependencies between them. Do not use for: organizational team structure based on Conway's Law (use eventmodeling-applying-conways-law) or planning before the event model is complete (complete the full model first using eventmodeling-orchestrating-event-modeling)."
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- AskUserQuestion
|
|
6
|
+
- Write
|
|
7
|
+
- Bash
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Slicing Event Models
|
|
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 (in particular the **Slices** section). Do not proceed until both skills have been loaded.
|
|
13
|
+
|
|
14
|
+
**Purpose**: Turn a completed event model's timeline into explicit slice definitions on the board, and note the event dependencies between them.
|
|
15
|
+
|
|
16
|
+
**When to Use**:
|
|
17
|
+
- After completing the full event model (commands, events, read models are in place)
|
|
18
|
+
- To make slice boundaries explicit on the board before implementation
|
|
19
|
+
- To see which slices' events other slices depend on
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Core Concept: A Slice Is One Command, One Read Model, or One Automation — Never Combined
|
|
24
|
+
|
|
25
|
+
A **Feature Slice** is the thinnest possible vertical cut through the model — exactly one decision or one query:
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
state-change slice = SCREEN/Processor → COMMAND → EVENT(s)
|
|
29
|
+
state-view slice = EVENT(s) → READMODEL → SCREEN/Processor
|
|
30
|
+
automation slice = EVENT(s) → AUTOMATION → COMMAND → EVENT(s)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
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.
|
|
34
|
+
|
|
35
|
+
**Key characteristics**:
|
|
36
|
+
- Exactly one COMMAND (state-change), exactly one READMODEL (state-view), or one AUTOMATION's command — never combined
|
|
37
|
+
- Named after that command, read model, or automation
|
|
38
|
+
- Independently deployable
|
|
39
|
+
- Communicates with other slices via events only
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Slices Already Exist in the Timeline
|
|
44
|
+
|
|
45
|
+
By the time an event model is complete, the slices are already implied by the timeline's structure. This skill's job is to make them explicit on the board — not to invent broader groupings.
|
|
46
|
+
|
|
47
|
+
Walk the timeline column by column:
|
|
48
|
+
- Every **COMMAND** → one `state-change` slice, named after the command
|
|
49
|
+
- Every **READMODEL** → one `state-view` slice, named after the read model
|
|
50
|
+
- Every **AUTOMATION** → one `automation` slice, named after the automation (or the command it issues)
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Step 1: Resolve the Timeline
|
|
55
|
+
|
|
56
|
+
`$TL` (the timeline/chapter UUID) is required for every call below. If it wasn't given up front, resolve it before doing anything else:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
curl -s "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/nodes?type=CHAPTER"
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
- **Exactly one chapter** → use it automatically, tell the user which one was selected.
|
|
63
|
+
- **Multiple chapters** → list them by name/ID and use `AskUserQuestion` to ask which one to slice.
|
|
64
|
+
- **No chapters** → stop and tell the user to create a chapter/timeline first (e.g. via the `/timeline` skill).
|
|
65
|
+
|
|
66
|
+
## Step 2: Enumerate Commands, Read Models, and Automations
|
|
67
|
+
|
|
68
|
+
Use `spec-info` (or existing board knowledge) to list every COMMAND, READMODEL, and AUTOMATION node across the resolved timeline:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
curl "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/timelines/$TL/spec-info" -H "x-token: $TOKEN"
|
|
72
|
+
# → { timelineId, elements: [{ id, title, type }] }
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Filter to `type` in `COMMAND`, `READMODEL`, `AUTOMATION`.
|
|
76
|
+
|
|
77
|
+
`spec-info` doesn't include the column each element sits in, so fetch the chapter node to resolve it:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
curl -s "$BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/nodes/$TL" -H "x-token: $TOKEN"
|
|
81
|
+
# → meta.timelineData.columns: [{ id, index }]
|
|
82
|
+
# → meta.timelineData.cells: [{ id: "<rowId>-<columnId>", nodeId }]
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
For each filtered element, find the cell whose `nodeId` matches the element's `id` — the `columnId` is the cell `id` with the leading `<rowId>-` (36 chars + hyphen) stripped off. Record `{ elementId, elementType, title, columnId }` for every COMMAND, READMODEL, and AUTOMATION.
|
|
86
|
+
|
|
87
|
+
Check which columns already have a slice, so you don't create duplicates:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
curl $BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/slicedata/slices -H "x-token: $TOKEN"
|
|
91
|
+
# → { slices: [{ id, title, status }] }
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
A column already has a slice if its element's title matches an existing slice's title.
|
|
95
|
+
|
|
96
|
+
## Step 3: Define slices
|
|
97
|
+
|
|
98
|
+
For each column from Step 2 that doesn't already have a matching slice, mark that **existing** column as a slice via the **slice-definitions** endpoint:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
curl -X POST $BASE_URL/api/org/$ORG_ID/boards/$BOARD_ID/timelines/$TL/slice-definitions \
|
|
102
|
+
-H "x-token: $TOKEN" -H "Content-Type: application/json" \
|
|
103
|
+
-d '{"columnId":"<colId>","title":"PlaceOrder"}'
|
|
104
|
+
# → 200 { nodeId, timelineId, columnId, title }
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
- COMMAND column → title = command name (state-change slice)
|
|
108
|
+
- READMODEL column → title = read model name (state-view slice)
|
|
109
|
+
- AUTOMATION column → title = automation name, or the command it issues (automation slice)
|
|
110
|
+
|
|
111
|
+
Use **`slice-definitions`**, never the plain **`slices`** endpoint here — `slices` creates a brand-new column with its own swimlane/content nodes, which would duplicate the element already placed on the timeline. `slice-definitions` only adds a `SLICE_BORDER` node to the column you already resolved in Step 2. `title` always comes from the request body — it is never derived automatically from the command/read model/automation node.
|
|
112
|
+
|
|
113
|
+
## Step 4 (Optional): Note Dependencies Between Slices
|
|
114
|
+
|
|
115
|
+
Slices depend on each other only through events — never directly:
|
|
116
|
+
|
|
117
|
+
- **Event dependency** — slice B's command or read model needs an event that slice A produces.
|
|
118
|
+
- **No dependency** — slices work off entirely separate events.
|
|
119
|
+
|
|
120
|
+
This is useful to surface back to the user (e.g. "`OrderDetailView` depends on `PlaceOrder`'s `OrderPlaced` event"). Slicing itself does not require planning team allocation, sprint sizing, or effort estimates — that's a separate concern from defining the slices.
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Quality Checklist
|
|
125
|
+
|
|
126
|
+
- [ ] Every slice contains exactly one COMMAND (state-change), one READMODEL (state-view), or one AUTOMATION — never a COMMAND and a READMODEL together
|
|
127
|
+
- [ ] Slice name matches the command/read model/automation title exactly
|
|
128
|
+
- [ ] No slice was created for an element that already has one
|
|
129
|
+
- [ ] Dependencies are expressed as events only, never as direct slice-to-slice calls or shared state
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Reference Documentation
|
|
134
|
+
|
|
135
|
+
- **[patterns.md](references/patterns.md)** — naming, boundaries, cross-slice communication patterns
|
|
136
|
+
- **[examples.md](references/examples.md)** — worked example of deriving slices from a timeline
|