@milehimikey/em 1.14.2 → 1.16.0

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 (125) hide show
  1. package/.claude/agents/em-implementer.md +12 -2
  2. package/.claude/agents/em-validator.md +2 -1
  3. package/.claude/skills/event-modeling/SKILL.md +3 -3
  4. package/.claude/skills/event-modeling-conform/SKILL.md +1 -1
  5. package/.claude/skills/event-modeling-design/SKILL.md +29 -18
  6. package/.claude/skills/event-modeling-discover/SKILL.md +1 -1
  7. package/.claude/skills/event-modeling-engagement/SKILL.md +60 -56
  8. package/.claude/skills/event-modeling-engagement/reference/engagement.md +13 -19
  9. package/.claude/skills/event-modeling-implement/SKILL.md +3 -3
  10. package/.claude/skills/event-modeling-implement/reference/implement.md +40 -27
  11. package/.claude/skills/event-modeling-review/SKILL.md +13 -3
  12. package/.claude/skills/event-modeling-shared/reference/em-dsl.md +234 -228
  13. package/.claude/skills/event-modeling-shared/reference/operating-principles.md +3 -3
  14. package/.claude/skills/event-modeling-shared/reference/slice-doc-schema.md +69 -27
  15. package/.claude/skills/event-modeling-shared/templates/constitution.md +5 -7
  16. package/.claude-plugin/marketplace.json +2 -2
  17. package/dist/catalog/deferQueue.d.ts +20 -0
  18. package/dist/catalog/deferQueue.js +63 -0
  19. package/dist/catalog/deferQueue.js.map +1 -0
  20. package/dist/catalog/docJoin.d.ts +22 -1
  21. package/dist/catalog/docJoin.js +13 -4
  22. package/dist/catalog/docJoin.js.map +1 -1
  23. package/dist/catalog/docModelConsistencyValidate.js +4 -8
  24. package/dist/catalog/docModelConsistencyValidate.js.map +1 -1
  25. package/dist/catalog/driftSignal.d.ts +16 -12
  26. package/dist/catalog/driftSignal.js +14 -9
  27. package/dist/catalog/driftSignal.js.map +1 -1
  28. package/dist/catalog/sliceDoc.d.ts +51 -0
  29. package/dist/catalog/sliceDoc.js +47 -0
  30. package/dist/catalog/sliceDoc.js.map +1 -1
  31. package/dist/catalog/sliceReadyValidate.js +19 -1
  32. package/dist/catalog/sliceReadyValidate.js.map +1 -1
  33. package/dist/catalog/sliceSections.d.ts +5 -0
  34. package/dist/catalog/sliceSections.js +11 -2
  35. package/dist/catalog/sliceSections.js.map +1 -1
  36. package/dist/cli/conformScope.d.ts +4 -0
  37. package/dist/cli/conformScope.js +2 -2
  38. package/dist/cli/conformScope.js.map +1 -1
  39. package/dist/cli/coverage.js +7 -3
  40. package/dist/cli/coverage.js.map +1 -1
  41. package/dist/cli/defer.d.ts +106 -2
  42. package/dist/cli/defer.js +357 -24
  43. package/dist/cli/defer.js.map +1 -1
  44. package/dist/cli/engagement.d.ts +26 -5
  45. package/dist/cli/engagement.js +55 -28
  46. package/dist/cli/engagement.js.map +1 -1
  47. package/dist/cli/engagementFile.d.ts +2 -0
  48. package/dist/cli/engagementFile.js +5 -3
  49. package/dist/cli/engagementFile.js.map +1 -1
  50. package/dist/cli/findings.d.ts +2 -2
  51. package/dist/cli/findings.js +2 -2
  52. package/dist/cli/frontmatterSurgery.d.ts +3 -3
  53. package/dist/cli/frontmatterSurgery.js +3 -3
  54. package/dist/cli/frontmatterSurgery.js.map +1 -1
  55. package/dist/cli/markImplemented.d.ts +23 -18
  56. package/dist/cli/markImplemented.js +99 -15
  57. package/dist/cli/markImplemented.js.map +1 -1
  58. package/dist/cli/ratify.d.ts +36 -6
  59. package/dist/cli/ratify.js +130 -35
  60. package/dist/cli/ratify.js.map +1 -1
  61. package/dist/cli/review.js +3 -3
  62. package/dist/cli/review.js.map +1 -1
  63. package/dist/cli/revise.d.ts +67 -0
  64. package/dist/cli/revise.js +229 -0
  65. package/dist/cli/revise.js.map +1 -0
  66. package/dist/cli/sliceConform.d.ts +4 -3
  67. package/dist/cli/sliceConform.js +29 -12
  68. package/dist/cli/sliceConform.js.map +1 -1
  69. package/dist/cli/status.d.ts +30 -6
  70. package/dist/cli/status.js +59 -19
  71. package/dist/cli/status.js.map +1 -1
  72. package/dist/cli/upgrade.js +17 -12
  73. package/dist/cli/upgrade.js.map +1 -1
  74. package/dist/cli.js +173 -85
  75. package/dist/cli.js.map +1 -1
  76. package/dist/emit/engagementJson.d.ts +7 -4
  77. package/dist/emit/engagementJson.js +11 -4
  78. package/dist/emit/engagementJson.js.map +1 -1
  79. package/dist/emit/json.d.ts +1 -1
  80. package/dist/emit/json.js +18 -5
  81. package/dist/emit/json.js.map +1 -1
  82. package/dist/emit/statusJson.d.ts +1 -1
  83. package/dist/emit/statusJson.js +6 -1
  84. package/dist/emit/statusJson.js.map +1 -1
  85. package/dist/mcp/server.js +5 -5
  86. package/dist/mcp/server.js.map +1 -1
  87. package/dist/model/continuation.d.ts +11 -1
  88. package/dist/model/continuation.js +29 -0
  89. package/dist/model/continuation.js.map +1 -1
  90. package/dist/model/resolveSlice.d.ts +19 -0
  91. package/dist/model/resolveSlice.js +69 -0
  92. package/dist/model/resolveSlice.js.map +1 -0
  93. package/dist/model/rules.d.ts +8 -0
  94. package/dist/model/rules.js +8 -0
  95. package/dist/model/rules.js.map +1 -1
  96. package/dist/model/sliceDocIndex.d.ts +5 -0
  97. package/dist/model/sliceDocIndex.js +6 -4
  98. package/dist/model/sliceDocIndex.js.map +1 -1
  99. package/dist/model/validate.js +5 -2
  100. package/dist/model/validate.js.map +1 -1
  101. package/dist/parser/parser.js +55 -1
  102. package/dist/parser/parser.js.map +1 -1
  103. package/dist/templates.d.ts +1 -1
  104. package/dist/templates.js +5 -7
  105. package/dist/templates.js.map +1 -1
  106. package/package.json +1 -1
  107. package/plugin/.claude-plugin/plugin.json +2 -2
  108. package/plugin/agents/em-implementer.md +12 -2
  109. package/plugin/agents/em-validator.md +2 -1
  110. package/plugin/shared/reference/em-dsl.md +234 -228
  111. package/plugin/shared/reference/operating-principles.md +3 -3
  112. package/plugin/shared/reference/slice-doc-schema.md +69 -27
  113. package/plugin/shared/templates/constitution.md +5 -7
  114. package/plugin/skills/conform/SKILL.md +1 -1
  115. package/plugin/skills/design/SKILL.md +29 -18
  116. package/plugin/skills/discover/SKILL.md +1 -1
  117. package/plugin/skills/engagement/SKILL.md +60 -56
  118. package/plugin/skills/engagement/reference/engagement.md +13 -19
  119. package/plugin/skills/event-modeling/SKILL.md +3 -3
  120. package/plugin/skills/implement/SKILL.md +3 -3
  121. package/plugin/skills/implement/reference/implement.md +40 -27
  122. package/plugin/skills/review/SKILL.md +13 -3
  123. package/dist/cli/reratify.d.ts +0 -58
  124. package/dist/cli/reratify.js +0 -238
  125. package/dist/cli/reratify.js.map +0 -1
