@milehimikey/em 1.1.0 → 1.1.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.
Files changed (43) hide show
  1. package/.claude/skills/event-modeling/SKILL.md +23 -70
  2. package/.claude/skills/event-modeling/reference/em-dsl.md +0 -15
  3. package/.claude/skills/event-modeling/templates/model-readme.md +4 -4
  4. package/.claude/skills/event-modeling/templates/slice.md +2 -4
  5. package/.claude/skills/event-modeling/templates/state.md +3 -9
  6. package/README.md +4 -31
  7. package/dist/cli.js +4 -227
  8. package/dist/cli.js.map +1 -1
  9. package/dist/model/validate.d.ts +0 -2
  10. package/dist/model/validate.js +1 -1
  11. package/dist/model/validate.js.map +1 -1
  12. package/package.json +2 -3
  13. package/.claude/skills/event-modeling/reference/frontmatter.md +0 -129
  14. package/dist/config.d.ts +0 -15
  15. package/dist/config.js +0 -60
  16. package/dist/config.js.map +0 -1
  17. package/dist/migrate/migrate.d.ts +0 -26
  18. package/dist/migrate/migrate.js +0 -276
  19. package/dist/migrate/migrate.js.map +0 -1
  20. package/dist/model/deriveSliceFields.d.ts +0 -21
  21. package/dist/model/deriveSliceFields.js +0 -60
  22. package/dist/model/deriveSliceFields.js.map +0 -1
  23. package/dist/model/frontmatter.d.ts +0 -21
  24. package/dist/model/frontmatter.js +0 -38
  25. package/dist/model/frontmatter.js.map +0 -1
  26. package/dist/model/sliceDoc.d.ts +0 -56
  27. package/dist/model/sliceDoc.js +0 -28
  28. package/dist/model/sliceDoc.js.map +0 -1
  29. package/dist/model/validateSliceDocs.d.ts +0 -7
  30. package/dist/model/validateSliceDocs.js +0 -195
  31. package/dist/model/validateSliceDocs.js.map +0 -1
  32. package/dist/slice/generate.d.ts +0 -17
  33. package/dist/slice/generate.js +0 -61
  34. package/dist/slice/generate.js.map +0 -1
  35. package/dist/slice/query.d.ts +0 -42
  36. package/dist/slice/query.js +0 -96
  37. package/dist/slice/query.js.map +0 -1
  38. package/dist/slice/sync.d.ts +0 -18
  39. package/dist/slice/sync.js +0 -104
  40. package/dist/slice/sync.js.map +0 -1
  41. package/dist/util/findModel.d.ts +0 -1
  42. package/dist/util/findModel.js +0 -27
  43. package/dist/util/findModel.js.map +0 -1
@@ -16,10 +16,9 @@ You are facilitating an Event Modeling session. Your job is to **extract an accu
16
16
  the user through Socratic questioning** — never to invent the domain. You drive the `em` CLI to
17
17
  render the model live, and you produce implementation-ready slice design docs.
18
18
 
19
- Read `reference/methodology.md` (the 7 steps + 4 patterns), `reference/em-dsl.md` (DSL syntax +
20
- validation rules), and — before the `slice` phase specifically — `reference/frontmatter.md` (the
21
- slice-doc frontmatter schema, lifecycle, and `em slice` CLI) before doing real work; they are the
22
- source of truth. Templates live in `templates/`.
19
+ Read `reference/methodology.md` (the 7 steps + 4 patterns) and `reference/em-dsl.md` (DSL syntax
20
+ + validation rules) before doing real work — they are the source of truth. Templates live in
21
+ `templates/`.
23
22
 
24
23
  ## Operating principles (every phase)
25
24
 
@@ -59,13 +58,7 @@ source of truth. Templates live in `templates/`.
59
58
  2. Locate the model. Look for an existing `<dir>/.event-modeling.md` and `*.em` in the working
60
59
  directory (or a `models/` subfolder). If found, read the state file. If not, and the phase
61
60
  needs one, ask the user for the model name and where to create it.
62
- 3. **Pre-1.0 model check.** If a `slices/*.md` doc exists with no YAML frontmatter block (run
63
- `em validate <model>.em` — a missing-frontmatter doc errors with a message pointing at this),
64
- tell the user this model predates the frontmatter standard and offer to run
65
- `em migrate <model-dir>` before continuing (it refuses a dirty git tree by default — commit
66
- first, or pass `--force`). Don't hand-edit old-format docs around this; migrate once, then
67
- proceed normally.
68
- 4. Parse the argument (`$ARGUMENTS`) to pick the phase below. With **no argument**, read the
61
+ 3. Parse the argument (`$ARGUMENTS`) to pick the phase below. With **no argument**, read the
69
62
  state file and resume the recorded phase/step; if no model exists, propose starting `discover`.
