@milehimikey/em 1.19.7 → 1.20.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 (93) hide show
  1. package/.claude/skills/event-modeling/SKILL.md +1 -1
  2. package/.claude/skills/event-modeling-conform/SKILL.md +1 -1
  3. package/.claude/skills/event-modeling-conform/reference/conform.md +29 -1
  4. package/.claude/skills/event-modeling-design/SKILL.md +14 -3
  5. package/.claude/skills/event-modeling-discover/SKILL.md +1 -1
  6. package/.claude/skills/event-modeling-discover/reference/extract.md +8 -0
  7. package/.claude/skills/event-modeling-engagement/SKILL.md +1 -1
  8. package/.claude/skills/event-modeling-implement/SKILL.md +7 -2
  9. package/.claude/skills/event-modeling-implement/reference/implement.md +73 -6
  10. package/.claude/skills/event-modeling-review/SKILL.md +1 -1
  11. package/.claude/skills/event-modeling-shared/reference/em-dsl.md +22 -2
  12. package/.claude/skills/event-modeling-shared/reference/methodology.md +16 -0
  13. package/.claude/skills/event-modeling-shared/templates/slice.md +6 -1
  14. package/.claude-plugin/marketplace.json +2 -2
  15. package/dist/catalog/docBadge.d.ts +16 -0
  16. package/dist/catalog/docBadge.js +50 -0
  17. package/dist/catalog/docBadge.js.map +1 -0
  18. package/dist/catalog/docModelConsistencyValidate.js +9 -2
  19. package/dist/catalog/docModelConsistencyValidate.js.map +1 -1
  20. package/dist/catalog/invTokens.d.ts +49 -0
  21. package/dist/catalog/invTokens.js +94 -0
  22. package/dist/catalog/invTokens.js.map +1 -0
  23. package/dist/catalog/pages.js +48 -1
  24. package/dist/catalog/pages.js.map +1 -1
  25. package/dist/catalog/scenarios.d.ts +4 -0
  26. package/dist/catalog/scenarios.js +4 -1
  27. package/dist/catalog/scenarios.js.map +1 -1
  28. package/dist/catalog/sliceDoc.d.ts +46 -1
  29. package/dist/catalog/sliceDoc.js +90 -2
  30. package/dist/catalog/sliceDoc.js.map +1 -1
  31. package/dist/catalog/sliceDocRender.d.ts +3 -0
  32. package/dist/catalog/sliceDocRender.js +295 -0
  33. package/dist/catalog/sliceDocRender.js.map +1 -0
  34. package/dist/cli/coverage.d.ts +13 -23
  35. package/dist/cli/coverage.js +51 -91
  36. package/dist/cli/coverage.js.map +1 -1
  37. package/dist/cli/refsCheck.d.ts +52 -0
  38. package/dist/cli/refsCheck.js +127 -1
  39. package/dist/cli/refsCheck.js.map +1 -1
  40. package/dist/cli/sliceConform.d.ts +57 -1
  41. package/dist/cli/sliceConform.js +109 -9
  42. package/dist/cli/sliceConform.js.map +1 -1
  43. package/dist/cli/watchStoryline.d.ts +27 -0
  44. package/dist/cli/watchStoryline.js +55 -0
  45. package/dist/cli/watchStoryline.js.map +1 -0
  46. package/dist/cli.js +161 -7
  47. package/dist/cli.js.map +1 -1
  48. package/dist/emit/docJson.d.ts +99 -0
  49. package/dist/emit/docJson.js +197 -0
  50. package/dist/emit/docJson.js.map +1 -0
  51. package/dist/emit/refsJson.d.ts +5 -3
  52. package/dist/emit/refsJson.js +5 -2
  53. package/dist/emit/refsJson.js.map +1 -1
  54. package/dist/mcp/server.js +23 -3
  55. package/dist/mcp/server.js.map +1 -1
  56. package/dist/model/continuation.d.ts +9 -0
  57. package/dist/model/continuation.js +30 -0
  58. package/dist/model/continuation.js.map +1 -1
  59. package/dist/model/rules.d.ts +8 -0
  60. package/dist/model/rules.js +8 -0
  61. package/dist/model/rules.js.map +1 -1
  62. package/dist/model/shapeLint.js +48 -0
  63. package/dist/model/shapeLint.js.map +1 -1
  64. package/dist/model/validate.js +119 -0
  65. package/dist/model/validate.js.map +1 -1
  66. package/dist/parser/ast.d.ts +8 -0
  67. package/dist/parser/parser.js +51 -1
  68. package/dist/parser/parser.js.map +1 -1
  69. package/dist/render/render.js +1 -1
  70. package/dist/render/render.js.map +1 -1
  71. package/dist/render/sliceOverlay.d.ts +7 -2
  72. package/dist/render/sliceOverlay.js +28 -3
  73. package/dist/render/sliceOverlay.js.map +1 -1
  74. package/dist/render/storylinePicker.d.ts +9 -0
  75. package/dist/render/storylinePicker.js +17 -0
  76. package/dist/render/storylinePicker.js.map +1 -0
  77. package/dist/render/viewerHtml.js +1 -1
  78. package/dist/render/viewerHtml.js.map +1 -1
  79. package/package.json +1 -1
  80. package/plugin/.claude-plugin/plugin.json +2 -2
  81. package/plugin/shared/reference/em-dsl.md +22 -2
  82. package/plugin/shared/reference/methodology.md +16 -0
  83. package/plugin/shared/templates/slice.md +6 -1
  84. package/plugin/skills/conform/SKILL.md +1 -1
  85. package/plugin/skills/conform/reference/conform.md +29 -1
  86. package/plugin/skills/design/SKILL.md +14 -3
  87. package/plugin/skills/discover/SKILL.md +1 -1
  88. package/plugin/skills/discover/reference/extract.md +8 -0
  89. package/plugin/skills/engagement/SKILL.md +1 -1
  90. package/plugin/skills/event-modeling/SKILL.md +1 -1
  91. package/plugin/skills/implement/SKILL.md +7 -2
  92. package/plugin/skills/implement/reference/implement.md +73 -6
  93. package/plugin/skills/review/SKILL.md +1 -1