@@ -119,12 +119,12 @@ including sessions started from bare `/event-modeling`.
119
119
  - **Version rule: never bump a draft's `version:` on edit.** A `draft`/`reviewed` doc is edited
120
120
  in place. Check the release state with `em status <model>.em --json`: the model is
121
121
  **pre-release** when its `modelVersion` entry has `design: null` and
122
- `slices.byStatus.implemented === 0`. Pre-release: never run `em slice reratify`; edit
122
+ `slices.byStatus.shipped === 0`. Pre-release: never run `em slice revise`; edit
123
123
  `draft`/`reviewed` docs in place and leave `version:` as it is. A pre-release doc that is
124
124
  already ratified (`ready-to-implement` with `ratifiedBy`) carries a human sign-off: STOP,
125
125
  record the needed change as an open question, and let the ratifier decide. Released (either
126
- condition false): changing an `implemented` or ratified doc goes through `em slice reratify`
127
- (see `event-modeling-design`).
126
+ condition false): changing a shipped or ratified doc goes through `em slice revise`, which
127
+ opens the next version as a `draft` (see `event-modeling-design`).
128
128
  - **Pre-commit check (STOP on any finding).** Stage the session's files, then run both:
129
129
  1. `em system scope --staged` from the repository root. Any `seam-crossing` error → STOP:
130
130
  unstage the other model's files and record a seam change request instead.
@@ -67,8 +67,13 @@ to decide `frontmatter-invalid` without re-deriving frontmatter-shape rules of i
67
67
  | `reviewedOn` | string | `YYYY-MM-DD` | written only by `em slice review` (MIL-201); joined into `em export`'s `slice.doc.reviewedOn` (schema `1.11`) |