70
63
 
71
64
  ## Project layout this skill creates
@@ -76,24 +69,14 @@ source of truth. Templates live in `templates/`.
76
69
  <model-name>.svg # render target for em watch
77
70
  live.html # auto-refresh viewer (copy of templates/live.html, SVG_FILE set)
78
71
  README.md # overview + slice index (from templates/model-readme.md)
79
- .event-modeling.md # resumable state (from templates/state.md, with frontmatter)
80
- em.config.json # optional: { "sliceTemplate": "..." } for a team's own slice template
81
- slices/<slice-id>.md # one rich slice doc per slice, scaffolded via `em slice new`
72
+ .event-modeling.md # resumable state (from templates/state.md)
73
+ slices/<slice-name>.md # one rich slice doc per slice (from templates/slice.md)
82
74
  ```
83
75
 
84
- When creating a new model, scaffold the directory, copy the `model-readme.md`/`state.md`
85
- templates in (filling the placeholders), and set `SVG_FILE` in the copied `live.html` to
86
- `<model-name>.svg`. You may use `em init` for a starter `.em`, but usually you'll build it up from
87
- the discovery conversation instead. Fill template placeholders — never leave `{{...}}` in
88
- delivered files. **Slice docs are the one exception**: don't hand-copy `templates/slice.md` —
89
- use `em slice new` (see the `slice` phase below), which injects the required frontmatter and
90
- respects a project's `em.config.json` custom template if one is configured.
91
-
92
- Ask the **Regulatory scope** session input (state.md) up front, alongside Scope line / PRD
93
- reference / Headless-API-model: does this domain have compliance requirements (PCI-DSS, SOX,
94
- HIPAA, GDPR, ...) or none? This decides whether the `slice` phase asks about the `compliance:`
95
- frontmatter block per slice (see `reference/frontmatter.md`) — don't ask about compliance at all
96
- for a model with no regulatory scope.
76
+ When creating a new model, scaffold the directory, copy the templates in (filling the
77
+ placeholders), and set `SVG_FILE` in the copied `live.html` to `<model-name>.svg`. You may use
78
+ `em init` for a starter `.em`, but usually you'll build it up from the discovery conversation
79
+ instead. Fill template placeholders — never leave `{{...}}` in delivered files.
97
80
 
98
81
  ---
99
82
 
@@ -159,33 +142,17 @@ the corresponding event/slice to the `.em` and re-render. The happy-path spine f
159
142
  phases is the starting point, not the finished event set.
160
143
 
161
144
  For each slice:
162
- 1. Scaffold the doc: `em slice new "<Slice Name>" --pattern <state-change|state-view|automation|translation>`.
163
- This writes `slices/<id>.md` with the required frontmatter already filled in (`id`, `pattern`,
164
- `status: draft`, `version: 1`, …) and the body template (custom, if `em.config.json` configures
165
- one; the shipped default otherwise) ready to fill in.
166
- 2. Hold a Socratic deep-dive to fill every body section: intent, trigger/actor, command + field
167
- table (types & rules), event(s) + payload (mark immutable facts), invariants (give each a
168
- stable ID), Given/When/Then scenarios (happy path + rule boundaries + edge cases),
145
+ 1. Hold a Socratic deep-dive to fill every section of `templates/slice.md`: intent, trigger/actor,
146
+ command + field table (types & rules), event(s) + payload (mark immutable facts), invariants
147
+ (give each a stable ID), Given/When/Then scenarios (happy path + rule boundaries + edge cases),
169
148
  alternate/error flows (retries, idempotency, compensations), read models affected, open
170
- questions. Park anything unresolved rather than guessing. Pattern and status are frontmatter
171
- now, not prose — see `reference/frontmatter.md`. If the model's **Regulatory scope** (state
172
- file) isn't "none," additionally ask whether *this* slice touches regulated data or processes;
173
- if so, hand-add a `compliance:` block to the doc's frontmatter (see `reference/frontmatter.md`
174
- for the suggested shape — `em` never validates it, so use whatever sub-fields fit). Skip this
175
- question entirely for non-regulated models, and skip the block for slices with no compliance
176
- relevance even in a regulated model — don't ask by rote.
177
- 3. Wire it into the `.em`: add `note "slices/<id>.md"` to the slice's primary element (the command
178
- for State Change, the view for State View, the processor for Automation, the translation for
179
- Translation).
180
- 4. Run `em slice sync <id>` — it discovers the linked element from that `note` and fills in the
181
- generated frontmatter fields (`commands`/`events`/`readModels`/`contexts`/`personas`, and
182
- `triggers`/`triggeredBy` for automation/translation). **Re-run `em slice sync <id>` (or
183
- `--all`) after any later `.em` edit that touches this slice's elements** — generated fields
184
- drift otherwise, and `em validate` will flag it.
185
- 5. When the doc is solid, move it forward: `em slice update <id> --status reviewed` (and later
186
- `--status ready-to-implement`). Update `README.md`'s slice index.
187
- 6. Re-render and `em validate` (validates the `.em` **and** every slice doc's frontmatter by
188
- default).
149
+ questions. Park anything unresolved rather than guessing.
150
+ 2. Write the doc to `slices/<slice-name>.md` (kebab-case the slice name).
151
+ 3. Wire it into the `.em`: add `note "slices/<slice-name>.md"` to the slice's primary element
152
+ (the command for State Change, the view for State View, the processor for Automation, the
153
+ translation for Translation).
154
+ 4. Update `README.md`'s slice index and the state file's slice inventory (`draft` → `ready`).
155
+ 5. Re-render and `em validate`.
189
156
 
190
157
  ## Phase: `watch` — live team view
191
158
 
@@ -200,13 +167,8 @@ For each slice:
200
167
  ## Phase: `validate`
201
168
 
202
169
  Run `em validate <model-name>.em` and walk through each diagnostic with the user, explaining the
203
- rule (see `reference/em-dsl.md` for `.em` rules, `reference/frontmatter.md` for slice-doc
204
- frontmatter rules) and proposing the fix. Apply fixes on agreement:
205
- - `.em`-level fixes: split an automation's command into the next slice, add a missing `from`, give
206
- a command its event.
207
- - Slice-doc-level fixes: no frontmatter block → run `em migrate` (pre-1.0 model); "out of sync
208
- with .em" → run `em slice sync <id>`; orphan doc → wire a `note "slices/<id>.md"` onto the
209
- right element, then sync.
170
+ rule (see `reference/em-dsl.md`) and proposing the fix (e.g. split an automation's command into
171
+ the next slice, add a missing `from`, give a command its event). Apply fixes on agreement.
210
172
 
211
173
  Then do one check `em validate` can't: scan every `translation`/`processor`/`automation` slice and
212
174
  confirm none contains an `event` — each reaction must trigger a `command` in the next slice
@@ -220,20 +182,11 @@ two slices and route it through a command.
220
182
  ```bash
