@milehimikey/em 1.13.0 → 1.13.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 (33) hide show
  1. package/.claude/skills/event-modeling/SKILL.md +3 -2
  2. package/.claude/skills/event-modeling-conform/SKILL.md +1 -1
  3. package/.claude/skills/event-modeling-conform/reference/conform.md +1 -1
  4. package/.claude/skills/event-modeling-design/SKILL.md +17 -3
  5. package/.claude/skills/event-modeling-discover/SKILL.md +1 -1
  6. package/.claude/skills/event-modeling-implement/SKILL.md +7 -4
  7. package/.claude/skills/event-modeling-implement/reference/implement.md +14 -2
  8. package/.claude/skills/event-modeling-review/SKILL.md +1 -1
  9. package/.claude/skills/event-modeling-shared/reference/em-dsl.md +6 -5
  10. package/.claude/skills/event-modeling-shared/reference/slice-doc-schema.md +9 -0
  11. package/dist/cli/ciInit.d.ts +24 -0
  12. package/dist/cli/ciInit.js +70 -17
  13. package/dist/cli/ciInit.js.map +1 -1
  14. package/dist/cli/coverage.d.ts +16 -2
  15. package/dist/cli/coverage.js +26 -4
  16. package/dist/cli/coverage.js.map +1 -1
  17. package/dist/cli/reratify.d.ts +8 -2
  18. package/dist/cli/reratify.js +54 -22
  19. package/dist/cli/reratify.js.map +1 -1
  20. package/dist/cli/upgrade.d.ts +14 -4
  21. package/dist/cli/upgrade.js +69 -21
  22. package/dist/cli/upgrade.js.map +1 -1
  23. package/dist/cli.js +90 -19
  24. package/dist/cli.js.map +1 -1
  25. package/dist/emit/coverageJson.d.ts +5 -2
  26. package/dist/emit/coverageJson.js +6 -2
  27. package/dist/emit/coverageJson.js.map +1 -1
  28. package/dist/emit/upgradeJson.d.ts +1 -1
  29. package/dist/emit/upgradeJson.js +4 -1
  30. package/dist/emit/upgradeJson.js.map +1 -1
  31. package/dist/mcp/server.js +23 -6
  32. package/dist/mcp/server.js.map +1 -1
  33. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: event-modeling
3
- em-version: 1.13.0
3
+ em-version: 1.13.1
4
4
  description: >-
5
5
  Use when the user runs `/event-modeling` (with or without a phase name), or wants to resume an
6
6
  event-modeling session without specifying which part of the process applies. Reads the model's
@@ -32,7 +32,8 @@ phase lives in.
32
32
  1. Check the tool: `em --version`. If missing, tell the user to run `npm i -g @milehimikey/em`
33
33
  and stop until installed. Then check this vendored bundle's own currency against it — see
34
34
  `../event-modeling-shared/reference/operating-principles.md`'s Preconditions step 2: a bundle
35
- more than a minor version stale is a STOP, not a warning.
35
+ even one minor version behind the installed em is a STOP, not a warning — only a patch-only
36
+ gap proceeds normally.
36
37
  2. Parse `$ARGUMENTS` for a phase name.
37
38
  - **A recognized phase name** (`discover`, `extract`, `model`, `slice`, `implement`,
38
39
  `conform`, `validate`, `watch`, `review`): look it up in the table above and invoke that
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: event-modeling-conform
3
- em-version: 1.13.0
3
+ em-version: 1.13.1
4
4
  description: >-
5
5
  Use when checking a ratified event model (and its slice docs) for drift against the codebase
6
6
  that implements it — advisory only, never a gate, never an unprompted edit — or when walking
