@eventmodelers/cli 0.0.6 → 0.0.8

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.
Files changed (48) hide show
  1. package/README.md +42 -9
  2. package/cli.js +633 -175
  3. package/package.json +1 -1
  4. package/{stacks/node/templates → shared}/build-kit/README.md +3 -3
  5. package/{stacks/axon/templates → shared}/build-kit/lib/ralph.js +10 -3
  6. package/shared/build-kit/ralph-ollama.js +2 -2
  7. package/{stacks/node/templates → shared}/build-kit/ralph.sh +1 -1
  8. package/shared/build-kit/realtime-agent.js +1 -1
  9. package/{stacks/supabase/templates/.claude → shared}/skills/connect/SKILL.md +10 -5
  10. package/stacks/cratis-csharp/templates/build-kit/lib/AGENT.md +1 -0
  11. package/stacks/modeling-kit/templates/kit/README.md +79 -0
  12. package/stacks/modeling-kit/templates/kit/lib/ralph.js +9 -2
  13. package/stacks/modeling-kit/templates/kit/ralph.sh +1 -1
  14. package/stacks/node/templates/build-kit/lib/backend-prompt.md +1 -1
  15. package/stacks/supabase/templates/build-kit/lib/backend-prompt.md +1 -1
  16. package/stacks/axon/templates/.claude/skills/connect/SKILL.md +0 -178
  17. package/stacks/axon/templates/.claude/skills/learn-eventmodelers-api/SKILL.md +0 -611
  18. package/stacks/axon/templates/.claude/skills/update-slice-status/SKILL.md +0 -105
  19. package/stacks/axon/templates/build-kit/ralph.sh +0 -98
  20. package/stacks/cratis-csharp/templates/.claude/skills/connect/SKILL.md +0 -178
  21. package/stacks/cratis-csharp/templates/.claude/skills/learn-eventmodelers-api/SKILL.md +0 -609
  22. package/stacks/cratis-csharp/templates/.claude/skills/update-slice-status/SKILL.md +0 -105
  23. package/stacks/cratis-csharp/templates/build-kit/lib/agent.sh +0 -20
  24. package/stacks/cratis-csharp/templates/build-kit/lib/ralph.js +0 -302
  25. package/stacks/cratis-csharp/templates/build-kit/ralph-claude.js +0 -37
  26. package/stacks/cratis-csharp/templates/build-kit/ralph.sh +0 -98
  27. package/stacks/modeling-kit/templates/.claude/skills/connect/SKILL.md +0 -178
  28. package/stacks/modeling-kit/templates/.claude/skills/learn-eventmodelers-api/SKILL.md +0 -441
  29. package/stacks/modeling-kit/templates/.claude/skills/update-slice-status/SKILL.md +0 -110
  30. package/stacks/modeling-kit/templates/kit/lib/agent.sh +0 -20
  31. package/stacks/modeling-kit/templates/kit/lib/ollama-agent.js +0 -147
  32. package/stacks/modeling-kit/templates/kit/ralph-ollama.js +0 -38
  33. package/stacks/modeling-kit/templates/kit/realtime-agent.js +0 -18
  34. package/stacks/node/templates/.claude/skills/connect/SKILL.md +0 -178
  35. package/stacks/node/templates/build-kit/lib/agent.sh +0 -20
  36. package/stacks/node/templates/build-kit/lib/ralph.js +0 -369
  37. package/stacks/node/templates/build-kit/ralph-claude.js +0 -44
  38. package/stacks/supabase/templates/.claude/skills/learn-eventmodelers-api/SKILL.md +0 -628
  39. package/stacks/supabase/templates/.claude/skills/update-slice-status/SKILL.md +0 -110
  40. package/stacks/supabase/templates/build-kit/README.md +0 -86
  41. package/stacks/supabase/templates/build-kit/lib/agent.sh +0 -20
  42. package/stacks/supabase/templates/build-kit/lib/ralph.js +0 -369
  43. package/stacks/supabase/templates/build-kit/ralph-claude.js +0 -44
  44. package/stacks/supabase/templates/build-kit/ralph.sh +0 -98
  45. /package/{stacks/axon/templates → shared}/build-kit/lib/agent.sh +0 -0
  46. /package/{stacks/axon/templates → shared}/build-kit/ralph-claude.js +0 -0
  47. /package/{stacks/node/templates/.claude → shared}/skills/learn-eventmodelers-api/SKILL.md +0 -0
  48. /package/{stacks/node/templates/.claude → shared}/skills/update-slice-status/SKILL.md +0 -0