221
183
  em --version
222
184
  em init <name>.em # optional starter scaffold
223
- em validate <name>.em # check .em rules + slice-doc frontmatter
185
+ em validate <name>.em # check rules; exit 0 if clean/warnings only
224
186
  em render <name>.em -o <name>.svg # render (svg/png/pdf by extension)
225
187
  em render <name>.em --emit-dot # inspect generated Graphviz DOT
226
188
  em watch <name>.em -o <name>.svg # re-render on save (run in background)
227
-
228
- em slice new "<Slice Name>" --pattern <pattern> # scaffold slices/<id>.md with frontmatter
229
- em slice sync <id> # after wiring note "slices/<id>.md" into the .em
230
- em slice update <id> --status <status> # move a slice's lifecycle status forward
231
- em slice list / show <id> / search "<query>" # query slice docs by frontmatter (--format json)
232
- em slice search "<q>" --format json --full # ...with every field, not just the summary row
233
- em migrate <model-dir> # one-time upgrade from a pre-1.0 model
234
189
  ```
235
190
 
236
- See `reference/frontmatter.md` for the full slice-doc frontmatter schema and CLI reference.
237
-
238
191
  Always finish a working session by: re-rendering, running `em validate`, and updating
239
192
  `.event-modeling.md` with the current phase/step, decisions, and open questions.
@@ -20,21 +20,6 @@ em validate <file> # check event-modeling rules; exit 0 if only warn
20
20
  Install if missing: `npm i -g @milehimikey/em`. PNG works with no system deps; PDF needs
21
21
  `rsvg-convert`.
22
22
 
23
- **Slice docs** (frontmatter, lifecycle, search — see `reference/frontmatter.md` for the schema):
24
-
25
- ```bash
26
- em slice new "Slice Name" [--pattern state-change] [--id <id>] # scaffold slices/<id>.md
27
- em slice sync <id> # after wiring note "slices/<id>.md" into the .em
28
- em slice sync --all # re-sync every doc in the model directory
29
- em slice list [--status <s>] [--pattern <p>] [--context <c>] [--tag <t>] [--format json] [--full]
30
- em slice show <id> [--body] [--format json]
31
- em slice search "<query>" [--pattern <p>] [--status <s>] [--context <c>] [--tag <t>] [--format json] [--full]
32
- em slice update <id> [--status <s>] [--bump-version]
33
- em migrate <model-dir> [--dry-run] [--report <path>] # one-time upgrade from a pre-1.0 model
34
- ```
35
-
36
- `em validate <file>` also validates every doc in `slices/` by default (`--skip-slices` to opt out).
37
-
38
23
  ---
39
24
 
40
25
  ## Grammar
@@ -19,10 +19,10 @@ Static render: `em render {{model-name}}.em -o {{model-name}}.svg`
19
19
  - **Translation** — External input (or Read Model) → Translation → (next slice) Command → Event
20
20
 
21
21
  ## Slices
22
- <!-- Keep this index in sync as slice docs are written (or regenerate from `em slice list`). -->
23
- | # | Slice | Pattern | Status | Design doc |
24
- |---|-------|---------|--------|------------|
25
- | 1 | {{Slice Name}} | {{Pattern}} | {{status}} | [slices/{{slice-id}}.md](slices/{{slice-id}}.md) |
22
+ <!-- Keep this index in sync as slice docs are written. -->
23
+ | # | Slice | Pattern | Design doc |
24
+ |---|-------|---------|------------|
25
+ | 1 | {{Slice Name}} | {{Pattern}} | [slices/{{slice-name}}.md](slices/{{slice-name}}.md) |
26
26
 
27
27
  ## Status
28
28
  See [`.event-modeling.md`](.event-modeling.md) for current phase, decisions, and open questions.
@@ -3,15 +3,13 @@ Rich slice design document. One per slice, stored in <model>/slices/<slice-name>
3
3
  linked from the .em model with: note "slices/<slice-name>.md" on the slice's defining element.
4
4
  Fill every section through Socratic questioning. Leave "Open Questions" rather than guessing.
5
5
  Replace the bracketed placeholders; delete guidance comments before finishing.
6
-
7
- This is the body template only — `em slice new` injects the required frontmatter block above
8
- this content (id, pattern, status, version, sliceElement, and the generated search fields).
9
- Pattern and status live there now, not as prose here — see reference/frontmatter.md.
10
6
  -->
11
7
 
12
8
  # Slice: {{Slice Name}}
13
9
 
10
+ - **Pattern:** {{State Change | State View | Automation | Translation}}
14
11
  - **Swimlane:** {{Persona/Actor}} → {{Context/Aggregate}}
12
+ - **Status:** {{draft | reviewed | ready-to-implement}}
15
13
 
16
14
  ## Intent
17
15
  {{Why this slice exists — the user or business goal it serves, in one or two sentences.}}
@@ -4,11 +4,6 @@ The skill reads this on `/event-modeling` (no arg) to resume where you left off.
4
4
  Keep it current at the end of every working session.
5
5
  -->
6
6
 
7
- ---
8
- schemaVersion: 1
9
- model: {{model-name}}.em
10
- ---
11
-
12
7
  # Event Modeling Progress — {{Model Name}}
13
8
 
14
9
  - **Model file:** `{{model-name}}.em`
@@ -20,7 +15,6 @@ model: {{model-name}}.em
20
15
  - **Scope line:** {{one-line description of what's in/out of bounds for this model}}
21
16
  - **PRD / spec reference:** {{path, link, or "none"}}
22
17
  - **Headless/API model:** {{yes | no}}
23
- - **Regulatory scope:** {{e.g. PCI-DSS, SOX, HIPAA, or "none"}}
24
18
 
25
19
  ## Steps completed
26
20
  - [ ] 1. Brainstorm events
@@ -40,6 +34,6 @@ model: {{model-name}}.em
40
34
  - [ ] {{question}}
41
35
 
42
36
  ## Slice inventory
43
- | Slice | Id | Pattern | Doc status |
44
- |-------|-----|---------|------------|
45
- | {{Slice Name}} | {{slice-id}} | {{state-change/state-view/automation/translation}} | {{none / draft / reviewed / ready-to-implement}} |
37
+ | Slice | Pattern | Doc status |
38
+ |-------|---------|------------|
39
+ | {{Slice Name}} | {{State Change/View/Automation/Translation}} | {{none / draft / ready}} |
package/README.md CHANGED
@@ -154,12 +154,9 @@ em render <file> -o out.png # PNG (in-process, no system deps)
154
154
  em render <file> --emit-dot # print the generated DOT instead of rendering
155
155
  em render <file> --keep-empty-lanes # don't collapse the API lane when empty
156
156
  em watch <file> [-o out.svg] # re-render on every save
157
- em validate <file> # check event-modeling rules + slice-doc frontmatter
158
- em migrate <model-dir> # one-time upgrade of a pre-1.0 model to the frontmatter standard
157
+ em validate <file> # check event-modeling rules (non-zero exit on errors)
159
158
  ```