@@ -398,7 +398,7 @@ manifest exists yet, or if the model has drifted since the last bump (the certif
398
398
  otherwise name a version that isn't what conform actually walked). If the model changed during
399
399
  this conform run (a slice's `version:` moved, or the `.em` file itself changed), bump a new
400
400
  design version (`em model version bump --by <name>`) before the final `em state
401
- set-conformance` call. `--partial` never certifies. See `docs/model-versions.md`.
401
+ set-conformance` call. `--partial` never certifies. See `docs/process.md#model-versions`.
402
402
 
403
403
  Conform doesn't chain to another phase automatically — it's a recurring loop, not a step in
404
404
  building the model. Suggest running it again next time the target codebase has moved, at
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: event-modeling-design
3
- em-version: 1.13.0
3
+ em-version: 1.13.1
4
4
  description: >-
5
5
  Use when structuring a draft event model into swimlanes and the four patterns (State Change,
6
6
  State View, Automation, Translation), evaluating a model's structural completeness, or writing
@@ -115,7 +115,16 @@ For each slice:
115
115
  anything unresolved rather than guessing. If the slice lives in an existing codebase, Grep/Read
116
116
  adjacent real sources (OpenAPI specs, DB migrations, existing DTOs/event classes in sibling
117
117
  contexts) before finalizing field names/types or invariants — don't guess a shape that's
118
- already defined elsewhere.
118
+ already defined elsewhere. Before finalizing an invariant, also compare it with the slices in
119
+ **this same model** — never another `.em` model — that make the same kind of change (other
120
+ `Archive*` or `Create*` state changes on different entities, say). If one of them already
121
+ states an analogous rule, either state the same rule here — written out in this doc under
122
+ this slice's own `INV-<MNEMONIC>-n` ID, not by pointing at the sibling's — or record why this
123
+ slice's case differs. If this slice has a rule those siblings lack, raise that with the user
124
+ as an open question against each of them; a ratified sibling changes only through its own
125
+ re-ratification, never as a side effect of this slice. Repeating a rule across slice docs is
126
+ correct: each doc is a self-contained spec, and whether the code behind those rules is shared
127
+ is the constitution's call, not this doc's.
119
128
  2. **First-time authoring:** scaffold the doc mechanically rather than hand-writing the
120
129
  frontmatter — `em slice new "<slice name>" --pattern <state-change|state-view|automation|
121
130
  translation> --swimlane "<Persona> → <Context>" --wire <model>.em` writes `slices/<slice-name>.md`
@@ -144,7 +153,12 @@ For each slice:
144
153
  doc's authored body) — run `em slice reratify <model>.em <slice-key>` instead: it bumps
145
154
  `version` and flips `status` back to `ready-to-implement` in the existing frontmatter,
146
155
  clearing any stale `ratifiedBy:`/`ratifiedOn:` from the prior version so a follow-up
147
- `em slice ratify --by <name>` (if the team records that) applies cleanly.
156
+ `em slice ratify --by <name>` (if the team records that) applies cleanly. The same command
157
+ changes a ratified doc that **never shipped** (`ready-to-implement` with `ratifiedBy` set — a
158
+ gap answered mid-build, MIL-258): it bumps `version` and clears the sign-off but leaves
159
+ `status` alone. Either way the doc is not ratified until `em slice ratify --by <name>` records
160
+ the new sign-off. A `ready-to-implement` doc with no `ratifiedBy` is already awaiting that
161
+ sign-off and refuses a second `reratify`; a `draft`/`reviewed` doc is simply edited.
148
162
  3. Render the slice's own diagram: `em render <model>.em --slice "<slice name>" -o
149
163
  slices/<slice-name>.svg` (kebab-case, matching the doc's filename and the `![Diagram]` stub
150
164
  `em slice new` already wrote) — redraws just this slice in its own canonical pattern shape.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: event-modeling-discover
3
- em-version: 1.13.0
3
+ em-version: 1.13.1
4
4
  description: >-
5
5
  Use when starting a brand-new event model from scratch — greenfield discovery: brainstorming
6
6
  past-tense events, storyboarding the happy path, finding the commands and read models — or when
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: event-modeling-implement
3
- em-version: 1.13.0
3
+ em-version: 1.13.1
4
4
  description: >-
5
5
  Use when building a single ratified event-modeling slice (status: ready-to-implement) into
6
6
  merged, tested code — the one phase where the agent builds rather than facilitates. Gates on
@@ -21,11 +21,14 @@ land a one-time foundation PR holding every model event (plus the shared interfa
21
21
  slices only ever import contracts, never invent or reach into a sibling's; build in dependency
22
22
  order from `em query upstream`, not timeline order; treat the slice doc as
23
23
  the spec (read-only, except the merge-time `status`/`implementedIn` flip); implement exactly one
24
- slice doc per PR — a `covers:` doc's two keys ship together in that one PR, an `again` view
25
- instance gets its own; ship the endpoint a
24
+ slice doc per PR — a `covers:` doc's two keys ship together in that one PR, and an `again` view
25
+ instance is a continuation of its originating slice (no doc, status, or PR of its own — it
26
+ ships in the originating doc's PR); ship the endpoint a
26
27
  `ui`-triggered command or `ui`-consumed view obligates, and surface — never invent — one the
27
28
  model doesn't show; surface every gap to the user instead of deciding it silently; cover every
28
- `INV-<MNEMONIC>-n` and every scenario with tests; in spec-kit projects, allocate via
29
+ `INV-<MNEMONIC>-n` and every scenario with tests, proving the citations before merge with
30
+ `em coverage <model>.em --slice <key> --tests <dir> --strict` (the default form skips a
31
+ `ready-to-implement` slice); in spec-kit projects, allocate via
29
32
  em-sdd-bridge (redirect mode) and never run `/speckit.specify`.
30
33
 
31
34
  **Gate: no constitution, no first slice.** The constitution is the project's ratified house rules
@@ -157,6 +157,12 @@ undocumented ordering, a contradiction with adjacent code. The discipline:
157
157
  your recommendation. The human resolves it — at the model, where the resolution lands as an
158
158
  answered open question or a small ratified delta alongside your fix, so the decision is
159
159
  recorded instead of buried in an implementation diff.
160
+ - **How a delta is ratified on a doc that never shipped** (it is `ready-to-implement` with
161
+ `ratifiedBy` set): once the human has answered, the doc changes by `em slice reratify
162
+ <model>.em <slice-key>` (bumps `version:`, clears the old sign-off, leaves `status` alone),
163
+ the answer is written into the doc, and the human re-signs with `em slice ratify <model>.em
164
+ <slice-key> --by <name>`. That is the human's step, not yours — you never run `ratify`, and
165
+ the doc is not ratified again until they do; resume the build after that.
160
166
  - **Never edit the ratified doc to record your own answer**, and never quietly pick a behavior
161
167
  a business person could have an opinion on. Silent divergence is the failure mode the whole
162
168
  conformance loop exists to catch — don't manufacture it.
@@ -183,8 +189,14 @@ or seem small — see §10.
183
189
  - The PR description cites exactly one slice doc (plus its `covers:` keys, if any) and lists
184
190
  that doc's invariants alongside the tests that cover them.
185
191
  - Every `INV-<MNEMONIC>-n` invariant has at least one test that cites its ID — checked mechanically by
186
- `em coverage <model>.em --tests <dir>` (MIL-130); run it (add `--strict` in CI) rather than
187
- eyeballing citations by hand.
192
+ `em coverage <model>.em --slice <slice-key> --tests <dir> --strict` (MIL-130, MIL-255); run it
193
+ before merge rather than eyeballing citations by hand. `--slice` is what makes this check the
194
+ slice under build: the default form, `em coverage <model>.em --tests <dir>`, counts only slices
195
+ already flipped to `implemented` (MIL-207), and your slice is still `ready-to-implement` until
196
+ the §6 flip — so the default form reports it `inScope: false`, checks nothing, and exits 0. It
197
+ is a regression check for shipped slices, not the definition-of-done check. (`--include-ready`
198
+ is no substitute: it counts every ratified slice, so `--strict` fails on slices nobody has
199
+ started.) A continuation key resolves to its originating slice's doc. If it exits 1 with "not in scope", the slice's doc is not `ready-to-implement`/`implemented` — nothing was checked, so stop and surface it rather than treating the run as a pass.
188
200
  - Every scenario in `## Scenarios (Given / When / Then)` exists as a passing test; rejection
189
201
  scenarios assert the doc's named rejection reason.
190
202
  - Alternate/error flows (idempotency included) are covered by tests.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: event-modeling-review
3
- em-version: 1.13.0
3
+ em-version: 1.13.1
4
4
  description: >-
5
5
  Use when starting em's live browser viewer (`em watch --serve`) so a team can watch a model
6
6
  update in real time, or facilitating a SCHEDULED stakeholder walkthrough that steps through
@@ -61,11 +61,11 @@ em slice mark-implemented <file> <slice-key> <pr-url> # flip a slice doc
61
61
  em slice review <file> <slice-key> # flip a slice doc's frontmatter to `status: reviewed` and record `reviewedBy:`/`reviewedOn:` — the FIRST of the two human gates (MIL-201, docs/process.md#the-slice-lifecycle-gates): the room walked this slice and every open question it raised is resolved. Ratification is a separate, later gate (`em slice ratify`). Legal from `status: draft`; idempotent on the same --by/--on pair; refuses to overwrite a different one already recorded; refuses a doc already `ready-to-implement`/`implemented`; never touches `version:` or the doc body
62
62
  em slice review <file> <slice-key> --by <name> # the reviewer's (or facilitator's) name
63
63
  em slice review <file> <slice-key> --on <date> # review date, YYYY-MM-DD (default: today, local date)
64
- em slice ratify <file> <slice-key> # flip a slice doc's frontmatter to `status: ready-to-implement` and record `ratifiedBy:`/`ratifiedOn:` — the handoff sign-off (MIL-165, docs/process.md#the-slice-lifecycle-gates) that makes who ratified, and when, a first-class recorded fact. Refuses a doc that never passed the review gate (`em slice review`) unless --skip-review is passed. Idempotent on the same --by/--on pair; refuses to overwrite a different one already recorded; never touches `version:` or the doc body
64
+ em slice ratify <file> <slice-key> # flip a slice doc's frontmatter to `status: ready-to-implement` and record `ratifiedBy:`/`ratifiedOn:` — the handoff sign-off (MIL-165, docs/process.md#the-slice-lifecycle-gates) that makes who ratified, and when, a first-class recorded fact. The review gate is a check on the doc's current `status:`, not on whether `reviewedBy:`/`reviewedOn:` are populated: a doc at `reviewed` or `ready-to-implement` passes (the latter is where `em slice reratify` leaves a doc, so the follow-up ratify needs no --skip-review); any other status — a `draft` that never went through `em slice review` — is refused unless --skip-review is passed. Idempotent on the same --by/--on pair; refuses to overwrite a different one already recorded; never touches `version:` or the doc body
65
65
  em slice ratify <file> <slice-key> --by <name> # the ratifier's name
66
66
  em slice ratify <file> <slice-key> --on <date> # ratification date, YYYY-MM-DD (default: today, local date)
67
67
  em slice ratify <file> <slice-key> --skip-review # ratify without a recorded review — prints a loud notice on stderr
68
- em slice reratify <file> <slice-key> # bump `version:` and flip a shipped slice doc's frontmatter back to `status: ready-to-implement` — the re-ratification mechanical edit (MIL-161, mirrors `em slice mark-implemented`). Only applies to a doc at `status: implemented`; clears any stale `ratifiedBy:`/`ratifiedOn:`/`reviewedBy:`/`reviewedOn:` (they describe the PRIOR version's review and sign-off) so a follow-up `em slice ratify --by` applies cleanly — and needs no fresh review; never touches `implementedIn:` or the doc body
68
+ em slice reratify <file> <slice-key> # bump `version:` and flip a shipped slice doc's frontmatter back to `status: ready-to-implement` — the re-ratification mechanical edit (MIL-161, mirrors `em slice mark-implemented`). Applies to a doc at `status: implemented`, or (MIL-258) to a `ready-to-implement` doc that is ratified but not yet shipped — there it bumps `version:` and clears the sign-off but leaves `status:` alone; a `ready-to-implement` doc with no `ratifiedBy:` refuses (awaiting `em slice ratify --by`). Clears any stale `ratifiedBy:`/`ratifiedOn:`/`reviewedBy:`/`reviewedOn:` (they describe the PRIOR version's review and sign-off) so a follow-up `em slice ratify --by` applies cleanly — and needs no fresh review; never touches `implementedIn:` or the doc body
69
69
  em slice conform <file> <slice-key> # record per-slice-per-version conformance certification: sets `conformedVersion:`/`conformedAt:`/`conformedOn:` on a slice doc (MIL-214) — the fact `driftSignal: in-sync` now depends on. Legal only for `status: implemented` with an `implementedIn:` link. Idempotent on the same (version, --at) pair; a different --at simply overwrites (a later re-certification is normal — there's no way for em to tell 'later' from 'earlier' for an arbitrary revision string, so there's no --force to reach for). Refuses when the newest conformance/*-findings.json matching --at still has an unruled finding in scope for this slice; --skip-findings-check overrides with a loud notice.
70
70
  em slice conform <file> <slice-key> --at <rev> # the target-repo revision this certification sweep diffed against
71
71
  em slice conform <file> <slice-key> --on <date> # certification date, YYYY-MM-DD (default: today, local date)
@@ -123,8 +123,9 @@ em ledger <file> --from <rev> # baseline revisio
123
123
  em ledger <file> --to <rev> # compare revision (default: current working tree)
124
124
  em ledger <file> --waive <slice-key> # excuse a doc-content-without-version-bump finding for this slice key (repeatable; MIL-185, see docs/cli.md) — never waives a version regression or bump-without-content-change
125
125
  em ledger <file> --json # print a JSON document instead of the text report (see docs/cli.md)
126
- em coverage <file> # check that every INV-* invariant ID cited in an implemented slice doc is cited by a test under --tests <dir> (MIL-130/MIL-207) — mechanizes reference/implement.md's definition-of-done citation check; advisory by default, --strict for CI; --include-ready also counts ready-to-implement docs (forward-looking report); a continuation slice (an `again` view instance with no doc of its own, MIL-208) is excluded from the report — its invariants, if any, live in the originating slice's own doc
126
+ em coverage <file> # check that every INV-* invariant ID cited in an implemented slice doc is cited by a test under --tests <dir> (MIL-130/MIL-207) — mechanizes reference/implement.md's definition-of-done citation check; advisory by default, --strict for CI; --include-ready also counts ready-to-implement docs (forward-looking report); a continuation slice (an `again` view instance with no doc of its own, MIL-208) is excluded from the report — its invariants, if any, live in the originating slice's own doc; --slice <key> scopes the report to one slice whatever its status (MIL-255), the pre-merge definition-of-done check
127
127
  em coverage <file> --tests <dir> # directory to scan recursively for test files citing invariant IDs
128
+ em coverage <file> --slice <key> # only this slice (export key), whether ready-to-implement or implemented — no --include-ready needed; --strict then fails on this slice's uncited invariants, or if the slice is not in scope (draft/reviewed/unbound: nothing checked) (MIL-255)
128
129
  em coverage <file> --strict # exit non-zero if any invariant ID has zero citations (CI)
129
130
  em coverage <file> --include-ready # also count ready-to-implement docs, not just implemented (MIL-207)
130
131
  em coverage <file> --json # print a JSON document instead of the text report (see docs/cli.md)
@@ -188,11 +189,11 @@ em skill check [path] # check the vendor
188
189
  em skill check [path] --json # print a JSON document instead of the text report (see docs/cli.md)
189
190
  em ci init <model> # install .github/workflows/em-ci.yml (PR gates: em validate, em slice index --check, em coverage --strict, em ledger, em skill check, em glossary --fail-on-conflicts, plus a push-triggered status-badge rebuild) and em-conform.yml (scheduled, advisory-only conformance cadence) — same install discipline as `em skill install`: marker-delimited, idempotent, --check for CI self-verification (MIL-166, see docs/ci.md)
190
191
  em ci init <model> --tests <dir> # test directory the coverage/status steps scan for INV-* citations
191
- em ci init <model> -f, --force # replace an existing workflow file that has no GENERATED markers
192
+ em ci init <model> -f, --force # replace an existing workflow file that has no GENERATED markers, or a managed block generated for a different model
192
193
  em ci init <model> --check # verify both files match the current preset; exit non-zero on drift without writing (CI)
193
194
  em upgrade <file> # bring a model repo authored under an older em (1.6 forward) up to the installed version: an ordered list of mechanical steps (skill bundle, reaction shape, state-file bullets, generated CI blocks, constitution scaffold) plus a human list of things no command can safely decide by itself (MIL-219, see docs/upgrading.md). Dry-run by default; --apply makes one git commit per applicable step, refusing on a dirty working tree
194
195
  em upgrade <file> --apply # apply every applicable mechanical step, one git commit each, then a final `Em version:` commit
195
- em upgrade <file> --check # exit non-zero only on a hard incompatibility (unparseable state file, an un-migratable .em shape) — writes nothing; what CI runs
196
+ em upgrade <file> --check # exit non-zero only on a hard incompatibility (an existing but unparseable state file, an un-migratable .em shape) — writes nothing; what CI runs; the final line says why
196
197
  em upgrade <file> --json # print a JSON document instead of text (dry-run/--check only, never with --apply)
197
198
  ```
198
199
  <!-- GENERATED:cli:end -->
@@ -398,6 +398,15 @@ frontmatter-coherence check (MIL-85) deliberately never flags this combination
398
398
  `status: implemented` with no `implementedIn` link at all is checkable incoherence; see
399
399
  [validation.md#frontmatter-coherence](https://github.com/milehimikey/em/blob/main/docs/validation.md#frontmatter-coherence).
400
400
 
401
+ **An unshipped version has nothing to flip back** (MIL-258). A ratified doc that has not shipped
402
+ yet (`status: ready-to-implement` with `ratifiedBy:` set) changes the same way: `em slice
403
+ reratify` bumps `version:` and clears `ratifiedBy`/`ratifiedOn`/`reviewedBy`/`reviewedOn`, but
404
+ leaves `status` at `ready-to-implement` (and any `implementedIn` as it was — an absent one stays
405
+ absent). This is the path for an answered gap mid-build. In both cases the new version is not
406
+ ratified until `em slice ratify --by <name>` records the sign-off. A `ready-to-implement` doc with
407
+ no `ratifiedBy` is awaiting that sign-off, so a second `reratify` refuses rather than
408
+ double-bump; `draft`/`reviewed` docs are not ratified and are simply edited.
409
+
401
410
  Pair a re-ratification with a `## Delta` section (see
402
411
  [Delta section: grammar and lifecycle](#delta-section-grammar-and-lifecycle) above) recording
403
412
  the ratified change in typed operation blocks, so it's reviewable without opening git.
@@ -34,7 +34,25 @@ export type CiFileStatus = {
34
34
  } | {
35
35
  kind: "would-replace";
36
36
  content: string;
37
+ } | {
38
+ kind: "other-model";
39
+ previous: string;
40
+ } | {
41
+ kind: "replace-model";
42
+ content: string;
43
+ previous: string;
37
44
  };
45
+ /**
46
+ * Which model an existing managed block was generated for, read from the block's own content
47
+ * (MIL-256). Deliberately content-derived rather than a new marker line: blocks written by em
48
+ * 1.13.0 and earlier carry no machine-readable model, but every one of them bakes the model into
49
+ * the per-model `run:` lines (em-ci.yml: `slice index "<model>" --check`; em-conform.yml:
50
+ * `MODEL_DIR: <dir>`). Neither pattern includes the `npx @milehimikey/em@<ver>` pin, so a
51
+ * version difference can never read as a different model. Returns null when the block was
52
+ * hand-edited past recognition - callers then treat it as the same model (the conservative,
53
+ * pre-MIL-256 behavior) rather than refusing on a guess.
54
+ */
55
+ export declare function managedBlockModel(markerName: string, blockBody: string): string | null;
38
56
  /**
39
57
  * Decide what to do with one generated file: create it if missing, patch the managed block if
40
58
  * the marker pair is present, or (without `force`) leave an existing unmarked file alone. Pure
@@ -44,6 +62,12 @@ export type CiFileStatus = {
44
62
  * marker-wrapped body) — written verbatim for `create`/`would-replace`. `managedBody` is just
45
63
  * the text between the markers, reused to patch an existing marked file in place without
46
64
  * touching whatever a repo added around it.
65
+ *
66
+ * MIL-256 (#174): the managed block is single-model (multi-model is MIL-233). A marked file
67
+ * whose block was generated for a DIFFERENT model than `managedBody` is `other-model` (refused)
68
+ * unless `force`, then `replace-model`. The same model with any other difference (version pin,
69
+ * old text) stays `stale`, exactly as before. `em upgrade`'s ci-block step re-derives the model
70
+ * from the existing file itself, so it only ever plans the same model.
47
71
  */
48
72
  export declare function planCiFile(path: string, generated: string, managedBody: string, markerName: string, force: boolean): CiFileStatus;
49
73
  export declare function applyCiFile(path: string, status: CiFileStatus): void;
@@ -25,7 +25,7 @@
25
25
  // check` as its own gate instead of silently overwriting").
26
26
  import { existsSync, readFileSync, writeFileSync } from "node:fs";
27
27
  import { dirname, join } from "node:path";
28
- import { applyMarker, markerPair } from "../util/markers.js";
28
+ import { applyMarker, markerPair, markerRegex } from "../util/markers.js";
29
29
  export const CI_WORKFLOW_MARKER = "em-ci";
30
30
  export const CONFORM_WORKFLOW_MARKER = "em-conform";
31
31
  const CI_WORKFLOW_RELPATH = join(".github", "workflows", "em-ci.yml");
@@ -107,7 +107,7 @@ export function ciManagedBody(model, testsDir, emVersion) {
107
107
  with:
108
108
  node-version: 20
109
109
  - name: Check invariant test coverage
110
- # Counts INV-* IDs in \`implemented\` slice docs only (MIL-207) — a ready-to-implement
110
+ # Counts INV-* IDs in \`implemented\` slice docs only (MIL-207) - a ready-to-implement
111
111
  # doc has nothing yet to cite it, so this job is green on a fresh scaffold and on a
112
112
  # doc-only ratification PR. Pass --include-ready for the older, forward-looking report.
113
113
  run: ${em} coverage "${model}" --tests "${testsDir}" --strict
@@ -140,11 +140,11 @@ export function ciManagedBody(model, testsDir, emVersion) {
140
140
  if [ -d .claude/skills/event-modeling ]; then
141
141
  ${em} skill check
142
142
  else
143
- echo "no vendored skill at .claude/skills/event-modeling — skipping (run \`em skill install\` to opt in)"
143
+ echo "no vendored skill at .claude/skills/event-modeling - skipping (run em skill install to opt in)"
144
144
  fi
145
145
 
146
146
  upgrade-check:
147
- name: "em upgrade --check (advisory — hard incompatibilities only, MIL-219)"
147
+ name: "em upgrade --check (advisory - hard incompatibilities only, MIL-219)"
148
148
  if: github.event_name == 'pull_request'
149
149
  runs-on: ubuntu-latest
150
150
  steps:
@@ -156,7 +156,7 @@ export function ciManagedBody(model, testsDir, emVersion) {
156
156
  node-version: 20
157
157
  - name: Check for hard upgrade incompatibilities
158
158
  # Advisory: exits non-zero ONLY on a hard incompatibility (an unparseable state file, an
159
- # old .em shape em migrate itself refuses) — never on the ordinary "some mechanical
159
+ # old .em shape em migrate itself refuses) - never on the ordinary "some mechanical
160
160
  # steps are applicable" case. See docs/upgrading.md.
161
161
  run: ${em} upgrade "${model}" --check
162
162
 
@@ -170,10 +170,12 @@ export function ciManagedBody(model, testsDir, emVersion) {
170
170
  with:
171
171
  node-version: 20
172
172
  - name: Check glossary consistency across models
173
- run: ${em} glossary $(git ls-files '*.em') --fail-on-conflicts
173
+ run: |
174
+ mapfile -t models < <(git ls-files '*.em')
175
+ ${em} glossary "\${models[@]}" --fail-on-conflicts
174
176
 
175
177
  status-badge:
176
- name: rebuild status badge (advisory — publish only, never a gate)
178
+ name: rebuild status badge (advisory - publish only, never a gate)
177
179
  if: github.event_name == 'push'
178
180
  runs-on: ubuntu-latest
179
181
  permissions:
@@ -198,14 +200,14 @@ export function ciManagedBody(model, testsDir, emVersion) {
198
200
  git push`;
199
201
  }
200
202
  function ciWorkflowHeader(model, emVersion) {
201
- return `# Generated once by \`em ci init ${model}\` (em ${emVersion}) — docs/ci.md
203
+ return `# Generated once by \`em ci init ${model}\` (em ${emVersion}) - docs/ci.md
202
204
  #
203
205
  # This file is yours from here: edit it, add jobs, remove ones you don't want. The content
204
206
  # between the GENERATED:${CI_WORKFLOW_MARKER} markers below is what a future \`em ci init\`
205
- # (e.g. after upgrading em) refreshes in place — add your own jobs above or below the markers,
207
+ # (e.g. after upgrading em) refreshes in place - add your own jobs above or below the markers,
206
208
  # at the same indent under \`jobs:\`, and they survive a re-run untouched. Every gate here fails
207
209
  # the PR the same way any other required check does; the status-badge job only ever publishes.
208
- # \`em ci init ${model} --check\` reports drift in the managed block — advisory unless you wire
210
+ # \`em ci init ${model} --check\` reports drift in the managed block - advisory unless you wire
209
211
  # it into a gate yourself (docs/ci.md).
210
212
  name: em ci
211
213
 
@@ -246,7 +248,7 @@ export function conformManagedBody(model, emVersion) {
246
248
  node-version: 20
247
249
 
248
250
  - name: Note reports already present
249
- run: ls "$MODEL_DIR"/conformance/*-report.md 2>/dev/null | sort > /tmp/reports-before
251
+ run: find "$MODEL_DIR/conformance" -maxdepth 1 -name '*-report.md' 2>/dev/null | sort > /tmp/reports-before
250
252
 
251
253
  - name: Run conform phase
252
254
  run: |
@@ -259,10 +261,10 @@ export function conformManagedBody(model, emVersion) {
259
261
 
260
262
  - name: Post report
261
263
  run: |
262
- ls "$MODEL_DIR"/conformance/*-report.md 2>/dev/null | sort > /tmp/reports-after
264
+ find "$MODEL_DIR/conformance" -maxdepth 1 -name '*-report.md' 2>/dev/null | sort > /tmp/reports-after
263
265
  report=$(comm -13 /tmp/reports-before /tmp/reports-after | tail -1)
264
266
  if [ -z "$report" ]; then
265
- echo "the run produced no new report — nothing to post"
267
+ echo "the run produced no new report - nothing to post"
266
268
  exit 0
267
269
  fi
268
270
  gh issue create --title "Model conformance report $(date +%F)" \\
@@ -273,9 +275,9 @@ export function conformManagedBody(model, emVersion) {
273
275
  MODEL_DIR: ${modelDir}`;
274
276
  }
275
277
  function conformWorkflowHeader(model, emVersion) {
276
- return `# Generated once by \`em ci init ${model}\` (em ${emVersion}) — docs/ci.md#conformance-cadence-advisory
278
+ return `# Generated once by \`em ci init ${model}\` (em ${emVersion}) - docs/ci.md#conformance-cadence-advisory
277
279
  #
278
- # This file is yours from here: edit it freely. It is advisory-only by construction — the job
280
+ # This file is yours from here: edit it freely. It is advisory-only by construction - the job
279
281
  # never fails the build on drift (findings become a GitHub issue for a human to ratify), and
280
282
  # the state file's \`Last conformance:\` marker only advances when a human ratifies the run's
281
283
  # outcome locally and commits that update. Resist wiring this to every push; cadence, not
@@ -298,6 +300,41 @@ export function buildConformWorkflowFile(model, emVersion) {
298
300
  const { start, end } = markerPair(CONFORM_WORKFLOW_MARKER, "hash");
299
301
  return `${conformWorkflowHeader(model, emVersion)}${start}\n${conformManagedBody(model, emVersion)}\n${end}\n`;
300
302
  }
303
+ /**
304
+ * Which model an existing managed block was generated for, read from the block's own content
305
+ * (MIL-256). Deliberately content-derived rather than a new marker line: blocks written by em
306
+ * 1.13.0 and earlier carry no machine-readable model, but every one of them bakes the model into
307
+ * the per-model `run:` lines (em-ci.yml: `slice index "<model>" --check`; em-conform.yml:
308
+ * `MODEL_DIR: <dir>`). Neither pattern includes the `npx @milehimikey/em@<ver>` pin, so a
309
+ * version difference can never read as a different model. Returns null when the block was
310
+ * hand-edited past recognition - callers then treat it as the same model (the conservative,
311
+ * pre-MIL-256 behavior) rather than refusing on a guess.
312
+ */
313
+ export function managedBlockModel(markerName, blockBody) {
314
+ if (markerName === CONFORM_WORKFLOW_MARKER) {
315
+ const m = /^\s*MODEL_DIR: (.+?)\s*$/m.exec(blockBody);
316
+ return m ? m[1] : null;
317
+ }
318
+ const m = /\bslice index "([^"]*)" --check\b/.exec(blockBody);
319
+ return m ? m[1] : null;
320
+ }
321
+ function existingBlockBody(content, markerName) {
322
+ const m = markerRegex(markerName, "hash").exec(content);
323
+ return m ? m[2] : null;
324
+ }
325
+ /** `--force` over another model's block also retargets the generated header's own wording
326
+ * (`em ci init <model>` on `#` comment lines above the start marker) at the new model, taken
327
+ * from the freshly generated header. Only those exact generated phrasings are touched; a
328
+ * header the repo reworded, and everything below the start marker, is left alone. */
329
+ function retargetHeader(content, generated, markerName) {
330
+ const startLine = markerPair(markerName, "hash").start;
331
+ const at = content.indexOf(startLine);
332
+ const nextModel = /^#.*`em ci init ([^ `]+)/m.exec(generated)?.[1];
333
+ if (at < 0 || !nextModel)
334
+ return content;
335
+ const head = content.slice(0, at).replace(/^(#.*`em ci init )([^ `]+)/gm, (_w, pre) => `${pre}${nextModel}`);
336
+ return head + content.slice(at);
337
+ }
301
338
  /**
302
339
  * Decide what to do with one generated file: create it if missing, patch the managed block if
303
340
  * the marker pair is present, or (without `force`) leave an existing unmarked file alone. Pure
@@ -307,6 +344,12 @@ export function buildConformWorkflowFile(model, emVersion) {
307
344
  * marker-wrapped body) — written verbatim for `create`/`would-replace`. `managedBody` is just
308
345
  * the text between the markers, reused to patch an existing marked file in place without
309
346
  * touching whatever a repo added around it.
347
+ *
348
+ * MIL-256 (#174): the managed block is single-model (multi-model is MIL-233). A marked file
349
+ * whose block was generated for a DIFFERENT model than `managedBody` is `other-model` (refused)
350
+ * unless `force`, then `replace-model`. The same model with any other difference (version pin,
351
+ * old text) stays `stale`, exactly as before. `em upgrade`'s ci-block step re-derives the model
352
+ * from the existing file itself, so it only ever plans the same model.
310
353
  */
311
354
  export function planCiFile(path, generated, managedBody, markerName, force) {
312
355
  if (!existsSync(path))
@@ -316,10 +359,20 @@ export function planCiFile(path, generated, managedBody, markerName, force) {
316
359
  if (updated === null) {
317
360
  return force ? { kind: "would-replace", content: generated } : { kind: "missing-markers" };
318
361
  }
319
- return updated === original ? { kind: "ok", content: original } : { kind: "stale", content: updated, current: original };
362
+ if (updated === original)
363
+ return { kind: "ok", content: original };
364
+ const existing = existingBlockBody(original, markerName);
365
+ const previous = existing === null ? null : managedBlockModel(markerName, existing);
366
+ const next = managedBlockModel(markerName, managedBody);
367
+ if (previous !== null && next !== null && previous !== next) {
368
+ if (!force)
369
+ return { kind: "other-model", previous };
370
+ return { kind: "replace-model", content: retargetHeader(updated, generated, markerName), previous };
371
+ }
372
+ return { kind: "stale", content: updated, current: original };
320
373
  }
321
374
  export function applyCiFile(path, status) {
322
- if (status.kind === "create" || status.kind === "stale" || status.kind === "would-replace") {
375
+ if (status.kind === "create" || status.kind === "stale" || status.kind === "would-replace" || status.kind === "replace-model") {
323
376
  writeFileSync(path, status.content, "utf8");
324
377
  }
325
378
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ciInit.js","sourceRoot":"","sources":["../../src/cli/ciInit.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,wFAAwF;AACxF,2FAA2F;AAC3F,4FAA4F;AAC5F,yFAAyF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QACrD,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,cAAc,CAAC,OAAO,EAAE,SAAS,EAAE,UAAU,CAAC,EAAE,QAAQ,EAAE,CAAC;IACtG,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;AAChE,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,IAAY,EAAE,MAAoB;IAC5D,IAAI,MAAM,CAAC,IAAI,KAAK,QAAQ,IAAI,MAAM,CAAC,IAAI,KAAK,OAAO,IAAI,MAAM,CAAC,IAAI,KAAK,eAAe,IAAI,MAAM,CAAC,IAAI,KAAK,eAAe,EAAE,CAAC;QAC9H,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC9C,CAAC;AACH,CAAC"}
@@ -86,7 +86,21 @@ export interface ScopedSlice {
86
86
  * has exactly one answer everywhere it's asked (MIL-207: don't fork the leniency logic per
87
87
  * consumer). `includeReady` selects `IN_SCOPE_STATUSES_WITH_READY` over the MIL-207 default.
88
88
  */
89
- export declare function resolveScopedSlices(model: NormalizedModel, refs: RefsResult, baseDir: string, includeReady: boolean): ScopedSlice[];
89
+ export declare function resolveScopedSlices(model: NormalizedModel, refs: RefsResult, baseDir: string, includeReady: boolean, onlyKey?: string): ScopedSlice[];
90
+ /** Result of resolving a `--slice <key>` argument (MIL-255). */
91
+ export interface CoverageSliceTarget {
92
+ /** The slice key the report is scoped to: the requested key, or — for a continuation key
93
+ * (MIL-208) — the ORIGINATING slice's key, since a continuation has no doc of its own. */
94
+ key: string;
95
+ /** The originating slice's key when the requested key was a continuation, else null — same
96
+ * field `em validate --slice-ready` reports (sliceReadyValidate.ts). */
97
+ continuationOf: string | null;
98
+ }
99
+ /** Resolve `--slice <key>` against the model's export keys (same convention as `em export
100
+ * --slice` and `em validate --slice-ready`). Null when no slice has that key — the caller turns
101
+ * that into an error, never an empty (vacuously passing) report. A continuation key resolves to
102
+ * its originating slice (MIL-208), whose doc carries the invariants. */
103
+ export declare function resolveCoverageSliceKey(model: NormalizedModel, refs: RefsResult, key: string): CoverageSliceTarget | null;
90
104
  /**
91
105
  * Assemble the full coverage report: for every slice in the model, resolve its doc-join/in-scope
92
106
  * status (`resolveScopedSlices`), extract invariant IDs for in-scope slices, then scan `testsDir`
@@ -98,4 +112,4 @@ export declare function resolveScopedSlices(model: NormalizedModel, refs: RefsRe
98
112
  * this with a `testsDir` that doesn't exist yet is safe in that case (see callers' leniency
99
113
  * check via `resolveScopedSlices` before this).
100
114
  */
101
- export declare function buildCoverageReport(model: NormalizedModel, refs: RefsResult, baseDir: string, testsDir: string, includeReady?: boolean): CoverageReport;
115
+ export declare function buildCoverageReport(model: NormalizedModel, refs: RefsResult, baseDir: string, testsDir: string, includeReady?: boolean, onlyKey?: string): CoverageReport;
@@ -28,6 +28,7 @@
28
28
  // same reason, since that direction is a substring search rather than a token match.
29
29
  import { readFileSync } from "node:fs";
30
30
  import { join } from "node:path";
31
+ import { continuationOf } from "../model/continuation.js";
31
32
  import { resolveSliceDocJoin } from "../catalog/docJoin.js";
32
33
  import { readSliceDoc } from "../catalog/readSliceDoc.js";
33
34
  import { walkDir } from "../util/walkDir.js";
@@ -175,11 +176,19 @@ export function scanTestCitations(testsDir, ids) {
175
176
  * has exactly one answer everywhere it's asked (MIL-207: don't fork the leniency logic per
176
177
  * consumer). `includeReady` selects `IN_SCOPE_STATUSES_WITH_READY` over the MIL-207 default.
177
178
  */
178
- export function resolveScopedSlices(model, refs, baseDir, includeReady) {
179
- const scopeStatuses = inScopeStatuses(includeReady);
179
+ export function resolveScopedSlices(model, refs, baseDir, includeReady, onlyKey) {
180
+ // MIL-255: `--slice <key>` scopes the report to one slice, whatever its status — a slice under
181
+ // build is `ready-to-implement` until the merge-time flip, so the MIL-207 default (implemented
182
+ // only) would report `inScope: false` and check nothing, while `--include-ready` would widen to
183
+ // every ratified-but-unstarted slice. Scoped, both ready-to-implement and implemented count, so
184
+ // `--include-ready` is not needed (and is moot) alongside it. `onlyKey` must already be the
185
+ // RESOLVED key (see resolveCoverageSliceKey) — a continuation key never reaches this loop.
186
+ const scopeStatuses = inScopeStatuses(includeReady || onlyKey !== undefined);
180
187
  const result = [];
181
188
  model.slices.forEach((slice, i) => {
182
189
  const key = refs.sliceKeys[i];
190
+ if (onlyKey !== undefined && key !== onlyKey)
191
+ return;
183
192
  const { doc, continuationOf: continuationOfKey } = resolveSliceDocJoin(model, refs, slice, key, baseDir, (id) => refs.refById.get(id));
184
193
  // MIL-208: a continuation slice (an again-view-only slice with no legacy doc of its own)
185
194
  // has nothing of its own to cite — its invariants, if any, live in the ORIGINATING slice's
@@ -192,6 +201,19 @@ export function resolveScopedSlices(model, refs, baseDir, includeReady) {
192
201
  });
193
202
  return result;
194
203
  }
204
+ /** Resolve `--slice <key>` against the model's export keys (same convention as `em export
205
+ * --slice` and `em validate --slice-ready`). Null when no slice has that key — the caller turns
206
+ * that into an error, never an empty (vacuously passing) report. A continuation key resolves to
207
+ * its originating slice (MIL-208), whose doc carries the invariants. */
208
+ export function resolveCoverageSliceKey(model, refs, key) {
209
+ const idx = refs.sliceKeys.indexOf(key);
210
+ if (idx === -1)
211
+ return null;
212
+ const continuation = continuationOf(model, refs, idx);
213
+ return continuation
214
+ ? { key: continuation.sliceKey, continuationOf: continuation.sliceKey }
215
+ : { key, continuationOf: null };
216
+ }
195
217
  /**
196
218
  * Assemble the full coverage report: for every slice in the model, resolve its doc-join/in-scope
197
219
  * status (`resolveScopedSlices`), extract invariant IDs for in-scope slices, then scan `testsDir`
@@ -203,8 +225,8 @@ export function resolveScopedSlices(model, refs, baseDir, includeReady) {
203
225
  * this with a `testsDir` that doesn't exist yet is safe in that case (see callers' leniency
204
226
  * check via `resolveScopedSlices` before this).
205
227
  */
206
- export function buildCoverageReport(model, refs, baseDir, testsDir, includeReady = false) {
207
- const scoped = resolveScopedSlices(model, refs, baseDir, includeReady);
228
+ export function buildCoverageReport(model, refs, baseDir, testsDir, includeReady = false, onlyKey) {
229
+ const scoped = resolveScopedSlices(model, refs, baseDir, includeReady, onlyKey);
208
230
  const allIds = new Set();
209
231
  const withIds = scoped.map(({ key, status, docReason, inScope, docPath }) => {
210
232
  let ids = [];
@@ -1 +1 @@
1
- {"version":3,"file":"coverage.js","sourceRoot":"","sources":["../../src/cli/coverage.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,8FAA8F;AAC9F,iGAAiG;AACjG,6FAA6F;AAC7F,gGAAgG;AAChG,iGAAiG;AACjG,iGAAiG;AACjG,6FAA6F;AAC7F,+FAA+F;AAC/F,sBAAsB;AACtB,EAAE;AACF,8FAA8F;AAC9F,wFAAwF;AACxF,+FAA+F;AAC/F,+FAA+F;AAC/F,+FAA+F;AAC/F,wFAAwF;AACxF,EAAE;AACF,oGAAoG;AACpG,6FAA6F;AAC7F,kGAAkG;AAClG,uFAAuF;AACvF,+FAA+F;AAC/F,+FAA+F;AAC/F,8FAA8F;AAC9F,kGAAkG;AAClG,iGAAiG;AACjG,qFAAqF;AAErF,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C;;;wCAGwC;AACxC,MAAM,CAAC,MAAM,YAAY,GAAG,yCAAyC,CAAC;AAEtE;;;;;;uEAMuE;AACvE,MAAM,oBAAoB,GAAG,4DAA4D,CAAC;AAE1F;;;;;;;;;;;;;;;;oFAgBoF;AACpF,MAAM,kBAAkB,GAAG,sBAAsB,CAAC;AAElD;;;;;;;;aAQa;AACb,MAAM,yBAAyB,GAAG,IAAI,GAAG,CAAC,CAAC,aAAa,CAAC,C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