@milehimikey/em 1.8.1 → 1.9.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.
- package/.claude/skills/event-modeling/SKILL.md +58 -404
- package/.claude/skills/event-modeling-conform/SKILL.md +77 -0
- package/.claude/skills/{event-modeling → event-modeling-conform}/reference/conform.md +40 -14
- package/.claude/skills/event-modeling-design/SKILL.md +139 -0
- package/.claude/skills/event-modeling-discover/SKILL.md +89 -0
- package/.claude/skills/{event-modeling → event-modeling-discover}/reference/extract.md +3 -2
- package/.claude/skills/event-modeling-implement/SKILL.md +40 -0
- package/.claude/skills/{event-modeling → event-modeling-implement}/reference/implement.md +3 -2
- package/.claude/skills/event-modeling-review/SKILL.md +58 -0
- package/.claude/skills/{event-modeling → event-modeling-shared}/reference/em-dsl.md +115 -83
- package/.claude/skills/{event-modeling → event-modeling-shared}/reference/methodology.md +6 -5
- package/.claude/skills/event-modeling-shared/reference/operating-principles.md +150 -0
- package/.claude/skills/event-modeling-shared/reference/slice-doc-schema.md +381 -0
- package/.claude/skills/{event-modeling → event-modeling-shared}/templates/model-readme.md +2 -2
- package/.claude/skills/{event-modeling → event-modeling-shared}/templates/slice.md +57 -14
- package/README.md +24 -4
- package/dist/catalog/build.js +9 -0
- package/dist/catalog/build.js.map +1 -1
- package/dist/catalog/docJoin.d.ts +15 -0
- package/dist/catalog/docJoin.js +8 -0
- package/dist/catalog/docJoin.js.map +1 -1
- package/dist/catalog/modelCollisionValidate.d.ts +22 -0
- package/dist/catalog/modelCollisionValidate.js +67 -0
- package/dist/catalog/modelCollisionValidate.js.map +1 -0
- package/dist/catalog/orphanedSliceDocValidate.d.ts +11 -0
- package/dist/catalog/orphanedSliceDocValidate.js +98 -0
- package/dist/catalog/orphanedSliceDocValidate.js.map +1 -0
- package/dist/catalog/sliceDoc.d.ts +15 -0
- package/dist/catalog/sliceDoc.js +18 -0
- package/dist/catalog/sliceDoc.js.map +1 -1
- package/dist/cli/changelogBuild.d.ts +12 -0
- package/dist/cli/changelogBuild.js +89 -0
- package/dist/cli/changelogBuild.js.map +1 -0
- package/dist/cli/ciInit.d.ts +42 -0
- package/dist/cli/ciInit.js +298 -0
- package/dist/cli/ciInit.js.map +1 -0
- package/dist/cli/conformSupersede.d.ts +32 -0
- package/dist/cli/conformSupersede.js +102 -0
- package/dist/cli/conformSupersede.js.map +1 -0
- package/dist/cli/coverage.d.ts +6 -1
- package/dist/cli/coverage.js +28 -3
- package/dist/cli/coverage.js.map +1 -1
- package/dist/cli/frontmatterSurgery.d.ts +28 -0
- package/dist/cli/frontmatterSurgery.js +66 -0
- package/dist/cli/frontmatterSurgery.js.map +1 -0
- package/dist/cli/markImplemented.js +6 -45
- package/dist/cli/markImplemented.js.map +1 -1
- package/dist/cli/ratify.d.ts +41 -0
- package/dist/cli/ratify.js +151 -0
- package/dist/cli/ratify.js.map +1 -0
- package/dist/cli/reratify.d.ts +33 -0
- package/dist/cli/reratify.js +137 -0
- package/dist/cli/reratify.js.map +1 -0
- package/dist/cli/skillCheck.d.ts +6 -0
- package/dist/cli/skillCheck.js +46 -0
- package/dist/cli/skillCheck.js.map +1 -1
- package/dist/cli/skillDirs.d.ts +15 -0
- package/dist/cli/skillDirs.js +34 -0
- package/dist/cli/skillDirs.js.map +1 -0
- package/dist/cli/skillSync.d.ts +10 -0
- package/dist/cli/skillSync.js +15 -0
- package/dist/cli/skillSync.js.map +1 -1
- package/dist/cli/sliceIndex.d.ts +3 -0
- package/dist/cli/sliceIndex.js +6 -2
- package/dist/cli/sliceIndex.js.map +1 -1
- package/dist/cli/sliceLink.d.ts +52 -0
- package/dist/cli/sliceLink.js +152 -0
- package/dist/cli/sliceLink.js.map +1 -0
- package/dist/cli/status.d.ts +261 -0
- package/dist/cli/status.js +536 -0
- package/dist/cli/status.js.map +1 -0
- package/dist/cli/usageLog.d.ts +75 -0
- package/dist/cli/usageLog.js +193 -0
- package/dist/cli/usageLog.js.map +1 -0
- package/dist/cli.js +503 -132
- package/dist/cli.js.map +1 -1
- package/dist/emit/freshnessJson.d.ts +6 -0
- package/dist/emit/freshnessJson.js +24 -0
- package/dist/emit/freshnessJson.js.map +1 -0
- package/dist/emit/json.d.ts +62 -8
- package/dist/emit/json.js +14 -3
- package/dist/emit/json.js.map +1 -1
- package/dist/emit/statusJson.d.ts +7 -0
- package/dist/emit/statusJson.js +39 -0
- package/dist/emit/statusJson.js.map +1 -0
- package/dist/emit/typespec.d.ts +26 -0
- package/dist/emit/typespec.js +356 -0
- package/dist/emit/typespec.js.map +1 -0
- package/dist/emit/usageReportJson.d.ts +3 -0
- package/dist/emit/usageReportJson.js +23 -0
- package/dist/emit/usageReportJson.js.map +1 -0
- package/dist/mcp/server.d.ts +1 -1
- package/dist/mcp/server.js +301 -11
- package/dist/mcp/server.js.map +1 -1
- package/dist/model/rules.d.ts +13 -0
- package/dist/model/rules.js +20 -0
- package/dist/model/rules.js.map +1 -1
- package/dist/templates.d.ts +1 -1
- package/dist/templates.js +2 -2
- package/dist/util/markers.d.ts +16 -4
- package/dist/util/markers.js +23 -10
- package/dist/util/markers.js.map +1 -1
- package/package.json +2 -1
- /package/.claude/skills/{event-modeling → event-modeling-shared}/templates/conformance-report.md +0 -0
- /package/.claude/skills/{event-modeling → event-modeling-shared}/templates/state.md +0 -0
package/dist/util/markers.js
CHANGED
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
// Shared marker-delimited region patcher: `<!-- GENERATED:<name>:start -->...
|
|
3
|
-
// <!-- GENERATED:<name>:end
|
|
4
|
-
//
|
|
5
|
-
//
|
|
3
|
+
// <!-- GENERATED:<name>:end -->` (or, for a file whose format doesn't support HTML comments,
|
|
4
|
+
// `# GENERATED:<name>:start` ... `# GENERATED:<name>:end`). Originally
|
|
5
|
+
// scripts/generate-skill-docs.ts's own local helper (MIL-92, docs-generation only); extracted
|
|
6
|
+
// here so a real runtime command — `em slice index` (MIL-98) — can reuse the exact same marker
|
|
7
|
+
// convention instead of re-deriving its own regex. The `hash` style was added for `em ci init`
|
|
8
|
+
// (MIL-166), whose generated files are YAML (no `<!-- -->` comment syntax).
|
|
6
9
|
// Pure string in, string (or null) out — no fs access, so both a dev script and a CLI command
|
|
7
10
|
// can layer their own file-reading and error reporting on top.
|
|
8
11
|
/** Captures the exact start/end marker lines separately from whatever sits between them, so
|
|
9
12
|
* replacement never depends on how much whitespace happened to separate them before — matters
|
|
10
13
|
* for a freshly-added, still-empty marker pair (start line immediately followed by end line,
|
|
11
|
-
* nothing in between to non-greedily match a leading "\n" against).
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
* nothing in between to non-greedily match a leading "\n" against). The `[^\n]*` tail on the
|
|
15
|
+
* start line lets a caller append trailing prose after `:start` (e.g. em-dsl.md's "-- run `npm
|
|
16
|
+
* run docs:generate` to refresh, do not hand-edit") without breaking the match. */
|
|
17
|
+
export function markerRegex(name, style = "html") {
|
|
18
|
+
const start = style === "hash" ? `# GENERATED:${name}:start[^\\n]*` : `<!-- GENERATED:${name}:start[^\\n]*-->`;
|
|
19
|
+
const end = style === "hash" ? `# GENERATED:${name}:end` : `<!-- GENERATED:${name}:end -->`;
|
|
15
20
|
return new RegExp(`(${start})([\\s\\S]*?)(${end})`);
|
|
16
21
|
}
|
|
17
22
|
/**
|
|
@@ -19,12 +24,20 @@ export function markerRegex(name) {
|
|
|
19
24
|
* marker lines themselves verbatim. Returns `null` (never throws) when the marker pair isn't
|
|
20
25
|
* found in `content` — callers decide how to report that: a dev-tooling throw
|
|
21
26
|
* (scripts/generate-skill-docs.ts), or a user-facing CLI error suggesting how to add the
|
|
22
|
-
* markers (`em slice index`, src/cli/sliceIndex.ts).
|
|
27
|
+
* markers (`em slice index`, src/cli/sliceIndex.ts; `em ci init`, src/cli/ciInit.ts).
|
|
23
28
|
*/
|
|
24
|
-
export function applyMarker(content, markerName, newBody) {
|
|
25
|
-
const re = markerRegex(markerName);
|
|
29
|
+
export function applyMarker(content, markerName, newBody, style = "html") {
|
|
30
|
+
const re = markerRegex(markerName, style);
|
|
26
31
|
if (!re.test(content))
|
|
27
32
|
return null;
|
|
28
33
|
return content.replace(re, (_m, open, _old, close) => `${open}\n${newBody}\n${close}`);
|
|
29
34
|
}
|
|
35
|
+
/** The bare start/end marker lines for `markerName`, for a caller writing a fresh marker pair
|
|
36
|
+
* from scratch (e.g. `em ci init` creating a brand-new file, or `em ci init --check` reporting
|
|
37
|
+
* what a from-scratch file would contain). */
|
|
38
|
+
export function markerPair(markerName, style = "html") {
|
|
39
|
+
return style === "hash"
|
|
40
|
+
? { start: `# GENERATED:${markerName}:start`, end: `# GENERATED:${markerName}:end` }
|
|
41
|
+
: { start: `<!-- GENERATED:${markerName}:start -->`, end: `<!-- GENERATED:${markerName}:end -->` };
|
|
42
|
+
}
|
|
30
43
|
//# sourceMappingURL=markers.js.map
|
package/dist/util/markers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markers.js","sourceRoot":"","sources":["../../src/util/markers.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,8EAA8E;AAC9E,+FAA+F;AAC/F
|
|
1
|
+
{"version":3,"file":"markers.js","sourceRoot":"","sources":["../../src/util/markers.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,8EAA8E;AAC9E,6FAA6F;AAC7F,uEAAuE;AACvE,8FAA8F;AAC9F,+FAA+F;AAC/F,+FAA+F;AAC/F,4EAA4E;AAC5E,8FAA8F;AAC9F,+DAA+D;AAM/D;;;;;oFAKoF;AACpF,MAAM,UAAU,WAAW,CAAC,IAAY,EAAE,QAAqB,MAAM;IACnE,MAAM,KAAK,GAAG,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,eAAe,IAAI,eAAe,CAAC,CAAC,CAAC,kBAAkB,IAAI,kBAAkB,CAAC;IAC/G,MAAM,GAAG,GAAG,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,eAAe,IAAI,MAAM,CAAC,CAAC,CAAC,kBAAkB,IAAI,UAAU,CAAC;IAC5F,OAAO,IAAI,MAAM,CAAC,IAAI,KAAK,iBAAiB,GAAG,GAAG,CAAC,CAAC;AACtD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CAAC,OAAe,EAAE,UAAkB,EAAE,OAAe,EAAE,QAAqB,MAAM;IAC3G,MAAM,EAAE,GAAG,WAAW,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;IAC1C,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC;QAAE,OAAO,IAAI,CAAC;IACnC,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,GAAG,IAAI,KAAK,OAAO,KAAK,KAAK,EAAE,CAAC,CAAC;AACzF,CAAC;AAED;;+CAE+C;AAC/C,MAAM,UAAU,UAAU,CAAC,UAAkB,EAAE,QAAqB,MAAM;IACxE,OAAO,KAAK,KAAK,MAAM;QACrB,CAAC,CAAC,EAAE,KAAK,EAAE,eAAe,UAAU,QAAQ,EAAE,GAAG,EAAE,eAAe,UAAU,MAAM,EAAE;QACpF,CAAC,CAAC,EAAE,KAAK,EAAE,kBAAkB,UAAU,YAAY,EAAE,GAAG,EAAE,kBAAkB,UAAU,UAAU,EAAE,CAAC;AACvG,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milehimikey/em",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.1",
|
|
4
4
|
"description": "AI-friendly Event Modeling — a slice-first text DSL rendered to a strict, self-contained Graphviz grid (SVG/PNG)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -68,6 +68,7 @@
|
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@types/node": "^22.0.0",
|
|
70
70
|
"@types/pdfkit": "^0.17.6",
|
|
71
|
+
"@typespec/compiler": "^1.15.0",
|
|
71
72
|
"jsdom": "^26.1.0",
|
|
72
73
|
"tsx": "^4.19.0",
|
|
73
74
|
"typescript": "^5.6.0",
|
/package/.claude/skills/{event-modeling → event-modeling-shared}/templates/conformance-report.md
RENAMED
|
File without changes
|
|
File without changes
|