68
68
  | `ratifiedBy` | string | free text (typically a person's name) | written only by `em slice ratify` (MIL-165 — see [cli.md](https://github.com/milehimikey/em/blob/main/docs/cli.md#em-slice-ratify-file-slice-key---by-name)); joined into `em export`'s `slice.doc.ratifiedBy` (schema `1.8`) and `em slice index`'s Ratified by column |
69
69
  | `ratifiedOn` | string | `YYYY-MM-DD` | written only by `em slice ratify` (MIL-165); joined into `em export`'s `slice.doc.ratifiedOn` (schema `1.8`) |
70
- | `meaningConfirmed` | boolean | `true` | written only by `em slice ratify`/`reratify --meaning-unchanged` (MIL-238 — see [cli.md](https://github.com/milehimikey/em/blob/main/docs/cli.md#em-slice-ratify-file-slice-key---by-name)): the API-first sign-off on a public-touching slice — this version does not change what the public contract means. Joined into `em export`'s `slice.doc.meaningConfirmed` (schema `1.15`; `false` when absent) |
71
- | `contractChange` | string | quoted free text (`contractChange: "<why>"`) | written only by `em slice ratify`/`reratify --contract-change "<why>"` (MIL-238): the API-first sign-off on a public-touching slice — why a consumer must read this change differently. Joined into `em export`'s `slice.doc.contractChange` (schema `1.15`, quotes stripped; `null` when absent) |
70
+ | `ratifiedRef` | string | full commit sha | written only by `em slice ratify` (MIL-284 — see [cli.md](https://github.com/milehimikey/em/blob/main/docs/cli.md#em-slice-ratify-file-slice-key---by-name)) when the model directory is inside a git repository: `HEAD` at ratification, the commit whose tree holds the body that was signed (ratify refuses a doc with uncommitted changes so this holds). Absent when ratified before 1.15 or outside git. Cleared by `em slice reratify`. Joined into `em export`'s `slice.doc.ratifiedRef` (schema `1.16`). Not a target-repo revision: `em slice conform --at` still names that itself |
71
+ | `ratifiedHash` | string | `sha256:<64 hex>` | written only by `em slice ratify` (MIL-284): `sha256` over the doc body (everything after the frontmatter fence, EOLs normalised) — the signed content's identity without git. Cleared by `em slice reratify`. Read by `em validate --slice-ready` (`slice-ready-body-changed-since-ratification`); joined into `em export`'s `slice.doc.ratifiedHash` (schema `1.16`) |
72
+ | `shippedVersion` | integer | positive integer | written only by `em slice mark-implemented` (MIL-284): the doc's `version:` when the merge was recorded. With `shippedRef`/`shippedOn`/`implementedIn`, joined into `em export`'s `slice.doc.shipped` (schema `1.16`). Additive in 1.15 — `status`/`implementedIn` still carry the lifecycle for every reader |
73
+ | `shippedRef` | string | full commit sha | written only by `em slice mark-implemented` (MIL-284): the doc's `ratifiedRef` at merge time, i.e. the ref the shipped version was signed at; absent when the doc had none |
74
+ | `shippedOn` | string | `YYYY-MM-DD` | written only by `em slice mark-implemented` (MIL-284): the local date of the merge record, or `--on <date>` |
75
+ | `meaningConfirmed` | boolean | `true` | written only by `em slice ratify --meaning-unchanged` (MIL-238 — see [cli.md](https://github.com/milehimikey/em/blob/main/docs/cli.md#em-slice-ratify-file-slice-key---by-name)): the API-first sign-off on a public-touching slice — this version does not change what the public contract means. Joined into `em export`'s `slice.doc.meaningConfirmed` (schema `1.15`; `false` when absent) |
76
+ | `contractChange` | string | quoted free text (`contractChange: "<why>"`) | written only by `em slice ratify --contract-change "<why>"` (MIL-238): the API-first sign-off on a public-touching slice — why a consumer must read this change differently. Joined into `em export`'s `slice.doc.contractChange` (schema `1.15`, quotes stripped; `null` when absent) |
72
77
  | `owner` | string | free text (typically a person or team name) | hand-filled — no `em` command writes it; joined into `em export`'s `slice.doc.owner` (schema `1.9`, MIL-171), `em slice index`'s Owner column, and `em status`'s per-slice `owners[]` |
73
78
  | `tracking` | string | free text (typically an external ticket/issue URL) | hand-filled — no `em` command writes it; joined into `em export`'s `slice.doc.tracking` (schema `1.9`, MIL-171) and `em slice index`'s Tracking column. This is the exact field `em-tracker-bridge` reads to find the ticket mirroring this slice — `em` only stores and displays it, it never talks to a tracker itself |
74
79
  | `conformedVersion` | integer | positive integer | written only by `em slice conform` (MIL-214 — see [cli.md](https://github.com/milehimikey/em/blob/main/docs/cli.md#em-slice-conform-file-slice-key---at-rev)): this slice's `version:` at the time a conform sweep last certified it. Joined into `em export`'s `slice.doc.conformedVersion` (schema `1.13`); paired with `version` to compute `slice.doc.driftSignal`'s `"uncertified"` case |
@@ -245,7 +250,7 @@ straight through to the originating slice's own doc, exactly the way a ratified
245
250
  binding resolves a covered slice — same `doc.found`/`status`/`driftSignal`, plus a
246
251
  `continuationOf: <originating-key>` field naming why. `em export`, `em status`, `em coverage`,
247
252
  `em slice index`, `em catalog`, and the render pipeline's Slice Status legend all resolve a
248
- continuation slice this way; `em slice ratify`/`review`/`reratify`/`mark-implemented` and
253
+ continuation slice this way; `em slice ratify`/`review`/`revise`/`mark-implemented` and
249
254
  `em slice new --wire` refuse on one outright, naming the originating slice to act on instead —
250
255
  a continuation slice has no status/ratification of its own to flip.
251
256
 
@@ -482,7 +487,7 @@ prior one — exactly the ambiguity a live, current-version-only section avoids.
482
487
  **Deferral marker (MIL-275).** A question this version will not answer is not left `- [ ]` and
483
488
  not deleted: `em slice defer` checks it and rewrites it as `- [x] <original> — v<current>:
484
489
  <decision>; deferred to v<n> (<date>[, <by>])`. The `deferred to v<n>` marker is what
485
- `em slice reratify` reads: when a bump reaches v<n> it rewrites each such item back to
490
+ `em slice revise` (and `mark-implemented`, which opens v<n> at merge when something is deferred to it) reads: when the doc reaches v<n> it rewrites each such item back to
486
491
  `- [ ] <original>`, so the question must be resolved or re-deferred before `--slice-ready` passes
487
492
  again. The prune rule above does not apply to a deferred item before v<n> (it stays as the
488
493
  record); once reopened it is an ordinary open question.
@@ -497,26 +502,62 @@ actually happened on re-ratification).
497
502
 
498
503
  ## `status` under re-ratification
499
504
 
500
- When a new version is ratified for a slice whose previous version already shipped, `status`
501
- tracks the **current version's** implementation state, not a running "has this ever shipped"
502
- flag. Ratifying v2 on an `implemented` slice flips `status` back to `ready-to-implement`, while
503
- `implementedIn` keeps naming the v1 PR until v2 ships. That deliberate mismatch — version 2,
504
- implemented-link still pointing at v1's work — is not staleness, it's the **drift signal**: a
505
- reader, `em export`'s `slice.doc.driftSignal` (`"unpropagated-delta"`, schema `1.5`, MIL-85), and
506
- the event-modeling skill's `conform` phase all read it the same way — a ratified delta hasn't
507
- shipped yet, not a fresh finding against the still-live v1 code. `em validate`'s
508
- frontmatter-coherence check (MIL-85) deliberately never flags this combination — only
509
- `status: implemented` with no `implementedIn` link at all is checkable incoherence; see
505
+ Since 1.15.0 (MIL-283) two separate facts live in the frontmatter, and every reader knows which
506
+ one it is asking about:
507
+
508
+ - **`status` is the working state** of the doc's current `version:` — `draft`, `reviewed`,
509
+ `ready-to-implement`, `implemented`.
510
+ - **The shipped record is what is in production**: `shippedVersion:`/`shippedRef:`/`shippedOn:`
511
+ (written by `em slice mark-implemented`, MIL-284) together with `implementedIn:`. For a doc
512
+ shipped before 1.15 — no `shippedVersion:` — the read-both rule applies: `status: implemented`
513
+ means "shipped at the current `version:`". The one function that answers "has a version of this
514
+ slice shipped, and which" is `shippedRecordOf()` (`src/catalog/sliceDoc.ts`); `em export`
515
+ publishes its answer as `slice.doc.shipped`.
516
+
517
+ So a shipped slice can be a `draft` again. `em slice revise <key>`
518
+ ([cli.md](https://github.com/milehimikey/em/blob/main/docs/cli.md#em-slice-revise-file-slice-key)) opens v<N+1> as `status: draft`, bumps
519
+ `version:`, clears the prior version's review and sign-off, and leaves `implementedIn`/`shipped*`
520
+ alone — v<N> stays shipped. `em slice mark-implemented` does the same automatically at merge when a
521
+ question was deferred to v<N+1> (`em slice defer`), so known work is on the list the moment the
522
+ previous version lands. Version 2 then takes both human gates like version 1 did: `em slice review
523
+ --by`, then `em slice ratify --by` (which records a fresh `ratifiedRef`/`ratifiedHash`).
524
+
525
+ The deliberate mismatch — `version: 2` open while `implementedIn`/`shippedVersion` still name v1's
526
+ work — is not staleness, it's the **drift signal**: `em export`'s `slice.doc.driftSignal` is
527
+ `"unpropagated-delta"` whenever `version` is past the shipped version (MIL-85/283), and the
528
+ event-modeling skill's `conform` phase reads it as "a delta hasn't shipped yet", not a fresh finding
529
+ against the still-live v1 code. `em validate`'s frontmatter-coherence check (MIL-85) never flags it;
530
+ only a shipped slice with no `implementedIn` link at all is checkable incoherence
531
+ (`implemented-without-link`); see
510
532
  [validation.md#frontmatter-coherence](https://github.com/milehimikey/em/blob/main/docs/validation.md#frontmatter-coherence).
511
533
 
512
- **An unshipped version has nothing to flip back** (MIL-258). A ratified doc that has not shipped
513
- yet (`status: ready-to-implement` with `ratifiedBy:` set) changes the same way: `em slice
514
- reratify` bumps `version:` and clears `ratifiedBy`/`ratifiedOn`/`reviewedBy`/`reviewedOn` (and `meaningConfirmed`/`contractChange`, MIL-238), but
515
- leaves `status` at `ready-to-implement` (and any `implementedIn` as it was — an absent one stays
516
- absent). This is the path for an answered gap mid-build. In both cases the new version is not
517
- ratified until `em slice ratify --by <name>` records the sign-off. A `ready-to-implement` doc with
518
- no `ratifiedBy` is awaiting that sign-off, so a second `reratify` refuses rather than
519
- double-bump; `draft`/`reviewed` docs are not ratified and are simply edited.
534
+ **Which readers decide on the shipped record, not `status`** (MIL-283): `em status`'s
535
+ `byStatus.shipped` count and its conformance scope, `em coverage --strict`'s default scope, `em
536
+ conform-scope` / `em conform-supersede`'s in-scope slices, `em slice conform` (legal when shipped;
537
+ `conformedVersion:` is the **shipped** version), the engagement Ledger's inferred `merged` and its
538
+ outside-upstream hold, `em upgrade`'s pre-release signal, `em slice ratify`'s upstream advisory, and
539
+ `driftSignal`. `byStatus.implemented`, the render/legend colouring and `--slice-ready` still read the
540
+ working `status` — that is what they are about.
541
+
542
+ **A ratified version that never shipped** (`status: ready-to-implement` with `ratifiedBy:` set — a
543
+ gap answered mid-build) is revised the same way: `draft`, `version + 1`, sign-off cleared; the
544
+ ratification of v<N> is withdrawn and nothing shipped, so no shipped record is written. Because that
545
+ withdraws the only implementable version, `em slice revise` **refuses it without `--withdraw`**
546
+ (GH #236).
547
+
548
+ **Questions found against a ratified or shipped version are queued, not written into the body**
549
+ (GH #236). `ratifiedHash` covers the whole body, `## Open Questions` included, so `em slice defer` on
550
+ a `ready-to-implement` + `ratifiedBy:` or `implemented` doc does not edit the doc: it records the
551
+ question in the model's `.event-modeling.md` as queued for `<key>@v<N+1>` (exact bullet shape in
552
+ [cli.md](https://github.com/milehimikey/em/blob/main/docs/cli.md#em-slice-defer-file-slice-key-question)), keeping `ratifiedHash` and `--slice-ready`
553
+ valid. When v<N+1> opens as a draft — `mark-implemented` at merge, or `revise` — each queued item is
554
+ injected into that draft's `## Open Questions` (unchecked, carrying its decision) and the queue is
555
+ cleared. `em export` reports the waiting count as `slice.doc.queuedForNext` (schema `1.17`). **A
556
+ `ready-to-implement` doc with no `ratifiedBy`** is the leftover of a pre-1.15 `reratify` (which
557
+ bumped the version and left the doc unsigned at that status); no command produces it any more and
558
+ `em slice ratify` no longer accepts it — `em slice revise` reopens it as a `draft` at the same
559
+ version, and the normal road follows. `draft`/`reviewed` docs are not ratified and are simply
560
+ edited; `revise` refuses them ("the next version is already open").
520
561
 
521
562
  Pair a re-ratification with a `## Delta` section (see
522
563
  [Delta section: grammar and lifecycle](#delta-section-grammar-and-lifecycle) above) recording
@@ -526,10 +567,11 @@ the ratified change in typed operation blocks, so it's reviewable without openin
526
567
  see [cli.md#em-ledger-file](https://github.com/milehimikey/em/blob/main/docs/cli.md#em-ledger-file)) checks that `version:` and a slice doc's
527
568
  content (body + lineage refs) always change together across two git revisions — a version bump
528
569
  with no real content change, or a content change with no version bump, is a ledger bug.
529
- It **deliberately excludes `status`/`implementedIn`** from what counts as "content" for exactly
530
- the reason this section explains: a re-ratification legitimately flips `status` and leaves
531
- `implementedIn` naming prior work, with no version bump of its own — including either field in
532
- the comparison would flag every ordinary lifecycle transition as a false positive.
570
+ It **deliberately excludes `status`/`implementedIn`** (and the `shipped*` keys) from what counts
571
+ as "content" for exactly the reason this section explains: a lifecycle transition legitimately
572
+ moves `status` and leaves `implementedIn`/`shippedVersion` naming prior work, with no version bump
573
+ of its own — including those fields in the comparison would flag every ordinary lifecycle
574
+ transition as a false positive.
533
575
 
534
576
  ## Unknown keys
535
577
 
@@ -563,7 +605,7 @@ legacy form; they're frontmatter-only from the day they were introduced.
563
605
  - [cli.md](https://github.com/milehimikey/em/blob/main/docs/cli.md#em-render-file) — slice status colors
564
606
  - [cli.md](https://github.com/milehimikey/em/blob/main/docs/cli.md#em-catalog-files) — pattern / doc lookup
565
607
  - [cli.md](https://github.com/milehimikey/em/blob/main/docs/cli.md#em-slice-ratify-file-slice-key---by-name) — `em slice ratify`, the mechanized ratification act (`ratifiedBy`/`ratifiedOn`, schema `1.8`, MIL-165)
566
- - [cli.md](https://github.com/milehimikey/em/blob/main/docs/cli.md#em-slice-reratify-file-slice-key) — `em slice reratify`, the mechanized re-ratification version bump/status flip (MIL-161)
608
+ - [cli.md](https://github.com/milehimikey/em/blob/main/docs/cli.md#em-slice-revise-file-slice-key) — `em slice revise`, which opens the next version as a draft (the successor of `reratify`)
567
609
  - [cli.md](https://github.com/milehimikey/em/blob/main/docs/cli.md#em-export-file) — the `em export` join (`slice.pattern`/`slice.doc`, schema `1.4`, MIL-91), including `owner`/`tracking` (schema `1.9`, MIL-171)
568
610
  - [cli.md](https://github.com/milehimikey/em/blob/main/docs/cli.md#em-diff-old-new) — the `em diff` lineage annotation (schema `1.6`, MIL-84)
569
611
  - [validation.md#lineage](https://github.com/milehimikey/em/blob/main/docs/validation.md#lineage) — `em validate`'s lineage-ref resolution (MIL-84)
@@ -23,9 +23,9 @@ NAMED human and an ISO date, hand-filled at sign-off (no `em` command writes thi
23
23
  unratified, says so, and does not proceed on unilateral style or stack decisions for a first slice.
24
24
 
25
25
  `em status` reports this document as present or absent per model — existence only. em never reads
26
- or validates its content, and the CLI parses nothing here. Three lines are read as plain text by
26
+ or validates its content, and the CLI parses nothing here. Two lines are read as plain text by
27
27
  the engagement skill and its sub-agents, so keep their exact shape: `- **Test command:**` (the
28
- validator), `- **Merge strategy:**` and `- **Agent models:**` (the engagement skill). In a spec-kit
28
+ validator) and `- **Agent models:**` (the engagement skill). In a spec-kit
29
29
  project they merge under the same headings in `.specify/memory/constitution.md`.
30
30
  -->
31
31
 
@@ -120,11 +120,9 @@ it is silent, these apply.
120
120
  amend** — a `covers:` doc ships as one PR for both keys; a read model is one doc, so a later
121
121
  `again` instance is a continuation of the doc that first declared it, not a PR of its own. See
122
122
  the agent guide's §5/§10.
123
- - **Merge strategy:** merge-commits-when-stacked
124
- {{**How do PRs merge, and what happens when one PR depends on another?** Merge commits whenever
125
- a dependent PR is open; squash only a PR with no open dependent (implement contract §8 rule 2a).
126
- Keep this exact line: it is the only value the engagement skill accepts, and it refuses to run
127
- without it.}}
123
+ - **Merge strategy:** {{squash | merge commit | rebase — the project's own choice. Every slice PR
124
+ is cut from and targets `main` (implement contract §8 rule 2), so no PR ever depends on
125
+ another and any strategy works; em reads nothing from this line.}}
128
126
  - **Agent models:** implementer=sonnet, validator=sonnet, reviewer=sonnet, critic=opus
129
127
  {{**Which model runs each em sub-agent?** Keep this exact line shape, with the defaults shown or
130
128
  your own choices. The critic must run on a different model from the implementer; `critic=codex`
@@ -1,9 +1,9 @@
1
1
  {
2
- "name": "em-1-14-2",
2
+ "name": "em-1-16-0",
3
3
  "owner": {
4
4
  "name": "Mike Key"
5
5
  },
6
- "description": "em v1.14.2: the Event Modeling skill bundle and MCP server as a Claude Code plugin.",
6
+ "description": "em v1.16.0: the Event Modeling skill bundle and MCP server as a Claude Code plugin.",
7
7
  "plugins": [
8
8
  {
9
9
  "name": "em",
@@ -0,0 +1,20 @@
1
+ export interface QueuedItem {
2
+ question: string;
3
+ sliceKey: string;
4
+ /** The version the item is injected into: the doc's version when it was queued, plus one. */
5
+ targetVersion: number;
6
+ /** The `--until` version that must answer it (>= targetVersion). */
7
+ until: number;
8
+ on: string;
9
+ by?: string;
10
+ decision: string;
11
+ }
12
+ /** The parking-lot bullet that records `item` as queued. */
13
+ export declare function queuedBullet(item: QueuedItem): string;
14
+ /** Parses one state-file line; null for anything that is not a queued bullet. */
15
+ export declare function parseQueuedBullet(line: string): QueuedItem | null;
16
+ /** Every queued item in `stateRaw` for `sliceKey` aimed at `targetVersion`, in file order. */
17
+ export declare function queuedItems(stateRaw: string, sliceKey: string, targetVersion: number): QueuedItem[];
18
+ /** How many questions wait in `<baseDir>/.event-modeling.md` for `<sliceKey>@v<docVersion + 1>`;
19
+ * 0 when the file is absent or unreadable (the queue is advisory for readers). */
20
+ export declare function queuedCount(baseDir: string, sliceKey: string, docVersion: number | null): number;
@@ -0,0 +1,63 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // GH #236: the deferral QUEUE — where `em slice defer` parks a question for a slice doc that must
3
+ // not be edited. A ratified (`ready-to-implement` + `ratifiedBy:`) or shipped (`implemented`) doc's
4
+ // body is the signed spec: editing it breaks `ratifiedHash`, so `defer` leaves the body alone and
5
+ // records the item in the model's `.event-modeling.md` parking lot instead, as ONE bullet:
6
+ //
7
+ // - <question> (from slice <key>, queued for <key>@v<N+1>, until v<U>, <on>[, by <who>]; decision: <text>)
8
+ //
9
+ // `em slice revise` / `mark-implemented` read the bullet back when they open v<N+1> as a draft,
10
+ // inject it into the new draft's `## Open Questions`, and turn it into the ordinary
11
+ // `- <question> (from slice <key>, deferred to v<U>)` parking-lot bullet (the queue is "cleared").
12
+ // Everything here is read-side and pure except `queuedCount`, which `em status` / `em export` call
13
+ // (via docJoin) to show the room how much known work waits on the next version.
14
+ import { existsSync, readFileSync } from "node:fs";
15
+ import { join } from "node:path";
16
+ import { STATE_FILE_NAME } from "../cli/stateFile.js";
17
+ const QUEUED = /^- (.+?) \(from slice ([^\s,]+), queued for ([^\s,@]+)@v(\d+), until v(\d+), (\d{4}-\d{2}-\d{2})(?:, by (.+?))?; decision: (.*)\)\s*$/;
18
+ /** The parking-lot bullet that records `item` as queued. */
19
+ export function queuedBullet(item) {
20
+ return (`- ${item.question} (from slice ${item.sliceKey}, queued for ${item.sliceKey}@v${item.targetVersion}, ` +
21
+ `until v${item.until}, ${item.on}${item.by !== undefined ? `, by ${item.by}` : ""}; decision: ${item.decision})`);
22
+ }
23
+ /** Parses one state-file line; null for anything that is not a queued bullet. */
24
+ export function parseQueuedBullet(line) {
25
+ const m = QUEUED.exec(line.replace(/\r?\n$/, ""));
26
+ if (!m || m[2] !== m[3])
27
+ return null;
28
+ return {
29
+ question: m[1],
30
+ sliceKey: m[2],
31
+ targetVersion: Number(m[4]),
32
+ until: Number(m[5]),
33
+ on: m[6],
34
+ ...(m[7] !== undefined ? { by: m[7] } : {}),
35
+ decision: m[8],
36
+ };
37
+ }
38
+ /** Every queued item in `stateRaw` for `sliceKey` aimed at `targetVersion`, in file order. */
39
+ export function queuedItems(stateRaw, sliceKey, targetVersion) {
40
+ const out = [];
41
+ for (const line of stateRaw.split("\n")) {
42
+ const item = parseQueuedBullet(line);
43
+ if (item && item.sliceKey === sliceKey && item.targetVersion === targetVersion)
44
+ out.push(item);
45
+ }
46
+ return out;
47
+ }
48
+ /** How many questions wait in `<baseDir>/.event-modeling.md` for `<sliceKey>@v<docVersion + 1>`;
49
+ * 0 when the file is absent or unreadable (the queue is advisory for readers). */
50
+ export function queuedCount(baseDir, sliceKey, docVersion) {
51
+ if (docVersion === null)
52
+ return 0;
53
+ const p = join(baseDir, STATE_FILE_NAME);
54
+ if (!existsSync(p))
55
+ return 0;
56
+ try {
57
+ return queuedItems(readFileSync(p, "utf8"), sliceKey, docVersion + 1).length;
58
+ }
59
+ catch {
60
+ return 0;
61
+ }
62
+ }
63
+ //# sourceMappingURL=deferQueue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deferQueue.js","sourceRoot":"","sources":["../../src/catalog/deferQueue.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kGAAkG;AAClG,oGAAoG;AACpG,kGAAkG;AAClG,2FAA2F;AAC3F,EAAE;AACF,6GAA6G;AAC7G,EAAE;AACF,gGAAgG;AAChG,oFAAoF;AACpF,mGAAmG;AACnG,mGAAmG;AACnG,gFAAgF;AAChF,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AActD,MAAM,MAAM,GACV,uIAAuI,CAAC;AAE1I,4DAA4D;AAC5D,MAAM,UAAU,YAAY,CAAC,IAAgB;IAC3C,OAAO,CACL,KAA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KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;QACxC,MAAM,IAAI,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;QACrC,IAAI,IAAI,IAAI,IAAI,CAAC,QAAQ,KAAK,QAAQ,IAAI,IAAI,CAAC,aAAa,KAAK,aAAa;YAAE,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjG,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED;mFACmF;AACnF,MAAM,UAAU,WAAW,CAAC,OAAe,EAAE,QAAgB,EAAE,UAAyB;IACtF,IAAI,UAAU,KAAK,IAAI;QAAE,OAAO,CAAC,CAAC;IAClC,MAAM,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;IACzC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;QAAE,OAAO,CAAC,CAAC;IAC7B,IAAI,CAAC;QACH,OAAO,WAAW,CAAC,YAAY,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE,UAAU,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC;IAC/E,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,CAAC,CAAC;IACX,CAAC;AACH,CAAC"}
@@ -3,7 +3,8 @@ import { NormalizedModel, Slice } from "../model/model.js";
3
3
  import { RefsResult } from "../model/refs.js";
4
4
  import { Diagnostic } from "../model/validate.js";
5
5
  import { DriftSignalKind } from "./driftSignal.js";
6
- import { SliceDoc, SliceRef } from "./sliceDoc.js";
6
+ import { ShippedRecord, SliceDoc, SliceRef } from "./sliceDoc.js";
7
+ export type { ShippedRecord } from "./sliceDoc.js";
7
8
  export declare const NOTE_SLICE_PATH: RegExp;
8
9
  /** One cross-binding candidate's resolution against `sliceKey`'s ratification requirement:
9
10
  * the target file doesn't exist, exists but its frontmatter isn't usable, exists and is usable
@@ -66,6 +67,21 @@ export interface SliceDocExport {
66
67
  /** MIL-165: when this doc was ratified (frontmatter `ratifiedOn:`, `YYYY-MM-DD`), written only
67
68
  * by `em slice ratify` — null when absent, same as `ratifiedBy`. */
68
69
  ratifiedOn: string | null;
70
+ /** MIL-284: the commit (full sha) whose tree holds the ratified body (frontmatter
71
+ * `ratifiedRef:`), written only by `em slice ratify` inside a git repository — null when
72
+ * absent (ratified before em 1.15, by hand, or outside git). The ratified content's address. */
73
+ ratifiedRef: string | null;
74
+ /** MIL-284: `sha256:<hex>` over the doc body at ratification (frontmatter `ratifiedHash:`),
75
+ * written only by `em slice ratify` — null when absent. `--slice-ready` compares it to the
76
+ * current body (`slice-ready-body-changed-since-ratification`). */
77
+ ratifiedHash: string | null;
78
+ /** MIL-283/284: the shipped record — `em slice mark-implemented`'s `shippedVersion:`/
79
+ * `shippedRef:`/`shippedOn:` beside `implementedIn:`, or, for a doc shipped before em 1.15
80
+ * (no `shippedVersion:`), the `status: implemented` it carries (read-both rule,
81
+ * `shippedRecordOf`). Null when nothing has shipped. THIS — not `status` — is what every
82
+ * lifecycle reader decides on since 1.15.0: `status` is the working state, and a shipped slice
83
+ * can be `draft` again while its earlier version stays shipped. */
84
+ shipped: ShippedRecord | null;
69
85
  /** MIL-171: who (a person or team) holds this slice, from frontmatter `owner:` — hand-filled,
70
86
  * no `em` command writes it. Null when absent. */
71
87
  owner: string | null;
@@ -95,6 +111,11 @@ export interface SliceDocExport {
95
111
  * `{ title, given, when, then }` string arrays, in document order. Null when the doc has no
96
112
  * well-formed block (every 1.13-style doc) or isn't found / usable. */
97
113
  scenarios: Scenario[] | null;
114
+ /** GH #236: how many questions `em slice defer` has QUEUED for this slice's next version
115
+ * (`.event-modeling.md` parking lot, catalog/deferQueue.ts) — known work for v<version+1> that
116
+ * a ratified/shipped doc could not take without breaking its sign-off. 0 when none, when the
117
+ * state file is absent, and whenever no doc was found. */
118
+ queuedForNext: number;
98
119
  }
99
120
  export interface SliceDocJoinResult {
100
121
  doc: SliceDocExport;
@@ -34,12 +34,13 @@
34
34
  // needs a second, cross-cutting pass over EVERY doc-shaped note on a slice (not just the winning
35
35
  // one) to tell "extra" from "dangling" from "unratified". It reuses `NOTE_SLICE_PATH` and
36
36
  // `resolveCrossCandidate` below rather than re-deriving the ratification predicate.
37
+ import { queuedCount } from "./deferQueue.js";
37
38
  import { parseScenarios } from "./scenarios.js";
38
39
  import { continuationOf } from "../model/continuation.js";
39
40
  import { makeDiag } from "../model/rules.js";
40
41
  import { classifyImplementationDrift } from "./driftSignal.js";
41
42
  import { readSliceDoc } from "./readSliceDoc.js";
42
- import { hasUsableFrontmatter } from "./sliceDoc.js";
43
+ import { hasUsableFrontmatter, shippedRecordOf } from "./sliceDoc.js";
43
44
  // Matches a `note "slices/<key>.md"` value's path shape, to pull `<key>` back out for the
44
45
  // MIL-121 cross-binding search below (and MIL-126's mismatch sweep, catalog/noteBindingValidate.ts)
45
46
  // — same kebab-slug grammar sliceDoc.ts's SLICE_REF uses.
@@ -72,6 +73,9 @@ const EMPTY_CONTENT = {
72
73
  reviewedOn: null,
73
74
  ratifiedBy: null,
74
75
  ratifiedOn: null,
76
+ ratifiedRef: null,
77
+ ratifiedHash: null,
78
+ shipped: null,
75
79
  owner: null,
76
80
  tracking: null,
77
81
  conformedVersion: null,
@@ -80,6 +84,7 @@ const EMPTY_CONTENT = {
80
84
  meaningConfirmed: false,
81
85
  contractChange: null,
82
86
  scenarios: null,
87
+ queuedForNext: 0,
83
88
  };
84
89
  /**
85
90
  * Resolve one slice's doc join. `baseDir` is the `.em` file's directory (doc paths, like note
@@ -117,7 +122,7 @@ export function resolveSliceDocJoin(model, refs, slice, sliceKey, baseDir, eleme
117
122
  // read — `slices/request-payment.md` — not the note's original casing. Otherwise a
118
123
  // consumer that re-derives the key from `doc.path` (sliceReadyValidate.ts) would try to
119
124
  // re-read the mixed-case path and get null on a case-sensitive filesystem.
120
- return { doc: foundDoc(`slices/${otherKey}.md`, result.doc), diagnostics: [], continuationOf: null };
125
+ return { doc: foundDoc(`slices/${otherKey}.md`, result.doc, baseDir, sliceKey), diagnostics: [], continuationOf: null };
121
126
  }
122
127
  // MIL-208: no note-bound doc of its own (`boundEls.length === 0`, checked above) and no
123
128
  // ratified MIL-121 cross-binding (the loop just above) — "legacy own doc wins" is
@@ -169,11 +174,11 @@ export function resolveSliceDocJoin(model, refs, slice, sliceKey, baseDir, eleme
169
174
  continuationOf: null,
170
175
  };
171
176
  }
172
- return { doc: foundDoc(path, parsed), diagnostics: [], continuationOf: null };
177
+ return { doc: foundDoc(path, parsed, baseDir, sliceKey), diagnostics: [], continuationOf: null };
173
178
  }
174
179
  /** Builds the `found: true, reason: null` doc join result shared by a canonical binding and a
175
180
  * ratified MIL-121 cross-binding — `path` is whichever path the content actually came from. */
176
- function foundDoc(path, parsed) {
181
+ function foundDoc(path, parsed, baseDir, docKey) {
177
182
  return {
178
183
  found: true,
179
184
  path,
@@ -189,6 +194,9 @@ function foundDoc(path, parsed) {
189
194
  reviewedOn: parsed.reviewedOn,
190
195
  ratifiedBy: parsed.ratifiedBy,
191
196
  ratifiedOn: parsed.ratifiedOn,
197
+ ratifiedRef: parsed.ratifiedRef,
198
+ ratifiedHash: parsed.ratifiedHash,
199
+ shipped: shippedRecordOf(parsed),
192
200
  owner: parsed.owner,
193
201
  tracking: parsed.tracking,
194
202
  conformedVersion: parsed.conformedVersion,
@@ -197,6 +205,7 @@ function foundDoc(path, parsed) {
197
205
  meaningConfirmed: parsed.meaningConfirmed,
198
206
  contractChange: parsed.contractChange,
199
207
  scenarios: scenariosOf(parsed.body),
208
+ queuedForNext: queuedCount(baseDir, docKey, parsed.version),
200
209
  };
201
210
  }
202
211
  function scenariosOf(body) {
@@ -1 +1 @@
1
- {"version":3,"file":"docJoin.js","sourceRoot":"","sources":["../../src/catalog/docJoin.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,4FAA4F;AAC5F,6FAA6F;AAC7F,2FAA2F;AAC3F,4FAA4F;AAC5F,uFAAuF;AACvF,6FAA6F;AAC7F,oFAAoF;AACpF,0FAA0F;AAC1F,4FAA4F;AAC5F,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7B,UAAU,EAAE,MAAM,CAAC,UAAU;QAC7B,UAAU,EAAE,MAAM,CAAC,UAAU;QAC7B,UAAU,EAAE,MAAM,CAAC,UAAU;QAC7B,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,YAAY,EAAE,MAAM,CAAC,YAAY;QACjC,OAAO,EAAE,eAAe,CAAC,MAAM,CAAC;QAChC,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;QACzC,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;QACzC,cAAc,EAAE,MAAM,CAAC,cAAc;QACrC,SAAS,EAAE,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC;QACnC,aAAa,EAAE,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC;KAC5D,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAAC,IAAY;IAC/B,MAAM,EAAE,SAAS,EAAE,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;IAC3C,OAAO,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC;AACjD,CAAC"}
@@ -62,7 +62,7 @@ import { pushDiag } from "../model/rules.js";
62
62
  import { classifySlicePattern, slicePatternLabel } from "./classify.js";
63
63
  import { resolveSliceDocJoin } from "./docJoin.js";
64
64
  import { readSliceDoc } from "./readSliceDoc.js";
65
- import { findStructuredSectionProblems } from "./sliceSections.js";
65
+ import { findStructuredSectionProblems, splitCells } from "./sliceSections.js";
66
66
  const COMMAND_MARKER = /^\*\*Command:\*\*\s*`([^`]+)`\s*$/;
67
67
  const EVENT_MARKER = /^\*\*Event:\*\*\s*`([^`]+)`(?:\s*→\s*context\s*`[^`]+`\s*)?$/;
68
68
  const VIEW_MARKER = /^-\s*\*\*View:\*\*\s*`([^`]+)`/;
@@ -81,10 +81,6 @@ function matchMarker(line) {
81
81
  const TABLE_ROW = /^\s*\|/;
82
82
  const TABLE_SEPARATOR_CELL = /^:?-+:?$/;
83
83
  const PLACEHOLDER = /\{\{.*\}\}/;
84
- function splitRow(line) {
85
- const trimmed = line.trim().replace(/^\|/, "").replace(/\|$/, "");
86
- return trimmed.split("|").map((c) => c.trim());
87
- }
88
84
  function cleanCell(raw) {
89
85
  if (raw === undefined)
90
86
  return null;
@@ -102,10 +98,10 @@ function findFieldTable(lines, start, end) {
102
98
  for (let i = start; i < end - 1; i++) {
103
99
  if (!TABLE_ROW.test(lines[i]) || !TABLE_ROW.test(lines[i + 1]))
104
100
  continue;
105
- const sepCells = splitRow(lines[i + 1]);
101
+ const sepCells = splitCells(lines[i + 1]);
106
102
  if (sepCells.length === 0 || !sepCells.every((c) => TABLE_SEPARATOR_CELL.test(c)))
107
103
  continue;
108
- const headerCells = splitRow(lines[i]);
104
+ const headerCells = splitCells(lines[i]);
109
105
  if (normalizeName(headerCells[0] ?? "") !== "field")
110
106
  continue;
111
107
  const typeIdx = headerCells.findIndex((c, idx) => idx > 0 && normalizeName(c) === "type");
@@ -113,7 +109,7 @@ function findFieldTable(lines, start, end) {
113
109
  for (let j = i + 2; j < end; j++) {
114
110
  if (!TABLE_ROW.test(lines[j]))
115
111
  break;
116
- const cells = splitRow(lines[j]);
112
+ const cells = splitCells(lines[j]);
117
113
  const name = cleanCell(cells[0]);
118
114
  if (!name)
119
115
  continue; // blank or placeholder row — not a real field declaration
@@ -1 +1 @@
1
- {"version":3,"file":"docModelConsistencyValidate.js","sourceRoot":"","sources":["../../src/catalog/docModelConsistencyValidate.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,+FAA+F;AAC/F,kGAAkG;AAClG,4FAA4F;AAC5F,8FAA8F;AAC9F,iGAAiG;AACjG,sFAAsF;AACtF,uEAAuE;AACvE,EAAE;AAC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,IAAI,KAAK,EAAE,CAAC,IAAI,aAAa,SAAS,iBAAiB,EAAE,CAAC,IAAI,yBAAyB,EAAE,CAAC,IAAI,oBAAoB,OAAO,GAAG;oBAC9J,IAAI,EAAE,EAAE,CAAC,IAAI;oBACb,IAAI,EAAE,MAAM;iBACb,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"docModelConsistencyValidate.js","sourceRoot":"","sources":["../../src/catalog/docModelConsistencyValidate.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,+FAA+F;AAC/F,kGAAkG;AAClG,4FAA4F;AAC5F,8FAA8F;AAC9F,iGAAiG;AACjG,sFAAsF;AACtF,uEAAuE;AACvE,EAAE;AACF,2FAA2F;AAC3F,4FAA4F;AAC5F,UAAU;AACV,EAAE;AACF,2FAA2F;AAC3F,4FAA4F;AAC5F,kGAAkG;AAClG,6FAA6F;AAC7F,iGAAiG;AACjG,+FAA+F;AAC/F,iGAAiG;AACjG,EAAE;AACF,2FAA2F;AAC3F,6FAA6F;AAC7F,8FAA8F;AAC9F,gGAAgG;AAChG,4FAA4F;AAC5F,kGAAkG;AAClG,0DAA0D;AAC1D,EAAE;AACF,kGAAkG;AAClG,8FAA8F;AAC9F,6FAA6F;AAC7F,8FAA8F;AAC9F,gGAAgG;AAChG,8FAA8F;AAC9F,0FAA0F;AAC1F,0CAA0C;AAC1C,EAAE;AACF,oFAAoF;AACpF,iGAAiG;AACjG,iGAAiG;AACjG,iGAAiG;AACjG,8FAA8F;AAC9F,iGAAiG;AACjG,4FAA4F;AAC5F,iGAAiG;AACjG,6FAA6F;AAC7F,gGAAgG;AAChG,mFAAmF;AACnF,EAAE;AACF,gGAAgG;AAChG,2FAA2F;AAC3F,iGAAiG;AACjG,kGAAkG;AAClG,2FAA2F;AAC3F,4CAA4C;AAC5C,EAAE;AACF,4FAA4F;AAC5F,4FAA4F;AAE5F,OAAO,EAAmC,aAAa,EAAE,MAAM,mB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IAAI,CAAC,KAAK,aAAa,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC5E,QAAQ,CAAC,KAAK,EAAE,0BAA0B,EAAE;oBAC1C,OAAO,EAAE,UAAU,EAAE,CAAC,IAAI,QAAQ,IAAI,KAAK,EAAE,CAAC,IAAI,aAAa,SAAS,iBAAiB,EAAE,CAAC,IAAI,yBAAyB,EAAE,CAAC,IAAI,oBAAoB,OAAO,GAAG;oBAC9J,IAAI,EAAE,EAAE,CAAC,IAAI;oBACb,IAAI,EAAE,MAAM;iBACb,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -1,22 +1,26 @@
1
1
  import { SliceDoc } from "./sliceDoc.js";
2
2
  export type DriftSignalKind =
3
- /** status: implemented, implementedIn set, conformedVersion === version — certified current. */
3
+ /** shipped, implementedIn set, the doc's version IS the shipped version and conformedVersion
4
+ * matches it — certified current. */
4
5
  "in-sync"
5
- /** status not implemented, implementedIn absent — normal pre-ship state. */
6
+ /** nothing shipped, implementedIn absent — normal pre-ship state. */
6
7
  | "never-implemented"
7
- /** status not implemented, implementedIn still set — a ratified delta hasn't shipped yet.
8
- * Expected, not a defect: never surface this as fresh drift or a validate diagnostic. */
8
+ /** a ratified/drafted delta hasn't shipped yet: either the doc's `version:` is past the shipped
9
+ * version (MIL-283 — a later draft is open over a shipped version), or (pre-1.15 shape) status
10
+ * is off `implemented` while `implementedIn` still names the prior version's PR. Expected, not
11
+ * a defect: never surface this as fresh drift or a validate diagnostic. */
9
12
  | "unpropagated-delta"
10
- /** status: implemented, implementedIn absent — genuine incoherence (em validate warns). */
13
+ /** shipped, implementedIn absent — genuine incoherence (em validate warns). */
11
14
  | "implemented-without-link"
12
- /** status: implemented, implementedIn set, but conformedVersion is absent or doesn't match the
13
- * current version — nobody has certified THIS version yet. Expected post-ship default, not a
14
- * defect: never surface this as an `em validate` diagnostic (see
15
+ /** shipped, implementedIn set, the doc's version is the shipped version, but conformedVersion
16
+ * is absent or doesn't match — nobody has certified THIS version yet. Expected post-ship
17
+ * default, not a defect: never surface this as an `em validate` diagnostic (see
15
18
  * catalog/frontmatterCoherenceValidate.ts, which only ever flags implemented-without-link). */
16
19
  | "uncertified";
17
20
  /**
18
- * Classify a doc's status/implementedIn/version/conformedVersion quadruple. Takes a `Pick`
19
- * rather than the full `SliceDoc` so callers building a partial/synthetic doc (tests, future
20
- * callers) don't need every field.
21
+ * Classify a doc's drift from its shipped record (MIL-283: `shippedRecordOf`, which reads the
22
+ * `shipped*` keys and, for a doc written before 1.15, `status: implemented`), its `implementedIn`,
23
+ * its working `version` and `conformedVersion`. Takes a `Pick` rather than the full `SliceDoc`
24
+ * so callers building a partial/synthetic doc (tests, future callers) don't need every field.
21
25
  */
22
- export declare function classifyImplementationDrift(doc: Pick<SliceDoc, "status" | "implementedIn" | "version" | "conformedVersion">): DriftSignalKind;
26
+ export declare function classifyImplementationDrift(doc: Pick<SliceDoc, "status" | "implementedIn" | "version" | "conformedVersion" | "ratifiedRef" | "shippedVersion" | "shippedRef" | "shippedOn">): DriftSignalKind;