@@ -0,0 +1,295 @@
1
+ // SPDX-License-Identifier: MIT
2
+ // GH #402: section-aware HTML rendering for a slice doc's body — the same `marked` dependency
3
+ // already bundled for `em catalog` (docs/dependencies.md), driven through custom renderer
4
+ // extensions instead of marked's flat default output. No new dependency, and no change to the
5
+ // body markdown a doc author writes — only how it renders to HTML. A fresh `Marked` instance is
6
+ // built per call (the package's own guidance, see marked's `Marked` class doc comment: "create a
7
+ // separate Marked instance and use Marked#use" for per-call configuration) so the per-doc
8
+ // invariant-anchor bookkeeping below never leaks across two docs rendered in the same `em
9
+ // catalog`/`em watch` run.
10
+ //
11
+ // - Given/When/Then scenario cards: a `### Scenario: <title>` heading immediately followed by a
12
+ // Given/When/Then bullet list, inside a `## Scenarios…` section, merges — at the token level
13
+ // (`hooks.processAllTokens`) — into one synthetic `scenarioCard` token rendered as a single
14
+ // bordered card. Acceptance is EXACTLY the strict grammar's (catalog/scenarios.ts): the
15
+ // candidate block's own raw text is run through `parseScenarios`, and only a block it accepts
16
+ // (all three beats present and non-empty, labels case-sensitive, column-0) becomes a card.
17
+ // Anything it would flag `slice-doc/structured-section-malformed` — a missing or empty beat, a
18
+ // lowercase label — and anything it ignores — a block outside a `## Scenarios…` section —
19
+ // renders exactly as flat markdown did before, so a diagnostic-worthy block never looks
20
+ // silently fixed by presentation.
21
+ // - INV-* chips: every `INV-<mnemonic>-<n>`-shaped token (the grammar catalog/invTokens.ts's
22
+ // `INV_TOKEN_RE` defines, `\b`-bounded on both sides) becomes a chip. An ID this doc declares
23
+ // in its own Invariants/Delta ownership section (`extractInvariantIds` — the same scan `em
24
+ // coverage`/`em validate` already trust as "this doc owns this ID") gets its anchor at its
25
+ // first rendered occurrence INSIDE that ownership section — not at an earlier passing citation
26
+ // (the template's canonical order puts the Command field table, whose Rules column cites ids,
27
+ // before `## Invariants`); every other mention, before or after, links to the anchor. Only
28
+ // when the ownership section has no chip-renderable occurrence of the id (e.g. the declaring
29
+ // bullet backticks it, which renders as a codespan marked's inline extensions never enter)
30
+ // does the anchor fall back to the id's first rendered mention anywhere. An ID this doc never
31
+ // declares (a narrative citation of a sibling slice's rule) renders as a plain, unlinked chip.
32
+ // - Field tables: every markdown table (the GENERATED command/event/view tables, MIL-266,
33
+ // included) gets a `field-table` class, and its Type / Notes-or-Rules / Required-or-
34
+ // Immutable-Fact column (matched by header text, position-independent since the three
35
+ // REGION_TABLE_HEADERS shapes don't share a column order) gets a `col-type`/`col-notes`/
36
+ // `col-flag` class — same table, just styled.
37
+ //
38
+ // Pure: markdown text in, HTML string out. No frontmatter, no SliceDoc, no drift
39
+ // classification — those live one level up (catalog/docBadge.ts), kept out of this module on
40
+ // purpose so it never has to depend on catalog/sliceDoc.ts or catalog/driftSignal.ts. The INV
41
+ // grammar comes from catalog/invTokens.ts (a leaf), NOT cli/coverage.ts, which imports
42
+ // catalog/docJoin.ts → catalog/sliceDoc.ts → this module — an import cycle invTokens.ts exists
43
+ // to break.
44
+ import { Marked } from "marked";
45
+ import { extractInvariantIds, INV_TOKEN_RE, OWNERSHIP_HEADING_RE } from "./invTokens.js";
46
+ import { parseScenarios, SCENARIOS_SECTION_RE } from "./scenarios.js";
47
+ /** INV_TOKEN_RE's token run, anchored at the current inline-lexer position; the `\b` on each
48
+ * side is enforced by the tokenizer below (the preceding character lives in the already-lexed
49
+ * tokens, outside what a `^`-anchored regex can see). */
50
+ const INV_CHIP_RE = /^INV-[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*/;
51
+ /** The strict grammar's heading prefix (scenarios.ts `SCENARIO_HEADING_RE`), case-sensitive, as
52
+ * it appears in a heading token's inner text. */
53
+ const SCENARIO_PREFIX_RE = /^Scenario:\s*/;
54
+ /** The strict grammar's beat labels (scenarios.ts `LABEL_RE`), case-sensitive. */
55
+ const GWT_LABEL_RE = /^(Given|When|Then):$/;
56
+ function escapeHtml(s) {
57
+ return s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
58
+ }
59
+ /** The Given/When/Then label a scenario list item's bullet opens with, or null when its first
60
+ * child isn't a bold `**Given:**`/`**When:**`/`**Then:**` label (exact case — the strict
61
+ * grammar's) — scenarios.ts's shape, read off the already-lexed token tree. */
62
+ function itemLabel(item) {
63
+ const first = item.tokens[0];
64
+ if (!first || (first.type !== "text" && first.type !== "paragraph"))
65
+ return null;
66
+ const inline = first.tokens;
67
+ const strong = inline?.[0];
68
+ if (!strong || strong.type !== "strong")
69
+ return null;
70
+ const m = GWT_LABEL_RE.exec(strong.text);
71
+ return m ? m[1].toLowerCase() : null;
72
+ }
73
+ /** True when every item of a bullet list is Given/When/Then-labelled — the card layout can only
74
+ * label steps it recognizes, so a list with any stray unlabelled bullet stays a plain list even
75
+ * when the strict grammar would accept the block (it ignores such bullets; a card would have to
76
+ * mislabel them). */
77
+ function isScenarioList(list) {
78
+ if (!list || list.type !== "list")
79
+ return false;
80
+ const items = list.items;
81
+ return items.length > 0 && items.every((it) => itemLabel(it) !== null);
82
+ }
83
+ /** The strict grammar's verdict on a candidate heading+list pair, by parsing the pair's OWN raw
84
+ * text (under a synthetic `## Scenarios` opener, since section membership was already checked
85
+ * against the doc's real headings). Accepted means `parseScenarios` yields exactly this one
86
+ * scenario and no problems — the exact acceptance `slice-doc/structured-section-malformed` and
87
+ * `em export`'s `doc.scenarios` use, not a re-implementation of it. A block the full-doc parse
88
+ * would flag can never pass here: the snippet is a subset of the block's lines, and beats only
89
+ * accumulate, so snippet-accepted implies full-doc-accepted. */
90
+ function strictGrammarAccepts(heading, list) {
91
+ const snippet = `## Scenarios\n${heading.raw.trimEnd()}\n${list.raw}`;
92
+ const parsed = parseScenarios(snippet);
93
+ return parsed.problems.length === 0 && parsed.scenarios.length === 1;
94
+ }
95
+ /** The heading's own inline tokens, with the literal `Scenario: ` prefix stripped off the first
96
+ * text token — so the title's own inline formatting (an INV-* mention included) still renders. */
97
+ function stripScenarioPrefix(heading) {
98
+ const [first, ...rest] = heading.tokens;
99
+ if (!first || first.type !== "text")
100
+ return heading.tokens;
101
+ const stripped = first.text.replace(SCENARIO_PREFIX_RE, "");
102
+ if (stripped === first.text)
103
+ return heading.tokens;
104
+ return [{ ...first, text: stripped, raw: stripped }, ...rest];
105
+ }
106
+ /** Merges each strict-grammar-accepted `### Scenario: <title>` heading + Given/When/Then list
107
+ * pair inside a `## Scenarios…` section into one `scenarioCard` token, so the two render as a
108
+ * single card instead of a heading followed by a loose bullet list. Section tracking mirrors
109
+ * `parseScenarios`' own raw-line rule: a literal `## Scenarios…` ATX heading opens the section,
110
+ * any other `#`/`##` ATX heading closes it. Everything else — a block outside the section, a
111
+ * missing or empty beat, a lowercase label — passes through untouched and renders as plain
112
+ * markdown. Runs once, over the top-level token array, via `hooks.processAllTokens`. */
113
+ function mergeScenarioCards(tokens) {
114
+ const out = [];
115
+ let inScenarios = false;
116
+ for (let i = 0; i < tokens.length; i++) {
117
+ const t = tokens[i];
118
+ if (t.type === "heading") {
119
+ // Same boundary rule as parseScenarios, applied to the heading's raw first line: only a
120
+ // `#`/`##` line toggles the section; `###` and deeper never do.
121
+ const rawLine = t.raw.split(/\r?\n/)[0];
122
+ if (/^#{1,2}\s/.test(rawLine))
123
+ inScenarios = SCENARIOS_SECTION_RE.test(rawLine);
124
+ }
125
+ if (inScenarios && t.type === "heading" && t.depth === 3 && SCENARIO_PREFIX_RE.test(t.text)) {
126
+ const heading = t;
127
+ let j = i + 1;
128
+ while (j < tokens.length && tokens[j].type === "space")
129
+ j++;
130
+ const list = tokens[j];
131
+ if (isScenarioList(list) && strictGrammarAccepts(heading, list)) {
132
+ const card = { type: "scenarioCard", raw: heading.raw + list.raw, titleTokens: stripScenarioPrefix(heading), list };
133
+ out.push(card);
134
+ i = j;
135
+ continue;
136
+ }
137
+ }
138
+ out.push(t);
139
+ }
140
+ const links = tokens.links;
141
+ if (links !== undefined)
142
+ out.links = links;
143
+ return out;
144
+ }
145
+ function scenarioStepBodyHtml(parser, item) {
146
+ const first = item.tokens[0];
147
+ const inlineRest = (first.tokens ?? []).slice(1);
148
+ const inlineHtml = parser.parseInline(inlineRest).trim();
149
+ const blockRest = item.tokens.slice(1);
150
+ const blockHtml = blockRest.length > 0 ? parser.parse(blockRest) : "";
151
+ return inlineHtml + blockHtml;
152
+ }
153
+ function renderScenarioCard(token) {
154
+ const { titleTokens, list } = token;
155
+ const titleHtml = this.parser.parseInline(titleTokens);
156
+ const steps = list.items
157
+ .map((item) => {
158
+ // itemLabel() is non-null for every item — isScenarioList() gated the merge on that.
159
+ const label = itemLabel(item);
160
+ const name = label[0].toUpperCase() + label.slice(1);
161
+ const body = scenarioStepBodyHtml(this.parser, item);
162
+ return (`<div class="scenario-step scenario-step--${label}">` +
163
+ `<span class="scenario-step-label">${name}</span>` +
164
+ `<div class="scenario-step-body">${body}</div></div>`);
165
+ })
166
+ .join("");
167
+ return `<div class="scenario-card"><h3 class="scenario-card-title">${titleHtml}</h3>${steps}</div>`;
168
+ }
169
+ /** The defining ids that will actually RENDER as a chip somewhere inside the ownership section —
170
+ * where the definition anchor belongs. Scanned from the raw body with code spans stripped,
171
+ * because a backticked id renders as a codespan, which marked's inline extensions never enter:
172
+ * such an id still *defines* (extractInvariantIds reads raw text), but its anchor has to fall
173
+ * back to the first rendered mention anywhere. */
174
+ function ownershipRenderableIds(body, definingIds) {
175
+ const out = new Set();
176
+ let inOwnership = false;
177
+ for (const line of body.split(/\r?\n/)) {
178
+ if (/^#{1,2}\s/.test(line)) {
179
+ inOwnership = OWNERSHIP_HEADING_RE.test(line);
180
+ continue;
181
+ }
182
+ if (!inOwnership)
183
+ continue;
184
+ const noCode = line.replace(/`[^`]*`/g, "");
185
+ for (const m of noCode.matchAll(INV_TOKEN_RE))
186
+ if (definingIds.has(m[0]))
187
+ out.add(m[0]);
188
+ }
189
+ return out;
190
+ }
191
+ const WORD_CHAR_RE = /[A-Za-z0-9_]/;
192
+ /** A fresh inline extension per render call: `claimed` is per-doc state (which IDs have already
193
+ * been given their one anchor), so two docs rendered back to back in the same `em catalog` run
194
+ * never share it — see the file header comment on why a fresh `Marked` instance is built per
195
+ * call. `definingIds` is this doc's own `extractInvariantIds(body)` result; `anchorInOwnership`
196
+ * the subset whose anchor must wait for the ownership section (`ownershipRenderableIds`);
197
+ * `state.inOwnership` is kept current by the heading renderer in `renderSliceDocBodyHtml`. */
198
+ function invChipExtension(definingIds, anchorInOwnership, state) {
199
+ const claimed = new Set();
200
+ return {
201
+ name: "invChip",
202
+ level: "inline",
203
+ start(src) {
204
+ const i = src.indexOf("INV-");
205
+ return i < 0 ? undefined : i;
206
+ },
207
+ tokenizer(src, tokens) {
208
+ const m = INV_CHIP_RE.exec(src);
209
+ if (!m)
210
+ return undefined;
211
+ // INV_TOKEN_RE's \b on both sides: a run glued to a preceding word character (`XINV-1`,
212
+ // the preceding text is the last already-lexed inline token) or followed by one (only `_`
213
+ // can follow the greedy alphanumeric run and still be a word character) is not a token.
214
+ const prev = tokens[tokens.length - 1];
215
+ const prevChar = typeof prev?.raw === "string" ? prev.raw.slice(-1) : "";
216
+ if (WORD_CHAR_RE.test(prevChar))
217
+ return undefined;
218
+ if (src.charAt(m[0].length) === "_")
219
+ return undefined;
220
+ return { type: "invChip", raw: m[0], id: m[0] };
221
+ },
222
+ renderer(token) {
223
+ const { id } = token;
224
+ if (!definingIds.has(id))
225
+ return `<span class="inv-chip inv-chip--external">${escapeHtml(id)}</span>`;
226
+ const anchor = `inv-${id.toLowerCase()}`;
227
+ if (claimed.has(id))
228
+ return `<a class="inv-chip inv-chip--ref" href="#${anchor}">${escapeHtml(id)}</a>`;
229
+ // The definition anchor belongs to the occurrence inside the ownership section; a passing
230
+ // citation rendered before it (the template puts the Command field table first) is a link.
231
+ if (anchorInOwnership.has(id) && !state.inOwnership) {
232
+ return `<a class="inv-chip inv-chip--ref" href="#${anchor}">${escapeHtml(id)}</a>`;
233
+ }
234
+ claimed.add(id);
235
+ return `<span class="inv-chip inv-chip--def" id="${anchor}">${escapeHtml(id)}</span>`;
236
+ },
237
+ };
238
+ }
239
+ // ---------------------------------------------------------------------------------------------
240
+ // Field tables.
241
+ /** Which styling class a generated region's table column gets, by header text — position-
242
+ * independent since REGION_TABLE_HEADERS' three shapes (command/event/view) don't share a
243
+ * column order (sliceSections.ts). */
244
+ function fieldColumnClass(header) {
245
+ if (/^type$/i.test(header))
246
+ return "col-type";
247
+ if (/notes|rules|validation/i.test(header))
248
+ return "col-notes";
249
+ if (/^(required|immutable fact\?)$/i.test(header))
250
+ return "col-flag";
251
+ return "";
252
+ }
253
+ function renderFieldTable(token) {
254
+ const headerHtml = token.header
255
+ .map((cell) => {
256
+ const cls = fieldColumnClass(cell.text);
257
+ return `<th${cls ? ` class="${cls}"` : ""}>${this.parser.parseInline(cell.tokens)}</th>`;
258
+ })
259
+ .join("");
260
+ const bodyHtml = token.rows
261
+ .map((row) => `<tr>${row
262
+ .map((cell, i) => {
263
+ const cls = fieldColumnClass(token.header[i]?.text ?? "");
264
+ return `<td${cls ? ` class="${cls}"` : ""}>${this.parser.parseInline(cell.tokens)}</td>`;
265
+ })
266
+ .join("")}</tr>`)
267
+ .join("");
268
+ return `<table class="field-table"><thead><tr>${headerHtml}</tr></thead><tbody>${bodyHtml}</tbody></table>`;
269
+ }
270
+ // ---------------------------------------------------------------------------------------------
271
+ /** The full `html` a slice doc's body renders to — `catalog/sliceDoc.ts`'s only caller. Replaces
272
+ * the plain `marked.parse(body)` this used to be with the section-aware rendering above. */
273
+ export function renderSliceDocBodyHtml(body) {
274
+ const definingIds = new Set(extractInvariantIds(body));
275
+ const anchorInOwnership = ownershipRenderableIds(body, definingIds);
276
+ const state = { inOwnership: false };
277
+ const m = new Marked();
278
+ m.use({
279
+ hooks: { processAllTokens: mergeScenarioCards },
280
+ extensions: [{ name: "scenarioCard", renderer: renderScenarioCard }, invChipExtension(definingIds, anchorInOwnership, state)],
281
+ renderer: {
282
+ // Tracks which section rendering is currently inside (same raw-line boundary rule the
283
+ // ownership scanners use), then falls through (`false`) to the default heading HTML.
284
+ heading(token) {
285
+ const rawLine = token.raw.split(/\r?\n/)[0];
286
+ if (/^#{1,2}\s/.test(rawLine))
287
+ state.inOwnership = OWNERSHIP_HEADING_RE.test(rawLine);
288
+ return false;
289
+ },
290
+ table: renderFieldTable,
291
+ },
292
+ });
293
+ return m.parse(body, { async: false });
294
+ }
295
+ //# sourceMappingURL=sliceDocRender.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sliceDocRender.js","sourceRoot":"","sources":["../../src/catalog/sliceDocRender.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,8FAA8F;AAC9F,0FAA0F;AAC1F,8FAA8F;AAC9F,gGAAgG;AAChG,iGAAiG;AACjG,0FAA0F;AAC1F,0FAA0F;AAC1F,2BAA2B;AAC3B,EAAE;AACF,iGAAiG;AACjG,gGAAgG;AAChG,+FAA+F;AAC/F,2FAA2F;AAC3F,iGAAiG;AACjG,8FAA8F;AAC9F,kGAAkG;AAClG,6FAA6F;AAC7F,2FAA2F;AAC3F,qCAAqC;AACrC,8FAA8F;AAC9F,i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G,sBAAsB,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IACpE,MAAM,KAAK,GAAc,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC;IAChD,MAAM,CAAC,GAAG,IAAI,MAAM,EAAE,CAAC;IACvB,CAAC,CAAC,GAAG,CAAC;QACJ,KAAK,EAAE,EAAE,gBAAgB,EAAE,kBAAkB,EAAE;QAC/C,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,QAAQ,EAAE,kBAAkB,EAAE,EAAE,gBAAgB,CAAC,WAAW,EAAE,iBAAiB,EAAE,KAAK,CAAC,CAAC;QAC7H,QAAQ,EAAE;YACR,sFAAsF;YACtF,qFAAqF;YACrF,OAAO,CAAC,KAAqB;gBAC3B,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC5C,IAAI,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC;oBAAE,KAAK,CAAC,WAAW,GAAG,oBAAoB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;gBACtF,OAAO,KAAK,CAAC;YACf,CAAC;YACD,KAAK,EAAE,gBAAgB;SACxB;KACF,CAAC,CAAC;IACH,OAAO,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAW,CAAC;AACnD,CAAC"}
@@ -1,26 +1,6 @@
1
1
  import { NormalizedModel } from "../model/model.js";
2
2
  import { RefsResult } from "../model/refs.js";
3
- /** The stable INV token format. `INV-` then one or more alphanumeric/hyphen segments — matches
4
- * both `INV-1`/`INV-2` (the template's bare numbering) and `INV-CHK-4`/`INV-CHK-3a` (the
5
- * per-slice mnemonic style reference/conform.md's own example uses). Exported so tests can
6
- * assert against the exact grammar. */
7
- export declare const INV_TOKEN_RE: RegExp;
8
- /**
9
- * Extract every distinct `INV-*` token this slice doc *defines*, in first-occurrence order (a
10
- * rule stated once in `## Invariants` and re-declared in a later `## Delta` section dedupes to
11
- * its first appearance — order is for stable, readable output, not a claim about which mention is
12
- * canonical). Scoped to `OWNERSHIP_HEADING_RE`'s sections only, so a doc's prose narratively
13
- * citing another slice's ID elsewhere (Dependencies, Open Questions, ...) doesn't cross-credit
14
- * that ID as this slice's own (MIL-149) — the section ends at the next `#`/`##` heading or EOF,
15
- * same boundary rule sliceDoc.ts's countOpenQuestions() uses, so a `### Added`/`#### Requirement`
16
- * subheading under `## Delta` stays in scope while a sibling `## Scenarios` does not. Within that
17
- * scope, only `STRUCTURAL_LINE_RE`'s bullet/subheading lines contribute — MIL-155 — so a wrapped
18
- * continuation line that legitimately *cites* a sibling slice's ID while explaining this doc's own
19
- * (e.g. an Invariants bullet's exactly-once rule wrapping onto a line naming another slice's
20
- * queue-draining ID) doesn't cross-credit that citation just because it sits inside the ownership
21
- * section too.
22
- */
23
- export declare function extractInvariantIds(body: string): string[];
3
+ export { INV_TOKEN_RE, extractInvariantIds } from "../catalog/invTokens.js";
24
4
  /**
25
5
  * MIL-265: the subset of `extractInvariantIds(body)` the doc *restates as a rule* — ids written
26
6
  * with the declaring label `**INV-X:**` (or `**INV-X**:`) on a structural line of an ownership
@@ -32,8 +12,18 @@ export declare function extractInvariantIds(body: string): string[];
32
12
  export declare function extractDeclaredInvariantLabels(body: string): string[];
33
13
  /**
34
14
  * GH #286: like `extractDeclaredInvariantLabels`, but also returns the rule text after the label
35
- * (`- **INV-X:** If `parentId` is set, ...`), trimmed. Used only by the advisory
36
- * `command-second-intent` lint (catalog/invariantsValidate.ts).
15
+ * (`- **INV-X:** If `parentId` is set, ...`), trimmed. Since GH #401 (round 3) a soft-wrapped
16
+ * declaring bullet's indented continuation lines are joined into its text with single spaces
17
+ * (`isContinuationLine` — nested elaboration bullets stay excluded, as does everything MIL-155
18
+ * excludes from ID extraction): real docs wrap their rule sentences
19
+ * (examples/order-fulfillment/slices/capture-payment.md's INV-CAP-1), and a single-line capture
20
+ * exported 4 of that estate's 7 catalog entries mid-sentence. Walks the ownership sections
21
+ * line-by-line itself — `ownershipStructuralLines` drops the continuation lines on purpose
22
+ * (MIL-155, so a wrapped line's cross-citation never contributes an ID) and must stay that way
23
+ * for `extractInvariantIds`. Consumers: the advisory `command-second-intent` lint
24
+ * (catalog/invariantsValidate.ts) — unaffected by the join, since `conditionalField` matches
25
+ * patterns anchored at `^` and the join only appends tail text — and `em export --doc-json`'s
26
+ * doc-declared invariant fallback (emit/docJson.ts), which needs the full sentence.
37
27
  */
38
28
  export declare function extractDeclaredInvariantRules(body: string): {
39
29
  id: string;
@@ -16,54 +16,20 @@
16
16
  // export document. Checks that an ID is *cited*, nothing about whether the citing test is good
17
17
  // or passing — that stays with review and CI respectively; no judgment mechanized here.
18
18
  //
19
- // Token format: `INV-<KEY>-n` where `<KEY>` is present in nothing textually — the actual convention
20
- // found in the codebase (templates/slice.md's own Invariants section, reference/conform.md's
21
- // worked example `INV-CHK-4`) uses either a bare running number (`INV-1`, `INV-2`) or a per-slice
22
- // mnemonic prefix (`INV-CHK-3`, `INV-CHK-3a` for a rename) — IDs are hand-authored per
23
- // docs/slice-doc-schema.md, "give each a stable ID", not machine-generated, so no single fixed
24
- // shape is enforced by any `em` command. INV_TOKEN_RE below matches both: `INV-` followed by a
25
- // greedy run of alphanumeric/hyphen segments. Greedy is what keeps `INV-KEY-1` from partially
26
- // matching inside `INV-KEY-12` during *extraction* (`\d+` inside the run always consumes the full
27
- // digit sequence); citation *scanning* below re-anchors with `\b` on the exact ID string for the
28
- // same reason, since that direction is a substring search rather than a token match.
19
+ // Token format and the ownership-section extraction live in catalog/invTokens.ts since GH #402 —
20
+ // a leaf module, so the section-aware doc renderer (catalog/sliceDocRender.ts) can read the same
21
+ // grammar without importing this module (which would close an import cycle through
22
+ // catalog/sliceDoc.ts). Re-exported below so this module's public surface is unchanged.
29
23
  import { readFileSync } from "node:fs";
30
24
  import { join } from "node:path";
31
25
  import { collectModelInvariants } from "../model/model.js";
32
26
  import { continuationOf } from "../model/continuation.js";
33
27
  import { resolveSliceDocJoin } from "../catalog/docJoin.js";
34
28
  import { readSliceDoc } from "../catalog/readSliceDoc.js";
29
+ import { extractInvariantIds, OWNERSHIP_HEADING_RE, ownershipStructuralLines, STRUCTURAL_LINE_RE } from "../catalog/invTokens.js";
30
+ import { isContinuationLine } from "../catalog/sliceDoc.js";
35
31
  import { walkDir } from "../util/walkDir.js";
36
- /** The stable INV token format. `INV-` then one or more alphanumeric/hyphen segments — matches
37
- * both `INV-1`/`INV-2` (the template's bare numbering) and `INV-CHK-4`/`INV-CHK-3a` (the
38
- * per-slice mnemonic style reference/conform.md's own example uses). Exported so tests can
39
- * assert against the exact grammar. */
40
- export const INV_TOKEN_RE = /\bINV-[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*\b/g;
41
- /** Headings whose content *defines* (or, for `## Delta`, legitimately re-declares) an invariant
42
- * ID for the slice doc it appears in — `## Invariants / Business Rules` itself, and `## Delta`'s
43
- * Added/Modified/Renamed requirement subsections, which introduce/rename IDs "from Invariants
44
- * below" on re-ratification (see templates/slice.md). Every other section — Intent, Scenarios,
45
- * Trigger & Actor, Dependencies & Read Models Affected, Open Questions, ... — is prose that may
46
- * narratively *cite* another slice's ID without this doc owning it (MIL-149: such a mention was
47
- * being cross-credited to the citing slice's own coverage ledger). */
48
- const OWNERSHIP_HEADING_RE = /^##\s+(?:Invariants(?:\s*\/\s*Business Rules)?|Delta)\s*$/i;
49
- /** A line contributes INV tokens only when it's *structural* — a top-level bullet/list item
50
- * (`- ...` / `* ...`, no leading indentation) or a subheading (`### ...` and deeper, since only
51
- * `#`/`##` toggles `inOwnershipSection` above) — never an indented continuation line wrapping a
52
- * multi-line bullet, nor a standalone prose paragraph with no bullet marker (MIL-155). Every
53
- * cross-credit MIL-149 missed turned out to have exactly this shape: a slice's own Invariants
54
- * bullet legitimately explains its rule across several wrapped lines, and a later wrapped line
55
- * names a sibling slice's ID for context — e.g. `request-payment`'s `INV-RP-1` bullet wraps onto
56
- * a line citing `payments-to-request`'s `INV-PTR-2` by way of explaining the exactly-once
57
- * mechanism. The bullet's own *opening* line is structural and trusted for every ID it mentions
58
- * (this also covers `## Delta`'s Renamed bullets, which legitimately declare two IDs — old and
59
- * new — on one line, and its `**MODIFIED (...):** INV-X — ...` bullets, whose bold label isn't
60
- * itself an ID); each wrapped continuation line is prose and contributes nothing. The indentation
61
- * test also covers MIL-156's blessed nested-elaboration-bullet shape: `templates/slice.md`'s
62
- * Invariants section now suggests a rule statement's optional rationale/edge-case detail go on
63
- * its own indented sub-bullet (` - {{...}}`) rather than run on into the rule sentence, purely
64
- * for HTML-render readability — that sub-bullet is indented, so it's already excluded here the
65
- * same as any other continuation line, and never contributes (or steals) an ID. */
66
- const STRUCTURAL_LINE_RE = /^(?:[-*]\s|#{3,6}\s)/;
32
+ export { INV_TOKEN_RE, extractInvariantIds } from "../catalog/invTokens.js";
67
33
  /** Statuses `reference/implement.md`'s coverage gate applies to, by default (MIL-207). Doc
68
34
  * ratification (`draft` -> `reviewed` -> `ready-to-implement`) is the hand-off *before*
69
35
  * implementation, not a claim that implementing code exists yet — a `ready-to-implement` doc
@@ -83,48 +49,6 @@ const IN_SCOPE_STATUSES_WITH_READY = new Set(["ready-to-implement"]);
83
49
  function inScopeStatuses(includeReady) {
84
50
  return includeReady ? IN_SCOPE_STATUSES_WITH_READY : IN_SCOPE_STATUSES_DEFAULT;
85
51
  }
86
- /**
87
- * Extract every distinct `INV-*` token this slice doc *defines*, in first-occurrence order (a
88
- * rule stated once in `## Invariants` and re-declared in a later `## Delta` section dedupes to
89
- * its first appearance — order is for stable, readable output, not a claim about which mention is
90
- * canonical). Scoped to `OWNERSHIP_HEADING_RE`'s sections only, so a doc's prose narratively
91
- * citing another slice's ID elsewhere (Dependencies, Open Questions, ...) doesn't cross-credit
92
- * that ID as this slice's own (MIL-149) — the section ends at the next `#`/`##` heading or EOF,
93
- * same boundary rule sliceDoc.ts's countOpenQuestions() uses, so a `### Added`/`#### Requirement`
94
- * subheading under `## Delta` stays in scope while a sibling `## Scenarios` does not. Within that
95
- * scope, only `STRUCTURAL_LINE_RE`'s bullet/subheading lines contribute — MIL-155 — so a wrapped
96
- * continuation line that legitimately *cites* a sibling slice's ID while explaining this doc's own
97
- * (e.g. an Invariants bullet's exactly-once rule wrapping onto a line naming another slice's
98
- * queue-draining ID) doesn't cross-credit that citation just because it sits inside the ownership
99
- * section too.
100
- */
101
- export function extractInvariantIds(body) {
102
- const seen = new Set();
103
- const ids = [];
104
- for (const line of ownershipStructuralLines(body)) {
105
- for (const m of line.matchAll(INV_TOKEN_RE)) {
106
- if (!seen.has(m[0])) {
107
- seen.add(m[0]);
108
- ids.push(m[0]);
109
- }
110
- }
111
- }
112
- return ids;
113
- }
114
- /** The lines `extractInvariantIds` reads: structural lines inside an ownership section. */
115
- function ownershipStructuralLines(body) {
116
- const out = [];
117
- let inOwnershipSection = false;
118
- for (const line of body.split(/\r?\n/)) {
119
- if (/^#{1,2}\s/.test(line)) {
120
- inOwnershipSection = OWNERSHIP_HEADING_RE.test(line);
121
- continue;
122
- }
123
- if (inOwnershipSection && STRUCTURAL_LINE_RE.test(line))
124
- out.push(line);
125
- }
126
- return out;
127
- }
128
52
  /** A doc's rule-statement label for an id: `**INV-X:**` or `**INV-X**:` — the template's
129
53
  * declaring bullet shape (`- **INV-ORD-1:** rule`). */
130
54
  const DECLARATION_LABEL_RE = /\*\*(INV-[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*)(?::\*\*|\*\*:)/g;
@@ -149,21 +73,57 @@ export function extractDeclaredInvariantLabels(body) {
149
73
  }
150
74
  return ids;
151
75
  }
76
+ /** A declaring label with its rule text: `**INV-X:**` / `**INV-X**:` (an optional parenthesised
77
+ * qualifier tolerated, `**INV-CAP-1 (idempotency):**`), capturing the rest of the line. */
78
+ const DECLARING_RULE_RE = /\*\*(INV-[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*)(?:\s+\([^)]*\))?(?::\*\*|\*\*:)\s*([^\n]*)/g;
152
79
  /**
153
80
  * GH #286: like `extractDeclaredInvariantLabels`, but also returns the rule text after the label
154
- * (`- **INV-X:** If `parentId` is set, ...`), trimmed. Used only by the advisory
155
- * `command-second-intent` lint (catalog/invariantsValidate.ts).
81
+ * (`- **INV-X:** If `parentId` is set, ...`), trimmed. Since GH #401 (round 3) a soft-wrapped
82
+ * declaring bullet's indented continuation lines are joined into its text with single spaces
83
+ * (`isContinuationLine` — nested elaboration bullets stay excluded, as does everything MIL-155
84
+ * excludes from ID extraction): real docs wrap their rule sentences
85
+ * (examples/order-fulfillment/slices/capture-payment.md's INV-CAP-1), and a single-line capture
86
+ * exported 4 of that estate's 7 catalog entries mid-sentence. Walks the ownership sections
87
+ * line-by-line itself — `ownershipStructuralLines` drops the continuation lines on purpose
88
+ * (MIL-155, so a wrapped line's cross-citation never contributes an ID) and must stay that way
89
+ * for `extractInvariantIds`. Consumers: the advisory `command-second-intent` lint
90
+ * (catalog/invariantsValidate.ts) — unaffected by the join, since `conditionalField` matches
91
+ * patterns anchored at `^` and the join only appends tail text — and `em export --doc-json`'s
92
+ * doc-declared invariant fallback (emit/docJson.ts), which needs the full sentence.
156
93
  */
157
94
  export function extractDeclaredInvariantRules(body) {
158
95
  const seen = new Set();
159
96
  const out = [];
160
- for (const line of ownershipStructuralLines(body)) {
161
- for (const m of line.matchAll(/\*\*(INV-[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*)(?:\s+\([^)]*\))?(?::\*\*|\*\*:)\s*([^\n]*)/g)) {
162
- if (seen.has(m[1]))
163
- continue;
164
- seen.add(m[1]);
165
- out.push({ id: m[1], text: m[2].trim() });
97
+ let inOwnershipSection = false;
98
+ let open = null; // the entry still accepting continuation lines
99
+ const byId = new Map();
100
+ for (const line of body.split(/\r?\n/)) {
101
+ if (/^#{1,2}\s/.test(line)) {
102
+ inOwnershipSection = OWNERSHIP_HEADING_RE.test(line);
103
+ open = null;
104
+ continue;
105
+ }
106
+ if (!inOwnershipSection)
107
+ continue;
108
+ if (STRUCTURAL_LINE_RE.test(line)) {
109
+ open = null;
110
+ for (const m of line.matchAll(DECLARING_RULE_RE)) {
111
+ if (seen.has(m[1]))
112
+ continue;
113
+ seen.add(m[1]);
114
+ const entry = { id: m[1], text: m[2].trim() };
115
+ out.push(entry);
116
+ byId.set(m[1], entry);
117
+ open = { id: m[1] };
118
+ }
119
+ continue;
120
+ }
121
+ if (open && isContinuationLine(line)) {
122
+ const entry = byId.get(open.id);
123
+ entry.text = `${entry.text} ${line.trim()}`.trim();
124
+ continue;
166
125
  }
126
+ open = null; // a blank line, nested bullet, or column-0 prose ends the wrap
167
127
  }
168
128
  return out;
169
129
  }
@@ -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;AACjC,OAAO,EAAE,sBAAsB,EAAmB,MAAM,mBAAmB,CAAC;AAE5E,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,O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