@sdd-method/sdd-cli 1.4.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/lib/catalogue/coverage-render.d.ts +1 -0
  2. package/dist/lib/catalogue/coverage-render.d.ts.map +1 -1
  3. package/dist/lib/catalogue/coverage-render.js +17 -0
  4. package/dist/lib/catalogue/coverage-render.js.map +1 -1
  5. package/dist/lib/catalogue/coverage-run.d.ts.map +1 -1
  6. package/dist/lib/catalogue/coverage-run.js +7 -2
  7. package/dist/lib/catalogue/coverage-run.js.map +1 -1
  8. package/dist/lib/catalogue/gate-checks.d.ts +20 -0
  9. package/dist/lib/catalogue/gate-checks.d.ts.map +1 -1
  10. package/dist/lib/catalogue/gate-checks.js +67 -0
  11. package/dist/lib/catalogue/gate-checks.js.map +1 -1
  12. package/dist/lib/catalogue/graph-projection.d.ts +74 -0
  13. package/dist/lib/catalogue/graph-projection.d.ts.map +1 -0
  14. package/dist/lib/catalogue/graph-projection.js +322 -0
  15. package/dist/lib/catalogue/graph-projection.js.map +1 -0
  16. package/dist/lib/catalogue/graph-run.d.ts +59 -0
  17. package/dist/lib/catalogue/graph-run.d.ts.map +1 -0
  18. package/dist/lib/catalogue/graph-run.js +112 -0
  19. package/dist/lib/catalogue/graph-run.js.map +1 -0
  20. package/dist/lib/catalogue/impact-run.d.ts +81 -0
  21. package/dist/lib/catalogue/impact-run.d.ts.map +1 -0
  22. package/dist/lib/catalogue/impact-run.js +228 -0
  23. package/dist/lib/catalogue/impact-run.js.map +1 -0
  24. package/dist/lib/catalogue/rubric-coverage-map.yaml +279 -0
  25. package/dist/verbs/catalogue.d.ts.map +1 -1
  26. package/dist/verbs/catalogue.js +56 -0
  27. package/dist/verbs/catalogue.js.map +1 -1
  28. package/package.json +2 -2
  29. package/scripts/sync-canonical-schema.sh +21 -0