160
159
 
161
- See [Slice docs & frontmatter](#slice-docs--frontmatter) below for the `em slice` command group.
162
-
163
160
  ## Validation rules (`em validate`)
164
161
 
165
162
  - two same-band elements in one slice (collision) → **error** (split into separate slices)
@@ -177,34 +174,10 @@ See [Slice docs & frontmatter](#slice-docs--frontmatter) below for the `em slice
177
174
  - a read model with no source event → **warning**
178
175
  - a name defined more than once and referenced → **warning** (resolves to first)
179
176
 
180
- ## Slice docs & frontmatter
181
-
182
- Slice design docs (`slices/<id>.md`, written during the skill's `slice` phase or via
183
- `em slice new`) carry a required YAML frontmatter block — a stable `id`, lifecycle `status`,
184
- integer `version`, and fields generated from the `.em` (`commands`/`events`/`readModels`/
185
- `contexts`/`personas`, plus `triggers`/`triggeredBy` for automation/translation) — so an AI agent
186
- can search and filter across a model with hundreds of slices from frontmatter alone, without
187
- reading every doc's body or re-parsing the `.em`:
188
-
189
- ```bash
190
- em slice new "Place Order" --pattern state-change # scaffold slices/place-order.md
191
- em slice sync place-order # after wiring note "slices/..." into the .em
192
- em slice list --status ready-to-implement
193
- em slice search --pattern automation --context Payment --format json
194
- em slice search --status ready-to-implement --format json --full # every field, not just a summary
195
- em slice update place-order --status reviewed --bump-version
196
- ```
197
-
198
- The doc body itself is **yours to define** — point `em.config.json` at a custom template
199
- (`{ "sliceTemplate": "path/to/template.md" }`) and `em` injects the frontmatter on top of it
200
- regardless of what sections you ask for. Full schema, lifecycle model, and the handoff contract a
201
- build/SDD tool should treat as authoritative once a slice is `ready-to-implement`:
202
- [docs/1.0.0-spec.md](docs/1.0.0-spec.md).
203
-
204
177
  ## Documentation
205
178
 
206
- - [docs/1.0.0-spec.md](docs/1.0.0-spec.md) — slice frontmatter standard, config, `em slice`/
207
- `em migrate`, and the SDD handoff contract
179
+ - [docs/timeline-model.md](docs/timeline-model.md) — the Two Laws of the Timeline (forward-only
180
+ validation, `view … again`)
208
181
  - [docs/why-dot-not-plantuml.md](docs/why-dot-not-plantuml.md) — why DOT + the strict-grid /
209
182
  self-drawn-edges architecture
210
183
  - [docs/features.md](docs/features.md) — full feature list and roadmap
@@ -236,7 +209,7 @@ Then, in Claude Code, run:
236
209
  /event-modeling # start (or resume) a guided session
237
210
  /event-modeling discover # steps 1–4: brainstorm events, timeline, commands, read models
238
211
  /event-modeling model # steps 5–7: swimlanes, patterns, completeness check
239
- /event-modeling slice # deep implementation specs, one per slice (frontmatter via `em slice new`)
212
+ /event-modeling slice # deep implementation specs, one per slice
240
213
  /event-modeling watch # open a live browser view for team modeling sessions
241
214
  /event-modeling validate # run em validate and resolve all diagnostics
242
215
  ```
package/dist/cli.js CHANGED
@@ -4,24 +4,18 @@ import { readFileSync, writeFileSync, existsSync } from "node:fs";
4
4
  import { cp, mkdir } from "node:fs/promises";
5
5
  import { basename, dirname, extname, join, resolve } from "node:path";
6
6
  import { fileURLToPath } from "node:url";
7
- import { Command, Option } from "commander";
7
+ import { Command } from "commander";
8
8
  import { compile } from "./pipeline.js";
9
9
  import { ParseError } from "./parser/parser.js";
10
10
  import { renderDot, formatFromPath } from "./render/render.js";
11
11
  import { watchFile } from "./render/watch.js";
12
12
  import { formatDiagnostic, hasErrors } from "./model/validate.js";
13
- import { loadSliceDocs } from "./model/sliceDoc.js";
14
- import { validateSliceDocs, VALID_PATTERNS, VALID_STATUSES } from "./model/validateSliceDocs.js";
15
- import { newSlice } from "./slice/generate.js";
16
- import { syncAll, syncSlice } from "./slice/sync.js";
17
- import { listSliceRecords, listSlices, searchSliceRecords, searchSlices, showSlice, updateSlice, } from "./slice/query.js";
18
- import { applyMigration, assertCleanWorkingTree, formatMigrationReport, planMigration, } from "./migrate/migrate.js";
19
13
  import { STARTER_EM } from "./templates.js";
20
14
  const program = new Command();
21
15
  program
22
16
  .name("em")
23
17
  .description("Event Modeling CLI — slice-first DSL rendered as a strict Graphviz grid")
24
- .version("1.1.0");
18
+ .version("1.1.1");
25
19
  program
26
20
  .command("init")
27
21
  .description("scaffold a starter .em model")
@@ -105,13 +99,8 @@ program
105
99
  .command("validate")
106
100
  .description("check a model against event-modeling rules")
107
101
  .argument("<file>", "input .em file")
108
- .option("--skip-slices", "don't validate slice docs (slices/*.md)")
109
- .action((file, opts) => {
110
- const { model, diagnostics } = compileFile(file);
111
- if (!opts.skipSlices) {
112
- const docs = loadSliceDocs(dirname(file));
113
- diagnostics.push(...validateSliceDocs(model, file, docs));
114
- }
102
+ .action((file) => {
103
+ const { diagnostics } = compileFile(file);
115
104
  printDiagnostics(diagnostics);
116
105
  if (hasErrors(diagnostics))
117
106
  process.exit(1);
@@ -139,198 +128,6 @@ skill
139
128
  console.log(`installed event-modeling skill → ${dest}`);
140
129
  console.log("in Claude Code, run /event-modeling to start a guided session");
141
130
  });
142
- const slice = program.command("slice").description("manage slice design docs (slices/*.md)");
143
- slice
144
- .command("new")
145
- .description("scaffold a new slice doc with injected frontmatter")
146
- .argument("<name>", 'slice title, e.g. "Place Order"')
147
- .option("--dir <path>", "model directory", ".")
148
- .option("--model <path>", "explicit .em file (default: the only .em in --dir)")
149
- .option("--config <path>", "explicit em.config.json path")
150
- .addOption(new Option("--pattern <pattern>", "slice pattern").choices(VALID_PATTERNS).default("state-change"))
151
- .option("--id <id>", "explicit slice id (default: kebab-case of the name)")
152
- .option("--slice-element <id>", "the .em Element.id this doc documents, if already known")
153
- .option("-f, --force", "overwrite an existing doc with this id")
154
- .action((name, opts) => {
155
- try {
156
- const result = newSlice(name, {
157
- dir: opts.dir,
158
- modelPath: opts.model,
159
- configPath: opts.config,
160
- pattern: opts.pattern,
161
- id: opts.id,
162
- sliceElement: opts.sliceElement,
163
- force: opts.force,
164
- });
165
- console.log(`wrote ${result.path} (id: ${result.id})`);
166
- }
167
- catch (e) {
168
- reportError(e);
169
- process.exit(1);
170
- }
171
- });
172
- slice
173
- .command("sync")
174
- .description("recompute generated frontmatter fields (commands/events/readModels/contexts/personas/triggers) from the .em")
175
- .argument("[id]", "slice id to sync (omit with --all)")
176
- .option("--dir <path>", "model directory", ".")
177
- .option("--model <path>", "explicit .em file")
178
- .option("--all", "sync every slice doc in the directory")
179
- .action((id, opts) => {
180
- try {
181
- if (opts.all) {
182
- const { synced, skipped } = syncAll({ dir: opts.dir, modelPath: opts.model });
183
- for (const s of synced)
184
- console.log(`synced ${s.path}${s.changed ? "" : " (no changes)"}`);
185
- for (const s of skipped)
186
- console.warn(` skip ${s.file}: ${s.reason}`);
187
- }
188
- else {
189
- if (!id) {
190
- console.error("pass a slice id, or --all");
191
- process.exit(1);
192
- }
193
- const result = syncSlice(id, { dir: opts.dir, modelPath: opts.model });
194
- console.log(`synced ${result.path}${result.changed ? "" : " (no changes)"}`);
195
- }
196
- }
197
- catch (e) {
198
- reportError(e);
199
- process.exit(1);
200
- }
201
- });
202
- slice
203
- .command("list")
204
- .description("list slice docs from frontmatter only (no .em parse, no body read)")
205
- .option("--dir <path>", "model directory", ".")
206
- .addOption(new Option("--status <status>", "filter by status").choices(VALID_STATUSES))
207
- .addOption(new Option("--pattern <pattern>", "filter by pattern").choices(VALID_PATTERNS))
208
- .option("--context <context>", "filter by context")
209
- .option("--tag <tag>", "filter by tag")
210
- .option("--format <fmt>", "table | json", "table")
211
- .option("--full", "emit every frontmatter field per slice (requires --format json)")
212
- .action((opts) => {
213
- const filter = {
214
- dir: opts.dir,
215
- status: opts.status,
216
- pattern: opts.pattern,
217
- context: opts.context,
218
- tag: opts.tag,
219
- };
220
- if (opts.full) {
221
- requireJson(opts.format);
222
- console.log(JSON.stringify(listSliceRecords(filter), null, 2));
223
- return;
224
- }
225
- printSlices(listSlices(filter), opts.format);
226
- });
227
- slice
228
- .command("show")
229
- .description("show one slice doc's frontmatter")
230
- .argument("<id>", "slice id")
231
- .option("--dir <path>", "model directory", ".")
232
- .option("--format <fmt>", "table | json", "table")
233
- .option("--body", "include the doc body")
234
- .action((id, opts) => {
235
- const doc = showSlice(id, { dir: opts.dir });
236
- if (!doc) {
237
- console.error(`no slice doc with id "${id}" found in ${opts.dir}`);
238
- process.exit(1);
239
- }
240
- if (opts.format === "json") {
241
- const payload = opts.body ? { ...doc.frontmatter, body: doc.body } : doc.frontmatter;
242
- console.log(JSON.stringify(payload, null, 2));
243
- return;
244
- }
245
- console.log(`# ${doc.file}`);
246
- for (const [k, v] of Object.entries(doc.frontmatter ?? {})) {
247
- console.log(`${k}: ${JSON.stringify(v)}`);
248
- }
249
- if (opts.body) {
250
- console.log("");
251
- console.log(doc.body);
252
- }
253
- });
254
- slice
255
- .command("search")
256
- .description("search slice docs by frontmatter only (title/tags/commands/events/readModels)")
257
- .argument("[query]", "free-text query", "")
258
- .option("--dir <path>", "model directory", ".")
259
- .addOption(new Option("--status <status>", "filter by status").choices(VALID_STATUSES))
260
- .addOption(new Option("--pattern <pattern>", "filter by pattern").choices(VALID_PATTERNS))
261
- .option("--context <context>", "filter by context")
262
- .option("--tag <tag>", "filter by tag")
263
- .option("--format <fmt>", "table | json", "table")
264
- .option("--full", "emit every frontmatter field per slice (requires --format json)")
265
- .action((query, opts) => {
266
- const filter = {
267
- dir: opts.dir,
268
- status: opts.status,
269
- pattern: opts.pattern,
270
- context: opts.context,
271
- tag: opts.tag,
272
- };
273
- if (opts.full) {
274
- requireJson(opts.format);
275
- console.log(JSON.stringify(searchSliceRecords(query, filter), null, 2));
276
- return;
277
- }
278
- printSlices(searchSlices(query, filter), opts.format);
279
- });
280
- slice
281
- .command("update")
282
- .description("write status/version changes back into a slice doc's frontmatter")
283
- .argument("<id>", "slice id")
284
- .option("--dir <path>", "model directory", ".")
285
- .addOption(new Option("--status <status>", "new status").choices(VALID_STATUSES))
286
- .option("--bump-version", "increment version by 1")
287
- .action((id, opts) => {
288
- try {
289
- const result = updateSlice(id, {
290
- dir: opts.dir,
291
- status: opts.status,
292
- bumpVersion: opts.bumpVersion,
293
- });
294
- console.log(`updated ${result.path}`);
295
- }
296
- catch (e) {
297
- reportError(e);
298
- process.exit(1);
299
- }
300
- });
301
- program
302
- .command("migrate")
303
- .description("upgrade a pre-1.0 model directory to the frontmatter standard (docs/1.0.0-spec.md)")
304
- .argument("<model-dir>", "model directory")
305
- .option("--model <path>", "explicit .em file")
306
- .option("--dry-run", "print the plan/report without writing")
307
- .option("--force", "proceed even with uncommitted changes or no git repo")
308
- .option("--report <path>", "write the migration report to a file instead of stdout")
309
- .action((dir, opts) => {
310
- try {
311
- if (!opts.dryRun)
312
- assertCleanWorkingTree(dir, opts.force);
313
- const plan = planMigration(dir, { modelPath: opts.model });
314
- const report = formatMigrationReport(plan);
315
- if (opts.report) {
316
- writeFileSync(opts.report, report);
317
- console.log(`wrote migration report -> ${opts.report}`);
318
- }
319
- else {
320
- console.log(report);
321
- }
322
- if (opts.dryRun) {
323
- console.log("dry run — no files written");
324
- return;
325
- }
326
- applyMigration(plan);
327
- console.log("migration applied");
328
- }
329
- catch (e) {
330
- reportError(e);
331
- process.exit(1);
332
- }
333
- });
334
131
  program.parseAsync().catch((e) => {
335
132
  reportError(e);
336
133
  process.exit(1);
@@ -383,24 +180,4 @@ function printDiagnostics(diags) {
383
180
  function reportError(e) {
384
181
  console.error(e instanceof Error ? e.message : String(e));
385
182
  }
386
- /** --full emits a shape only JSON can carry; fail loudly rather than silently ignoring it. */
387
- function requireJson(format) {
388
- if (format !== "json") {
389
- console.error("--full requires --format json");
390
- process.exit(1);
391
- }
392
- }
393
- function printSlices(results, format) {
394
- if (format === "json") {
395
- console.log(JSON.stringify(results, null, 2));
396
- return;
397
- }
398
- if (results.length === 0) {
399
- console.log("no matching slices");
400
- return;
401
- }
402
- for (const s of results) {
403
- console.log(`${s.id}\t${s.pattern ?? "?"}\t${s.status ?? "?"}\tv${s.version ?? "?"}\t${s.title}`);
404
- }
405
- }
406
183
  //# sourceMappingURL=cli.js.map
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,+BAA+B;AAC/B,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAkB,MAAM,eAAe,CAAC;AAExD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAc,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAE,aAAa,EAA6B,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACjG,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAi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UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;YACnD,OAAO,CAAC,IAAI,CAAC,oCAAoC,EAAE,CAAC,IAAI,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC;QAC3E,CAAC;IACH,CAAC;AACH,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAmB;IAC3C,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO;IAC/B,KAAK,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC;QACtB,MAAM,IAAI,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC;QACjC,IAAI,CAAC,CAAC,QAAQ,KAAK,OAAO;YAAE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;;YAC3C,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;AACH,CAAC;AAED,SAAS,WAAW,CAAC,CAAU;IAC7B,OAAO,CAAC,KAAK,CAAC,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAC5D,CAAC"}
@@ -5,8 +5,6 @@ export interface Diagnostic {
5
5
  severity: Severity;
6
6
  message: string;
7
7
  line?: number;
8
- /** Slice-doc path, for diagnostics that point at a Markdown doc rather than a .em line. */
9
- file?: string;
10
8
  }
11
9
  export declare function validate(model: NormalizedModel, grid: Grid): Diagnostic[];
12
10
  export declare function hasErrors(diags: Diagnostic[]): boolean;
@@ -165,7 +165,7 @@ export function hasErrors(diags) {
165
165
  }
166
166
  /** Pretty one-line diagnostic for terminal output. */
167
167
  export function formatDiagnostic(d) {
168
- const where = d.file ? ` ${d.file}` : d.line ? `:${d.line}` : "";
168
+ const where = d.line ? `:${d.line}` : "";
169
169
  const tag = d.severity === "error" ? "error" : "warn ";
170
170
  return ` ${tag}${where} ${d.message}`;
171
171
  }