@@ -1,611 +0,0 @@
1
- ---
2
- name: learn-eventmodelers-api
3
- description: Teaches an agent everything about the eventmodelers platform API — all endpoints, their purpose, request payloads, response shapes, authentication, and element types.
4
- ---
5
-
6
- # Eventmodelers Platform API Reference
7
-
8
- You now have complete knowledge of the eventmodelers platform API. Use this reference whenever you need to call, implement, or reason about any endpoint.
9
-
10
- ---
11
-
12
- ## Architecture Overview
13
-
14
- - **Framework**: Express.js + `@event-driven-io/emmett` (event sourcing)
15
- - **Adapter**: `@event-driven-io/emmett-expressjs`
16
- - **Database**: PostgreSQL via Knex
17
- - **Storage / Auth**: Supabase
18
- - **Route discovery**: Dynamic glob (`**/routes{,-*}.js`) loaded from `dist/src/slices`
19
- - **Base URL** (local): `http://localhost:3000`
20
-
21
- ---
22
-
23
- ## Authentication & Headers
24
-
25
- | Header | Required | Purpose |
26
- |---|---|---|
27
- | `Authorization` | Some routes | Supabase JWT bearer token |
28
- | `x-user-id` | Node operations | User identifier |
29
- | `x-causation-id` | Optional | Event causation tracing |
30
- | `x-correlation-id` | Optional | Correlation tracing |
31
-
32
- - CORS allowed origins: `localhost:3000`, `localhost:3001`, `https://app.eventmodelers.ai`
33
-
34
- ---
35
-
36
- ## Element Types
37
-
38
- ```typescript
39
- MODEL_CONTEXT // Context/domain modeling container
40
- CHAPTER // Timeline/sequence container
41
- ACTOR // System participant (swimlane label)
42
- AUTOMATION // Automated action
43
- API // External service
44
- SCREEN // UI screen
45
- COMMAND // State-changing operation
46
- EVENT // Domain event
47
- SPEC_ERROR // Error scenario
48
- TABLE // Data table
49
- READMODEL // Query result / materialized view
50
- SCENARIO // GWT scenario
51
- LANE // Timeline row
52
- SLICE_BORDER // Slice boundary marker
53
- ```
54
-
55
- ---
56
-
57
- ## Standard HTTP Status Codes
58
-
59
- | Code | Meaning |
60
- |---|---|
61
- | 200 | OK with data |
62
- | 201 | Created |
63
- | 204 | No content |
64
- | 400 | Validation error / bad input |
65
- | 401 | Authentication required |
66
- | 404 | Resource not found |
67
- | 409 | Conflict (e.g. duplicate) |
68
- | 500 | Server error |
69
-
70
- ---
71
-
72
- ## 1. Boards
73
-
74
- **File**: `src/slices/change/api-boards/routes.ts`
75
-
76
- ### POST `/api/org/:orgId/boards/:boardId/events`
77
- Persist board/timeline row events as an array of mixed event types.
78
-
79
- **Request body**: Array of node, comment, edge, or board events
80
- **Response**: `200` — processed results array
81
-
82
- ---
83
-
84
- ### GET `/api/boards`
85
- List all boards.
86
-
87
- **Response**: `200` — `Board[]`
88
-
89
- ---
90
-
91
- ### DELETE `/api/org/:orgId/boards/:boardId`
92
- Delete a board.
93
-
94
- **Response**: `204`
95
-
96
- ---
97
-
98
- ### GET `/api/org/:orgId/boards/:boardId/events/search`
99
- Search events by node name.
100
-
101
- **Query params**: `name` (string)
102
- **Response**: `200` — matching event array
103
-
104
- ---
105
-
106
- ### GET `/api/org/:orgId/boards/:boardId/events`
107
- Get all board events in sequence.
108
-
109
- **Response**: `200` — event array
110
-
111
- ---
112
-
113
- ### GET `/api/org/:orgId/boards/:boardId/nodes/:nodeId/comments`
114
- Get all comments for a node.
115
-
116
- **Response**: `200` — comment array
117
-
118
- ---
119
-
120
- ### POST `/api/org/:orgId/boards/:boardId/bucket`
121
- Create a Supabase storage bucket for the board.
122
-
123
- **Response**: `200` — `{ ok: boolean, bucket: string, alreadyExisted: boolean }`
124
-
125
- ---
126
-
127
- ## 2. Chapters & Timelines
128
-
129
- **File**: `src/slices/change/api-chapters/routes.ts`
130
-
131
- ### POST `/api/org/:orgId/boards/:boardId/chapters`
132
- Create a chapter node.
133
-
134
- **Request body**: `{ position?: { x: number, y: number } }`
135
- **Response**: `200` — chapter data
136
-
137
- ---
138
-
139
- ### POST `/api/org/:orgId/boards/:boardId/timelines/:timelineId/columns`
140
- Add a column to a timeline.
141
-
142
- **Request body**: `{ index?: number }` (integer index, optional)
143
- **Response**: `200` — `{ columnId: string, index: number, totalColumns: number }`
144
-
145
- ---
146
-
147
- ### DELETE `/api/org/:orgId/boards/:boardId/timelines/:timelineId/columns/:columnId`
148
- Delete a column from a timeline. Removes the column and all its cells. Cannot delete the last column.
149
-
150
- **Response**:
151
- - `200` — `{ columnId: string, totalColumns: number }`
152
- - `400` — validation error (e.g. last column)
153
- - `404` — timeline or column not found
154
-
155
- ---
156
-
157
- ### POST `/api/org/:orgId/boards/:boardId/timelines/:timelineId/lanes`
158
- Add a lane (row) to a timeline.
159
-
160
- **Request body**:
161
- ```typescript
162
- {
163
- type: 'actor' | 'interaction' | 'swimlane' | 'spec' | 'feedback'
164
- label?: string
165
- index?: number
166
- height?: number
167
- }
168
- ```
169
- **Response**: `200` — lane data
170
-
171
- ---
172
-
173
- ### POST `/api/org/:orgId/boards/:boardId/timelines/:timelineId/cells/:cellId/drop`
174
- Drop a node into a timeline cell. Validates placement rules.
175
-
176
- **Request body**: `{ nodeId: string, nodeType: ElementType }`
177
-
178
- **Placement rules**:
179
- - `swimlane` lane → accepts `EVENT`
180
- - `interaction` lane → accepts `COMMAND`, `READMODEL`
181
- - `actor` lane → accepts `SCREEN`, `AUTOMATION`
182
- - `feedback` lane → accepts markdown
183
- - `spec` lane → accepts `SPEC_NODE`
184
-
185
- **Response**:
186
- - `200` — drop result
187
- - `400` — placement violation
188
- - `404` — cell or node not found
189
-
190
- ---
191
-
192
- ## 3. Nodes
193
-
194
- **File**: `src/slices/change/api-nodes/routes.ts`
195
-
196
- All node endpoints require header: `x-user-id`
197
-
198
- ### POST `/api/org/:orgId/boards/:boardId/nodes/events`
199
- Submit node change events.
200
-
201
- **Request body**: `NodeChangeEvent[]`
202
-
203
- ```typescript
204
- interface NodeChangeEvent {
205
- id: string // uuid
206
- eventType: 'node:created' | 'node:changed' | 'node:deleted'
207
- nodeId: string
208
- boardId: string
209
- timestamp: number // unix ms
210
- userId?: string
211
- hash?: string // content hash
212
- changedAttributes?: string[] // dot-paths e.g. 'meta.title'
213
- node?: {
214
- id: string
215
- data: {
216
- backgroundColor?: string
217
- title?: string
218
- url?: string
219
- // ...other node data fields
220
- // Do NOT set a "type" here — the server derives the node's render type from
221
- // meta.type automatically. Setting one yourself risks it being read as the
222
- // render type itself and breaking rendering.
223
- }
224
- }
225
- meta?: {
226
- type: ElementType
227
- title?: string
228
- description?: string
229
- fields?: Record<string, unknown>
230
- // ...
231
- }
232
- edges?: Array<{
233
- id: string
234
- source: string
235
- target: string
236
- sourceHandle?: string
237
- targetHandle?: string
238
- }>
239
- chapterId?: string // for cell placement
240
- cellName?: string // spreadsheet-style e.g. "B2"
241
- }
242
- ```
243
-
244
- **Response**: `200` — `{ hashes: { [eventId: string]: string } }`
245
-
246
- ---
247
-
248
- ### GET `/api/org/:orgId/boards/:boardId/nodes`
249
- List all nodes on a board.
250
-
251
- **Query params**: `type?: ElementType`
252
- **Response**: `200` — node record array
253
-
254
- ---
255
-
256
- ### GET `/api/org/:orgId/boards/:boardId/nodes/:nodeId`
257
- Get a single node.
258
-
259
- **Response**: `200` — node record OR `404`
260
-
261
- ---
262
-
263
- ## 4. Images
264
-
265
- **File**: `src/slices/change/api-images/routes.ts`
266
-
267
- ### POST `/api/org/:orgId/boards/:boardId/images/:imageId`
268
- Update a board image.
269
-
270
- **Request**: `multipart/form-data` — field `file` (binary)
271
- **Response**: `204`
272
-
273
- ---
274
-
275
- ### POST `/api/org/:orgId/boards/:boardId/imagesnapshots/:imageId`
276
- Update an image snapshot.
277
-
278
- **Request**: `multipart/form-data` — field `file` (binary)
279
- **Response**: `204`
280
-
281
- ---
282
-
283
- ### POST `/api/org/:orgId/boards/:boardId/image-nodes/:nodeId`
284
- Create an image node.
285
-
286
- **Request**: `multipart/form-data` — fields: `file`, `chapterId`, `cellName`
287
- **Response**: `204`
288
-
289
- ---
290
-
291
- ### POST `/api/org/:orgId/boards/:boardId/images/:imageId/sketch`
292
- Render a sketch description to WebP and upload.
293
-
294
- **Request body**:
295
- ```typescript
296
- {
297
- elements: object[] // sketch element descriptors
298
- semanticDescription?: string // human-readable description stored in metadata
299
- }
300
- ```
301
- **Response**: `204`
302
-
303
- ---
304
-
305
- ### POST `/api/org/:orgId/boards/:boardId/image-nodes/:nodeId/sketch`
306
- Create a SCREEN node from a sketch description.
307
-
308
- **Request body**:
309
- ```typescript
310
- {
311
- chapterId: string
312
- cellName: string
313
- description: { elements: object[] }
314
- semanticDescription?: string
315
- }
316
- ```
317
- **Response**: `204` OR `400` (validation error)
318
-
319
- ---
320
-
321
- ## 5. Slices
322
-
323
- **File**: `src/slices/change/api-.slices/routes.ts`
324
-
325
- ### POST `/api/org/:orgId/boards/:boardId/timelines/:timelineId/slices`
326
- Create a complete slice (1 column + 3 nodes automatically placed).
327
-
328
- **Request body**:
329
- ```typescript
330
- {
331
- type: 'state-change' | 'state-view' | 'automation'
332
- index?: number
333
- nodes?: {
334
- actor?: Partial<NodeData>
335
- interaction?: Partial<NodeData>
336
- swimlane?: Partial<NodeData>
337
- }
338
- }
339
- ```
340
-
341
- **Slice node mapping**:
342
- - `state-change` → SCREEN (actor) + COMMAND (interaction) + EVENT (swimlane)
343
- - `state-view` → SCREEN (actor) + READMODEL (interaction) + EVENT (swimlane)
344
- - `automation` → AUTOMATION (actor) + COMMAND (interaction) + EVENT (swimlane)
345
-
346
- **Response**: `200` — slice data
347
-
348
- ---
349
-
350
- ## 6. Specifications (GWT Scenarios)
351
-
352
- **File**: `src/slices/change/api-specs/routes.ts`
353
-
354
- ### POST `/api/org/:orgId/boards/:boardId/contexts/:contextName/slices/:sliceName/scenarios`
355
- Append a Given-When-Then scenario to a spec node.
356
-
357
- **Request body**:
358
- ```typescript
359
- {
360
- id: string
361
- title: string
362
- vertical?: boolean
363
- examples?: unknown[]
364
- given: string[] // nodeIds — must be EVENTs from same timeline
365
- when: string[] // nodeIds — at most one COMMAND; empty if then has READMODEL
366
- then: string[] // nodeIds — EVENTs only OR exactly one READMODEL (not mixed)
367
- }
368
- ```
369
-
370
- **Validation rules**:
371
- - `given`: only EVENTs from same timeline
372
- - `when`: max one COMMAND; must be empty when `then` contains a READMODEL
373
- - `then`: all EVENTs OR exactly one READMODEL — never mixed
374
- - All referenced nodes must belong to the same chapter/timeline
375
-
376
- **Response**:
377
- - `201` — `{ scenario, scenarios, specNodeId, isNewNode: boolean }`
378
- - `400` — validation error
379
- - `404` — context or slice not found
380
- - `409` — duplicate scenario title
381
-
382
- ---
383
-
384
- ### GET `/api/org/:orgId/boards/:boardId/contexts/:contextName/spec-info`
385
- Get valid elements for a context (by name lookup).
386
-
387
- **Response**: `200` — `{ chapterId: string, elements: ElementRecord[] }`
388
-
389
- ---
390
-
391
- ### GET `/api/org/:orgId/boards/:boardId/contexts/:contextName/slices/:sliceName/spec-info`
392
- Get valid elements for a specific slice.
393
-
394
- **Response**: `200` — `{ chapterId: string, elements: ElementRecord[] }`
395
-
396
- ---
397
-
398
- ## 7. Config Import
399
-
400
- **File**: `src/slices/change/config-import/routes.ts`
401
-
402
- ### POST `/api/org/:orgId/boards/:boardId/import-config`
403
- Import an EventModelingJson config to populate a board.
404
-
405
- **Request**: `multipart/form-data` with field `file` OR `application/json` body:
406
- ```typescript
407
- { slices: SliceDefinition[] }
408
- ```
409
-
410
- **Response**: `200` — transformed canvas with nodes and edges
411
-
412
- ---
413
-
414
- ## 8. Slice Data
415
-
416
- **File**: `src/slices/slicedata/routes.ts`
417
-
418
- ### GET ` `
419
- Build structured slice data from board state.
420
-
421
- **Query params** (one required): `contextId` OR `contextName`; optional: `sliceId`
422
- **Response**: `200` — slice data matching event modeling schema
423
-
424
- ---
425
-
426
- ### GET `/api/org/:orgId/boards/:boardId/slicedata/slices`
427
- List all slices on a board.
428
-
429
- **Response**: `200` — `{ slices: Array<{ id: string, title: string, status: string }> }`
430
-
431
- ---
432
-
433
- ## 9. Extensions
434
-
435
- **File**: `src/slices/extensions/routes.ts`
436
-
437
- ### GET `/api/org/:orgId/boards/:boardId/extensions`
438
- List extension configs for a board.
439
-
440
- **Response**: `200` — extension record array
441
-
442
- ---
443
-
444
- ### PUT `/api/org/:orgId/boards/:boardId/extensions/:type`
445
- Enable or disable an extension.
446
-
447
- **Request body**: `{ enabled: boolean, config?: object }`
448
- **Response**: `200` — updated extension config
449
-
450
- ---
451
-
452
- ## 10. Snapshots
453
-
454
- **File**: `src/slices/Snapshots/routes.ts`
455
-
456
- All snapshot endpoints require Supabase JWT authentication.
457
-
458
- **Constraints**: max 3 snapshots per user, max 30-day retention, max 50 MB file size.
459
-
460
- ### GET `/api/snapshots`
461
- List current user's snapshots.
462
-
463
- **Response**: `200` — `Array<{ id, name, payload_id, expiry, shared }>`
464
-
465
- ---
466
-
467
- ### POST `/api/snapshots`
468
- Create a snapshot.
469
-
470
- **Request**: `multipart/form-data` — fields: `payloadFile` (binary), `name` (string), `retention?` (days, max 30)
471
- **Response**: `201` — `{ ok: true, id: string }`
472
-
473
- ---
474
-
475
- ### GET `/api/snapshots/:id`
476
- Load a snapshot's payload.
477
-
478
- **Response**: `200` — snapshot payload JSON
479
-
480
- ---
481
-
482
- ### PATCH `/api/snapshots/:id/share`
483
- Share a snapshot (makes it publicly accessible).
484
-
485
- **Response**: `200` — `{ ok: true }`
486
-
487
- ---
488
-
489
- ### DELETE `/api/snapshots/:id`
490
- Delete a snapshot.
491
-
492
- **Response**: `200` — `{ ok: true }`
493
-
494
- ---
495
-
496
- ## 11. User Management — Commands (Event Sourced)
497
-
498
- All commands respond with:
499
- ```typescript
500
- {
501
- ok: true
502
- next_expected_stream_version: number
503
- last_event_global_position: number
504
- }
505
- ```
506
-
507
- Optional headers on all: `correlation_id`, `causation_id`
508
-
509
- ### POST `/api/creategroup`
510
- **Body**: `{ groupId: string, name: string }`
511
- **Event emitted**: `GroupCreated`
512
-
513
- ---
514
-
515
- ### POST `/api/inviteuser`
516
- **Body**: `{ groupId: string, email: string, invitationId: string }`
517
- **Event emitted**: `UserInvited`
518
-
519
- ---
520
-
521
- ### POST `/api/acceptinvite`
522
- **Body**: `{ userId: string, groupId: string, invitationId: string }`
523
- **Event emitted**: `InvitationAccepted`
524
-
525
- ---
526
-
527
- ### POST `/api/assignrole`
528
- **Body**: `{ userId: string, groupId: string, role: string }`
529
- **Event emitted**: `RoleAssigned`
530
-
531
- ---
532
-
533
- ## 12. User Management — Read Models (Projections)
534
-
535
- All require authentication. Optional query param `_id` to filter by ID.
536
-
537
- ### GET `/api/query/group-details-lookup`
538
- Group details. Filter: `?_id=groupId`
539
-
540
- ### GET `/api/query/open-invites`
541
- Pending invitations. Filter: `?_id=invitationId`
542
-
543
- ### GET `/api/query/user-group-assignments`
544
- User-to-group mappings. Filter: `?_id=groupId`
545
-
546
- ### GET `/api/query/users-to-assign-to-groups`
547
- Users available for group assignment. Filter: `?_id=userId`
548
-
549
- ---
550
-
551
- ## 13. Utility
552
-
553
- ### GET `/api/user`
554
- Get current authenticated user info.
555
-
556
- **Response**: `{ user_id: string, email: string, metadata: object }`
557
-
558
- ### GET `/api-docs`
559
- Swagger UI (interactive API explorer)
560
-
561
- ### GET `/swagger.json`
562
- OpenAPI specification (JSON)
563
-
564
- ---
565
-
566
- ## Domain Events
567
-
568
- ### Snapshot Events (`src/events/SnapshotsEvents.ts`)
569
-
570
- ```typescript
571
- SnapshotStored // { name, id, payloadId, expiry }
572
- SnapshotDeleted // { id }
573
- SnapshotCleanedUp // { id }
574
- PublishedSnapshotDeleted // { id }
575
- SnapshotShared // { id }
576
- SnapshotPublished // { id, payloadId, bucket, path }
577
- ```
578
-
579
- ### User Management Events (`src/events/UserManagementEvents.ts`)
580
-
581
- ```typescript
582
- GroupCreated // { groupId, owner, name }
583
- UserAssignedToGroup // { groupId, userId }
584
- UserInvited // { groupId, invitationId, email }
585
- InvitationAccepted // { invitationId, groupId, userId }
586
- RoleAssigned // { groupId, userId, role }
587
- ```
588
-
589
- All events support optional metadata: `user_id`, `correlation_id`, `causation_id`
590
-
591
- ---
592
-
593
- ## Key Source Files
594
-
595
- | File | Purpose |
596
- |---|---|
597
- | `src/slices/change/types.ts` | `ElementType`, `NodeChangeEvent`, `EdgeEvent` |
598
- | `src/slices/change/api-boards/routes.ts` | Board CRUD + event persistence |
599
- | `src/slices/change/api-chapters/routes.ts` | Chapters, columns, lanes, cell drops |
600
- | `src/slices/change/api-nodes/routes.ts` | Node event sourcing |
601
- | `src/slices/change/api-images/routes.ts` | Image upload + sketch rendering |
602
- | `src/slices/change/api-.slices/routes.ts` | Slice creation |
603
- | `src/slices/change/api-specs/routes.ts` | GWT scenario management |
604
- | `src/slices/change/config-import/routes.ts` | Config import |
605
- | `src/slices/slicedata/routes.ts` | Slice data read models |
606
- | `src/slices/extensions/routes.ts` | Extension management |
607
- | `src/slices/Snapshots/routes.ts` | Snapshot CRUD |
608
- | `src/slices/usermanagement/*/routes*.ts` | User management commands + projections |
609
- | `src/events/SnapshotsEvents.ts` | Snapshot domain events |
610
- | `src/events/UserManagementEvents.ts` | User management domain events |
611
- | `backend/src/server.ts` | Route wiring, CORS, `/api/user` |
@@ -1,105 +0,0 @@
1
- ---
2
- name: update-slice-status
3
- description: Update the status of a single slice on an eventmodelers board by changing the SLICE_BORDER node's sliceStatus field
4
- ---
5
-
6
- # Update Slice Status
7
-
8
- > **Before doing anything else**, invoke the `connect` skill to resolve `TOKEN`, `BOARD_ID`, `ORG_ID`, and `BASE_URL`. Do not proceed until the connect skill has completed.
9
-
10
- ---
11
-
12
- ## Step 1 — Parse arguments
13
-
14
- From `$ARGUMENTS`, extract:
15
-
16
- | Field | How to find it | Default |
17
- |-------|---------------|---------|
18
- | `sliceName` | the slice title to update (case-insensitive match) | **required** |
19
- | `newStatus` | the target status value | **required** |
20
-
21
- Valid status values (case-sensitive):
22
-
23
- | Value | Meaning |
24
- |-------|---------|
25
- | `Created` | Default — slice has been created but not started |
26
- | `Planned` | Work is planned |
27
- | `InProgress` | Work is actively in progress |
28
- | `Review` | Ready for review |
29
- | `Done` | Completed |
30
- | `Blocked` | Blocked by something |
31
- | `Assigned` | Assigned to someone |
32
- | `Informational` | Informational / reference slice |
33
-
34
- If `newStatus` is not one of these exact values, stop and tell the user the valid options.
35
-
36
- ---
37
-
38
- ## Step 2 — List all slices
39
-
40
- Fetch all slices on the board:
41
-
42
- ```bash
43
- curl -s \
44
- -H "x-token: <TOKEN>" \
45
- -H "x-board-id: <BOARD_ID>" \
46
- -H "x-user-id: update-slice-status-skill" \
47
- "<BASE_URL>/api/org/<ORG_ID>/boards/<BOARD_ID>/slicedata/slices"
48
- ```
49
-
50
- Response: `{ "slices": [{ "id": "<nodeId>", "title": "<title>", "status": "<status>" }] }`
51
-
52
- The `id` here is the `SLICE_BORDER` node ID — use it directly in Step 3.
53
-
54
- Find the slice whose `title` matches `sliceName` (case-insensitive). If no match is found, stop and list the available slice titles so the user can pick one.
55
-
56
- Save the matched slice as:
57
- - `SLICE_NODE_ID` — the node ID of the SLICE_BORDER
58
- - `CURRENT_STATUS` — the current status value
59
-
60
- ---
61
-
62
- ## Step 3 — Update the slice status
63
-
64
- Send a `node:changed` event to update the `sliceStatus` field in the SLICE_BORDER node's meta:
65
-
66
- ```bash
67
- curl -s -X POST "<BASE_URL>/api/org/<ORG_ID>/boards/<BOARD_ID>/nodes/events" \
68
- -H "Content-Type: application/json" \
69
- -H "x-token: <TOKEN>" \
70
- -H "x-board-id: <BOARD_ID>" \
71
- -H "x-user-id: update-slice-status-skill" \
72
- -d '[{
73
- "id": "<new-random-uuid>",
74
- "eventType": "node:changed",
75
- "nodeId": "<SLICE_NODE_ID>",
76
- "boardId": "<BOARD_ID>",
77
- "timestamp": <Date.now()>,
78
- "changedAttributes": ["sliceStatus"],
79
- "meta": {
80
- "sliceStatus": "<newStatus>"
81
- }
82
- }]'
83
- ```
84
-
85
- Response: `{ "hashes": { "<eventId>": "<hash>" } }`
86
-
87
- ---
88
-
89
- ## Step 4 — Report back
90
-
91
- Tell the user:
92
-
93
- - **Slice**: the title that was updated
94
- - **Previous status**: `CURRENT_STATUS`
95
- - **New status**: `newStatus`
96
- - **Node ID**: `SLICE_NODE_ID`
97
- - **Any errors**: raw API message if something failed
98
-
99
- Example success output:
100
- ```
101
- Updated: "Order Placed" slice
102
- Before: InProgress
103
- After: Done
104
- Node ID: a1b2c3d4-…
105
- ```