@@ -0,0 +1,228 @@
1
+ /**
2
+ * Transitive impact analysis — `sdd-cli catalogue impact` (M-ADR 0206 §4.6).
3
+ *
4
+ * Impact traverses the graph-projection edge set BY DECLARED SEMANTICS: every
5
+ * relationship carries an impact-flow token in the rubric-coverage-map
6
+ * (M-ADR 0206 §4.1) naming which endpoint RECEIVES impact — `toward-source`
7
+ * (dependency shape: a change at the target propagates to the source),
8
+ * `toward-target` (membership shape: a part's change reaches its whole),
9
+ * `both` (realisation), `none` (xref, lineage records, attributes). One
10
+ * relationship (`service_event`) resolves its flow per row from a named
11
+ * column (§4.2). The closure is the set of nodes impact can reach from the
12
+ * seed along declared propagation directions, computed by recursive SQL
13
+ * (`WITH RECURSIVE`) on the Phase A engine.
14
+ *
15
+ * THE CO-DIRECTIONALITY INVARIANT (§4.4, a condition of 0206's acceptance):
16
+ * the Phase C mirror-dedup heuristic is retired because under the declared
17
+ * tokens every true-mirror pair propagates the SAME direction. That premise
18
+ * is exercised, not assumed: buildImpactPropagation asserts that no node
19
+ * pair receives propagation in BOTH directions from two DIFFERENT
20
+ * single-direction relationship types, and fails loudly naming the pair and
21
+ * types. A single relationship declaring `both` is deliberate bidirectional
22
+ * coupling and is exempt; a self-referential type contributing both
23
+ * directions from different rows (a hierarchy cycle) is likewise exempt.
24
+ * A future token edit that would silently bring the undirected flood back
25
+ * trips this assertion instead.
26
+ *
27
+ * Cycle discipline: the recursion carries NO depth column — recursive UNION
28
+ * deduplicates whole rows, and a depth column makes every lap of a cycle a
29
+ * "new" row: the query that looks more informative is the query that never
30
+ * terminates. As a bare id-set the closure saturates and stops.
31
+ */
32
+ import { existsSync } from "node:fs";
33
+ import { join, resolve } from "node:path";
34
+ import { readCatalogueCsv } from "./csv-reader.js";
35
+ import { loadCanonicalSchema } from "./schema-loader.js";
36
+ import { loadCatalogueKinds, loadRelationshipSemantics, } from "./graph-run.js";
37
+ import { projectGraph } from "./graph-projection.js";
38
+ function resolveFlow(edge, semantics) {
39
+ const decl = edge.type.includes(".")
40
+ ? semantics.entityFks.get(edge.type)
41
+ : semantics.edges.get(edge.type);
42
+ if (decl === undefined) {
43
+ throw new Error(`impact: relationship ${edge.type} has no declaration in the ` +
44
+ `rubric-coverage-map (M-ADR 0206) — sync the vendored map.`);
45
+ }
46
+ if (decl.impactFlow !== undefined)
47
+ return decl.impactFlow;
48
+ const by = decl.impactFlowBy;
49
+ const value = (edge.properties?.[by.column] ?? "").trim();
50
+ const flow = by.values[value];
51
+ if (flow === undefined) {
52
+ throw new Error(`impact: ${edge.type} resolves flow by column '${by.column}' but row ` +
53
+ `value '${value}' is not in the declared map — extend the ` +
54
+ `declaration or fix the row.`);
55
+ }
56
+ return flow;
57
+ }
58
+ /**
59
+ * Resolve every declared edge into propagation steps per its flow, and
60
+ * exercise the §4.4 co-directionality invariant.
61
+ */
62
+ export function buildImpactPropagation(edges, semantics) {
63
+ const out = [];
64
+ const byFlow = new Map();
65
+ let flowNone = 0;
66
+ const pairs = new Map();
67
+ const notePair = (from, to, type) => {
68
+ const [a, b] = from < to ? [from, to] : [to, from];
69
+ const key = `${a}␟${b}`;
70
+ let rec = pairs.get(key);
71
+ if (rec === undefined) {
72
+ rec = { ab: new Set(), ba: new Set() };
73
+ pairs.set(key, rec);
74
+ }
75
+ (from === a ? rec.ab : rec.ba).add(type);
76
+ };
77
+ for (const e of edges) {
78
+ const flow = resolveFlow(e, semantics);
79
+ byFlow.set(flow, (byFlow.get(flow) ?? 0) + 1);
80
+ if (flow === "none") {
81
+ flowNone += 1;
82
+ continue;
83
+ }
84
+ if (flow === "toward-source" || flow === "both") {
85
+ out.push({ from: e.target, to: e.source, type: e.type });
86
+ notePair(e.target, e.source, e.type);
87
+ }
88
+ if (flow === "toward-target" || flow === "both") {
89
+ out.push({ from: e.source, to: e.target, type: e.type });
90
+ notePair(e.source, e.target, e.type);
91
+ }
92
+ }
93
+ // §4.4 invariant, refined on measured data (2026-08-06): a pair fails only
94
+ // when one type contributes EXCLUSIVELY a→b against another contributing
95
+ // EXCLUSIVELY b→a. A type that itself spans both directions on the pair —
96
+ // opposing role-rows of a role-conditional relationship (a service that
97
+ // publishes AND consumes the same event: five real pairs on the reverse
98
+ // estate, one service, all session-broadcast shaped), a self-referential
99
+ // hierarchy cycle, or a declared `both` flow — has DECLARED that pair
100
+ // bidirectional, so other types aligning with either direction are
101
+ // consistent with declarations, not drift. The flipped-token flood shape
102
+ // (two single-direction declarations opposing) still fails, loudly.
103
+ for (const [key, rec] of pairs) {
104
+ const abOnly = [...rec.ab].filter((t) => !rec.ba.has(t));
105
+ const baOnly = [...rec.ba].filter((t) => !rec.ab.has(t));
106
+ if (abOnly.length > 0 && baOnly.length > 0) {
107
+ const [a, b] = key.split("␟");
108
+ throw new Error(`impact: counter-directional reciprocal pair (M-ADR 0206 §4.4): ` +
109
+ `${abOnly[0]} propagates ${a} -> ${b} while ${baOnly[0]} propagates ` +
110
+ `${b} -> ${a}, and neither declares the pair bidirectional. The ` +
111
+ `declared tokens have re-created an undirected pair; fix the ` +
112
+ `classification before trusting any closure.`);
113
+ }
114
+ }
115
+ return { edges: out, flowNone, byFlow };
116
+ }
117
+ function sqlStringLiteral(value) {
118
+ return `'${value.replace(/'/g, "''")}'`;
119
+ }
120
+ /**
121
+ * Closure of `seed` over resolved propagation edges, on the engine.
122
+ * Exported for the fixture controls; the verb goes through runCatalogueImpact.
123
+ */
124
+ export async function computeImpactClosure(propagation, seed) {
125
+ const { DuckDBInstance } = await import("@duckdb/node-api");
126
+ const instance = await DuckDBInstance.create(":memory:");
127
+ const conn = await instance.connect();
128
+ try {
129
+ await conn.run(`CREATE TABLE prop (f VARCHAR, t VARCHAR);`);
130
+ const CHUNK = 500;
131
+ for (let i = 0; i < propagation.length; i += CHUNK) {
132
+ const tuples = propagation
133
+ .slice(i, i + CHUNK)
134
+ .map((e) => `(${sqlStringLiteral(e.from)}, ${sqlStringLiteral(e.to)})`)
135
+ .join(",\n");
136
+ await conn.run(`INSERT INTO prop VALUES\n${tuples};`);
137
+ }
138
+ const seedLit = sqlStringLiteral(seed);
139
+ // CYCLE GUARD: the recursion carries NO depth column, deliberately.
140
+ // Recursive UNION deduplicates whole rows; a depth column makes every
141
+ // lap around a cycle a "new" row (same id, bigger depth), so the query
142
+ // that looks more informative is the query that never terminates — the
143
+ // catalogue graph is not a DAG. As a bare id-set the closure saturates
144
+ // and stops.
145
+ const reader = await conn.runAndReadAll(`WITH RECURSIVE reach(id) AS (\n` +
146
+ ` SELECT t FROM prop WHERE f = ${seedLit}\n` +
147
+ ` UNION\n` +
148
+ ` SELECT p.t FROM prop p JOIN reach r ON p.f = r.id\n` +
149
+ `)\n` +
150
+ `SELECT DISTINCT id FROM reach WHERE id <> ${seedLit} ORDER BY id;`);
151
+ return reader.getRows().map((row) => String(row[0]));
152
+ }
153
+ finally {
154
+ conn.disconnectSync();
155
+ }
156
+ }
157
+ export async function runCatalogueImpact(inputs, write) {
158
+ const sddRoot = resolve(inputs.sddPath ?? process.cwd());
159
+ const dir = resolve(sddRoot, inputs.cataloguesDir ?? "catalogues");
160
+ const tier = inputs.tier ?? "member";
161
+ if (!existsSync(dir)) {
162
+ write(`catalogues directory not found at ${dir}\n` +
163
+ ` Run \`sdd-cli catalogue build\` (or aggregate) first.\n`);
164
+ return { exitCode: 2 };
165
+ }
166
+ const schema = await loadCanonicalSchema();
167
+ const kinds = await loadCatalogueKinds();
168
+ const semantics = await loadRelationshipSemantics();
169
+ const rowsByCatalogue = new Map();
170
+ for (const cat of schema.catalogues) {
171
+ const filePath = join(dir, `${cat.name}.csv`);
172
+ if (!existsSync(filePath))
173
+ continue;
174
+ rowsByCatalogue.set(cat.name, (await readCatalogueCsv(filePath)).rows);
175
+ }
176
+ const projection = projectGraph(schema, kinds, rowsByCatalogue, tier);
177
+ const lines = projection.text.trimEnd().split("\n");
178
+ const nodeIds = new Set();
179
+ const edges = [];
180
+ for (const line of lines) {
181
+ const o = JSON.parse(line);
182
+ if (o.t === "node")
183
+ nodeIds.add(o.id);
184
+ else if (o.t === "edge")
185
+ edges.push({
186
+ source: o.source,
187
+ target: o.target,
188
+ type: o.type,
189
+ ...(o.properties !== undefined ? { properties: o.properties } : {}),
190
+ });
191
+ }
192
+ if (!nodeIds.has(inputs.of)) {
193
+ write(`node not found in the projection: ${inputs.of}\n` +
194
+ ` Node ids have the form "<catalogue>/<id>", e.g. contracts/orders-api.\n`);
195
+ return { exitCode: 2 };
196
+ }
197
+ const prop = buildImpactPropagation(edges, semantics);
198
+ const closure = await computeImpactClosure(prop.edges, inputs.of);
199
+ const byCatalogue = new Map();
200
+ for (const id of closure) {
201
+ const cat = id.slice(0, id.indexOf("/"));
202
+ byCatalogue.set(cat, (byCatalogue.get(cat) ?? 0) + 1);
203
+ }
204
+ write(`impact closure of ${inputs.of} (${tier} tier, schema ${schema.schemaVersion})\n`);
205
+ // Required stated lines (M-ADR 0206 §4.6): what the number means, and what
206
+ // was traversed under each declared flow — visible per run, not
207
+ // discoverable from the code.
208
+ write(` semantics: change impact over classified relationships (M-ADR 0206) —\n` +
209
+ ` each relationship traversed per its declared impact-flow; the\n` +
210
+ ` co-directionality invariant is asserted on every run\n`);
211
+ const flowCounts = [...prop.byFlow.entries()]
212
+ .sort()
213
+ .map(([f, n]) => `${f}=${n}`)
214
+ .join(" ");
215
+ write(` declared edges by resolved flow: ${flowCounts}\n`);
216
+ write(` reachable nodes: ${closure.length}\n`);
217
+ for (const [cat, n] of [...byCatalogue.entries()].sort()) {
218
+ write(` ${cat}: ${n}\n`);
219
+ }
220
+ for (const id of closure) {
221
+ write(` ${id}\n`);
222
+ }
223
+ return {
224
+ exitCode: 0,
225
+ result: { seed: inputs.of, closure, byCatalogue },
226
+ };
227
+ }
228
+ //# sourceMappingURL=impact-run.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"impact-run.js","sourceRoot":"","sources":["../../../src/lib/catalogue/impact-run.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI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E,4DAA4D,CAC/D,CAAC;IACF,MAAM,UAAU,GAAG,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;SAC1C,IAAI,EAAE;SACN,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;SAC5B,IAAI,CAAC,IAAI,CAAC,CAAC;IACd,KAAK,CAAC,sCAAsC,UAAU,IAAI,CAAC,CAAC;IAC5D,KAAK,CAAC,sBAAsB,OAAO,CAAC,MAAM,IAAI,CAAC,CAAC;IAChD,KAAK,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;QACzD,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IACD,KAAK,MAAM,EAAE,IAAI,OAAO,EAAE,CAAC;QACzB,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACrB,CAAC;IACD,OAAO;QACL,QAAQ,EAAE,CAAC;QACX,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE;KAClD,CAAC;AACJ,CAAC"}
@@ -0,0 +1,279 @@
1
+ # Rubric coverage map — the scoring disposition of every key the canonical
2
+ # catalogue schema declares (enums included, so the extraction is mechanical).
3
+ #
4
+ # This file IS the coverage claim of catalogue-rubric-coverage.md, held against
5
+ # the schema by the entity-scoring-coverage correspondence instance: a catalogue
6
+ # class added to the schema without an entry here fails that instance, so
7
+ # "no rubric" can never again be indistinguishable from "nobody asked".
8
+ #
9
+ # kind: entity | edge | finding | enum — declared here because the schema does
10
+ # not carry it (68 of 69 tables share primary_key: id; the 24/45 split was
11
+ # hand classification until this file). Consumers needing node-vs-edge kind
12
+ # (graph projection, per-class predicates) read it from here.
13
+ #
14
+ # scoring: rubric | rubric-pair | predicate | scored-at-source | re-targeted
15
+ # | not-applicable | derived-edge | not-built
16
+ #
17
+ # Relationship semantics (M-ADR 0206) — a SECOND vocabulary, distinct from
18
+ # scoring. `scoring: derived-edge` is a SCORING-ATTRIBUTION claim (where the
19
+ # quality judgment lives); it is NOT a build-provenance or semantics claim —
20
+ # conflating the two misdiagnosed the mirror families once already. The
21
+ # semantics are:
22
+ # class: membership | dependency | realisation | lineage | traceability
23
+ # | xref | attribute — what the relationship MEANS (for
24
+ # humans and review)
25
+ # impact_flow: toward-source | toward-target | both | none
26
+ # — which endpoint RECEIVES impact (the machine-read token):
27
+ # toward-source = a change at the target propagates to the source;
28
+ # toward-target = a change at the source propagates to the target.
29
+ # Declared PER RELATIONSHIP, not per class: declaration orientation
30
+ # is a per-builder historical accident (composition exists both as
31
+ # member->owner features.product_id and owner->member
32
+ # screen_component).
33
+ # impact_flow_by: { column: <name>, values: {...} } — the role-conditional
34
+ # form, mutually exclusive with impact_flow; admitted for measured
35
+ # need (today exactly one relationship: service_event).
36
+ # Edge catalogues carry class + impact_flow at the top level; entity
37
+ # catalogues carry a relationships: block keyed by FK column. `applications`
38
+ # inherits `products`' declarations through the schema's YAML merge and is
39
+ # deliberately not declared separately. Every parsed FK column and edge
40
+ # catalogue MUST carry a declaration — check-relationship-classes.sh holds
41
+ # this closed in both directions, and sdd-cli's vendored-map test mirrors it.
42
+
43
+ coverage:
44
+ c4_system_kind: { kind: enum, scoring: not-applicable, reason: "closed vocabulary, not an artefact" }
45
+ c4_container_type: { kind: enum, scoring: not-applicable, reason: "closed vocabulary, not an artefact" }
46
+ service_type: { kind: enum, scoring: not-applicable, reason: "closed vocabulary, not an artefact" }
47
+ capability_exemption_reason: { kind: enum, scoring: not-applicable, reason: "closed vocabulary, not an artefact" }
48
+ service_capability_exemption_reason: { kind: enum, scoring: not-applicable, reason: "closed vocabulary, not an artefact" }
49
+ external_system_exemption_reason: { kind: enum, scoring: not-applicable, reason: "closed vocabulary, not an artefact" }
50
+ domains:
51
+ kind: entity
52
+ scoring: not-applicable
53
+ instrument: "directory discovery; only the README first paragraph is authored — nothing to score"
54
+ products:
55
+ kind: entity
56
+ scoring: rubric-pair
57
+ instrument: "forward: rubrics/product-definition-rubric.md · reverse: reverse/rubrics/product-synthesis-quality.md"
58
+ relationships:
59
+ domain_id: { class: membership, impact_flow: toward-target }
60
+ applications:
61
+ kind: entity
62
+ scoring: not-applicable
63
+ instrument: "YAML-anchor view of products; scored there"
64
+ integrations:
65
+ kind: entity
66
+ scoring: rubric
67
+ instrument: "rubrics/integration-sdd-quality-rubric.md"
68
+ relationships:
69
+ domain_id: { class: membership, impact_flow: toward-target }
70
+ parent_product_id: { class: membership, impact_flow: toward-target }
71
+ integration_component:
72
+ kind: entity
73
+ scoring: rubric
74
+ instrument: "scored at the owning integration via rubrics/integration-sdd-quality-rubric.md (manifest block)"
75
+ relationships:
76
+ integration_id: { class: membership, impact_flow: toward-target }
77
+ adrs:
78
+ kind: entity
79
+ scoring: rubric-pair
80
+ instrument: "forward: rubrics/adr-quality-rubric.md · reverse: reverse/rubrics/reverse-adr-quality.md"
81
+ relationships:
82
+ domain_id: { class: membership, impact_flow: toward-target }
83
+ superseded_by_id: { class: lineage, impact_flow: none }
84
+ glossary_items:
85
+ kind: entity
86
+ scoring: rubric-pair
87
+ instrument: "forward: rubrics/glossary-rubric.md · reverse: reverse/rubrics/reverse-glossary-quality.md"
88
+ relationships:
89
+ owning_domain_id: { class: membership, impact_flow: toward-target }
90
+ canonical_term_id: { class: xref, impact_flow: toward-source }
91
+ glossary_xref: { kind: edge, class: xref, impact_flow: none, scoring: derived-edge, reason: "derived from entity rows or manifest blocks scored at the owning entity" }
92
+ entity_glossary: { kind: edge, class: xref, impact_flow: none, scoring: derived-edge, reason: "derived from entity rows or manifest blocks scored at the owning entity" }
93
+ services:
94
+ kind: entity
95
+ scoring: re-targeted
96
+ instrument: "deliberately no dedicated rubric: boundary scored by rubrics/domain-architecture-rubric.md B5/B9 against the declared set (repo-config, input 3); source absence by scripts/check-repo-config-coverage.sh; reverse doc form by reverse/rubrics/repo-doc-quality.md"
97
+ relationships:
98
+ product_id: { class: membership, impact_flow: toward-target }
99
+ domain_id: { class: membership, impact_flow: toward-target }
100
+ primary_repo_id: { class: realisation, impact_flow: both }
101
+ capabilities:
102
+ kind: entity
103
+ scoring: rubric-pair
104
+ instrument: "forward: rubrics/intent-quality-rubric.md · reverse: reverse/rubrics/reverse-capability-spec-quality.md"
105
+ relationships:
106
+ domain_id: { class: membership, impact_flow: toward-target }
107
+ parent_capability_id: { class: membership, impact_flow: toward-target }
108
+ feature_groups:
109
+ kind: entity
110
+ scoring: scored-at-source
111
+ instrument: "grouping is authored inside capability/feature specs; scored there by rubrics/intent-quality-rubric.md"
112
+ relationships:
113
+ product_id: { class: membership, impact_flow: toward-target }
114
+ capability_id: { class: membership, impact_flow: toward-target }
115
+ parent_group_id: { class: membership, impact_flow: toward-target }
116
+ features:
117
+ kind: entity
118
+ scoring: rubric-pair
119
+ instrument: "forward: rubrics/intent-quality-rubric.md (feature tier) + rubrics/feature-grounding-rubric.md · reverse: reverse/rubrics/reverse-feature-grounding-quality.md"
120
+ relationships:
121
+ product_id: { class: membership, impact_flow: toward-target }
122
+ capability_id: { class: membership, impact_flow: toward-target }
123
+ parent_group_id: { class: membership, impact_flow: toward-target }
124
+ parent_feature_id: { class: membership, impact_flow: toward-target }
125
+ personas:
126
+ kind: entity
127
+ scoring: rubric-pair
128
+ instrument: "forward: rubrics/persona-rubric.md · reverse: reverse/rubrics/reverse-persona-quality.md"
129
+ relationships:
130
+ product_id: { class: membership, impact_flow: toward-target }
131
+ user_journeys:
132
+ kind: entity
133
+ scoring: rubric
134
+ instrument: "rubrics/user-journey-rubric.md"
135
+ relationships:
136
+ product_id: { class: membership, impact_flow: toward-target }
137
+ contracts:
138
+ kind: entity
139
+ scoring: rubric-pair
140
+ instrument: "forward: rubrics/contract-quality-rubric.md · reverse: reverse/rubrics/reverse-contract-quality.md"
141
+ relationships:
142
+ service_id: { class: membership, impact_flow: toward-target }
143
+ source_repo_id: { class: lineage, impact_flow: toward-source }
144
+ events:
145
+ kind: entity
146
+ scoring: predicate
147
+ instrument: "event-catalogue + event coverage checks (sdd-cli catalogue validate --coverage) — absence class; content rides the contract rubrics where events have contracts"
148
+ relationships:
149
+ publisher_service_id: { class: dependency, impact_flow: toward-source }
150
+ domain_id: { class: membership, impact_flow: toward-target }
151
+ c4_systems:
152
+ kind: entity
153
+ scoring: rubric-pair
154
+ instrument: "rubrics/c4-diagram-rubric.md (L1 per the level table) · reverse/rubrics/reverse-c4-quality.md"
155
+ relationships:
156
+ product_id: { class: realisation, impact_flow: both }
157
+ c4_containers:
158
+ kind: entity
159
+ scoring: rubric-pair
160
+ instrument: "rubrics/c4-diagram-rubric.md (L2) · reverse/rubrics/reverse-c4-quality.md"
161
+ relationships:
162
+ system_id: { class: membership, impact_flow: toward-target }
163
+ domain_id: { class: membership, impact_flow: toward-target }
164
+ service_id: { class: realisation, impact_flow: both }
165
+ c4_components:
166
+ kind: entity
167
+ scoring: rubric-pair
168
+ instrument: "rubrics/c4-diagram-rubric.md (L3 per the level table) · reverse/rubrics/reverse-c4-quality.md (L3 section)"
169
+ relationships:
170
+ container_id: { class: membership, impact_flow: toward-target }
171
+ service_id: { class: realisation, impact_flow: both }
172
+ c4_external_systems:
173
+ kind: entity
174
+ scoring: scored-at-source
175
+ instrument: "externality is scored inside the c4 rubrics (D4 / dimension 6); rows derive from System_Ext elements"
176
+ repositories:
177
+ kind: entity
178
+ scoring: predicate
179
+ instrument: "deliberately no rubric: repo-config is four structural fields; scripts/check-repo-config-coverage.sh covers the silent absences, builder findings own enum/orphan/divergence"
180
+ relationships:
181
+ domain_id: { class: membership, impact_flow: toward-target }
182
+ product_id: { class: membership, impact_flow: toward-target }
183
+ domain_models:
184
+ kind: entity
185
+ scoring: rubric-pair
186
+ instrument: "forward: rubrics/domain-architecture-rubric.md · reverse: reverse/rubrics/reverse-data-model-quality.md"
187
+ relationships:
188
+ domain_id: { class: membership, impact_flow: toward-target }
189
+ entities:
190
+ kind: entity
191
+ scoring: predicate
192
+ instrument: "verified covered: builder reads glossary-alignment-manifest (entities-manifest builder); absence fires the glossary-xref + data-model-entities coverage checks (sdd-cli catalogue validate --coverage); authored population is 1 forward + 1 reverse — a rubric would be ceremony"
193
+ relationships:
194
+ domain_id: { class: membership, impact_flow: toward-target }
195
+ source_domain_model_id: { class: lineage, impact_flow: toward-source }
196
+ glossary_term: { class: xref, impact_flow: none }
197
+ repo_capability: { kind: edge, class: realisation, impact_flow: both, scoring: derived-edge, reason: "derived from entity rows or manifest blocks scored at the owning entity" }
198
+ repo_capability_exemption: { kind: edge, class: attribute, impact_flow: none, scoring: derived-edge, reason: "derived from entity rows or manifest blocks scored at the owning entity" }
199
+ service_capability_exemption: { kind: edge, class: attribute, impact_flow: none, scoring: derived-edge, reason: "derived from entity rows or manifest blocks scored at the owning entity" }
200
+ external_system_exemption: { kind: edge, class: attribute, impact_flow: none, scoring: derived-edge, reason: "derived from entity rows or manifest blocks scored at the owning entity" }
201
+ repo_contract: { kind: edge, class: realisation, impact_flow: both, scoring: derived-edge, reason: "derived from entity rows or manifest blocks scored at the owning entity" }
202
+ product_capability: { kind: edge, class: dependency, impact_flow: toward-source, scoring: derived-edge, reason: "derived from entity rows or manifest blocks scored at the owning entity" }
203
+ product_service: { kind: edge, class: dependency, impact_flow: toward-source, scoring: derived-edge, reason: "derived from entity rows or manifest blocks scored at the owning entity" }
204
+ service_contract: { kind: edge, class: realisation, impact_flow: both, scoring: derived-edge, reason: "derived from entity rows or manifest blocks scored at the owning entity" }
205
+ service_event:
206
+ kind: edge
207
+ class: dependency
208
+ # role-conditional (M-ADR 0206 §4.2): the two roles flow in opposite directions
209
+ impact_flow_by: { column: role, values: { publishes: toward-target, consumes: toward-source } }
210
+ scoring: derived-edge
211
+ reason: "derived from entity rows or manifest blocks scored at the owning entity"
212
+ service_entity: { kind: edge, class: dependency, impact_flow: toward-source, scoring: derived-edge, reason: "derived from entity rows or manifest blocks scored at the owning entity" }
213
+ capability_feature: { kind: edge, class: traceability, impact_flow: toward-source, scoring: derived-edge, reason: "derived from entity rows or manifest blocks scored at the owning entity" }
214
+ capability_service: { kind: edge, class: dependency, impact_flow: toward-source, scoring: derived-edge, reason: "derived from entity rows or manifest blocks scored at the owning entity" }
215
+ capability_event: { kind: edge, class: dependency, impact_flow: toward-source, scoring: derived-edge, reason: "derived from entity rows or manifest blocks scored at the owning entity" }
216
+ capability_contract: { kind: edge, class: dependency, impact_flow: toward-source, scoring: derived-edge, reason: "derived from entity rows or manifest blocks scored at the owning entity" }
217
+ journey_feature: { kind: edge, class: dependency, impact_flow: toward-source, scoring: derived-edge, reason: "derived from entity rows or manifest blocks scored at the owning entity" }
218
+ persona_feature: { kind: edge, class: dependency, impact_flow: toward-source, scoring: derived-edge, reason: "derived from entity rows or manifest blocks scored at the owning entity" }
219
+ feature_service: { kind: edge, class: dependency, impact_flow: toward-source, scoring: derived-edge, reason: "derived from entity rows or manifest blocks scored at the owning entity" }
220
+ feature_event: { kind: edge, class: dependency, impact_flow: toward-source, scoring: derived-edge, reason: "derived from entity rows or manifest blocks scored at the owning entity" }
221
+ feature_repo: { kind: edge, class: realisation, impact_flow: both, scoring: derived-edge, reason: "derived from entity rows or manifest blocks scored at the owning entity" }
222
+ feature_contract: { kind: edge, class: dependency, impact_flow: toward-source, scoring: derived-edge, reason: "derived from entity rows or manifest blocks scored at the owning entity" }
223
+ feature_subscription_channels: { kind: edge, class: attribute, impact_flow: none, scoring: derived-edge, reason: "derived from entity rows or manifest blocks scored at the owning entity" }
224
+ capability_domain_model: { kind: edge, class: dependency, impact_flow: toward-source, scoring: derived-edge, reason: "derived from entity rows or manifest blocks scored at the owning entity" }
225
+ feature_domain_model: { kind: edge, class: dependency, impact_flow: toward-source, scoring: derived-edge, reason: "derived from entity rows or manifest blocks scored at the owning entity" }
226
+ persona_journey: { kind: edge, class: dependency, impact_flow: toward-source, scoring: derived-edge, reason: "derived from entity rows or manifest blocks scored at the owning entity" }
227
+ persona_screen: { kind: edge, class: dependency, impact_flow: toward-source, scoring: derived-edge, reason: "derived from entity rows or manifest blocks scored at the owning entity" }
228
+ persona_c4system: { kind: edge, class: dependency, impact_flow: toward-source, scoring: derived-edge, reason: "derived from entity rows or manifest blocks scored at the owning entity" }
229
+ persona_container: { kind: edge, class: dependency, impact_flow: toward-source, scoring: derived-edge, reason: "derived from entity rows or manifest blocks scored at the owning entity" }
230
+ system_external_dependency: { kind: edge, class: dependency, impact_flow: toward-source, scoring: derived-edge, reason: "derived from entity rows or manifest blocks scored at the owning entity" }
231
+ container_dependency: { kind: edge, class: dependency, impact_flow: toward-source, scoring: derived-edge, reason: "derived from entity rows or manifest blocks scored at the owning entity" }
232
+ system_system_dependency: { kind: edge, class: dependency, impact_flow: toward-source, scoring: derived-edge, reason: "derived from entity rows or manifest blocks scored at the owning entity" }
233
+ c4_container_entity: { kind: edge, class: dependency, impact_flow: toward-source, scoring: derived-edge, reason: "derived from entity rows or manifest blocks scored at the owning entity" }
234
+ c4_system_entity: { kind: edge, class: dependency, impact_flow: toward-source, scoring: derived-edge, reason: "derived from entity rows or manifest blocks scored at the owning entity" }
235
+ capability_adr: { kind: edge, class: dependency, impact_flow: toward-source, scoring: derived-edge, reason: "derived from entity rows or manifest blocks scored at the owning entity" }
236
+ adr_supersedes: { kind: edge, class: lineage, impact_flow: none, scoring: derived-edge, reason: "derived from entity rows or manifest blocks scored at the owning entity" }
237
+ product_platform_dependencies: { kind: edge, class: dependency, impact_flow: toward-source, scoring: derived-edge, reason: "derived from entity rows or manifest blocks scored at the owning entity" }
238
+ cross_sdd_platform_capability: { kind: edge, class: dependency, impact_flow: toward-source, scoring: derived-edge, reason: "derived from entity rows or manifest blocks scored at the owning entity" }
239
+ application_data_plane_bindings: { kind: edge, class: attribute, impact_flow: none, scoring: derived-edge, reason: "derived from entity rows or manifest blocks scored at the owning entity" }
240
+ application_data_plane_deviations: { kind: edge, class: attribute, impact_flow: none, scoring: derived-edge, reason: "derived from entity rows or manifest blocks scored at the owning entity" }
241
+ application_conformance_coverage: { kind: edge, class: attribute, impact_flow: none, scoring: derived-edge, reason: "derived from entity rows or manifest blocks scored at the owning entity" }
242
+ screens:
243
+ kind: entity
244
+ scoring: rubric-pair
245
+ instrument: "forward: rubrics/screen-spec-rubric.md above the mechanical floor (guides/screen-spec-depth-rubric.md) · reverse: reverse/rubrics/reverse-screen-spec-quality.md"
246
+ relationships:
247
+ product_id: { class: membership, impact_flow: toward-target }
248
+ ui_components:
249
+ kind: entity
250
+ scoring: not-applicable
251
+ instrument: "projected from component call-heads inside the screens builder; no authoring surface"
252
+ relationships:
253
+ product_id: { class: membership, impact_flow: toward-target }
254
+ screen_component: { kind: edge, class: membership, impact_flow: toward-source, scoring: derived-edge, reason: "derived from entity rows or manifest blocks scored at the owning entity" }
255
+ screen_feature: { kind: edge, class: dependency, impact_flow: toward-source, scoring: derived-edge, reason: "derived from entity rows or manifest blocks scored at the owning entity" }
256
+ screen_action: { kind: edge, class: dependency, impact_flow: toward-source, scoring: derived-edge, reason: "derived from entity rows or manifest blocks scored at the owning entity" }
257
+ conformance_finding: { kind: finding, scoring: not-built, reason: "not produced by catalogue build; populated by conformance tooling" }
258
+ quality_scores:
259
+ kind: entity
260
+ scoring: predicate
261
+ instrument: "the score record itself — scoring it with a rubric would be circular. Its COVERAGE is what needs governing (every eligible artefact carries a current, non-stale score), and that is the scores-coverage predicate of M-ADR 0205 §4.5, run by sdd-cli catalogue validate --coverage. The quality of each individual assessment is the rubric named in its own rubric_id."
262
+ relationships:
263
+ # flow none, RULED (0206 flagged-row resolution): diagnostics do not
264
+ # ride change closures. A score is a record ABOUT an artefact; "is this
265
+ # score still current after the change" is owned, precisely, by the
266
+ # scores instruments (staleness_basis/corpus_ref + the coverage check),
267
+ # and answering it through reachability answers it worse. Measured
268
+ # before ruling: scores were 27-30% of both estates' contract closures.
269
+ sdd_id: { class: dependency, impact_flow: none }
270
+ quality_score_dimensions:
271
+ kind: edge
272
+ class: attribute
273
+ impact_flow: none
274
+ scoring: derived-edge
275
+ reason: "derived from the parent quality_scores row; the dimension keys are the rubric's own vocabulary, governed by the rubric that declares them"
276
+ quality_gate: { kind: enum, scoring: not-applicable, reason: "closed vocabulary, not an artefact" }
277
+ score_selection_method: { kind: enum, scoring: not-applicable, reason: "closed vocabulary, not an artefact" }
278
+ staleness_basis: { kind: enum, scoring: not-applicable, reason: "closed vocabulary, not an artefact" }
279
+ scoring_form: { kind: enum, scoring: not-applicable, reason: "closed vocabulary, not an artefact" }
@@ -1 +1 @@
1
- {"version":3,"file":"catalogue.d.ts","sourceRoot":"","sources":["../../src/verbs/catalogue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA4BzC,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA6JxD"}
1
+ {"version":3,"file":"catalogue.d.ts","sourceRoot":"","sources":["../../src/verbs/catalogue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA8BzC,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA2QxD"}
@@ -1,5 +1,7 @@
1
1
  import { runCatalogueBuild, runCatalogueAggregate, runCatalogueMigrationMap, runCatalogueValidate, runCatalogueVersion, } from "../lib/catalogue/index.js";
2
2
  import { runCatalogueCoverage } from "../lib/catalogue/coverage-run.js";
3
+ import { runCatalogueGraph } from "../lib/catalogue/graph-run.js";
4
+ import { runCatalogueImpact } from "../lib/catalogue/impact-run.js";
3
5
  export function registerCatalogue(program) {
4
6
  const catalogue = program
5
7
  .command("catalogue")
@@ -74,6 +76,60 @@ export function registerCatalogue(program) {
74
76
  if (result.exitCode !== 0)
75
77
  process.exit(result.exitCode);
76
78
  });
79
+ catalogue
80
+ .command("graph")
81
+ .description("Emit the graph projection (typed node/edge JSON Lines) derived from built catalogues (M-ADR 0205 §4.6) — regenerated every run, digest-stamped, never committed")
82
+ .option("--sdd-path <path>", "Path to the SDD repo root (defaults to cwd)")
83
+ .option("--catalogues-dir <dir>", "Catalogues directory relative to the SDD root (default catalogues)")
84
+ .option("--tier <tier>", "Tier, explicit never inferred (member | aggregate; default member)")
85
+ .option("--out <path>", "Output file (default <catalogues-dir>-graph.jsonl beside the catalogues directory)")
86
+ .action(async (opts) => {
87
+ if (opts.tier !== undefined &&
88
+ opts.tier !== "member" &&
89
+ opts.tier !== "aggregate") {
90
+ process.stderr.write(`--tier must be 'member' or 'aggregate' (got: ${opts.tier})\n`);
91
+ process.exit(2);
92
+ }
93
+ const result = await runCatalogueGraph({
94
+ ...(opts.sddPath !== undefined ? { sddPath: opts.sddPath } : {}),
95
+ ...(opts.cataloguesDir !== undefined
96
+ ? { cataloguesDir: opts.cataloguesDir }
97
+ : {}),
98
+ ...(opts.tier !== undefined
99
+ ? { tier: opts.tier }
100
+ : {}),
101
+ ...(opts.out !== undefined ? { out: opts.out } : {}),
102
+ }, (s) => process.stdout.write(s));
103
+ if (result.exitCode !== 0)
104
+ process.exit(result.exitCode);
105
+ });
106
+ catalogue
107
+ .command("impact")
108
+ .description("Change-impact closure of a node (M-ADR 0206): each relationship is traversed per its declared impact-flow from the rubric-coverage-map — dependency edges reach their consumers, membership edges propagate part-to-whole only, xref/lineage records are inert — computed by recursive SQL on the embedded engine, with the co-directionality invariant asserted on every run")
109
+ .requiredOption("--of <node-id>", 'Node to compute impact of, in the projection\'s "<catalogue>/<id>" form (e.g. contracts/orders-api)')
110
+ .option("--sdd-path <path>", "Path to the SDD repo root (defaults to cwd)")
111
+ .option("--catalogues-dir <dir>", "Catalogues directory relative to the SDD root (default catalogues)")
112
+ .option("--tier <tier>", "Tier, explicit never inferred (member | aggregate; default member)")
113
+ .action(async (opts) => {
114
+ if (opts.tier !== undefined &&
115
+ opts.tier !== "member" &&
116
+ opts.tier !== "aggregate") {
117
+ process.stderr.write(`--tier must be 'member' or 'aggregate' (got: ${opts.tier})\n`);
118
+ process.exit(2);
119
+ }
120
+ const result = await runCatalogueImpact({
121
+ of: opts.of,
122
+ ...(opts.sddPath !== undefined ? { sddPath: opts.sddPath } : {}),
123
+ ...(opts.cataloguesDir !== undefined
124
+ ? { cataloguesDir: opts.cataloguesDir }
125
+ : {}),
126
+ ...(opts.tier !== undefined
127
+ ? { tier: opts.tier }
128
+ : {}),
129
+ }, (s) => process.stdout.write(s));
130
+ if (result.exitCode !== 0)
131
+ process.exit(result.exitCode);
132
+ });
77
133
  catalogue
78
134
  .command("migration-map")
79
135
  .description("Emit the 2.x → 3.0.0 id migration maps (external-system + contract ids) from existing catalogues/ (M-ADR 0203)")
@@ -1 +1 @@
1
- {"version":3,"file":"catalogue.js","sourceRoot":"","sources":["../../src/verbs/catalogue.ts"],"names":[],"mappings":"AACA,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,wBAAwB,EACxB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAoBxE,MAAM,UAAU,iBAAiB,CAAC,OAAgB;IAChD,MAAM,SAAS,GAAG,OAAO;SACtB,OAAO,CAAC,WAAW,CAAC;SACpB,WAAW,CACV,gEAAgE,CACjE,CAAC;IAEJ,SAAS;SACN,OAAO,CAAC,OAAO,CAAC;SAChB,WAAW,CACV,uEAAuE,CACxE;SACA,MAAM,CACL,mBAAmB,EACnB,6CAA6C,CAC9C;SACA,MAAM,CAAC,cAAc,EAAE,sEAAsE,CAAC;SAC9F,MAAM,CAAC,UAAU,EAAE,4EAA4E,CAAC;SAChG,MAAM,CAAC,KAAK,EAAE,IAAkB,EAAE,EAAE;QACnC,MAAM,MAAM,GAAG,MAAM,iBAAiB,CACpC;YACE,GAAG,CAAC,IAAI,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,OAA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