@eventmodelers/cli 1.0.112 → 1.0.113
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eventmodelers/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.113",
|
|
4
4
|
"description": "Eventmodelers CLI — real-time Claude agent + skills for Claude Code, for any stack (Node, Supabase, Axon, OpenCQRS, UmaDB, Kurrent, or modeling-only)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: analyze-
|
|
3
|
-
description: Uncover the business process behind
|
|
2
|
+
name: analyze-code-base
|
|
3
|
+
description: Uncover the business process behind an existing code base and build it on the board as an interview, iteratively — all chapters at high level first, then one chapter per pass, the person choosing which. Reads the code for hypotheses, asks one question at a time, draws as answers land. Use for "analyze this code base", "analyze this existing system", "reverse-engineer the model from the code", "model the legacy app".
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Analyze a
|
|
6
|
+
# Analyze a Code Base
|
|
7
7
|
|
|
8
8
|
You are a facilitator running an interview, not a batch analyser. The code gives you a hypothesis; the person gives you the truth. **The board is the deliverable** — never hand over a JSON model, `config.json` or `high-level-analysis.json`. Everything you derive is created on the board as you go.
|
|
9
9
|
|
|
@@ -44,24 +44,24 @@ Therefore: never trade one reader for the other. No cryptic titles to save space
|
|
|
44
44
|
|
|
45
45
|
## How to interview
|
|
46
46
|
|
|
47
|
-
- **
|
|
47
|
+
- **Build what the code shows; ask only what it can't tell you.** Elements, fields, edges and scenarios that follow from the API, persistence, tests and UI go onto the board directly — no confirmation round, no tick-boxes for things you can see. Ask only about **order** and **unclear business requirements** (what the code leaves open or contradicts). When you ask, propose first: "From `VisitController` I see the owner picks a pet and then books a visit — is that the real sequence?" — never an empty question.
|
|
48
48
|
- **One question at a time**, answerable in a sentence or two. Never a wall of questions.
|
|
49
49
|
- The recurring question is **"what happens next?"** — walk the flow forward until the person says it ends, then backwards once: "what has to have happened before this?"
|
|
50
|
-
- **Order before placement.**
|
|
51
|
-
- **Draw as you go.**
|
|
50
|
+
- **Order before placement.** Place where the code or UI make the order clear; where they don't, ask first. The timeline is only as right as its sequence.
|
|
51
|
+
- **Draw as you go.** Everything you derived or were told goes onto the board immediately — the person watches the model grow. Never disappear for ten tool calls.
|
|
52
52
|
- **Ask before every descent.** Which flow next and how much deeper — never decide alone.
|
|
53
53
|
|
|
54
54
|
### Be proactive — and ask about order above all
|
|
55
55
|
|
|
56
56
|
The code almost never says in which order the business does things: persistence writes have no sequence, controllers are independent, tests run in isolation. **Order is the person's knowledge, so ask for it — every round, unprompted.** Don't settle for the sequence the code happens to suggest.
|
|
57
57
|
|
|
58
|
-
**Order is what the timeline is made of.** An event model is a left-to-right sequence: a column's position *is* the business order, and a wrong order is a wrong model, not a cosmetic flaw. So never place an element at a position you guessed — place it where the person confirmed it
|
|
58
|
+
**Order is what the timeline is made of.** An event model is a left-to-right sequence: a column's position *is* the business order, and a wrong order is a wrong model, not a cosmetic flaw. So never place an element at a position you guessed — place it where the code or UI make the order clear or the person confirmed it, and if the order is still open, hold the element back (or leave a QUESTION comment) rather than put it somewhere plausible. Chapters get their order the same way.
|
|
59
59
|
|
|
60
60
|
- Whenever you have two or more elements (events, chapters, milestones), propose an order *and* ask: "I'd put *Owner Registered* before *Pet Added* — does the clinic ever add a pet first, or can it happen in either order?"
|
|
61
61
|
- Ask what must have happened **before** each step (preconditions) and what **can run in parallel** or in any order.
|
|
62
62
|
- Ask where the **ordering of chapters** comes from: which flow starts the story, which depends on another, which repeat.
|
|
63
63
|
- Ask when a step can happen **again** (a second visit, a re-booking) and what it means then.
|
|
64
|
-
-
|
|
64
|
+
- In a chat, put an order question as a `poll` with the candidate orders, or a `confirm` on your proposal (see Chat mode).
|
|
65
65
|
- Don't wait for gaps to surface: whenever the code leaves you guessing — what triggers an automation, who is allowed to act, what happens on failure, whether a step is optional — ask, with your best hypothesis attached. Still one question at a time: pick the one that unblocks the most.
|
|
66
66
|
|
|
67
67
|
Questions to keep in rotation: *What happens next? · Which comes first — and can it be the other way round? · What must be true before this can happen? · Who triggers this? · What do they see before they decide? · Can this fail — and what does the business do then? · Is that the word the business uses? · Which flow now? · Deeper, or enough?*
|
|
@@ -79,10 +79,14 @@ Every pass reads the code through the same four lenses; each produces *hypothese
|
|
|
79
79
|
|
|
80
80
|
**With a URL, play with it using Playwright.** Prefer the Playwright MCP tools (`browser_navigate`, `browser_snapshot`, `browser_click`, `browser_type`, …) when they are available; otherwise drive it with a small Playwright script (`npx playwright`) kept in the scratchpad, not in the repository.
|
|
81
81
|
- Walk it like a user: start at the entry page, follow the navigation, and note each page, form, button and list. Record, per step, what the person sees, what they can do, and what changed afterwards — that is a screen, a command and the event or read model behind it.
|
|
82
|
-
-
|
|
82
|
+
- **The UI is the best source for what is possible and in which order.** Menus, buttons, wizard steps and enabled/disabled states show which actions exist and which come first; use the click path as the *proposed* order and put it to the person ("after *Add Pet* the app leads to *Book Visit* — is that the real sequence?"). The person still confirms the order before anything is placed.
|
|
83
|
+
- **Screenshot every step and paste it onto the board as an image.** Save each screenshot (`browser_take_screenshot`, or `page.screenshot()` in the script) to the scratchpad, then place it as a SCREEN in the chapter, at the column of the step it belongs to, in walk order:
|
|
84
|
+
`mcp__eventmodelers__create_screen { boardId, screens: [{ contentType: "image", chapterId, cellName, title: "<business name of the step>", imageBase64: "<base64 PNG, no data: URI prefix>", mimeType: "image/png", description: "Shows X. Arrived via: Y. Actions: A, B. Legacy: <URL / template>" }] }`
|
|
85
|
+
The image is the real legacy screen kept as evidence. Where a person decides, `/html-screen` may add a clean wireframe later, but never replaces the screenshot unasked. Screenshot only what you walked, never invent screens. Mask personal data (names, emails) in the shots, or use test data.
|
|
83
86
|
- Trigger a write (submit a form) only against a test or local system, or after the person agrees — it changes real data. Never on anything that looks like production without asking first. Create test data with a clear marker so it can be found again.
|
|
84
87
|
- Confirm what you observed against the code: the UI shows the flow, the API/persistence lenses show what really happens behind it.
|
|
85
88
|
- Not reachable, login missing or the page needs something you don't have: tell the person and carry on with the other lenses; never invent screens.
|
|
89
|
+
- **No UI, and the code doesn't make the flow or order clear: ask the business expert (the human in the loop).** Don't guess from the code. Put your best hypothesis to them, one question at a time ("without a UI I can't see the sequence — does the clinic register the owner before adding a pet?"), and ask them to describe or sketch what people see and do. Their answer is the source for order and screens; if it stays open, leave a QUESTION comment instead of placing the element.
|
|
86
90
|
|
|
87
91
|
Where the lenses disagree (a route nobody calls, a table never written, a test for removed behaviour, a screen with no backend), that is a question for the person — not something to model.
|
|
88
92
|
|
|
@@ -120,14 +124,14 @@ Before proposing elements for a chapter, apply the rules of the skills that own
|
|
|
120
124
|
|
|
121
125
|
### Pass 0 — all chapters, high level
|
|
122
126
|
1. Read the sources broadly through the four lenses (API, tests, persistence, UI) to spot the end-to-end business flows, and ask whether a running UI exists.
|
|
123
|
-
2.
|
|
124
|
-
3. Create **one chapter per high-level flow** (`/timeline`)
|
|
127
|
+
2. Derive the flows yourself and name them in business words (*Register an Owner*, *Book a Visit*). Ask only what the code can't tell you: the **order** of the flows, and what starts or ends one when that is unclear.
|
|
128
|
+
3. Create **one chapter per high-level flow** (`/timeline`) straight away — no confirmation round — in the best-known business order (ask where it is unclear). Inside each chapter sketch only the coarse milestones as slices — titles only (*Visit Booked*, *Pet Registered*; not operations on entities). Connect the chapters' order, not their internals.
|
|
125
129
|
4. Report the chapters back and **ask which chapter to start with**. Never pick for them.
|
|
126
130
|
|
|
127
131
|
### Pass N — detail the chosen chapter
|
|
128
132
|
1. The person picks one existing chapter. Work **in that chapter** — do not create a new one. Replace/expand its milestones into the real command / event / read model sequence (`/timeline`, `/place-element`), reusing what is already there.
|
|
129
|
-
2.
|
|
130
|
-
3. Add this layer's detail (budget below) as answers land.
|
|
133
|
+
2. Read the code behind each step (all four lenses) and build it directly. Interview only where the code stops: what happens next when the order is unclear, who is allowed to act, what the business does on failure.
|
|
134
|
+
3. Add this layer's detail (budget below) as you derive it, and as answers land.
|
|
131
135
|
4. Report what you uncovered, name the sub-flows found *inside* this chapter (offer them as new chapters if the person wants them), list the chapters still at high level, and ask: which chapter next, go deeper here, or stop?
|
|
132
136
|
|
|
133
137
|
Repeat until the person says stop. Each pass leaves the chapters not yet chosen untouched at high level.
|
|
@@ -144,15 +148,17 @@ Never add detail that belongs to a deeper layer. Every element must trace to sou
|
|
|
144
148
|
|
|
145
149
|
---
|
|
146
150
|
|
|
147
|
-
## Chat mode — snippets
|
|
151
|
+
## Chat mode — snippets only for real questions
|
|
148
152
|
|
|
149
|
-
**When this run has a chat** (`CHAT_SESSION_ID` is set — the request came from the board's chat),
|
|
153
|
+
**When this run has a chat** (`CHAT_SESSION_ID` is set — the request came from the board's chat), a question the person answers with a pick is a **snippet** (`post_chat_message` with `snippet`; shapes in `/learn-eventmodelers-api` § 16 *Chat snippets*); an open question stays text. Without a chat, ask in prose.
|
|
150
154
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
155
|
+
**Snippets are not a confirmation gate.** Never post a `tasks` snippet to let the person tick what you derived from the code — you build that directly (see *How to interview*). Use a snippet only when you genuinely need the person:
|
|
156
|
+
|
|
157
|
+
1. **Order** — *"Which comes first?"* → a `poll` with the candidate orders; *"I'd put A before B — right?"* → a `confirm`.
|
|
158
|
+
2. **Unclear business requirement** — the code leaves it open or contradicts itself (*"Can a visit be cancelled?"*, *"Is the specialty optional?"*) → a `confirm` or `poll` with your hypothesis; an open answer stays text.
|
|
159
|
+
3. **Which chapter next** (end of every pass) → a `poll` with one option per chapter still at high level, plus *"Stop here"*. The pick arrives as the next chat message.
|
|
160
|
+
|
|
161
|
+
One question per message, with the best hypothesis attached. The answer arrives as a normal chat message: apply it to the board right away and continue with the next derivation or question. If nothing is unclear, don't ask — post a short note of what went on the board and the poll for the next chapter.
|
|
156
162
|
|
|
157
163
|
---
|
|
158
164
|
|
|
@@ -203,7 +203,7 @@ for it. Instead:
|
|
|
203
203
|
and posts nothing to the board until they answer (`/wdyt` Step 4.0). Your reply here is one line —
|
|
204
204
|
*"On it — looking at Registration."*
|
|
205
205
|
- **a skill by name** — the message starts with `/<name>` of one of your skills (the chat panel's menu
|
|
206
|
-
writes these: `/analyze-existing-model`, `/analyze-
|
|
206
|
+
writes these: `/analyze-existing-model`, `/analyze-code-base`, `/detect-architecture-drift`, `/add-next-slice`, `/examples`, `/timeline …`,
|
|
207
207
|
`/html-screen …`, `/storyboard …`): the person chose that skill, so it **is** the work — create one prompt,
|
|
208
208
|
*"Run /<name> <the rest of the message>"*, with the target resolved from `context=` like any other
|
|
209
209
|
(selected elements, chapter), and say so in one line. Don't re-interpret it as a question. A skill that
|
|
@@ -356,7 +356,7 @@ nothing to sanitize either, since a board change is not user text.
|
|
|
356
356
|
| Design or update a single wireframe/sketch screen (explicit request only) | `/storyboard-screen` |
|
|
357
357
|
| Business analysis, gap spotting, posting questions | `/wdyt` |
|
|
358
358
|
| Analyse the existing model structure, slice coverage, element counts | `/analyze-existing-model` |
|
|
359
|
-
| Reverse-engineer the business process of
|
|
359
|
+
| Reverse-engineer the business process of an existing code base into the model, as an interview — all chapters first, then one chapter at a time | `/analyze-code-base` |
|
|
360
360
|
| Find where the model and the code have drifted apart (fields, specs, screens, edges, missing/extra slices) and propose fixes | `/detect-architecture-drift` |
|
|
361
361
|
| Turn a document or image (e.g. a tender/RFP) into a chaptered event model with screens, scenarios and a written blueprint summary | `/summarize` |
|
|
362
362
|
| Look up any API endpoint or element type not already covered by the skill you're executing | `/learn-eventmodelers-api` |
|