@sdd-method/sdd-cli 1.3.2 → 1.5.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.
- package/dist/lib/catalogue/builders/adrs.d.ts.map +1 -1
- package/dist/lib/catalogue/builders/adrs.js +19 -1
- package/dist/lib/catalogue/builders/adrs.js.map +1 -1
- package/dist/lib/catalogue/builders/quality-scores.d.ts.map +1 -1
- package/dist/lib/catalogue/builders/quality-scores.js +159 -8
- package/dist/lib/catalogue/builders/quality-scores.js.map +1 -1
- package/dist/lib/catalogue/canonical-schema.yaml +59 -9
- package/dist/lib/catalogue/graph-projection.d.ts +65 -0
- package/dist/lib/catalogue/graph-projection.d.ts.map +1 -0
- package/dist/lib/catalogue/graph-projection.js +293 -0
- package/dist/lib/catalogue/graph-projection.js.map +1 -0
- package/dist/lib/catalogue/graph-run.d.ts +39 -0
- package/dist/lib/catalogue/graph-run.d.ts.map +1 -0
- package/dist/lib/catalogue/graph-run.js +73 -0
- package/dist/lib/catalogue/graph-run.js.map +1 -0
- package/dist/lib/catalogue/impact-run.d.ts +73 -0
- package/dist/lib/catalogue/impact-run.d.ts.map +1 -0
- package/dist/lib/catalogue/impact-run.js +0 -0
- package/dist/lib/catalogue/impact-run.js.map +1 -0
- package/dist/lib/catalogue/rubric-coverage-map.yaml +176 -0
- package/dist/lib/catalogue/scores-coverage.d.ts +13 -0
- package/dist/lib/catalogue/scores-coverage.d.ts.map +1 -1
- package/dist/lib/catalogue/scores-coverage.js +113 -2
- package/dist/lib/catalogue/scores-coverage.js.map +1 -1
- package/dist/lib/lock-file.d.ts.map +1 -1
- package/dist/lib/lock-file.js +7 -1
- package/dist/lib/lock-file.js.map +1 -1
- package/dist/verbs/catalogue.d.ts.map +1 -1
- package/dist/verbs/catalogue.js +56 -0
- package/dist/verbs/catalogue.js.map +1 -1
- package/package.json +1 -1
- package/scripts/sync-canonical-schema.sh +21 -0
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Graph projection — `sdd-cli catalogue graph` (M-ADR 0205 §4.6, Phase C0b).
|
|
3
|
+
*
|
|
4
|
+
* Derives a typed node/edge list (JSON Lines) from built catalogues. The
|
|
5
|
+
* projection is DERIVED, never authored, never a second source of truth:
|
|
6
|
+
* regenerated on every run, digest-stamped, not committed. The derivation
|
|
7
|
+
* rule is the C0a rule table (catalogue-engine-evolution plan), keyed on
|
|
8
|
+
* the rubric-coverage-map's `kind` × the schema's FK arity:
|
|
9
|
+
*
|
|
10
|
+
* entity (less `applications`) → nodes, id = "<catalogue>/<pk>"
|
|
11
|
+
* entity FK columns → edges typed "<catalogue>.<column>"
|
|
12
|
+
* edge, 2 FKs → edges, declaration order = source→target;
|
|
13
|
+
* a row with an empty nullable endpoint
|
|
14
|
+
* degrades to a property record, never an edge
|
|
15
|
+
* edge, 3 FKs → edges with declared endpoint pairs
|
|
16
|
+
* (THREE_FK_ENDPOINTS below)
|
|
17
|
+
* edge, 1 FK → property records on the FK owner
|
|
18
|
+
* `applications` → excluded (C0a ruling 2026-08-06: filtered
|
|
19
|
+
* view of products — its rows ARE product
|
|
20
|
+
* rows; emitting it creates edge-less
|
|
21
|
+
* shadow nodes beside the products nodes)
|
|
22
|
+
* finding / enum kinds → excluded (diagnostics / vocabularies)
|
|
23
|
+
*
|
|
24
|
+
* Emission reads the PARSED CSV ROWS, deliberately not an engine readback:
|
|
25
|
+
* the engine's load TRY_CASTs typed columns and silently nulls unparseable
|
|
26
|
+
* cells (a real, measured case: prose in a date-typed column). A projection
|
|
27
|
+
* that inherits cast smoothing is no longer a faithful derivation of the
|
|
28
|
+
* CSV canon. C1's impact queries run on the engine; this emission does not.
|
|
29
|
+
*
|
|
30
|
+
* Every edge endpoint and property owner MUST resolve to a node record in
|
|
31
|
+
* the same export — a dangling reference here is a defect in the projection,
|
|
32
|
+
* not a finding about the estate (the FK layer already reports those). A
|
|
33
|
+
* candidate whose endpoint does not resolve is OMITTED and COUNTED, loudly,
|
|
34
|
+
* in the header and summary: `omitted_external` for external /
|
|
35
|
+
* external-for-profiles FKs (expected at member tier, resolving at
|
|
36
|
+
* aggregate), `omitted_unresolved` for the rest (mirrors an FK-layer
|
|
37
|
+
* finding). Stub nodes are never emitted — inventing nodes is the failure
|
|
38
|
+
* mode the C0a rule exists to prevent.
|
|
39
|
+
*/
|
|
40
|
+
import { createHash } from "node:crypto";
|
|
41
|
+
/** Node-kind catalogues excluded from projection by C0a ruling. */
|
|
42
|
+
const EXCLUDED_NODE_CATALOGUES = new Set(["applications"]);
|
|
43
|
+
/**
|
|
44
|
+
* Declared endpoint pairs for the three 3-FK edge catalogues (C0a).
|
|
45
|
+
* `product_platform_dependencies` is SERVICE-FIRST — the aggregator already
|
|
46
|
+
* derives product→capability (cross_sdd_platform_capability) by joining
|
|
47
|
+
* target_service_id, so a capability-first rule would emit the same
|
|
48
|
+
* relationship twice; its resolution is per-row in projectRow below.
|
|
49
|
+
*/
|
|
50
|
+
const THREE_FK_ENDPOINTS = {
|
|
51
|
+
system_external_dependency: ["c4_system_id", "external_system_id"],
|
|
52
|
+
cross_sdd_platform_capability: [
|
|
53
|
+
"consuming_product_id",
|
|
54
|
+
"platform_capability_id",
|
|
55
|
+
],
|
|
56
|
+
product_platform_dependencies: null, // per-row: target_service_id, else target_capability_id
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Kinds must cover every schema catalogue — a catalogue without a kind
|
|
60
|
+
* cannot be classified and the projection must not guess (the map is
|
|
61
|
+
* guarded method-side by the entity-scoring-coverage correspondence
|
|
62
|
+
* instance; this is the consumer-side half of that guarantee).
|
|
63
|
+
*/
|
|
64
|
+
export function assertKindCoverage(schema, kinds) {
|
|
65
|
+
const missing = schema.catalogues
|
|
66
|
+
.map((c) => c.name)
|
|
67
|
+
.filter((n) => !kinds.has(n));
|
|
68
|
+
if (missing.length > 0) {
|
|
69
|
+
throw new Error(`rubric-coverage-map has no kind for: ${missing.join(", ")} — ` +
|
|
70
|
+
`sync the vendored map (it must cover every schema catalogue).`);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
export function projectGraph(schema, kinds, rowsByCatalogue, tier) {
|
|
74
|
+
assertKindCoverage(schema, kinds);
|
|
75
|
+
const nodeCats = schema.catalogues.filter((c) => kinds.get(c.name) === "entity" && !EXCLUDED_NODE_CATALOGUES.has(c.name));
|
|
76
|
+
const edgeCats = schema.catalogues.filter((c) => kinds.get(c.name) === "edge");
|
|
77
|
+
// Pass 1 — the node set. Endpoint resolution below is against THIS
|
|
78
|
+
// export's nodes, which is exactly the per-export invariant.
|
|
79
|
+
const nodeIds = new Set();
|
|
80
|
+
const nodeLines = [];
|
|
81
|
+
for (const cat of nodeCats) {
|
|
82
|
+
for (const row of rowsByCatalogue.get(cat.name) ?? []) {
|
|
83
|
+
const key = cell(row, cat.primaryKey);
|
|
84
|
+
const id = `${cat.name}/${key}`;
|
|
85
|
+
nodeIds.add(id);
|
|
86
|
+
nodeLines.push(jsonLine({
|
|
87
|
+
t: "node",
|
|
88
|
+
id,
|
|
89
|
+
catalogue: cat.name,
|
|
90
|
+
key,
|
|
91
|
+
properties: propsOf(cat, row, new Set([cat.primaryKey])),
|
|
92
|
+
}));
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
const resolveTarget = (fk, value) => {
|
|
96
|
+
const [refCat, refCol] = fk.references.split(".");
|
|
97
|
+
// The rule resolves FK values against node PKs; a reference to a
|
|
98
|
+
// non-PK column would resolve against the wrong namespace. All 127
|
|
99
|
+
// parsed FKs reference `.id` today — guard it rather than assume it.
|
|
100
|
+
const refDef = schema.catalogues.find((c) => c.name === refCat);
|
|
101
|
+
if (refDef && refDef.primaryKey !== refCol) {
|
|
102
|
+
throw new Error(`FK ${fk.column} references non-PK column ${fk.references} — ` +
|
|
103
|
+
`the projection cannot resolve non-PK references.`);
|
|
104
|
+
}
|
|
105
|
+
const target = `${refCat}/${value}`;
|
|
106
|
+
return nodeIds.has(target) ? target : null;
|
|
107
|
+
};
|
|
108
|
+
const isExternal = (fk) => fk.external || (fk.externalForProfiles ?? []).length > 0;
|
|
109
|
+
const edgeLines = [];
|
|
110
|
+
const propertyLines = [];
|
|
111
|
+
const omissions = { external: 0, unresolved: 0 };
|
|
112
|
+
const emitEdge = (cat, row, type, sourceFk, targetFk) => {
|
|
113
|
+
const sv = cell(row, sourceFk.column);
|
|
114
|
+
const tv = cell(row, targetFk.column);
|
|
115
|
+
const source = resolveTarget(sourceFk, sv);
|
|
116
|
+
const target = resolveTarget(targetFk, tv);
|
|
117
|
+
if (source === null || target === null) {
|
|
118
|
+
const failedFk = source === null ? sourceFk : targetFk;
|
|
119
|
+
if (isExternal(failedFk))
|
|
120
|
+
omissions.external += 1;
|
|
121
|
+
else
|
|
122
|
+
omissions.unresolved += 1;
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
edgeLines.push(jsonLine({
|
|
126
|
+
t: "edge",
|
|
127
|
+
type,
|
|
128
|
+
source,
|
|
129
|
+
target,
|
|
130
|
+
properties: propsOf(cat, row, new Set([sourceFk.column, targetFk.column])),
|
|
131
|
+
}));
|
|
132
|
+
};
|
|
133
|
+
const emitProperty = (cat, row, ownerFk) => {
|
|
134
|
+
const ov = cell(row, ownerFk.column);
|
|
135
|
+
const owner = ov === "" ? null : resolveTarget(ownerFk, ov);
|
|
136
|
+
if (owner === null) {
|
|
137
|
+
if (ov !== "" && isExternal(ownerFk))
|
|
138
|
+
omissions.external += 1;
|
|
139
|
+
else
|
|
140
|
+
omissions.unresolved += 1;
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
propertyLines.push(jsonLine({
|
|
144
|
+
t: "property",
|
|
145
|
+
owner,
|
|
146
|
+
catalogue: cat.name,
|
|
147
|
+
via: ownerFk.column,
|
|
148
|
+
properties: propsOf(cat, row, new Set([ownerFk.column])),
|
|
149
|
+
}));
|
|
150
|
+
};
|
|
151
|
+
// Pass 2a — edges from edge catalogues, schema declaration order.
|
|
152
|
+
for (const cat of edgeCats) {
|
|
153
|
+
const fks = cat.foreignKeys;
|
|
154
|
+
for (const row of rowsByCatalogue.get(cat.name) ?? []) {
|
|
155
|
+
if (fks.length === 1) {
|
|
156
|
+
// Attribute table the metamodel calls an edge: the other "end" is
|
|
157
|
+
// an enum/key/name — a property record, never an edge.
|
|
158
|
+
emitProperty(cat, row, fks[0]);
|
|
159
|
+
continue;
|
|
160
|
+
}
|
|
161
|
+
let sourceFk;
|
|
162
|
+
let targetFk;
|
|
163
|
+
if (fks.length === 2) {
|
|
164
|
+
[sourceFk, targetFk] = fks;
|
|
165
|
+
}
|
|
166
|
+
else if (cat.name === "product_platform_dependencies") {
|
|
167
|
+
sourceFk = fks.find((f) => f.column === "product_id");
|
|
168
|
+
const svc = cell(row, "target_service_id");
|
|
169
|
+
const cap = cell(row, "target_capability_id");
|
|
170
|
+
const targetCol = svc !== ""
|
|
171
|
+
? "target_service_id"
|
|
172
|
+
: cap !== ""
|
|
173
|
+
? "target_capability_id"
|
|
174
|
+
: null;
|
|
175
|
+
if (targetCol === null) {
|
|
176
|
+
// Neither target declared: property-only row on the product.
|
|
177
|
+
emitProperty(cat, row, sourceFk);
|
|
178
|
+
continue;
|
|
179
|
+
}
|
|
180
|
+
targetFk = fks.find((f) => f.column === targetCol);
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
const pair = THREE_FK_ENDPOINTS[cat.name];
|
|
184
|
+
if (pair === undefined || pair === null) {
|
|
185
|
+
throw new Error(`edge catalogue ${cat.name} has ${fks.length} FKs and no declared ` +
|
|
186
|
+
`endpoint pair — extend THREE_FK_ENDPOINTS (a C0a-level decision, ` +
|
|
187
|
+
`not a default).`);
|
|
188
|
+
}
|
|
189
|
+
sourceFk = fks.find((f) => f.column === pair[0]);
|
|
190
|
+
targetFk = fks.find((f) => f.column === pair[1]);
|
|
191
|
+
}
|
|
192
|
+
if (sourceFk === undefined || targetFk === undefined) {
|
|
193
|
+
throw new Error(`edge catalogue ${cat.name}: declared endpoint column missing from ` +
|
|
194
|
+
`schema foreign_keys — schema and rule table disagree.`);
|
|
195
|
+
}
|
|
196
|
+
const sv = cell(row, sourceFk.column);
|
|
197
|
+
const tv = cell(row, targetFk.column);
|
|
198
|
+
if (sv === "" || tv === "") {
|
|
199
|
+
// Empty nullable endpoint: degrade to a property record on the
|
|
200
|
+
// present endpoint (screen_action is the live case — measured
|
|
201
|
+
// 2026-08-06: all 85+1,652 rows on both estates have no event_id).
|
|
202
|
+
const present = sv !== "" ? sourceFk : tv !== "" ? targetFk : null;
|
|
203
|
+
if (present === null) {
|
|
204
|
+
omissions.unresolved += 1; // no endpoint at all — counted, never guessed
|
|
205
|
+
continue;
|
|
206
|
+
}
|
|
207
|
+
emitProperty(cat, row, present);
|
|
208
|
+
continue;
|
|
209
|
+
}
|
|
210
|
+
emitEdge(cat, row, cat.name, sourceFk, targetFk);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
// Pass 2b — edges carried on node rows (41 FK columns on 22 catalogues;
|
|
214
|
+
// 34–40% of all edges on the measured estates — the third of the graph
|
|
215
|
+
// the naive "edge catalogues = edges" rule drops).
|
|
216
|
+
for (const cat of nodeCats) {
|
|
217
|
+
for (const fk of cat.foreignKeys) {
|
|
218
|
+
for (const row of rowsByCatalogue.get(cat.name) ?? []) {
|
|
219
|
+
const value = cell(row, fk.column);
|
|
220
|
+
if (value === "")
|
|
221
|
+
continue;
|
|
222
|
+
const source = `${cat.name}/${cell(row, cat.primaryKey)}`;
|
|
223
|
+
const target = resolveTarget(fk, value);
|
|
224
|
+
if (target === null) {
|
|
225
|
+
if (isExternal(fk))
|
|
226
|
+
omissions.external += 1;
|
|
227
|
+
else
|
|
228
|
+
omissions.unresolved += 1;
|
|
229
|
+
continue;
|
|
230
|
+
}
|
|
231
|
+
edgeLines.push(jsonLine({
|
|
232
|
+
t: "edge",
|
|
233
|
+
type: `${cat.name}.${fk.column}`,
|
|
234
|
+
source,
|
|
235
|
+
target,
|
|
236
|
+
properties: {},
|
|
237
|
+
}));
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
const body = [...nodeLines, ...edgeLines, ...propertyLines];
|
|
242
|
+
const bodyText = body.map((l) => `${l}\n`).join("");
|
|
243
|
+
const digest = createHash("sha256").update(bodyText, "utf8").digest("hex");
|
|
244
|
+
const counts = {
|
|
245
|
+
nodes: nodeLines.length,
|
|
246
|
+
edges: edgeLines.length,
|
|
247
|
+
properties: propertyLines.length,
|
|
248
|
+
omittedExternal: omissions.external,
|
|
249
|
+
omittedUnresolved: omissions.unresolved,
|
|
250
|
+
};
|
|
251
|
+
const header = jsonLine({
|
|
252
|
+
t: "header",
|
|
253
|
+
format: "sdd-graph/1",
|
|
254
|
+
schema_version: schema.schemaVersion,
|
|
255
|
+
tier,
|
|
256
|
+
nodes: counts.nodes,
|
|
257
|
+
edges: counts.edges,
|
|
258
|
+
properties: counts.properties,
|
|
259
|
+
omitted_external: counts.omittedExternal,
|
|
260
|
+
omitted_unresolved: counts.omittedUnresolved,
|
|
261
|
+
digest: `sha256:${digest}`,
|
|
262
|
+
});
|
|
263
|
+
return { text: `${header}\n${bodyText}`, counts, digest };
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Row columns as a properties object: schema column order (deterministic),
|
|
267
|
+
* empty string omitted (the schema's own convention — empty means absent),
|
|
268
|
+
* excluded columns (PK / endpoint / owner) carried structurally instead.
|
|
269
|
+
* Values stay the strings the CSV canon holds — no cast, no smoothing.
|
|
270
|
+
*/
|
|
271
|
+
function propsOf(cat, row, exclude) {
|
|
272
|
+
const out = {};
|
|
273
|
+
for (const col of cat.columns) {
|
|
274
|
+
if (exclude.has(col.name))
|
|
275
|
+
continue;
|
|
276
|
+
const v = row[col.name];
|
|
277
|
+
const s = v === null || v === undefined ? "" : String(v);
|
|
278
|
+
if (s === "")
|
|
279
|
+
continue;
|
|
280
|
+
out[col.name] = s;
|
|
281
|
+
}
|
|
282
|
+
return out;
|
|
283
|
+
}
|
|
284
|
+
/** JSON.stringify with stable insertion-order keys — the whole line contract. */
|
|
285
|
+
function jsonLine(obj) {
|
|
286
|
+
return JSON.stringify(obj);
|
|
287
|
+
}
|
|
288
|
+
/** One cell as the trimmed string the CSV canon holds ('' = absent). */
|
|
289
|
+
function cell(row, column) {
|
|
290
|
+
const v = row[column];
|
|
291
|
+
return v === null || v === undefined ? "" : String(v).trim();
|
|
292
|
+
}
|
|
293
|
+
//# sourceMappingURL=graph-projection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-projection.js","sourceRoot":"","sources":["../../../src/lib/catalogue/graph-projection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAQzC,mEAAmE;AACnE,MAAM,wBAAwB,GAAwB,IAAI,GAAG,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC;AAEhF;;;;;;GAMG;AACH,MAAM,kBAAkB,GAEpB;IACF,0BAA0B,EAAE,CAAC,cAAc,EAAE,oBAAoB,CAAC;IAClE,6BAA6B,EAAE;QAC7B,sBAAsB;QACtB,wBAAwB;KACzB;IACD,6BAA6B,EAAE,IAAI,EAAE,wDAAwD;CAC9F,CAAC;AAyBF;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAChC,MAAuB,EACvB,KAAkC;IAElC,MAAM,OAAO,GAAG,MAAM,CAAC,UAAU;SAC9B,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;SAClB,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAChC,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CACb,wCAAwC,OAAO,CAAC,IAAI,CAAC,IAAI,CAA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AM,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,OAAO,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;AAC/D,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Orchestrator for `sdd-cli catalogue graph` — loads the schema, the
|
|
3
|
+
* vendored rubric-coverage-map (the node/edge kind authority; the schema
|
|
4
|
+
* itself does not declare kind), and the catalogues directory, projects
|
|
5
|
+
* the graph (graph-projection.ts holds the derivation rule), writes the
|
|
6
|
+
* JSONL export, and prints the counts + digest so the figures are stated
|
|
7
|
+
* on every run, not discoverable after the fact.
|
|
8
|
+
*
|
|
9
|
+
* The export is regenerated on every invocation and is NOT committed
|
|
10
|
+
* (M-ADR 0205 §4.6): default output is `<catalogues-dir>-graph.jsonl`
|
|
11
|
+
* beside the catalogues directory, which adopter .gitignore entries cover.
|
|
12
|
+
* Tier is explicit, never inferred, same discipline as every other reader.
|
|
13
|
+
*/
|
|
14
|
+
import { type GraphCounts, type GraphTier } from "./graph-projection.js";
|
|
15
|
+
/**
|
|
16
|
+
* Vendored copy of sdd-method's orchestration/rubric-coverage-map.yaml —
|
|
17
|
+
* byte-identical to the canonical (rubric-coverage-map-drift.test.ts guards
|
|
18
|
+
* it, same one-way contract as canonical-schema.yaml). The build copies it
|
|
19
|
+
* alongside the compiled module via scripts/copy-yaml-assets.mjs.
|
|
20
|
+
*/
|
|
21
|
+
export declare const VENDORED_COVERAGE_MAP_PATH: string;
|
|
22
|
+
export declare function loadCatalogueKinds(mapPath?: string): Promise<Map<string, string>>;
|
|
23
|
+
export interface GraphRunInputs {
|
|
24
|
+
/** SDD repo root (defaults to cwd). */
|
|
25
|
+
readonly sddPath?: string;
|
|
26
|
+
/** Catalogues directory, relative to the SDD root (default `catalogues`). */
|
|
27
|
+
readonly cataloguesDir?: string;
|
|
28
|
+
/** Explicit tier, never inferred. Default member. */
|
|
29
|
+
readonly tier?: GraphTier;
|
|
30
|
+
/** Output path (default `<resolved catalogues dir>-graph.jsonl`). */
|
|
31
|
+
readonly out?: string;
|
|
32
|
+
}
|
|
33
|
+
export interface GraphRunResult {
|
|
34
|
+
readonly exitCode: number;
|
|
35
|
+
readonly counts?: GraphCounts;
|
|
36
|
+
readonly outPath?: string;
|
|
37
|
+
}
|
|
38
|
+
export declare function runCatalogueGraph(inputs: GraphRunInputs, write: (s: string) => void): Promise<GraphRunResult>;
|
|
39
|
+
//# sourceMappingURL=graph-run.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-run.d.ts","sourceRoot":"","sources":["../../../src/lib/catalogue/graph-run.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAUH,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,SAAS,EACf,MAAM,uBAAuB,CAAC;AAE/B;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,QAGtC,CAAC;AAMF,wBAAsB,kBAAkB,CACtC,OAAO,GAAE,MAAmC,GAC3C,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAS9B;AAED,MAAM,WAAW,cAAc;IAC7B,uCAAuC;IACvC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,6EAA6E;IAC7E,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,qDAAqD;IACrD,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC;IAC1B,qEAAqE;IACrE,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;IAC9B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,cAAc,EACtB,KAAK,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,GACzB,OAAO,CAAC,cAAc,CAAC,CA2CzB"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Orchestrator for `sdd-cli catalogue graph` — loads the schema, the
|
|
3
|
+
* vendored rubric-coverage-map (the node/edge kind authority; the schema
|
|
4
|
+
* itself does not declare kind), and the catalogues directory, projects
|
|
5
|
+
* the graph (graph-projection.ts holds the derivation rule), writes the
|
|
6
|
+
* JSONL export, and prints the counts + digest so the figures are stated
|
|
7
|
+
* on every run, not discoverable after the fact.
|
|
8
|
+
*
|
|
9
|
+
* The export is regenerated on every invocation and is NOT committed
|
|
10
|
+
* (M-ADR 0205 §4.6): default output is `<catalogues-dir>-graph.jsonl`
|
|
11
|
+
* beside the catalogues directory, which adopter .gitignore entries cover.
|
|
12
|
+
* Tier is explicit, never inferred, same discipline as every other reader.
|
|
13
|
+
*/
|
|
14
|
+
import { existsSync } from "node:fs";
|
|
15
|
+
import { readFile, writeFile } from "node:fs/promises";
|
|
16
|
+
import { fileURLToPath } from "node:url";
|
|
17
|
+
import { join, resolve } from "node:path";
|
|
18
|
+
import { parse as parseYaml } from "yaml";
|
|
19
|
+
import { readCatalogueCsv } from "./csv-reader.js";
|
|
20
|
+
import { loadCanonicalSchema } from "./schema-loader.js";
|
|
21
|
+
import { projectGraph, } from "./graph-projection.js";
|
|
22
|
+
/**
|
|
23
|
+
* Vendored copy of sdd-method's orchestration/rubric-coverage-map.yaml —
|
|
24
|
+
* byte-identical to the canonical (rubric-coverage-map-drift.test.ts guards
|
|
25
|
+
* it, same one-way contract as canonical-schema.yaml). The build copies it
|
|
26
|
+
* alongside the compiled module via scripts/copy-yaml-assets.mjs.
|
|
27
|
+
*/
|
|
28
|
+
export const VENDORED_COVERAGE_MAP_PATH = join(fileURLToPath(new URL(".", import.meta.url)), "rubric-coverage-map.yaml");
|
|
29
|
+
export async function loadCatalogueKinds(mapPath = VENDORED_COVERAGE_MAP_PATH) {
|
|
30
|
+
const raw = parseYaml(await readFile(mapPath, "utf-8"));
|
|
31
|
+
const kinds = new Map();
|
|
32
|
+
for (const [name, entry] of Object.entries(raw.coverage)) {
|
|
33
|
+
kinds.set(name, entry.kind);
|
|
34
|
+
}
|
|
35
|
+
return kinds;
|
|
36
|
+
}
|
|
37
|
+
export async function runCatalogueGraph(inputs, write) {
|
|
38
|
+
const sddRoot = resolve(inputs.sddPath ?? process.cwd());
|
|
39
|
+
const dir = resolve(sddRoot, inputs.cataloguesDir ?? "catalogues");
|
|
40
|
+
const tier = inputs.tier ?? "member";
|
|
41
|
+
const outPath = inputs.out !== undefined
|
|
42
|
+
? resolve(sddRoot, inputs.out)
|
|
43
|
+
: `${dir}-graph.jsonl`;
|
|
44
|
+
if (!existsSync(dir)) {
|
|
45
|
+
write(`catalogues directory not found at ${dir}\n` +
|
|
46
|
+
` Run \`sdd-cli catalogue build\` (or aggregate) first — the graph ` +
|
|
47
|
+
`is derived from built catalogues, never authored.\n`);
|
|
48
|
+
return { exitCode: 2 };
|
|
49
|
+
}
|
|
50
|
+
const schema = await loadCanonicalSchema();
|
|
51
|
+
const kinds = await loadCatalogueKinds();
|
|
52
|
+
const rowsByCatalogue = new Map();
|
|
53
|
+
for (const cat of schema.catalogues) {
|
|
54
|
+
const filePath = join(dir, `${cat.name}.csv`);
|
|
55
|
+
if (!existsSync(filePath))
|
|
56
|
+
continue;
|
|
57
|
+
const parsed = await readCatalogueCsv(filePath);
|
|
58
|
+
rowsByCatalogue.set(cat.name, parsed.rows);
|
|
59
|
+
}
|
|
60
|
+
const projection = projectGraph(schema, kinds, rowsByCatalogue, tier);
|
|
61
|
+
await writeFile(outPath, projection.text, "utf-8");
|
|
62
|
+
const c = projection.counts;
|
|
63
|
+
write(`graph projection (${tier} tier, schema ${schema.schemaVersion})\n`);
|
|
64
|
+
write(` nodes: ${c.nodes}\n`);
|
|
65
|
+
write(` edges: ${c.edges}\n`);
|
|
66
|
+
write(` property records: ${c.properties}\n`);
|
|
67
|
+
write(` omitted (external, resolves at aggregation): ${c.omittedExternal}\n`);
|
|
68
|
+
write(` omitted (unresolved — mirrors FK findings): ${c.omittedUnresolved}\n`);
|
|
69
|
+
write(` digest: sha256:${projection.digest}\n`);
|
|
70
|
+
write(` wrote ${outPath}\n`);
|
|
71
|
+
return { exitCode: 0, counts: c, outPath };
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=graph-run.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-run.js","sourceRoot":"","sources":["../../../src/lib/catalogue/graph-run.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EACL,YAAY,GAGb,MAAM,uBAAuB,CAAC;AAE/B;;;;;GAKG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,IAAI,CAC5C,aAAa,CAAC,IAAI,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAC5C,0BAA0B,CAC3B,CAAC;AAMF,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,UAAkB,0BAA0B;IAE5C,MAAM,GAAG,GAAG,SAAS,CAAC,MAAM,QA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er per M-ADR 0205 §4.6).
|
|
4
|
+
*
|
|
5
|
+
* "This contract changes — which features, services and repositories are
|
|
6
|
+
* reachable?" Impact is REVERSE reachability over the C0 edge list: every
|
|
7
|
+
* edge means "the source row references / attaches to the target", so the
|
|
8
|
+
* nodes affected by a change to X are the nodes with a path of edges INTO
|
|
9
|
+
* X — followed target→source, transitively. The closure is computed by
|
|
10
|
+
* recursive SQL (`WITH RECURSIVE`) on the Phase A engine, over the same
|
|
11
|
+
* edge set `catalogue graph` exports (one derivation rule, two consumers).
|
|
12
|
+
*
|
|
13
|
+
* Cycle discipline: the catalogue graph is not a DAG (adr_supersedes and
|
|
14
|
+
* system_system_dependency can both close loops), so the recursion carries
|
|
15
|
+
* NO depth column — DuckDB's recursive UNION deduplicates whole rows, and
|
|
16
|
+
* a depth column makes every lap around a cycle a "new" row: the query
|
|
17
|
+
* that looks more informative is the query that never terminates. The
|
|
18
|
+
* closure is a set; it saturates and stops. impact.test.ts holds the
|
|
19
|
+
* hand-derived controls (a cycle and a diamond) this guard answers to.
|
|
20
|
+
*/
|
|
21
|
+
import { type GraphTier } from "./graph-projection.js";
|
|
22
|
+
export interface ImpactEdge {
|
|
23
|
+
readonly source: string;
|
|
24
|
+
readonly target: string;
|
|
25
|
+
readonly type: string;
|
|
26
|
+
}
|
|
27
|
+
export interface ImpactResult {
|
|
28
|
+
/** The seed node id as given. */
|
|
29
|
+
readonly seed: string;
|
|
30
|
+
/** Reachable node ids (seed excluded), sorted. */
|
|
31
|
+
readonly closure: readonly string[];
|
|
32
|
+
/** Closure size grouped by node catalogue (the "features, services, repos" answer). */
|
|
33
|
+
readonly byCatalogue: ReadonlyMap<string, number>;
|
|
34
|
+
}
|
|
35
|
+
export interface DedupedEdges {
|
|
36
|
+
readonly edges: readonly ImpactEdge[];
|
|
37
|
+
/** Entity-FK edges dropped because their reversed pair exists as an edge-catalogue edge. */
|
|
38
|
+
readonly suppressedMirrors: number;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Mirror dedup (C1 ruling 2026-08-06): the metamodel materialises some
|
|
42
|
+
* relationships twice — a derived-edge catalogue AND the entity FK it
|
|
43
|
+
* derives from, in opposite directions (measured: capability_feature ⇄
|
|
44
|
+
* features.capability_id is a 100% mirror on the reverse estate). A
|
|
45
|
+
* mirrored pair is undirected for any traversal, so closures flood through
|
|
46
|
+
* hub nodes toward the connected component. Rule: an entity-FK edge whose
|
|
47
|
+
* REVERSED pair exists as an edge-catalogue edge is dropped from the
|
|
48
|
+
* traversal set; the derived edge survives, because the edge catalogue is
|
|
49
|
+
* the deliberate, richer declaration and the FK is its source material.
|
|
50
|
+
* The projection itself is untouched — the moment it adjudicated which of
|
|
51
|
+
* two declared rows is real it would stop being a derivation (§0).
|
|
52
|
+
*
|
|
53
|
+
* Edge-type convention: entity-FK edges are typed "<catalogue>.<column>"
|
|
54
|
+
* (they carry a dot); edge-catalogue edges are typed by catalogue name.
|
|
55
|
+
*/
|
|
56
|
+
export declare function dedupMirrorEdges(edges: readonly ImpactEdge[]): DedupedEdges;
|
|
57
|
+
/**
|
|
58
|
+
* Reverse-reachability closure of `seed` over `edges`, on the engine.
|
|
59
|
+
* Exported for the fixture controls; the verb goes through runCatalogueImpact.
|
|
60
|
+
*/
|
|
61
|
+
export declare function computeImpactClosure(edges: readonly ImpactEdge[], seed: string): Promise<string[]>;
|
|
62
|
+
export interface ImpactRunInputs {
|
|
63
|
+
/** Node id to compute impact of, in the export's "<catalogue>/<pk>" form. */
|
|
64
|
+
readonly of: string;
|
|
65
|
+
readonly sddPath?: string;
|
|
66
|
+
readonly cataloguesDir?: string;
|
|
67
|
+
readonly tier?: GraphTier;
|
|
68
|
+
}
|
|
69
|
+
export declare function runCatalogueImpact(inputs: ImpactRunInputs, write: (s: string) => void): Promise<{
|
|
70
|
+
exitCode: number;
|
|
71
|
+
result?: ImpactResult;
|
|
72
|
+
}>;
|
|
73
|
+
//# sourceMappingURL=impact-run.d.ts.map
|
|
@@ -0,0 +1 @@
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