@milehimikey/em 1.13.1 → 1.14.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/agents/em-critic.md +26 -0
- package/.claude/agents/em-implementer.md +34 -0
- package/.claude/agents/em-reviewer.md +31 -0
- package/.claude/agents/em-validator.md +27 -0
- package/.claude/skills/event-modeling/SKILL.md +50 -11
- package/.claude/skills/event-modeling-conform/SKILL.md +1 -1
- package/.claude/skills/event-modeling-design/SKILL.md +127 -18
- package/.claude/skills/event-modeling-discover/SKILL.md +1 -1
- package/.claude/skills/event-modeling-engagement/SKILL.md +192 -0
- package/.claude/skills/event-modeling-engagement/reference/engagement.md +143 -0
- package/.claude/skills/event-modeling-implement/SKILL.md +1 -1
- package/.claude/skills/event-modeling-implement/reference/implement.md +38 -11
- package/.claude/skills/event-modeling-review/SKILL.md +2 -2
- package/.claude/skills/event-modeling-shared/reference/em-dsl.md +279 -189
- package/.claude/skills/event-modeling-shared/reference/operating-principles.md +61 -0
- package/.claude/skills/event-modeling-shared/reference/slice-doc-schema.md +116 -5
- package/.claude/skills/event-modeling-shared/templates/constitution.md +18 -1
- package/.claude/skills/event-modeling-shared/templates/slice.md +64 -39
- package/.claude/skills/event-modeling-shared/templates/state.md +5 -1
- package/.claude-plugin/marketplace.json +14 -0
- package/README.md +25 -11
- package/dist/catalog/apiFirst.d.ts +28 -0
- package/dist/catalog/apiFirst.js +49 -0
- package/dist/catalog/apiFirst.js.map +1 -0
- package/dist/catalog/docJoin.d.ts +13 -0
- package/dist/catalog/docJoin.js +11 -0
- package/dist/catalog/docJoin.js.map +1 -1
- package/dist/catalog/docModelConsistencyValidate.js +44 -4
- package/dist/catalog/docModelConsistencyValidate.js.map +1 -1
- package/dist/catalog/invariantsValidate.d.ts +4 -0
- package/dist/catalog/invariantsValidate.js +102 -0
- package/dist/catalog/invariantsValidate.js.map +1 -0
- package/dist/catalog/scenarios.d.ts +15 -0
- package/dist/catalog/scenarios.js +97 -0
- package/dist/catalog/scenarios.js.map +1 -0
- package/dist/catalog/sliceDoc.d.ts +8 -0
- package/dist/catalog/sliceDoc.js +9 -0
- package/dist/catalog/sliceDoc.js.map +1 -1
- package/dist/catalog/sliceReadyValidate.d.ts +31 -4
- package/dist/catalog/sliceReadyValidate.js +66 -8
- package/dist/catalog/sliceReadyValidate.js.map +1 -1
- package/dist/catalog/sliceSections.d.ts +55 -0
- package/dist/catalog/sliceSections.js +317 -0
- package/dist/catalog/sliceSections.js.map +1 -0
- package/dist/cli/agentsMd.js +7 -1
- package/dist/cli/agentsMd.js.map +1 -1
- package/dist/cli/api.d.ts +90 -0
- package/dist/cli/api.js +318 -0
- package/dist/cli/api.js.map +1 -0
- package/dist/cli/ciInit.d.ts +82 -21
- package/dist/cli/ciInit.js +468 -64
- package/dist/cli/ciInit.js.map +1 -1
- package/dist/cli/conformScope.d.ts +28 -0
- package/dist/cli/conformScope.js +67 -0
- package/dist/cli/conformScope.js.map +1 -1
- package/dist/cli/coverage.d.ts +9 -0
- package/dist/cli/coverage.js +60 -8
- package/dist/cli/coverage.js.map +1 -1
- package/dist/cli/defer.d.ts +55 -0
- package/dist/cli/defer.js +244 -0
- package/dist/cli/defer.js.map +1 -0
- package/dist/cli/engagement.d.ts +210 -0
- package/dist/cli/engagement.js +444 -0
- package/dist/cli/engagement.js.map +1 -0
- package/dist/cli/engagementFile.d.ts +86 -0
- package/dist/cli/engagementFile.js +255 -0
- package/dist/cli/engagementFile.js.map +1 -0
- package/dist/cli/metrics.d.ts +10 -0
- package/dist/cli/metrics.js +49 -1
- package/dist/cli/metrics.js.map +1 -1
- package/dist/cli/pluginPin.d.ts +55 -0
- package/dist/cli/pluginPin.js +188 -0
- package/dist/cli/pluginPin.js.map +1 -0
- package/dist/cli/ratify.d.ts +27 -2
- package/dist/cli/ratify.js +112 -13
- package/dist/cli/ratify.js.map +1 -1
- package/dist/cli/reratify.d.ts +4 -2
- package/dist/cli/reratify.js +41 -16
- package/dist/cli/reratify.js.map +1 -1
- package/dist/cli/scopeInputs.d.ts +48 -0
- package/dist/cli/scopeInputs.js +176 -0
- package/dist/cli/scopeInputs.js.map +1 -0
- package/dist/cli/skillCheck.d.ts +15 -1
- package/dist/cli/skillCheck.js +22 -1
- package/dist/cli/skillCheck.js.map +1 -1
- package/dist/cli/skillDirs.d.ts +5 -0
- package/dist/cli/skillDirs.js +13 -1
- package/dist/cli/skillDirs.js.map +1 -1
- package/dist/cli/skillSync.d.ts +4 -0
- package/dist/cli/skillSync.js +23 -0
- package/dist/cli/skillSync.js.map +1 -1
- package/dist/cli/sliceNew.d.ts +11 -7
- package/dist/cli/sliceNew.js +91 -18
- package/dist/cli/sliceNew.js.map +1 -1
- package/dist/cli/sliceSync.d.ts +50 -0
- package/dist/cli/sliceSync.js +170 -0
- package/dist/cli/sliceSync.js.map +1 -0
- package/dist/cli/status.d.ts +24 -1
- package/dist/cli/status.js +20 -1
- package/dist/cli/status.js.map +1 -1
- package/dist/cli/systemInputs.d.ts +53 -10
- package/dist/cli/systemInputs.js +186 -11
- package/dist/cli/systemInputs.js.map +1 -1
- package/dist/cli/upgrade.d.ts +16 -3
- package/dist/cli/upgrade.js +366 -30
- package/dist/cli/upgrade.js.map +1 -1
- package/dist/cli/usageLog.d.ts +4 -2
- package/dist/cli/usageLog.js +4 -2
- package/dist/cli/usageLog.js.map +1 -1
- package/dist/cli.js +599 -94
- package/dist/cli.js.map +1 -1
- package/dist/emit/api.d.ts +29 -0
- package/dist/emit/api.js +220 -0
- package/dist/emit/api.js.map +1 -0
- package/dist/emit/apiCheckJson.d.ts +3 -0
- package/dist/emit/apiCheckJson.js +21 -0
- package/dist/emit/apiCheckJson.js.map +1 -0
- package/dist/emit/codeownersJson.d.ts +3 -0
- package/dist/emit/codeownersJson.js +19 -0
- package/dist/emit/codeownersJson.js.map +1 -0
- package/dist/emit/diffJson.d.ts +1 -1
- package/dist/emit/diffJson.js +8 -1
- package/dist/emit/diffJson.js.map +1 -1
- package/dist/emit/engagementJson.d.ts +8 -0
- package/dist/emit/engagementJson.js +46 -0
- package/dist/emit/engagementJson.js.map +1 -0
- package/dist/emit/glossaryJson.d.ts +1 -1
- package/dist/emit/glossaryJson.js +4 -1
- package/dist/emit/glossaryJson.js.map +1 -1
- package/dist/emit/json.d.ts +17 -1
- package/dist/emit/json.js +30 -1
- package/dist/emit/json.js.map +1 -1
- package/dist/emit/metricsJson.d.ts +1 -1
- package/dist/emit/metricsJson.js +4 -1
- package/dist/emit/metricsJson.js.map +1 -1
- package/dist/emit/queryJson.d.ts +1 -1
- package/dist/emit/queryJson.js +7 -1
- package/dist/emit/queryJson.js.map +1 -1
- package/dist/emit/scopeJson.d.ts +12 -0
- package/dist/emit/scopeJson.js +26 -0
- package/dist/emit/scopeJson.js.map +1 -0
- package/dist/emit/skillCheckJson.d.ts +3 -2
- package/dist/emit/skillCheckJson.js +10 -2
- package/dist/emit/skillCheckJson.js.map +1 -1
- package/dist/emit/statusJson.d.ts +1 -1
- package/dist/emit/statusJson.js +15 -1
- package/dist/emit/statusJson.js.map +1 -1
- package/dist/emit/systemJson.d.ts +15 -8
- package/dist/emit/systemJson.js +28 -13
- package/dist/emit/systemJson.js.map +1 -1
- package/dist/emit/validateJson.d.ts +3 -3
- package/dist/emit/validateJson.js +10 -4
- package/dist/emit/validateJson.js.map +1 -1
- package/dist/mcp/server.d.ts +1 -1
- package/dist/mcp/server.js +163 -31
- package/dist/mcp/server.js.map +1 -1
- package/dist/model/diff.d.ts +4 -1
- package/dist/model/diff.js +44 -8
- package/dist/model/diff.js.map +1 -1
- package/dist/model/glossary.d.ts +2 -0
- package/dist/model/glossary.js +1 -0
- package/dist/model/glossary.js.map +1 -1
- package/dist/model/model.d.ts +55 -2
- package/dist/model/model.js +57 -0
- package/dist/model/model.js.map +1 -1
- package/dist/model/qualifiedRef.d.ts +18 -0
- package/dist/model/qualifiedRef.js +26 -0
- package/dist/model/qualifiedRef.js.map +1 -1
- package/dist/model/queryIndex.d.ts +9 -1
- package/dist/model/queryIndex.js +18 -2
- package/dist/model/queryIndex.js.map +1 -1
- package/dist/model/rules.d.ts +143 -2
- package/dist/model/rules.js +162 -3
- package/dist/model/rules.js.map +1 -1
- package/dist/model/validate.d.ts +40 -0
- package/dist/model/validate.js +147 -1
- package/dist/model/validate.js.map +1 -1
- package/dist/parser/ast.d.ts +31 -3
- package/dist/parser/parser.js +148 -14
- package/dist/parser/parser.js.map +1 -1
- package/dist/query/format.js +1 -1
- package/dist/query/format.js.map +1 -1
- package/dist/query/verbs.d.ts +6 -0
- package/dist/query/verbs.js +6 -2
- package/dist/query/verbs.js.map +1 -1
- package/dist/system/adaptation.d.ts +14 -0
- package/dist/system/adaptation.js +49 -0
- package/dist/system/adaptation.js.map +1 -0
- package/dist/system/codeowners.d.ts +77 -0
- package/dist/system/codeowners.js +242 -0
- package/dist/system/codeowners.js.map +1 -0
- package/dist/system/manifest.d.ts +10 -5
- package/dist/system/manifest.js +54 -26
- package/dist/system/manifest.js.map +1 -1
- package/dist/system/migrateManifest.d.ts +28 -0
- package/dist/system/migrateManifest.js +155 -0
- package/dist/system/migrateManifest.js.map +1 -0
- package/dist/system/scope.d.ts +46 -0
- package/dist/system/scope.js +132 -0
- package/dist/system/scope.js.map +1 -0
- package/dist/system/verify.d.ts +50 -13
- package/dist/system/verify.js +179 -58
- package/dist/system/verify.js.map +1 -1
- package/dist/templates.d.ts +2 -2
- package/dist/templates.js +23 -2
- package/dist/templates.js.map +1 -1
- package/package.json +5 -2
- package/plugin/.claude-plugin/plugin.json +18 -0
- package/plugin/agents/em-critic.md +27 -0
- package/plugin/agents/em-implementer.md +35 -0
- package/plugin/agents/em-reviewer.md +32 -0
- package/plugin/agents/em-validator.md +28 -0
- package/plugin/shared/reference/em-dsl.md +871 -0
- package/plugin/shared/reference/methodology.md +329 -0
- package/plugin/shared/reference/operating-principles.md +222 -0
- package/plugin/shared/reference/slice-doc-schema.md +574 -0
- package/plugin/shared/templates/conformance-report.md +85 -0
- package/plugin/shared/templates/constitution.md +136 -0
- package/plugin/shared/templates/model-readme.md +46 -0
- package/plugin/shared/templates/slice.md +251 -0
- package/plugin/shared/templates/state.md +77 -0
- package/plugin/skills/conform/SKILL.md +93 -0
- package/plugin/skills/conform/reference/conform.md +428 -0
- package/plugin/skills/design/SKILL.md +298 -0
- package/plugin/skills/discover/SKILL.md +90 -0
- package/plugin/skills/discover/reference/extract.md +147 -0
- package/plugin/skills/engagement/SKILL.md +193 -0
- package/plugin/skills/engagement/reference/engagement.md +144 -0
- package/plugin/skills/event-modeling/SKILL.md +132 -0
- package/plugin/skills/implement/SKILL.md +61 -0
- package/plugin/skills/implement/reference/implement.md +439 -0
- package/plugin/skills/review/SKILL.md +74 -0
- package/dist/emit/typespec.d.ts +0 -26
- package/dist/emit/typespec.js +0 -356
- package/dist/emit/typespec.js.map +0 -1
package/dist/system/verify.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
|
-
// Verifies a
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
//
|
|
2
|
+
// Verifies a system — a set of models' export documents (MIL-194) — the cross-model half of the
|
|
3
|
+
// bedrock "both ends of a flow" rule. A seam is a `public` event/view on one side bound to a
|
|
4
|
+
// reaction on the other. Since MIL-235 the binding is declared consumer-side, versionless, on
|
|
5
|
+
// the consuming translation itself (`consumes <modelKey>:<kind>.<slug>`, carried in the export
|
|
6
|
+
// as `elements[].consumes`), so it travels with the model; this module resolves every such ref
|
|
7
|
+
// against the other models' public surface (`consumes-unknown-model`/`-element`), then runs the
|
|
8
|
+
// MIL-194 checks off those bindings: nothing published goes unread, nothing externally fed goes
|
|
9
|
+
// unclaimed, and the old portal name-matching heuristic stays a lint (`undeclared-seam-
|
|
10
|
+
// candidate`). A legacy 1.0 manifest's `seams:` are still verified (same codes as before) with a
|
|
11
|
+
// `system-manifest-outdated` warning, so an unmigrated estate keeps working until `em upgrade`.
|
|
9
12
|
//
|
|
10
13
|
// It reads EXPORT DOCUMENTS ONLY — the `SystemExportDoc` shape below is the slice of `em
|
|
11
14
|
// export --json` (schema >= 1.10: `model.key`, `model.edges`) this check needs, and nothing here
|
|
@@ -13,43 +16,69 @@
|
|
|
13
16
|
// independently — no compile-time coupling"): a `.em` source is compiled into the same export
|
|
14
17
|
// document by the caller (src/cli/systemInputs.ts), so this verifier can't tell a co-located
|
|
15
18
|
// repo from a CI job aggregating exports from ten repos. Pure: no fs, no clock; output order
|
|
16
|
-
// is
|
|
19
|
+
// is model order (manifest or discovery) for models and bindings — every `consumes` binding in
|
|
20
|
+
// model/slice/element/ref order, then any legacy manifest seams — and stable derivation order
|
|
21
|
+
// for everything else.
|
|
17
22
|
import { AUTOMATION_KINDS } from "../parser/ast.js";
|
|
18
23
|
import { normalizeName } from "../model/model.js";
|
|
19
|
-
import { formatQualifiedRef, parseQualifiedRef } from "../model/qualifiedRef.js";
|
|
24
|
+
import { formatContractRef, formatQualifiedRef, parseContractRef, parseQualifiedRef } from "../model/qualifiedRef.js";
|
|
20
25
|
import { pushDiag } from "../model/rules.js";
|
|
26
|
+
import { adaptationMessage, compareConsumerFields } from "./adaptation.js";
|
|
27
|
+
import { LEGACY_SYSTEM_MANIFEST_SCHEMA_VERSION, SYSTEM_MANIFEST_SCHEMA_VERSION } from "./manifest.js";
|
|
21
28
|
const SEAM_ERROR_CODES = new Set([
|
|
22
29
|
"system-manifest-invalid",
|
|
23
30
|
"seam-endpoint-unresolved",
|
|
24
31
|
"seam-source-not-public",
|
|
25
32
|
"seam-consumer-not-reaction",
|
|
33
|
+
"consumes-unknown-model",
|
|
34
|
+
"consumes-unknown-element",
|
|
35
|
+
"consumer-not-adapted",
|
|
26
36
|
]);
|
|
27
|
-
/**
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
37
|
+
/** The `<kind>.<slug>` tail of an export element ref (`<sliceKey>/<kind>.<slug>`). */
|
|
38
|
+
function elementTail(ref) {
|
|
39
|
+
const slash = ref.indexOf("/");
|
|
40
|
+
return slash < 0 ? ref : ref.slice(slash + 1);
|
|
41
|
+
}
|
|
42
|
+
/** Verify a system: `models` (manifest order, or discovery order) plus, when the system came
|
|
43
|
+
* from a manifest, that `manifest` and the path manifest-level diagnostics point at. `manifest`
|
|
44
|
+
* is `null` in discovery mode (R4: no manifest found/given) — there is then no name, no
|
|
45
|
+
* manifest-key check, and no legacy seams. `preDiagnostics` (e.g. discovery's own
|
|
46
|
+
* `duplicate-model-key` warnings) lead the report's diagnostics unchanged. */
|
|
47
|
+
export function verifySystem(manifest, models, manifestFile, preDiagnostics = [], options = {}) {
|
|
48
|
+
const diagnostics = [...preDiagnostics];
|
|
31
49
|
const raise = (file, code, extra) => {
|
|
32
50
|
const bucket = [];
|
|
33
51
|
pushDiag(bucket, code, extra);
|
|
34
52
|
diagnostics.push({ ...bucket[0], file });
|
|
35
53
|
};
|
|
36
54
|
const qualify = formatQualifiedRef;
|
|
37
|
-
|
|
55
|
+
const manifestPath = manifestFile ?? "system.yaml";
|
|
56
|
+
if (manifest && manifest.systemSchemaVersion === LEGACY_SYSTEM_MANIFEST_SCHEMA_VERSION) {
|
|
57
|
+
raise(manifestPath, "system-manifest-outdated", {
|
|
58
|
+
message: `systemSchemaVersion "${LEGACY_SYSTEM_MANIFEST_SCHEMA_VERSION}" is outdated — seams now live on the consuming translation ` +
|
|
59
|
+
`(\`consumes <modelKey>:<kind>.<slug>\`) and owners on the model header (\`model "Name" owner "Team"\`); ` +
|
|
60
|
+
`run \`em upgrade <model>.em --apply\` once to migrate this manifest to "${SYSTEM_MANIFEST_SCHEMA_VERSION}"`,
|
|
61
|
+
line: manifest.versionLine,
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
// Models are addressed by their MANIFEST key throughout — even on a mismatch, so a binding
|
|
38
65
|
// written against the manifest's own vocabulary still verifies and the one error tells the
|
|
39
|
-
// author exactly which key to change.
|
|
66
|
+
// author exactly which key to change. In discovery mode the key IS the computed one (possibly
|
|
67
|
+
// `~n`-deduped), so there is nothing to mismatch.
|
|
40
68
|
const byKey = new Map();
|
|
41
69
|
for (const m of models) {
|
|
42
70
|
byKey.set(m.key, m);
|
|
43
|
-
if (m.doc.model.key !== m.key) {
|
|
71
|
+
if (manifest && m.doc.model.key !== m.key) {
|
|
44
72
|
const entry = manifest.models.find((e) => e.key === m.key);
|
|
45
73
|
const modelLabel = m.doc.model.name === null ? "(unnamed model)" : `model "${m.doc.model.name}"`;
|
|
46
|
-
raise(
|
|
74
|
+
raise(manifestPath, "system-model-key-mismatch", {
|
|
47
75
|
message: `manifest key "${m.key}" does not match the computed key "${m.doc.model.key}" of ${modelLabel} ` +
|
|
48
76
|
`(${m.source}) — rename the manifest entry to "${m.doc.model.key}"`,
|
|
49
77
|
line: entry?.line,
|
|
50
78
|
});
|
|
51
79
|
}
|
|
52
80
|
}
|
|
81
|
+
const modelKeyList = () => models.map((m) => m.key).join(", ");
|
|
53
82
|
const isReaction = (el) => AUTOMATION_KINDS.has(el.kind);
|
|
54
83
|
const isSurface = (el) => el.public === true && (el.kind === "event" || el.kind === "view");
|
|
55
84
|
const findElement = (model, ref) => {
|
|
@@ -60,17 +89,127 @@ export function verifySystem(manifest, models, manifestFile) {
|
|
|
60
89
|
}
|
|
61
90
|
return undefined;
|
|
62
91
|
};
|
|
63
|
-
|
|
64
|
-
const
|
|
65
|
-
const boundReactions = new Set(); // qualified refs named as a resolved `to`
|
|
92
|
+
const consumedSurface = new Set(); // qualified refs of resolved producers
|
|
93
|
+
const boundReactions = new Set(); // qualified refs of claimed consumers
|
|
66
94
|
const declaredPairs = new Map(); // fromQualified -> set of toQualified
|
|
67
|
-
const seenPairs = new
|
|
95
|
+
const seenPairs = new Map();
|
|
68
96
|
const seamsByModelPair = new Map();
|
|
69
|
-
const seams =
|
|
97
|
+
const seams = [];
|
|
98
|
+
const adaptation = { checked: 0, notAdapted: 0 };
|
|
99
|
+
const record = (origin, from, to, fromQualified, toQualified, fromModelKey, toModelKey, duplicate) => {
|
|
100
|
+
// Duplicate: same resolved (from, to) pair bound twice (a legacy bare-slice `to` and its
|
|
101
|
+
// element-level spelling, a ref repeated in `consumes`, or a 1.0 seam a `consumes` clause
|
|
102
|
+
// already declares). Warned on the second occurrence.
|
|
103
|
+
const pairKey = `${fromQualified} -> ${toQualified}`;
|
|
104
|
+
const previous = seenPairs.get(pairKey);
|
|
105
|
+
if (previous)
|
|
106
|
+
duplicate(previous);
|
|
107
|
+
else
|
|
108
|
+
seenPairs.set(pairKey, origin);
|
|
109
|
+
// A half-resolved binding still claims the endpoint it did resolve, so a typo on one side
|
|
110
|
+
// doesn't ALSO report the other side as dangling/unbound on top of the resolution error.
|
|
111
|
+
if (from)
|
|
112
|
+
consumedSurface.add(fromQualified);
|
|
113
|
+
if (to)
|
|
114
|
+
boundReactions.add(toQualified);
|
|
115
|
+
if (from && to) {
|
|
116
|
+
if (!declaredPairs.has(fromQualified))
|
|
117
|
+
declaredPairs.set(fromQualified, new Set());
|
|
118
|
+
declaredPairs.get(fromQualified).add(toQualified);
|
|
119
|
+
}
|
|
120
|
+
if (fromModelKey && toModelKey) {
|
|
121
|
+
const k = `${fromModelKey} ${toModelKey}`;
|
|
122
|
+
seamsByModelPair.set(k, (seamsByModelPair.get(k) ?? 0) + 1);
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
// ---- `consumes` bindings (MIL-235): every ref on every translation, model order. ----
|
|
126
|
+
for (const m of models) {
|
|
127
|
+
for (const slice of m.doc.model.slices) {
|
|
128
|
+
for (const el of slice.elements) {
|
|
129
|
+
const refs = el.consumes ?? [];
|
|
130
|
+
if (refs.length === 0)
|
|
131
|
+
continue;
|
|
132
|
+
const toQualified = qualify(m.key, el.ref);
|
|
133
|
+
const to = { modelKey: m.key, model: m, slice, element: el };
|
|
134
|
+
for (const raw of refs) {
|
|
135
|
+
const codes = [];
|
|
136
|
+
const consumer = `${el.kind} "${el.name}" (${toQualified})`;
|
|
137
|
+
const bindRaise = (code, message, refs = [toQualified, raw]) => {
|
|
138
|
+
codes.push(code);
|
|
139
|
+
raise(m.file, code, { message, line: el.line, refs });
|
|
140
|
+
};
|
|
141
|
+
let from;
|
|
142
|
+
const parsed = parseContractRef(raw);
|
|
143
|
+
const producer = parsed ? byKey.get(parsed.modelKey) : undefined;
|
|
144
|
+
if (!parsed) {
|
|
145
|
+
bindRaise("consumes-unknown-element", `${consumer} consumes "${raw}", which is not a <modelKey>:<kind>.<slug> contract ref (kind event or view)`);
|
|
146
|
+
}
|
|
147
|
+
else if (!producer) {
|
|
148
|
+
bindRaise("consumes-unknown-model", `${consumer} consumes "${raw}", but this system has no model "${parsed.modelKey}" — models are: ${modelKeyList()}`);
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
const tail = `${parsed.kind}.${parsed.slug}`;
|
|
152
|
+
let hit;
|
|
153
|
+
let unpublished;
|
|
154
|
+
for (const ps of producer.doc.model.slices) {
|
|
155
|
+
for (const pe of ps.elements) {
|
|
156
|
+
if (pe.kind !== parsed.kind || elementTail(pe.ref) !== tail)
|
|
157
|
+
continue;
|
|
158
|
+
if (pe.public === true)
|
|
159
|
+
hit ??= { slice: ps, element: pe };
|
|
160
|
+
else
|
|
161
|
+
unpublished ??= { slice: ps, element: pe };
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
if (hit) {
|
|
165
|
+
from = { modelKey: producer.key, model: producer, ...hit };
|
|
166
|
+
}
|
|
167
|
+
else if (unpublished) {
|
|
168
|
+
bindRaise("consumes-unknown-element", `${consumer} consumes "${raw}", but ${parsed.kind} "${unpublished.element.name}" ` +
|
|
169
|
+
`(${qualify(producer.key, unpublished.element.ref)}) is not marked \`public\` in model "${producer.key}"`);
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
bindRaise("consumes-unknown-element", `${consumer} consumes "${raw}", but model "${producer.key}" has no public ${parsed.kind} "${parsed.slug}"`);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
const fromQualified = from ? qualify(from.modelKey, from.element.ref) : raw;
|
|
176
|
+
record("consumes", from, to, fromQualified, toQualified, producer?.key, m.key, () => {
|
|
177
|
+
codes.push("seam-duplicate");
|
|
178
|
+
raise(m.file, "seam-duplicate", {
|
|
179
|
+
message: `${consumer} binds "${raw}" more than once — remove the repeated \`consumes\` ref`,
|
|
180
|
+
line: el.line,
|
|
181
|
+
refs: [toQualified, raw],
|
|
182
|
+
});
|
|
183
|
+
});
|
|
184
|
+
// MIL-239: the consumer's declared fields against the producer's public element now.
|
|
185
|
+
const consumerFields = el.fields ?? [];
|
|
186
|
+
if (from && consumerFields.length > 0) {
|
|
187
|
+
adaptation.checked++;
|
|
188
|
+
const problems = compareConsumerFields(consumerFields, from.element.fields ?? []);
|
|
189
|
+
if (problems.length > 0) {
|
|
190
|
+
adaptation.notAdapted++;
|
|
191
|
+
bindRaise("consumer-not-adapted", adaptationMessage(consumer, `${from.element.kind} "${from.element.name}" (${fromQualified})`, problems, options.producerCommit?.(from.model) ?? null), [toQualified, fromQualified]);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
seams.push({
|
|
195
|
+
from: fromQualified,
|
|
196
|
+
to: toQualified,
|
|
197
|
+
fromSlice: from ? qualify(from.modelKey, from.slice.key) : null,
|
|
198
|
+
toSlice: qualify(m.key, slice.key),
|
|
199
|
+
description: null,
|
|
200
|
+
status: codes.some((c) => SEAM_ERROR_CODES.has(c)) ? "error" : "verified",
|
|
201
|
+
diagnostics: codes,
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
// ---- Legacy 1.0 manifest seams: resolve both endpoints, then check what each one is. ----
|
|
208
|
+
(manifest?.seams ?? []).forEach((seam, i) => {
|
|
70
209
|
const codes = [];
|
|
71
210
|
const seamRaise = (code, message, refs) => {
|
|
72
211
|
codes.push(code);
|
|
73
|
-
raise(
|
|
212
|
+
raise(manifestPath, code, { message: `seams[${i}] (${seam.from} -> ${seam.to}): ${message}`, line: seam.line, refs });
|
|
74
213
|
};
|
|
75
214
|
const resolveModel = (raw, side) => {
|
|
76
215
|
const parsed = parseQualifiedRef(raw);
|
|
@@ -80,7 +219,7 @@ export function verifySystem(manifest, models, manifestFile) {
|
|
|
80
219
|
}
|
|
81
220
|
const model = byKey.get(parsed.modelKey);
|
|
82
221
|
if (!model) {
|
|
83
|
-
seamRaise("system-manifest-invalid", `\`${side}\` names unknown model key "${parsed.modelKey}" — declared models are: ${
|
|
222
|
+
seamRaise("system-manifest-invalid", `\`${side}\` names unknown model key "${parsed.modelKey}" — declared models are: ${modelKeyList()}`);
|
|
84
223
|
return undefined;
|
|
85
224
|
}
|
|
86
225
|
return { modelKey: parsed.modelKey, ref: parsed.ref, model };
|
|
@@ -120,7 +259,7 @@ export function verifySystem(manifest, models, manifestFile) {
|
|
|
120
259
|
}
|
|
121
260
|
}
|
|
122
261
|
else {
|
|
123
|
-
const slice = toModel.model.doc.model.slices.find((
|
|
262
|
+
const slice = toModel.model.doc.model.slices.find((sl) => sl.key === toModel.ref);
|
|
124
263
|
if (!slice) {
|
|
125
264
|
seamRaise("seam-endpoint-unresolved", `no slice "${toModel.ref}" in model "${toModel.modelKey}"`);
|
|
126
265
|
}
|
|
@@ -139,40 +278,18 @@ export function verifySystem(manifest, models, manifestFile) {
|
|
|
139
278
|
}
|
|
140
279
|
const fromQualified = from ? qualify(from.modelKey, from.element.ref) : seam.from;
|
|
141
280
|
const toQualified = to ? qualify(to.modelKey, to.element.ref) : seam.to;
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
const pairKey = `${fromQualified} -> ${toQualified}`;
|
|
145
|
-
if (seenPairs.has(pairKey)) {
|
|
146
|
-
seamRaise("seam-duplicate", "already declared earlier in the manifest");
|
|
147
|
-
}
|
|
148
|
-
seenPairs.add(pairKey);
|
|
149
|
-
// A half-resolved seam still claims the endpoint it did resolve, so a typo on one side
|
|
150
|
-
// doesn't ALSO report the other side as dangling/unbound on top of the resolution error.
|
|
151
|
-
if (from)
|
|
152
|
-
consumedSurface.add(fromQualified);
|
|
153
|
-
if (to)
|
|
154
|
-
boundReactions.add(toQualified);
|
|
155
|
-
if (from && to) {
|
|
156
|
-
if (!declaredPairs.has(fromQualified))
|
|
157
|
-
declaredPairs.set(fromQualified, new Set());
|
|
158
|
-
declaredPairs.get(fromQualified).add(toQualified);
|
|
159
|
-
}
|
|
160
|
-
if (fromModel && toModel) {
|
|
161
|
-
const k = `${fromModel.modelKey} ${toModel.modelKey}`;
|
|
162
|
-
seamsByModelPair.set(k, (seamsByModelPair.get(k) ?? 0) + 1);
|
|
163
|
-
}
|
|
164
|
-
const hasError = codes.some((c) => SEAM_ERROR_CODES.has(c));
|
|
165
|
-
return {
|
|
281
|
+
record("manifest", from, to, fromQualified, toQualified, fromModel?.modelKey, toModel?.modelKey, (previous) => seamRaise("seam-duplicate", previous === "manifest" ? "already declared earlier in the manifest" : "already declared by a `consumes` clause"));
|
|
282
|
+
seams.push({
|
|
166
283
|
from: fromQualified,
|
|
167
284
|
to: toQualified,
|
|
168
285
|
fromSlice: from ? qualify(from.modelKey, from.slice.key) : null,
|
|
169
286
|
toSlice: to ? qualify(to.modelKey, to.slice.key) : null,
|
|
170
287
|
description: seam.description,
|
|
171
|
-
status:
|
|
288
|
+
status: codes.some((c) => SEAM_ERROR_CODES.has(c)) ? "error" : "verified",
|
|
172
289
|
diagnostics: codes,
|
|
173
|
-
};
|
|
290
|
+
});
|
|
174
291
|
});
|
|
175
|
-
// ---- Per-model surface + the two "other end missing" checks,
|
|
292
|
+
// ---- Per-model surface + the two "other end missing" checks, model order. ----
|
|
176
293
|
const modelReports = models.map((m) => {
|
|
177
294
|
const publicSurface = [];
|
|
178
295
|
for (const slice of m.doc.model.slices) {
|
|
@@ -183,7 +300,9 @@ export function verifySystem(manifest, models, manifestFile) {
|
|
|
183
300
|
const q = qualify(m.key, el.ref);
|
|
184
301
|
if (!consumedSurface.has(q)) {
|
|
185
302
|
raise(m.file, "dangling-public-event", {
|
|
186
|
-
message: `public ${el.kind} "${el.name}" (${q}) is consumed by
|
|
303
|
+
message: `public ${el.kind} "${el.name}" (${q}) is consumed by nothing in this system — add ` +
|
|
304
|
+
`\`consumes ${formatContractRef(m.key, el.kind, elementTail(el.ref).slice(el.kind.length + 1))}\` ` +
|
|
305
|
+
"to the translation that reads it, or drop `public`",
|
|
187
306
|
line: el.line,
|
|
188
307
|
refs: [q],
|
|
189
308
|
});
|
|
@@ -194,7 +313,7 @@ export function verifySystem(manifest, models, manifestFile) {
|
|
|
194
313
|
});
|
|
195
314
|
// "Externally fed" is computed from the export's own edge list, never re-derived: a reaction
|
|
196
315
|
// with no incoming edge in `model.edges` (no `from` view feeds it — pattern, `from`, or arrow)
|
|
197
|
-
// is fed from outside its model by construction. With no
|
|
316
|
+
// is fed from outside its model by construction. With no binding claiming it, nobody in the
|
|
198
317
|
// system says what feeds it.
|
|
199
318
|
for (const m of models) {
|
|
200
319
|
const fedInside = new Set(m.doc.model.edges.map((e) => e.to));
|
|
@@ -206,7 +325,9 @@ export function verifySystem(manifest, models, manifestFile) {
|
|
|
206
325
|
if (boundReactions.has(q))
|
|
207
326
|
continue;
|
|
208
327
|
raise(m.file, "unbound-translation", {
|
|
209
|
-
message:
|
|
328
|
+
message: el.kind === "translation"
|
|
329
|
+
? `translation "${el.name}" (${q}) has no in-model source and consumes nothing — add \`consumes <modelKey>:<kind>.<slug>\` naming the public event/view that feeds it, or add a \`from\``
|
|
330
|
+
: `${el.kind} "${el.name}" (${q}) has no in-model source and nothing binds it — add a \`from\` (only a translation can \`consumes\` another model's public surface)`,
|
|
210
331
|
line: el.line,
|
|
211
332
|
refs: [q],
|
|
212
333
|
});
|
|
@@ -214,7 +335,7 @@ export function verifySystem(manifest, models, manifestFile) {
|
|
|
214
335
|
}
|
|
215
336
|
}
|
|
216
337
|
// The old portal heuristic, demoted: a public element in model A sharing its normalized
|
|
217
|
-
// name with a reaction or event in model B (B != A), with no
|
|
338
|
+
// name with a reaction or event in model B (B != A), with no binding between them.
|
|
218
339
|
for (const a of models) {
|
|
219
340
|
for (const aSlice of a.doc.model.slices) {
|
|
220
341
|
for (const el of aSlice.elements) {
|
|
@@ -239,7 +360,7 @@ export function verifySystem(manifest, models, manifestFile) {
|
|
|
239
360
|
continue;
|
|
240
361
|
raise(a.file, "undeclared-seam-candidate", {
|
|
241
362
|
message: `public ${el.kind} "${el.name}" (${aq}) and ${other.kind} "${other.name}" (${bq}) look connected by name, ` +
|
|
242
|
-
"but no
|
|
363
|
+
"but no `consumes` binds them — add the `consumes` ref to the consuming translation, or rename",
|
|
243
364
|
line: el.line,
|
|
244
365
|
refs: [aq, bq],
|
|
245
366
|
});
|
|
@@ -258,6 +379,6 @@ export function verifySystem(manifest, models, manifestFile) {
|
|
|
258
379
|
})
|
|
259
380
|
.sort((x, y) => x.from.localeCompare(y.from) || x.to.localeCompare(y.to)),
|
|
260
381
|
};
|
|
261
|
-
return { name: manifest
|
|
382
|
+
return { name: manifest?.name ?? null, models: modelReports, seams, contextMap, consumerAdaptation: adaptation, diagnostics };
|
|
262
383
|
}
|
|
263
384
|
//# sourceMappingURL=verify.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify.js","sourceRoot":"","sources":["../../src/system/verify.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,4FAA4F;AAC5F,8FAA8F;AAC9F,gGAAgG;AAChG,iGAAiG;AACjG,6FAA6F;AAC7F,8FAA8F;AAC9F,qFAAqF;AACrF,EAAE;AACF,yFAAyF;AACzF,iGAAiG;AACjG,0FAA0F;AAC1F,8FAA8F;AAC9F,6FAA6F;AAC7F,6FAA6F;AAC7F,sFAAsF;AAEtF,OAAO,EAAE,gBAAgB,EAAe,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,E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C3G,+FAA+F;gCACjG,IAAI,EAAE,EAAE,CAAC,IAAI;gCACb,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;6BACf,CAAC,CAAC;wBACL,CAAC;oBACH,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,MAAM,UAAU,GAAe;QAC7B,KAAK,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC;QAC9E,KAAK,EAAE,CAAC,GAAG,gBAAgB,CAAC,OAAO,EAAE,CAAC;aACnC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE;YAClB,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAChC,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;QACpC,CAAC,CAAC;aACD,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;KAC5E,CAAC;IAEF,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,IAAI,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,UAAU,EAAE,WAAW,EAAE,CAAC;AAChI,CAAC"}
|
package/dist/templates.d.ts
CHANGED
|
@@ -2,10 +2,10 @@ export declare const STARTER_EM = "model \"Order Fulfillment\"\n\npersona Custom
|
|
|
2
2
|
/** Raw copy of templates/model-readme.md, \`{{...}}\` placeholders intact — see scaffoldReadme(). */
|
|
3
3
|
export declare const MODEL_README_TEMPLATE = "# {{Model Name}}\n\n{{One-paragraph description of the business process(es) this event model covers.}}\n\n## Live view\nWhile modeling, run the live view so the team can watch the diagram update:\n\n```bash\nem watch {{model-name}}.em -o {{model-name}}.svg --serve # re-render + instant push-reload\n# then open the URL it prints (http://localhost:5173/?svg={{model-name}}.svg) and share the screen\n```\n\nPan/zoom to navigate the diagram (drag, scroll; **Fit** resets), and click **Review mode** in\nthe header for a slice-by-slice walkthrough. If a save fails to render, the viewer keeps the\nlast good diagram and shows an error banner until the next successful load.\n\nStatic render: `em render {{model-name}}.em -o {{model-name}}.svg`\n\n## Patterns legend\n- **State Change** \u2014 UI \u2192 Command \u2192 Event\n- **State View** \u2014 Event(s) \u2192 Read Model \u2192 UI\n- **Automation** \u2014 Read Model (slice before) \u2192 Processor + Command \u2192 Event, together\n- **Translation** \u2014 External input (or Read Model, slice before) \u2192 Translation + Command \u2192 Event, together\n\nBetween them these are the only legal connections: `ui \u2192 command`, `command \u2192 event`,\n`event \u2192 read model`, `read model \u2192 ui`, `read model \u2192 reaction`, `reaction \u2192 command`. A command\nnever reaches a read model directly \u2014 the event goes between them. Every slice is joined up at\nboth ends: something triggers each command (the screen it's issued from, or the reaction that\ntriggers it, also in this slice), and every event a command records is read by some read model \u2014 so each State\nChange slice is paired with the State View slice that projects its event. A read model repeated\nalong the timeline (`view X again`) shows the same projection at a later point; the instances are\nnever connected to one another.\n\n## Slices\n<!-- The canonical slice index \u2014 the ONE place slices are enumerated (the state file\n points here rather than keeping its own copy). Generated \u2014 run\n `em slice index {{model-name}}.em` to (re)write the table below from the model and its\n slice docs; never hand-edit between the markers. -->\n<!-- GENERATED:slices:start -->\n| # | Slice | Pattern | Status | Reviewed by | Ratified by | Owner | Tracking | Implemented in | Design doc |\n|---|-------|---------|--------|-------------|-------------|-------|----------|----------------|------------|\n<!-- GENERATED:slices:end -->\n\n## Status\nSee [`.event-modeling.md`](.event-modeling.md) for current phase, decisions, and open questions.\n";
|
|
4
4
|
/** Raw copy of templates/state.md, \`{{...}}\` placeholders intact — see scaffoldStateFile(). */
|
|
5
|
-
export declare const STATE_TEMPLATE = "<!--\nResumable progress state for an event model. Stored as <model>/.event-modeling.md\nThe skill reads this on `/event-modeling` (no arg) to resume where you left off.\nKeep it current at the end of every working session.\n-->\n\n# Event Modeling Progress \u2014 {{Model Name}}\n\n- **Model file:** `{{model-name}}.em`\n- **Em version:** {{X.Y.Z}}\n- **Current phase:** {{discover | extract | model | slice | implement | conform | review | validate}}\n- **Current step:** {{1\u20137, see methodology; or extraction round R1\u2013R7}}\n- **Last updated:** {{YYYY-MM-DD}}\n- **Last conformance:** {{YYYY-MM-DD @ <target-repo revision> \u2014 report: conformance/<date>-report.md | never}}\n- **Model version:** {{N | none}}\n- **Certified:** {{v<N> @ <target-repo revision> (YYYY-MM-DD) | never}}\n- **Last stakeholder review:** {{YYYY-MM-DD \u2014 attendees: see Participants | never}}\n\n## Session inputs\n- **Scope line:** {{one-line description of what's in/out of bounds for this model}}\n- **PRD / spec reference:** {{path, link, or \"none\"}}\n- **Headless/API model:** {{yes | no}}\n- **Source mode:** {{greenfield | extract-event-driven | extract-procedural}}\n- **Existing system refs:** {{repo paths, event-schema/topic locations, docs \u2014 or \"n/a\"}}\n\n## Participants\n<!-- Populate at session start. Live workshop: one human proxy relays questions to the room;\n attribute every answer/decision in the Decisions log to a named participant here. -->\n- {{Name}} \u2014 {{role}} \u2014 {{domain area}}\n\n## Extraction progress (existing-system models only \u2014 delete for greenfield)\n- [ ] R1. Candidate events (extracted/synthesized, filtered, confirmed)\n- [ ] R2. Timeline order (as-is narrative, actors/callers, first render)\n- [ ] R3. Commands / inputs\n- [ ] R4. Read models / outputs (validate from here)\n- [ ] R5. Boundaries & reactions (reaction shares its slice with the command it triggers)\n- [ ] R6. Gap & TBD reconciliation\n- [ ] R7. Convergence (render + validate clean, user confirmed as-is)\n\n## Steps completed\n- [ ] 1. Brainstorm events\n- [ ] 2. Plot / storyboard (personas + UI)\n- [ ] 3. Inputs (commands)\n- [ ] 4. Outputs (read models)\n- [ ] 5. Swimlanes & apply patterns\n- [ ] 6. Elaborate scenarios\n- [ ] 7. Evaluate completeness (`em validate` clean)\n\n## Decisions log\n<!-- Resolved choices, with the reasoning, so they aren't re-litigated. In a live workshop,\n attribute each entry to the participant who made the call (see Participants above)
|
|
5
|
+
export declare const STATE_TEMPLATE = "<!--\nResumable progress state for an event model. Stored as <model>/.event-modeling.md\nThe skill reads this on `/event-modeling` (no arg) to resume where you left off.\nKeep it current at the end of every working session.\n-->\n\n# Event Modeling Progress \u2014 {{Model Name}}\n\n- **Model file:** `{{model-name}}.em`\n- **Em version:** {{X.Y.Z}}\n- **Current phase:** {{discover | extract | model | slice | implement | conform | review | validate}}\n- **Current step:** {{1\u20137, see methodology; or extraction round R1\u2013R7}}\n- **Last updated:** {{YYYY-MM-DD}}\n- **Last conformance:** {{YYYY-MM-DD @ <target-repo revision> \u2014 report: conformance/<date>-report.md | never}}\n- **Model version:** {{N | none}}\n- **Certified:** {{v<N> @ <target-repo revision> (YYYY-MM-DD) | never}}\n- **Last stakeholder review:** {{YYYY-MM-DD \u2014 attendees: see Participants | never}}\n\n## Session inputs\n- **Scope line:** {{one-line description of what's in/out of bounds for this model}}\n- **PRD / spec reference:** {{path, link, or \"none\"}}\n- **Headless/API model:** {{yes | no}}\n- **Source mode:** {{greenfield | extract-event-driven | extract-procedural}}\n- **Existing system refs:** {{repo paths, event-schema/topic locations, docs \u2014 or \"n/a\"}}\n\n## Participants\n<!-- Populate at session start. Live workshop: one human proxy relays questions to the room;\n attribute every answer/decision in the Decisions log to a named participant here. -->\n- {{Name}} \u2014 {{role}} \u2014 {{domain area}}\n\n## Extraction progress (existing-system models only \u2014 delete for greenfield)\n- [ ] R1. Candidate events (extracted/synthesized, filtered, confirmed)\n- [ ] R2. Timeline order (as-is narrative, actors/callers, first render)\n- [ ] R3. Commands / inputs\n- [ ] R4. Read models / outputs (validate from here)\n- [ ] R5. Boundaries & reactions (reaction shares its slice with the command it triggers)\n- [ ] R6. Gap & TBD reconciliation\n- [ ] R7. Convergence (render + validate clean, user confirmed as-is)\n\n## Steps completed\n- [ ] 1. Brainstorm events\n- [ ] 2. Plot / storyboard (personas + UI)\n- [ ] 3. Inputs (commands)\n- [ ] 4. Outputs (read models)\n- [ ] 5. Swimlanes & apply patterns\n- [ ] 6. Elaborate scenarios\n- [ ] 7. Evaluate completeness (`em validate` clean)\n\n## Decisions log\n<!-- Resolved choices, with the reasoning, so they aren't re-litigated. In a live workshop,\n attribute each entry to the participant who made the call (see Participants above).\n Every entry is a dated bullet (\"- YYYY-MM-DD: ...\"); em changelog skips any other line.\n Seam change request (a needed change to another model's public element; never edit that\n model, keep the open question blocked on its owners):\n - YYYY-MM-DD: seam change request \u2192 <producerKey>:<kind>.<slug> \u2014 <what> \u2014 <why> -->\n- {{YYYY-MM-DD}}: {{decision}} \u2014 {{why}} \u2014 by {{participant, if a live workshop}}\n\n## Usage log\n<!-- The team's only usage signal today (see docs/usage-data.md) \u2014 cheap and coarse on purpose.\n One line per session: phase(s) touched, and validate diagnostic *categories* hit (one of\n the exact fixed strings in docs/usage-data.md#categories, e.g. \"read model has no\n consumer\" \u2014 never the full instance message or any domain content). Append, never edit\n past entries. -->\n- {{YYYY-MM-DD}}: phases: {{discover | extract | model | slice | implement | conform | review | validate | watch, ...}} \u2014 validate: {{diagnostic category (docs/usage-data.md#categories), ... | none}}\n\n## Open questions / parking lot\n<!-- Unresolved items to bring back to the user. Never guess these. Metadata is optional and\n flat \u2014 add only what's known: source (ticket/conversation that spawned it), blocked on\n (who/what), revisit (when). -->\n- [ ] {{question}} \u2014 source: {{ticket/conversation link, optional}} \u2014 blocked on: {{who/what, optional}} \u2014 revisit: {{when, optional}}\n\n## Slice inventory\n<!-- Deliberately NOT a table: the canonical slice index (slice, pattern, status, doc link)\n lives in README.md's \"Slices\" section \u2014 one source of truth, updated there. This file\n only tracks resumable session state. -->\nSee `README.md` \u2192 **Slices** for the slice index and per-slice doc status.\n";
|
|
6
6
|
/** Raw copy of templates/constitution.md, \`{{...}}\` placeholders intact — see
|
|
7
7
|
* scaffoldConstitution(). */
|
|
8
|
-
export declare const CONSTITUTION_TEMPLATE = "<!--\nThe implementation constitution: the house rules an implementing agent follows on EVERY slice \u2014\nstack, code style, testing norms, NFR baselines, review norms. It answers \"how do we build things\nhere\" once, so no slice doc has to repeat it and no agent has to invent it. Slice docs say WHAT to\nbuild; this says HOW it gets built here.\n\nWhere this document lives:\n - No SDD tool: `constitution.md` beside the model \u2014 `em scaffold` writes it there.\n - spec-kit project (a `.specify/` directory exists anywhere above the model): the document IS\n `.specify/memory/constitution.md`. em writes no second copy; the sections below merge into\n that file under these same headings, never overwriting text already there, and ratification is\n recorded in spec-kit's own `**Ratified**:` footer line instead of the frontmatter below.\n\nHow it gets filled: not by an agent guessing. Each section opens with the question a short\nfacilitated conversation asks before the first slice is implemented \u2014 the procedure is \"Before the\nfirst slice: the constitution\" in the `event-modeling-implement` skill's `reference/implement.md`\n(`em contract` prints it). Replace each `{{...}}` block with the real answers; delete the guidance\ncomments and any row that doesn't apply.\n\nRatification: `ratifiedBy:`/`ratifiedOn:` are the same identity discipline slice docs use \u2014 a\nNAMED human and an ISO date, hand-filled at sign-off (no `em` command writes this file).\n**A constitution with an empty `ratifiedBy:` is a draft**: an implementing agent treats it as\nunratified, says so, and does not proceed on unilateral style or stack decisions for a first slice.\n\n`em status` reports this document as present or absent per model \u2014 existence only. em never reads\nor validates its content, and nothing here
|
|
8
|
+
export declare const CONSTITUTION_TEMPLATE = "<!--\nThe implementation constitution: the house rules an implementing agent follows on EVERY slice \u2014\nstack, code style, testing norms, NFR baselines, review norms. It answers \"how do we build things\nhere\" once, so no slice doc has to repeat it and no agent has to invent it. Slice docs say WHAT to\nbuild; this says HOW it gets built here.\n\nWhere this document lives:\n - No SDD tool: `constitution.md` beside the model \u2014 `em scaffold` writes it there.\n - spec-kit project (a `.specify/` directory exists anywhere above the model): the document IS\n `.specify/memory/constitution.md`. em writes no second copy; the sections below merge into\n that file under these same headings, never overwriting text already there, and ratification is\n recorded in spec-kit's own `**Ratified**:` footer line instead of the frontmatter below.\n\nHow it gets filled: not by an agent guessing. Each section opens with the question a short\nfacilitated conversation asks before the first slice is implemented \u2014 the procedure is \"Before the\nfirst slice: the constitution\" in the `event-modeling-implement` skill's `reference/implement.md`\n(`em contract` prints it). Replace each `{{...}}` block with the real answers; delete the guidance\ncomments and any row that doesn't apply.\n\nRatification: `ratifiedBy:`/`ratifiedOn:` are the same identity discipline slice docs use \u2014 a\nNAMED human and an ISO date, hand-filled at sign-off (no `em` command writes this file).\n**A constitution with an empty `ratifiedBy:` is a draft**: an implementing agent treats it as\nunratified, says so, and does not proceed on unilateral style or stack decisions for a first slice.\n\n`em status` reports this document as present or absent per model \u2014 existence only. em never reads\nor validates its content, and the CLI parses nothing here. Three lines are read as plain text by\nthe engagement skill and its sub-agents, so keep their exact shape: `- **Test command:**` (the\nvalidator), `- **Merge strategy:**` and `- **Agent models:**` (the engagement skill). In a spec-kit\nproject they merge under the same headings in `.specify/memory/constitution.md`.\n-->\n\n---\nschemaVersion: 1\nratifiedBy:\nratifiedOn:\n---\n# {{Project Name}} \u2014 implementation constitution\n\nThe house rules for how implementation happens in this project. They bound every \"purely\ntechnical choice\" an implementing agent would otherwise make alone.\n\n## Stack and architectural shape\n\n> **What do we build on, what shape does the code take, and which implementation skill or\n> approach does each slice pattern route to?**\n\n- **Languages / runtimes:** {{e.g. Kotlin 2.x on JVM 21; TypeScript 5 on Node 24}}\n- **Frameworks / platform:** {{web framework, persistence, messaging, build tool}}\n- **Architectural pattern:** {{e.g. event-sourced CQRS with vertical slices; layered service over\n a relational store; functional core / imperative shell}}\n- **Where a slice's code lives:** {{one package per slice, per context, ...}}\n- **Interface conventions:** {{resource style \u2014 REST/RPC/GraphQL, etc.; error/rejection mapping;\n versioning; auth at the edge \u2014 the shape every `ui`-triggered command or `ui`-consumed view's\n endpoint follows, decided once here rather than invented per slice}}\n\nRouting \u2014 which implementation skill or approach each of the four slice patterns uses:\n\n| Pattern | Skill / approach |\n|---|---|\n| State Change | {{e.g. the `axon-*` skill set \u2014 axon-entity-patterns, then axon-entity-testing}} |\n| State View | {{e.g. the `axon-*` skill set \u2014 axon-projection-patterns, then axon-projection-testing}} |\n| Automation | {{e.g. the `axon-*` skill set \u2014 axon-policy-patterns, then axon-policy-testing}} |\n| Translation | {{e.g. the `axon-*` skill set \u2014 axon-translation-patterns}} |\n\nAn agent implementing a slice reads the doc's `pattern:` frontmatter and follows that row \u2014 this\ntable is the only routing rule.\n\n## Code style\n\n> **What does \"idiomatic\" mean in this codebase \u2014 formatting, naming, module layout?**\n\n- **Formatter / linter:** {{the tool and the command that runs it \u2014 never hand-format against it}}\n- **Naming:** {{commands, events, handlers, files, test names}}\n- **Module layout:** {{what lives in which file/package, and what may not import what}}\n- **Idiomatic here means:** {{the two or three habits a new contributor most often gets wrong}}\n\n## Testing norms\n\n> **What must be tested for each slice pattern, where do those tests live, and how are they named\n> so `em coverage` can trace invariant IDs?**\n\n- **Levels required per pattern:** {{e.g. State Change \u2014 decider unit tests plus a\n given/when/then fixture test; State View \u2014 projection tests; Automation / Translation \u2014\n reaction tests, including a negative case}}\n- **Invariant tests:** {{where they live}} \u2014 every `INV-<MNEMONIC>-n` in a slice doc needs at least\n one test **citing that exact ID** in its name or a comment, so\n `em coverage <model>.em --tests <dir>` can trace it.\n- **Scenario tests:** {{where they live}} \u2014 one per `## Scenarios (Given / When / Then)` entry,\n with rejection scenarios asserting the doc's named rejection reason.\n- **Test naming convention:** {{the exact pattern, e.g. `INV-ORD-3: rejects a second submit`}}\n- **What \"green\" means:** {{the command CI runs}}\n- **Test command:** `{{the one command that runs the tests, e.g. ./gradlew test}}`\n What the `em-validator` sub-agent runs. Keep exactly this shape: one line, the command in\n backticks. Absent, the validator reports \"no test command in the constitution\" and runs only the\n em checks.\n\n## NFR baselines\n\n> **What standing non-functional defaults does every slice inherit \u2014 authz, PII, performance,\n> observability?**\n\n- **Authorization model:** {{who may issue which commands, how it's enforced, and where}}\n- **PII / data handling:** {{what is sensitive, what may be logged, retention}}\n- **Performance defaults:** {{latency / throughput budgets that apply unless a slice says otherwise}}\n- **Observability:** {{logging, metrics, tracing every slice is expected to emit}}\n\nA slice doc's own `## Non-Functional Requirements` section overrides these for that slice; where\nit is silent, these apply.\n\n## Review and merge norms\n\n> **Who reviews an implementation PR, what blocks a merge, and how does the slice doc's status\n> flip fit in?**\n\n- **Reviewers:** {{who \u2014 a team, a CODEOWNERS rule, the slice's ratifier}}\n- **What blocks a merge:** {{e.g. a failing suite, an uncovered invariant, a gap that belongs back\n at the model}}\n- **Branch / commit conventions:** {{...}} \u2014 name only branch naming and commit-message style\n here. **One slice doc = one PR is the implement contract's rule, not this document's to\n amend** \u2014 a `covers:` doc ships as one PR for both keys; a read model is one doc, so a later\n `again` instance is a continuation of the doc that first declared it, not a PR of its own. See\n the agent guide's \u00A75/\u00A710.\n- **Merge strategy:** merge-commits-when-stacked\n {{**How do PRs merge, and what happens when one PR depends on another?** Merge commits whenever\n a dependent PR is open; squash only a PR with no open dependent (implement contract \u00A78 rule 2a).\n Keep this exact line: it is the only value the engagement skill accepts, and it refuses to run\n without it.}}\n- **Agent models:** implementer=sonnet, validator=sonnet, reviewer=sonnet, critic=opus\n {{**Which model runs each em sub-agent?** Keep this exact line shape, with the defaults shown or\n your own choices. The critic must run on a different model from the implementer; `critic=codex`\n selects the Codex critic. Absent, the engagement skill states these defaults once and\n proceeds.}}\n- **At merge:** run `em slice mark-implemented <model>.em <slice-key> <pr-url>` \u2014 the one edit an\n implementing agent makes to a ratified slice doc, run by {{the PR author | CI}}. Never bump\n `version:`; that moves only when a delta is ratified.\n";
|
|
9
9
|
/** Same STARTER_EM content `em init` writes, titled from an arbitrary display name — used by
|
|
10
10
|
* `em scaffold`, which (unlike `em init`) knows a name to title the model with. */
|
|
11
11
|
export declare function starterEmFor(title: string): string;
|
package/dist/templates.js
CHANGED
|
@@ -157,7 +157,11 @@ Keep it current at the end of every working session.
|
|
|
157
157
|
|
|
158
158
|
## Decisions log
|
|
159
159
|
<!-- Resolved choices, with the reasoning, so they aren't re-litigated. In a live workshop,
|
|
160
|
-
attribute each entry to the participant who made the call (see Participants above).
|
|
160
|
+
attribute each entry to the participant who made the call (see Participants above).
|
|
161
|
+
Every entry is a dated bullet ("- YYYY-MM-DD: ..."); em changelog skips any other line.
|
|
162
|
+
Seam change request (a needed change to another model's public element; never edit that
|
|
163
|
+
model, keep the open question blocked on its owners):
|
|
164
|
+
- YYYY-MM-DD: seam change request → <producerKey>:<kind>.<slug> — <what> — <why> -->
|
|
161
165
|
- {{YYYY-MM-DD}}: {{decision}} — {{why}} — by {{participant, if a live workshop}}
|
|
162
166
|
|
|
163
167
|
## Usage log
|
|
@@ -207,7 +211,10 @@ NAMED human and an ISO date, hand-filled at sign-off (no \`em\` command writes t
|
|
|
207
211
|
unratified, says so, and does not proceed on unilateral style or stack decisions for a first slice.
|
|
208
212
|
|
|
209
213
|
\`em status\` reports this document as present or absent per model — existence only. em never reads
|
|
210
|
-
or validates its content, and nothing here
|
|
214
|
+
or validates its content, and the CLI parses nothing here. Three lines are read as plain text by
|
|
215
|
+
the engagement skill and its sub-agents, so keep their exact shape: \`- **Test command:**\` (the
|
|
216
|
+
validator), \`- **Merge strategy:**\` and \`- **Agent models:**\` (the engagement skill). In a spec-kit
|
|
217
|
+
project they merge under the same headings in \`.specify/memory/constitution.md\`.
|
|
211
218
|
-->
|
|
212
219
|
|
|
213
220
|
---
|
|
@@ -270,6 +277,10 @@ table is the only routing rule.
|
|
|
270
277
|
with rejection scenarios asserting the doc's named rejection reason.
|
|
271
278
|
- **Test naming convention:** {{the exact pattern, e.g. \`INV-ORD-3: rejects a second submit\`}}
|
|
272
279
|
- **What "green" means:** {{the command CI runs}}
|
|
280
|
+
- **Test command:** \`{{the one command that runs the tests, e.g. ./gradlew test}}\`
|
|
281
|
+
What the \`em-validator\` sub-agent runs. Keep exactly this shape: one line, the command in
|
|
282
|
+
backticks. Absent, the validator reports "no test command in the constitution" and runs only the
|
|
283
|
+
em checks.
|
|
273
284
|
|
|
274
285
|
## NFR baselines
|
|
275
286
|
|
|
@@ -297,6 +308,16 @@ it is silent, these apply.
|
|
|
297
308
|
amend** — a \`covers:\` doc ships as one PR for both keys; a read model is one doc, so a later
|
|
298
309
|
\`again\` instance is a continuation of the doc that first declared it, not a PR of its own. See
|
|
299
310
|
the agent guide's §5/§10.
|
|
311
|
+
- **Merge strategy:** merge-commits-when-stacked
|
|
312
|
+
{{**How do PRs merge, and what happens when one PR depends on another?** Merge commits whenever
|
|
313
|
+
a dependent PR is open; squash only a PR with no open dependent (implement contract §8 rule 2a).
|
|
314
|
+
Keep this exact line: it is the only value the engagement skill accepts, and it refuses to run
|
|
315
|
+
without it.}}
|
|
316
|
+
- **Agent models:** implementer=sonnet, validator=sonnet, reviewer=sonnet, critic=opus
|
|
317
|
+
{{**Which model runs each em sub-agent?** Keep this exact line shape, with the defaults shown or
|
|
318
|
+
your own choices. The critic must run on a different model from the implementer; \`critic=codex\`
|
|
319
|
+
selects the Codex critic. Absent, the engagement skill states these defaults once and
|
|
320
|
+
proceeds.}}
|
|
300
321
|
- **At merge:** run \`em slice mark-implemented <model>.em <slice-key> <pr-url>\` — the one edit an
|
|
301
322
|
implementing agent makes to a ratified slice doc, run by {{the PR author | CI}}. Never bump
|
|
302
323
|
\`version:\`; that moves only when a delta is ratified.
|
package/dist/templates.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../src/templates.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,mCAAmC;AAEnC,MAAM,CAAC,MAAM,UAAU,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiDzB,CAAC;AAEF,wDAAwD;AACxD,EAAE;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C,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;SACtC,IAAI,CAAC,IAAI,CAAC,CAAC;AAChB,CAAC;AAED;;;;;;;;4CAQ4C;AAC5C,MAAM,UAAU,oBAAoB,CAAC,WAAmB;IACtD,6FAA6F;IAC7F,0FAA0F;IAC1F,wCAAwC;IACxC,OAAO,qBAAqB,CAAC,OAAO,CAAC,kBAAkB,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,CAAC;AAC9E,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milehimikey/em",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.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": {
|
|
@@ -20,7 +20,10 @@
|
|
|
20
20
|
"dist",
|
|
21
21
|
"README.md",
|
|
22
22
|
"LICENSE",
|
|
23
|
-
".claude/skills"
|
|
23
|
+
".claude/skills",
|
|
24
|
+
".claude/agents",
|
|
25
|
+
"plugin",
|
|
26
|
+
".claude-plugin"
|
|
24
27
|
],
|
|
25
28
|
"scripts": {
|
|
26
29
|
"build": "tsc -p tsconfig.json",
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "em",
|
|
3
|
+
"version": "1.14.1",
|
|
4
|
+
"description": "Event Modeling with em: discover, design, implement, conform, review and engagement skills over a slice-first text DSL, plus the em MCP server.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Mike Key"
|
|
7
|
+
},
|
|
8
|
+
"mcpServers": {
|
|
9
|
+
"em": {
|
|
10
|
+
"command": "npx",
|
|
11
|
+
"args": [
|
|
12
|
+
"-y",
|
|
13
|
+
"@milehimikey/em@1.14.1",
|
|
14
|
+
"mcp"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|