@milehimikey/em 0.2.0 → 0.2.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.
@@ -45,7 +45,8 @@ Read `reference/methodology.md` (the 7 steps + 4 patterns) and `reference/em-dsl
45
45
  only that one adjacent event, so every arrow is short (a read model far from its source events
46
46
  draws long arrows that look like a forbidden read→read link). Repeats render cleanly — em only
47
47
  warns on a duplicate name that's *referenced* by `from`/`arrow`. Slice order matters: a reaction
48
- must be directly followed by its command slice, and a read slice must not be (see `em-dsl.md`).
48
+ must be directly followed by its command slice, and a read slice must not be immediately
49
+ followed by a command slice (see `em-dsl.md`).
49
50
  See `reference/methodology.md` (State View) and `reference/em-dsl.md`.
50
51
  - **Validate continuously.** Run `em validate` and fix errors/warnings as you go (see DSL ref).
51
52
  - **Save state at the end of every session** so work resumes cleanly.
@@ -87,6 +88,9 @@ Goal: a draft model of events, storyboard, commands, and views. Loose is OK; str
87
88
  facts. Capture a flat list. Probe for missed state changes.
88
89
  2. **Plot / storyboard (step 2).** Order the events into the narrative. Identify **personas**
89
90
  (actors) and the **UI** screens at each step. Add `persona` declarations and `ui` elements.
91
+ In a **headless/API** model there are no personas or screens — identify the external
92
+ **callers** at each step instead; they become the inbound write translations and read
93
+ translations (see `reference/methodology.md`).
90
94
  3. **Inputs (step 3).** For each event, find the **command** that causes it (imperative name).
91
95
  Form `command → event` slices (State Change pattern).
92
96
  4. **Outputs (step 4).** Identify the **read models / views** consumers need and wire them with
@@ -156,6 +156,9 @@ slice "Read Quote — created" { view Quote from "QuoteCreated" translation S
156
156
  - A **read** slice (read model → read translation, no command) must **not** be immediately followed
157
157
  by a `command` slice, or the read translation will be mis-wired to that command. Put reads after a
158
158
  command+event slice, or before another read / a reaction / an inbound `(request)` slice.
159
+ - A read model fed by an early event (e.g. a queue or to-do view) can't always sit directly after
160
+ its source event when a reaction must immediately precede its command slice — placing the read
161
+ later, in narrative order with a longer arrow, is the correct trade-off, not something to force-fix.
159
162
 
160
163
  ---
161
164
 
@@ -11,6 +11,11 @@ Keep it current at the end of every working session.
11
11
  - **Current step:** {{1–7, see methodology}}
12
12
  - **Last updated:** {{YYYY-MM-DD}}
13
13
 
14
+ ## Session inputs
15
+ - **Scope line:** {{one-line description of what's in/out of bounds for this model}}
16
+ - **PRD / spec reference:** {{path, link, or "none"}}
17
+ - **Headless/API model:** {{yes | no}}
18
+
14
19
  ## Steps completed
15
20
  - [ ] 1. Brainstorm events
16
21
  - [ ] 2. Plot / storyboard (personas + UI)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@milehimikey/em",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "AI-friendly Event Modeling — a slice-first text DSL rendered to a strict, self-contained Graphviz grid (SVG/PNG)",
5
5
  "type": "module",
6
6
  "bin": {