@sdd-method/sdd-cli 0.26.0 → 0.27.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 (37) hide show
  1. package/dist/lib/catalogue/build.d.ts.map +1 -1
  2. package/dist/lib/catalogue/build.js +138 -1
  3. package/dist/lib/catalogue/build.js.map +1 -1
  4. package/dist/lib/catalogue/builders/c4-entity-rollups.d.ts +12 -0
  5. package/dist/lib/catalogue/builders/c4-entity-rollups.d.ts.map +1 -0
  6. package/dist/lib/catalogue/builders/c4-entity-rollups.js +87 -0
  7. package/dist/lib/catalogue/builders/c4-entity-rollups.js.map +1 -0
  8. package/dist/lib/catalogue/builders/entities-manifest.d.ts +15 -0
  9. package/dist/lib/catalogue/builders/entities-manifest.d.ts.map +1 -0
  10. package/dist/lib/catalogue/builders/entities-manifest.js +137 -0
  11. package/dist/lib/catalogue/builders/entities-manifest.js.map +1 -0
  12. package/dist/lib/catalogue/builders/entities-mermaid.d.ts +16 -0
  13. package/dist/lib/catalogue/builders/entities-mermaid.d.ts.map +1 -0
  14. package/dist/lib/catalogue/builders/entities-mermaid.js +166 -0
  15. package/dist/lib/catalogue/builders/entities-mermaid.js.map +1 -0
  16. package/dist/lib/catalogue/builders/entity-slug.d.ts +2 -0
  17. package/dist/lib/catalogue/builders/entity-slug.d.ts.map +1 -0
  18. package/dist/lib/catalogue/builders/entity-slug.js +34 -0
  19. package/dist/lib/catalogue/builders/entity-slug.js.map +1 -0
  20. package/dist/lib/catalogue/builders/event-catalog-walker.d.ts.map +1 -1
  21. package/dist/lib/catalogue/builders/event-catalog-walker.js +43 -5
  22. package/dist/lib/catalogue/builders/event-catalog-walker.js.map +1 -1
  23. package/dist/lib/catalogue/builders/index.d.ts +9 -0
  24. package/dist/lib/catalogue/builders/index.d.ts.map +1 -1
  25. package/dist/lib/catalogue/builders/index.js +5 -0
  26. package/dist/lib/catalogue/builders/index.js.map +1 -1
  27. package/dist/lib/catalogue/builders/repo-edges.d.ts +4 -2
  28. package/dist/lib/catalogue/builders/repo-edges.d.ts.map +1 -1
  29. package/dist/lib/catalogue/builders/repo-edges.js +40 -3
  30. package/dist/lib/catalogue/builders/repo-edges.js.map +1 -1
  31. package/dist/lib/catalogue/builders/service-entity-tables.d.ts +17 -0
  32. package/dist/lib/catalogue/builders/service-entity-tables.d.ts.map +1 -0
  33. package/dist/lib/catalogue/builders/service-entity-tables.js +212 -0
  34. package/dist/lib/catalogue/builders/service-entity-tables.js.map +1 -0
  35. package/dist/lib/catalogue/canonical-schema.yaml +58 -1
  36. package/dist/lib/mcp/tools/cascade-impact.d.ts +1 -1
  37. package/package.json +2 -2
@@ -0,0 +1,212 @@
1
+ // Primary reverse-method walker for the service_entity edge catalogue per
2
+ // ADR 0159 §4.5. Reads per-domain `## Data Store Mapping` markdown tables in
3
+ // `docs/domains/{domain}/architecture/data-model.mermaid.md` files.
4
+ //
5
+ // Phase Pre findings (research/adr-0159-prototypes/connect-data-store-mapping-table-variations.md):
6
+ // - Two heading variants: `## Data Store Mapping` and `## Data Store Inventory`
7
+ // (the latter is store-centric — different schema, no Entity column — and
8
+ // gets skipped with a convention finding).
9
+ // - Three column-shape variants: standard (Entity | Store | Schema/Collection
10
+ // | Owning Service | PPT/Notes), developer's first col = `Entity / Artefact`,
11
+ // and vehicle's lack of `Owning Service` column (skipped).
12
+ // - Compound owning-service cells split on ` / ` — emit one edge per part.
13
+ // - Trailing `(annotation)` on entity texts stripped before slug-lookup.
14
+ // - Cross-domain entity references in tables resolve against entities.csv
15
+ // from any domain (not just the table's own domain) — same-domain first.
16
+ //
17
+ // Service-name resolution rules (ADR 0159 §4.7):
18
+ // 1. Try alias-map exact match (case-insensitive on display name).
19
+ // 2. Try entitySlug(display_name) ⋈ entitySlug(services.name).
20
+ // 3. Try entitySlug(display_name) ⋈ last_segment(services.id).
21
+ // 4. Fire [finding] orphan; skip edge.
22
+ import { readFile } from "node:fs/promises";
23
+ import { join } from "node:path";
24
+ import { parse as parseYaml } from "yaml";
25
+ import { entitySlug } from "./entity-slug.js";
26
+ const RE_DATA_STORE_HEADING = /^##\s+Data Store\s+(Mapping|Inventory)\s*$/i;
27
+ const ALIAS_REL_PATH = join("docs", "platform", "reference", "service-name-aliases.yaml");
28
+ export async function buildServiceEntityFromTables(inputs) {
29
+ const aliasMap = await loadAliasMap(inputs.sddPath, inputs.findings);
30
+ // Pre-compute service lookups.
31
+ const serviceIdBySlugName = new Map();
32
+ const serviceIdByTrailSegment = new Map();
33
+ for (const s of inputs.services) {
34
+ const id = String(s["id"]);
35
+ const name = String(s["name"] ?? "");
36
+ if (name)
37
+ serviceIdBySlugName.set(entitySlug(name), id);
38
+ const lastSeg = id.split("-").pop() ?? "";
39
+ if (lastSeg && !serviceIdByTrailSegment.has(lastSeg)) {
40
+ serviceIdByTrailSegment.set(lastSeg, id);
41
+ }
42
+ }
43
+ const rowsByPk = new Map();
44
+ for (const dm of inputs.domainModels) {
45
+ if (!dm.doc_path.endsWith(".mermaid.md"))
46
+ continue;
47
+ const fullPath = dm.doc_path.startsWith("/")
48
+ ? dm.doc_path
49
+ : join(inputs.sddPath, dm.doc_path);
50
+ let text;
51
+ try {
52
+ text = await readFile(fullPath, "utf-8");
53
+ }
54
+ catch (err) {
55
+ if (err.code === "ENOENT")
56
+ continue;
57
+ throw err;
58
+ }
59
+ const lines = text.split(/\r?\n/);
60
+ const headingIdx = lines.findIndex((l) => RE_DATA_STORE_HEADING.test(l));
61
+ if (headingIdx === -1)
62
+ continue;
63
+ const tableLines = collectTableLines(lines, headingIdx + 1);
64
+ if (tableLines === null || tableLines.length < 2) {
65
+ inputs.findings.add("convention", `service-entity-tables: ${dm.doc_path}: Data Store heading present but no markdown table follows — skipped`);
66
+ continue;
67
+ }
68
+ const headers = splitRow(tableLines[0]);
69
+ let entityColIdx = -1;
70
+ let serviceColIdx = -1;
71
+ for (let i = 0; i < headers.length; i++) {
72
+ const h = headers[i].toLowerCase();
73
+ if (entityColIdx === -1 && (h === "entity" || h.startsWith("entity"))) {
74
+ entityColIdx = i;
75
+ }
76
+ if (serviceColIdx === -1 && h.includes("owning service")) {
77
+ serviceColIdx = i;
78
+ }
79
+ }
80
+ if (entityColIdx === -1 || serviceColIdx === -1) {
81
+ inputs.findings.add("convention", `service-entity-tables: ${dm.doc_path}: Data Store table missing Entity or Owning Service column (headers: ${headers.join(" | ")}) — skipped`);
82
+ continue;
83
+ }
84
+ // Skip the |---|---| separator row (lineLine[1]); data rows start at index 2.
85
+ for (let i = 2; i < tableLines.length; i++) {
86
+ const cells = splitRow(tableLines[i]);
87
+ if (cells.length <= Math.max(entityColIdx, serviceColIdx))
88
+ continue;
89
+ const entityText = cells[entityColIdx].trim();
90
+ const serviceText = cells[serviceColIdx].trim();
91
+ if (!entityText || !serviceText)
92
+ continue;
93
+ // Strip trailing parenthetical annotation: "Role (fleet)" → "Role".
94
+ const entityNorm = entityText.replace(/\s*\([^)]+\)\s*$/, "").trim();
95
+ const entSlug = entitySlug(entityNorm);
96
+ let entityId = inputs.entityIdByDomainSlug.get(`${dm.domain_id}|${entSlug}`);
97
+ if (entityId === undefined) {
98
+ entityId = inputs.entityIdBySlug.get(entSlug);
99
+ }
100
+ if (entityId === undefined) {
101
+ inputs.findings.add("orphan", `service-entity-tables: ${dm.doc_path}: entity "${entityText}" doesn't resolve to an entities.csv row — edge skipped`);
102
+ continue;
103
+ }
104
+ // Compound owning-service: split on " / ".
105
+ const serviceParts = serviceText
106
+ .split(/\s+\/\s+/)
107
+ .map((s) => s.trim())
108
+ .filter((s) => s.length > 0);
109
+ for (const sp of serviceParts) {
110
+ const serviceId = resolveService(sp, aliasMap, serviceIdBySlugName, serviceIdByTrailSegment, inputs.knownServiceIds);
111
+ if (serviceId === undefined) {
112
+ inputs.findings.add("orphan", `service-entity-tables: ${dm.doc_path}: owning-service "${sp}" doesn't resolve to a services.csv row — edge skipped`);
113
+ continue;
114
+ }
115
+ const pk = `${serviceId}__${entityId}__owns`;
116
+ if (rowsByPk.has(pk))
117
+ continue;
118
+ rowsByPk.set(pk, {
119
+ id: pk,
120
+ service_id: serviceId,
121
+ entity_id: entityId,
122
+ relation: "owns",
123
+ evidence_path: dm.doc_path,
124
+ source_sdd_id: "",
125
+ });
126
+ }
127
+ }
128
+ }
129
+ return [...rowsByPk.values()];
130
+ }
131
+ async function loadAliasMap(sddPath, findings) {
132
+ const empty = { byDisplayLower: new Map() };
133
+ const path = join(sddPath, ALIAS_REL_PATH);
134
+ let text;
135
+ try {
136
+ text = await readFile(path, "utf-8");
137
+ }
138
+ catch (err) {
139
+ if (err.code === "ENOENT")
140
+ return empty;
141
+ throw err;
142
+ }
143
+ let raw;
144
+ try {
145
+ raw = parseYaml(text);
146
+ }
147
+ catch (err) {
148
+ findings.add("convention", `${ALIAS_REL_PATH}: failed to parse YAML — ${err.message}`);
149
+ return empty;
150
+ }
151
+ if (!raw || typeof raw !== "object")
152
+ return empty;
153
+ const obj = raw;
154
+ const aliases = obj["aliases"];
155
+ if (!Array.isArray(aliases))
156
+ return empty;
157
+ const map = new Map();
158
+ for (const a of aliases) {
159
+ if (!a || typeof a !== "object")
160
+ continue;
161
+ const e = a;
162
+ const display = String(e["display"] ?? "").trim();
163
+ const canonical = String(e["canonical"] ?? "").trim();
164
+ if (display && canonical)
165
+ map.set(display.toLowerCase(), canonical);
166
+ }
167
+ return { byDisplayLower: map };
168
+ }
169
+ function resolveService(display, alias, serviceIdBySlugName, serviceIdByTrailSegment, knownServiceIds) {
170
+ // 1. Alias map exact (case-insensitive).
171
+ const aliased = alias.byDisplayLower.get(display.toLowerCase());
172
+ if (aliased && knownServiceIds.has(aliased))
173
+ return aliased;
174
+ // 2. Slug-of-name match.
175
+ const slug = entitySlug(display);
176
+ if (!slug)
177
+ return undefined;
178
+ const bySlugName = serviceIdBySlugName.get(slug);
179
+ if (bySlugName && knownServiceIds.has(bySlugName))
180
+ return bySlugName;
181
+ // 3. Trailing-id-segment match.
182
+ const byTrail = serviceIdByTrailSegment.get(slug);
183
+ if (byTrail && knownServiceIds.has(byTrail))
184
+ return byTrail;
185
+ return undefined;
186
+ }
187
+ function splitRow(line) {
188
+ // Strip leading/trailing `|`, split on `|`, trim cells.
189
+ const trimmed = line.trim();
190
+ const parts = trimmed.split("|");
191
+ // Drop the empty cells from leading/trailing `|`.
192
+ return parts.slice(1, parts.length - 1).map((c) => c.trim());
193
+ }
194
+ function collectTableLines(lines, startIdx) {
195
+ let i = startIdx;
196
+ while (i < lines.length) {
197
+ const l = lines[i] ?? "";
198
+ if (l.startsWith("## "))
199
+ return null;
200
+ if (l.trimStart().startsWith("|")) {
201
+ const out = [];
202
+ while (i < lines.length && lines[i].trimStart().startsWith("|")) {
203
+ out.push(lines[i]);
204
+ i++;
205
+ }
206
+ return out;
207
+ }
208
+ i++;
209
+ }
210
+ return null;
211
+ }
212
+ //# sourceMappingURL=service-entity-tables.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service-entity-tables.js","sourceRoot":"","sources":["../../../../src/lib/catalogue/builders/service-entity-tables.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,6EAA6E;AAC7E,oEAAoE;AACpE,EAAE;AACF,oGAAoG;AACpG,gFAAgF;AAChF,4EAA4E;AAC5E,6CAA6C;AAC7C,8EAA8E;AAC9E,gFAAgF;AAChF,6DAA6D;AAC7D,2EAA2E;AAC3E,yEAAyE;AACzE,0EAA0E;AAC1E,2EAA2E;AAC3E,EAAE;AACF,iDAAiD;AACjD,mEAAmE;AACnE,+DAA+D;AAC/D,+DAA+D;AAC/D,uCAAuC;AAEvC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAI1C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,MAAM,qBAAqB,GAAG,6CAA6C,CAAC;AAC5E,MAAM,c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: see docs/method/methods/product-category-taxonomy.md.
47
47
 
48
- schema_version: "2.12.0"
48
+ schema_version: "2.13.0"
49
49
  schema_owner: "sdd-method"
50
50
  schema_status: "canonical"
51
51
  # Bump rationale (2.9.0 — additive minor): adds the Track 2 cohort-sweep
@@ -507,6 +507,23 @@ catalogues:
507
507
  - { name: version, type: string, nullable: true, description: "Optional explicit version; null until the domain model is formally versioned (typically at first contract lock-in)." }
508
508
  - { name: source_sdd_id, type: string, nullable: true, description: "Originating SDD slug. Populated by the aggregator per ADR 0134." }
509
509
 
510
+ entities:
511
+ primary_key: id
512
+ description: "Data-model entity (a structural realisation of a concept inside a domain's data model). Distinct from glossary_items (vocabulary-level) and from domain_models (file-level). Added in schema 2.13.0 per ADR 0159. Forward source: `models[].entities[]` in glossary-alignment-manifest.yaml. Reverse source: `EntityName { ... }` declarations inside `erDiagram` fences in `docs/domains/{domain}/architecture/data-model.mermaid.md`. PK uses an entity-aware slug that normalises across UPPER_SNAKE and PascalCase authoring styles."
513
+ foreign_keys:
514
+ - { column: domain_id, references: domains.id, nullable: true }
515
+ - { column: source_domain_model_id, references: domain_models.id, nullable: true }
516
+ - { column: glossary_term, references: glossary_items.id, nullable: true }
517
+ columns:
518
+ - { name: id, type: string, nullable: false, description: "Slugged PK: {domain_id}-{entitySlug(name)}. For manifest-sourced rows with domain=platform-wide, the leading domain segment is empty (`-{entitySlug(name)}`) and the row carries a [finding] convention." }
519
+ - { name: name, type: string, nullable: false, description: "Entity name as authored. Preserves the original case/style (UPPER_SNAKE_CASE, PascalCase, lowercase camelCase all observed in the wild)." }
520
+ - { name: domain_id, type: string, nullable: true, description: "Owning domain. Nullable when the source is a non-canonical domain hint such as `platform-wide`; the walker emits a finding in that case." }
521
+ - { name: source_domain_model_id, type: string, nullable: true, description: "FK to domain_models.csv — the file the entity was extracted from. Populated by the reverse-method walker (Mermaid parse); empty when authored only via the forward-method manifest." }
522
+ - { name: persistence_kind, type: string, nullable: true, description: "Open string; recommended values: relational-table | document-collection | event-payload | dto | view | other. Values outside the recommended set fire `[finding] convention`." }
523
+ - { name: glossary_term, type: string, nullable: true, description: "FK to glossary_items.id when the entity name resolves to a canonical glossary term (by entity-aware slug). Drives entity_glossary edge emission." }
524
+ - { name: notes, type: string, nullable: true, description: "Free-form notes preserved from the authoring source. Carries `status=...`, `superseded_by=...`, and column count for diagnostic value." }
525
+ - { name: source_sdd_id, type: string, nullable: true, description: "Originating SDD slug. Populated by the aggregator per ADR 0134." }
526
+
510
527
  # ---- Edge catalogues ----
511
528
  # Edge catalogues do not carry source_sdd_id — provenance is recoverable
512
529
  # from either endpoint's row per ADR 0134.
@@ -583,6 +600,20 @@ catalogues:
583
600
  - { name: event_id, type: string, nullable: false }
584
601
  - { name: role, type: string, nullable: false, description: "publishes | consumes." }
585
602
 
603
+ service_entity:
604
+ primary_key: id
605
+ description: "Edge: service touches data-model entity. Added in schema 2.13.0 per ADR 0159. Primary source: per-domain `## Data Store Mapping` markdown table in `docs/domains/{domain}/architecture/data-model.mermaid.md` (relation=owns). Optional forward source (Phase 5 deferred): `entities:` block in `orchestration/repo-config/<repo>.yaml`. Service names resolve via heuristic (slug-of-name; trailing-id-segment) with optional adopter-authored alias map at `docs/platform/reference/service-name-aliases.yaml`."
606
+ foreign_keys:
607
+ - { column: service_id, references: services.id, nullable: false }
608
+ - { column: entity_id, references: entities.id, nullable: false }
609
+ columns:
610
+ - { name: id, type: string, nullable: false, description: "Composite PK: {service_id}__{entity_id}__{relation}." }
611
+ - { name: service_id, type: string, nullable: false }
612
+ - { name: entity_id, type: string, nullable: false }
613
+ - { name: relation, type: string, nullable: false, description: "Open string; recommended values: owns | reads | writes | references. Data Store Mapping table source emits `owns`. Values outside the recommended set fire `[finding] convention`." }
614
+ - { name: evidence_path, type: string, nullable: true, description: "Source markdown path or feature-grounding row that produced the edge. Audit aid." }
615
+ - { name: source_sdd_id, type: string, nullable: true, description: "Originating SDD slug. Populated by the aggregator per ADR 0134." }
616
+
586
617
  capability_feature:
587
618
  primary_key: id
588
619
  description: "Edge: capability decomposes into features. Forward: traceability.runway.enables. Reverse: parsed from spec Feature Grounding."
@@ -760,6 +791,32 @@ catalogues:
760
791
  - { name: external_system_id, type: string, nullable: false }
761
792
  - { name: interaction, type: string, nullable: true, description: "Optional integration label/protocol from the Rel(...) line." }
762
793
 
794
+ c4_container_entity:
795
+ primary_key: id
796
+ description: "Derived edge: C4 container is responsible for data-model entity. Added in schema 2.13.0 per ADR 0159 §4.8. Pure transitive derivation: `service_entity ⋈ c4_containers.service_id`. Only the subset of containers with `service_id` populated contribute edges (per ADR 0155 the container ↔ service cardinality is o-or-1; data-store containers and infra-umbrella containers without a service mapping legitimately emit no rows)."
797
+ foreign_keys:
798
+ - { column: container_id, references: c4_containers.id, nullable: false }
799
+ - { column: entity_id, references: entities.id, nullable: false }
800
+ columns:
801
+ - { name: id, type: string, nullable: false, description: "Composite PK: {container_id}__{entity_id}." }
802
+ - { name: container_id, type: string, nullable: false }
803
+ - { name: entity_id, type: string, nullable: false }
804
+ - { name: relation, type: string, nullable: false, description: "Inherits from upstream service_entity.relation when derived." }
805
+ - { name: source_sdd_id, type: string, nullable: true }
806
+
807
+ c4_system_entity:
808
+ primary_key: id
809
+ description: "Derived edge: C4 system is responsible for data-model entity. Added in schema 2.13.0 per ADR 0159 §4.8. Pure aggregation roll-up: `c4_container_entity ⋈ c4_containers.system_id`, with container_count recording how many of the system's containers touch the entity (governance signal for cross-container concerns)."
810
+ foreign_keys:
811
+ - { column: system_id, references: c4_systems.id, nullable: false }
812
+ - { column: entity_id, references: entities.id, nullable: false }
813
+ columns:
814
+ - { name: id, type: string, nullable: false, description: "Composite PK: {system_id}__{entity_id}." }
815
+ - { name: system_id, type: string, nullable: false }
816
+ - { name: entity_id, type: string, nullable: false }
817
+ - { name: container_count, type: integer, nullable: false, description: "Number of the system's containers that touch this entity. Aggregated from c4_container_entity." }
818
+ - { name: source_sdd_id, type: string, nullable: true }
819
+
763
820
  capability_adr:
764
821
  primary_key: id
765
822
  description: "Edge: ADR informs capability. Forward: declared in capability spec Architecture Decisions. Reverse: same plus heuristic match supplements with confidence."
@@ -12,8 +12,8 @@ import { z } from "zod";
12
12
  export declare const cascadeImpactArgsSchema: {
13
13
  change_type: z.ZodEnum<{
14
14
  capability: "capability";
15
- service: "service";
16
15
  entity: "entity";
16
+ service: "service";
17
17
  }>;
18
18
  target: z.ZodString;
19
19
  pin_to_commit: z.ZodOptional<z.ZodString>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sdd-method/sdd-cli",
3
- "version": "0.26.0",
4
- "description": "Method-layer CLI for SDD repository lifecycle — init, sync, validate, list, plan, generate-briefing, mcp serve, catalogue {build,aggregate,validate,version}, pack {build,validate}. v0.26.0 ships catalogue schema 2.12.0 (additive minor) implementing three ADRs in one release: ADR 0156 (Event Catalogue Multi-Source Ingestion) adds the reverse-method `docs/domains/<domain>/contracts/events/event-catalog.yaml` walker alongside the existing forward avsc path — YAML wins on name/domain/publisher/transport/consumers; avsc augments schema_path/version when YAML is null. Transport enum opens (no hardcoded \"nats\" default); recommended values surface a convention finding when violated. service_event edges populate from YAML's publisher + consumers[] in addition to repo-config events.produces/consumes. ADR 0157 (Forward-Declared / Reverse-Derived Parity for Edge Catalogues) codifies the principle that every edge with a forward declared source MUST also have a reverse derived source, applied here to repo_capability + repo_contract: reverse derivations add `capability_service ⋈ services.primary_repo_id` (universal Path X) and `capability_feature ⋈ feature_repo` (Path Y via ADR 0143 evidence) for repo_capability, and `contracts.source_repo_id` denormalisation for repo_contract — alongside the existing forward-declared `additional_context:` / `repo-config.contracts:` paths. The orphan-finding pattern surfaces when reverse paths can't derive (e.g. capability_service rows referencing services with empty primary_repo_id). ADR 0158 (Glossary Cross-Reference Multi-Source Ingestion) extends glossary_xref ingestion from one walker to four (forward declared pair-form, reverse cross_domain_terms, reverse multi-domain conflicts with field-inspection disambiguation, forward supersedes via models[].entities[].superseded_by) plus introduces a new sibling edge catalogue entity_glossary for data-model-entity → glossary-term mappings (status ∈ {aligned, matched_direct}). Dedupe by (domain, entity_name, glossary_item_id) collapses same-domain multi-diagram entries while preserving cross-domain cross-level cataloguing. glossary_xref.relation enum extends from {alias-of, conflicts-with} to {alias-of, conflicts-with, references, supersedes}. SCHEMA_COMPAT unchanged (^2.0.0); additive minor across all three ADRs. Cross-adopter regression verified: contextua's existing forward-path rows (12 repo_contract, 78 events, 42 service_event) preserved exactly; new reverse-path additions (+30 repo_capability via Path X; +10 entity_glossary). v0.25.3 ships catalogue schema 2.11.0 (additive minor): relaxes c4_systems.product_id to a nullable FK. Every product is a system, but not every system is a product — external/SaaS systems catalogued as c4_systems (e.g. Salesforce, DocuSign, Zendesk) legitimately have no owning product. The FK + column were nullable: false, so organisation-level aggregation FAILed with dangling-FK errors on c4_systems rows whose product_id is empty (63 such across the bko/latam/masternaut platforms). The FK validator already passes nullable empty values (fk-validator.test.ts \"treats nullable FK with empty value as PASS\"), so no logic change. Builds with populated product_id (e.g. connect, where every c4_system has an owning product) are unaffected — nullable is strictly more permissive. SCHEMA_COMPAT unchanged (still ^2.0.0); backward compatible — existing 2.10.0 catalogues read unchanged, no migration. v0.25.2 fixes a sync bug: bundle.ts inferred is_forward_base from isBundleName (true for ANY known bundle) instead of isForwardBase, so an additive bundle that omits is_forward_base in its manifest — every sdd-method-cut reverse-extension-baseline — was misclassified as a forward base, making `sdd-cli sync` throw \"Forward-base bundle reverse-extension-baseline has no profile mapping\" and blocking adopters from layering the reverse extension over a forward base. Inference now uses isForwardBase (additive bundles correctly resolve to false). v0.25.1 is a conformance patch: v0.25.0's notes advertised that the legacy c4_containers types Infrastructure / External System \"remain recognised-but-WARNed during the 2.x line\", but no code emitted that finding (the builder-spec's \"a conforming builder MUST emit [finding] convention\" was unimplemented). v0.25.1 adds checkContainerTypeAdvisory, wired into both `catalogue build` and `catalogue validate`, emitting a `convention` finding for any c4_containers.type outside the canonical c4_container_type set {Application, Data Store}. It reads the allowed values from the schema enum (no hardcoded list) and self-disables once the enum is bound via column_enums (the 3.0.0 hard-fail path) or removed — handing off cleanly at the major bump with no double-reporting. The validate path has teeth (it fires over an existing catalogues/ dir — e.g. an adopter who upgraded sdd-cli but has not yet rebuilt a catalogue still carrying Infrastructure rows from the old builder, which is the warn-then-enforce migration window ADR 0155 §4.3 relies on before 3.0.0); the build path is defensive (the canonical builder derives type from the C4 macro and cannot emit a legacy value). No schema change; SCHEMA_COMPAT unchanged (^2.0.0); patch release. v0.25.0 ships catalogue schema 2.10.0 (lockstep with sdd-method ADR 0155 — Align C4 Catalogue Capture with Strict C4 Abstractions), bringing the catalogue's C4 layer into line with c4model.com/abstractions. New node catalogue c4_external_systems (C4 L1 external software systems extracted from System_Ext(...) / Container_Ext(...) on L1+L2 mermaid; id = ext-{slug}); new edges persona_c4system (the C4 Person-uses-System relationship, mapping Person(...) actors to personas rows — the C4 Person abstraction reuses Persona) and system_external_dependency (system integrates-with external, from Rel(...) lines, collapsed to system level per ADR 0155 §4.2). New advisory enum c4_container_type = {Application, Data Store}: the c4-containers builder now types ContainerQueue as Data Store (was the non-canonical \"Infrastructure\") and no longer emits Container_Ext as an internal container row (external containers are catalogued as c4_external_systems); the legacy types Infrastructure / External System remain recognised-but-WARNed during the 2.x line and are removed at the 3.0.0 major bump (the enum is intentionally not bound in column_enums until then). The aggregator dedups c4_external_systems by id across SDDs rather than failing the duplicate-PK check — the one narrowly-scoped exception per ADR 0134, since the same external system (e.g. ext-google-maps) is legitimately declared by multiple SDDs; attribute conflicts on a shared id surface as a convention finding. SCHEMA_COMPAT unchanged (still ^2.0.0); additive minor. v0.24.0 ships sdd-mcp Phase 8 — catalogue resources + tools on the read-only MCP server (sdd-method ADR 0128 + ADR 0150). New resources: sdd://catalogue/schema (vendored canonical schema as JSON), sdd://catalogue/metamodel, sdd://catalogue/category-taxonomy, sdd://catalogue (list of built catalogues), and sdd://catalogue/{name} (rows from catalogues/{name}.csv, validated against the schema, distinguishing not-declared from not-built). New tools: query_catalogue_coverage (row count + internal-FK pass), find_products_by_category, find_orphan_rows (broken internal FK targets), and query_edges_for_entity (every edge row referencing an entity). All reuse the existing src/lib/catalogue schema-loader + csv-reader rather than re-parsing; FK checks consider internal FKs only per ADR 0134 (external FKs are validated at aggregation). Markdown resources try the post-IA path (guides/, standards/) then fall back, returning a structured 'run sdd-cli sync' error when absent. v0.23.1 patches v0.23.0: `sdd-cli pack build` now populates source_commit + source_branch in the rendered BUNDLE_MANIFEST.yaml from `git rev-parse HEAD` / `git rev-parse --abbrev-ref HEAD` against the producer-repo working tree, matching sdd-method's build-method-baseline-bundle.sh provenance behaviour. Non-git producer dirs (CI artefact directories etc.) get the sentinel \"uncommitted\" so consumer-side parseManifest (which rejects empty source_commit) still accepts the bundle. Pre-v0.23.1 packs wrote empty strings and were unsyncable — discovered during the contextua-platform Phase 7 first-adopter pilot (ADR 0151) when operations-console refused the first build of contextua-app-context-pack@v0.1.0. v0.23.0 ships the adopter pack producer + consumer surface per sdd-method ADR 0151 (companion plan adopter-bundle-producer-model.md Phases 3a + 3b + 3c). New `pack` verb with build and validate subcommands lets platform-profile adopters (contextua-platform, CXS Connect) produce additive-layer bundles from a context-pack-seed.yaml declaration. The builder validates the seed against the canonical schema, resolves include: directives across files, expands managed_paths (literal + glob against the producer working tree), runs a producer-side leakage check (disjointness with the declared forward base + disjointness with declared forbidden_paths globs), stages the payload tree, emits SHA-256 checksums per managed file, renders BUNDLE_MANIFEST.yaml mirroring the .hbs template shape, and produces <pack-name>-v<semver>.tar.gz + sidecar .sha256. Consumer-side enforcement extends `sdd-cli sync` for the multi-bundle lock chain: requires_forward_base resolution verifies the consumer's lock carries a compatible forward base; requires_pack resolution enforces vertical-extension dependencies with full semver-range support (caret with pre-1.0 narrow per npm convention, tilde, exact pin, >=); the existing cross-bundle path-ownership check now functions for adopter pack names too (consumer-side leakage assertion); produced_by_adopter / scope / requires_forward_base / requires_pack carry from the manifest into the lock entry as additive optional fields preserving lock_version: 2. New `sdd-cli sync --config <path>` reads a multi-bundle method-baseline.config.yaml (ordered bundles[].source list) and iterates each through the single-bundle sync engine — mutually exclusive with --bundle. `sdd-cli list` surfaces adopter pack provenance: forward-base version in the repo line plus indented `+ <pack-name> <version> from <adopter-repo> [requires <base-pack>]` lines beneath; --verbose adds per-bundle managed_path counts; JSON format adds a per-repo bundles[] array carrying full provenance. Type relaxation: BundleManifest.bundleName and BundleEntry.name widened from the closed BundleName enum to string (adopter pack names are arbitrary per ADR 0151); the closed enum still applies to sdd-method forward bases, validated at parse time only when is_forward_base: true. BundleManifest parser migrated from line-by-line scalar regex to the existing yaml library dependency for nested requires_forward_base / requires_pack object parsing. v0.22.0 bundles three landed scopes. (a) ADR 0141 Phase 5 — `--agent-harness` flag on init/sync now accepts `github-copilot-cli` as the second reference implementation alongside the `claude-code` default; Copilot CLI sync writes `.github/hooks/{pre-tool-use,session-start}.json` with the same sentinel-based ownership pattern as the Claude Code `.claude/settings.json` block. Default changes from \"unset\" to `claude-code`; existing adopters on v0.12.2+ get sentinel-tagged-in-place via the dedupe pre-pass. Unknown harness values fail loudly instead of warning. (b) ADR 0148 Phase 4 — init and sync now emit `agent-instructions.md` at the SDD root (harness-neutral, fully method-managed, unconditional overwrite) plus a thin harness wrapper (`CLAUDE.md` under claude-code, `AGENTS.md` under github-copilot-cli) with `<!-- method-managed: begin/end -->` markers; adopter content around the marker block survives sync via the existing `writeMarkedBlockFile` machinery. The v0.3–v0.21 `generate-claude-md` verb + native rich-content renderer retire; the new `generate-briefing` verb regenerates both files from the on-disk templates for the no-bundle-sync case. Older bundles pre-dating ADR 0148 templates sync gracefully with a \"Skipped\" log line. Existing repos carrying a hand-rolled CLAUDE.md without markers will see the wrapper rewrite refused on first sync; pass --allow-overwrite after rehoming any custom content (covered in the upstream agent-instructions-migration-guide). (c) Catalogue schema 2.9.0 (lockstep with sdd-method v0.10.0 reverse-extension-baseline v0.9.0) carrying the Track 2 cohort-sweep field additions per content/plans/v0-9-0-cohort-sweep-derived-bundle.md: capabilities now carries data_subset (foundational/synthesis-tier keying axis) + slice_scope (multi-app-group capability slicing — same capability_id may appear with distinct slice_scope values, row identity becomes (id, slice_scope)); new per-feature edge catalogue feature_subscription_channels built from reverse-evidence/feature-grounding-evidence.yaml subscription_channels: entries (AppSync WebSocket / Pekko WS / MQTT / SSE channel layer, peer of graphql_operations: per resolved §1, kebab name + transport + evidence + optional payload_ref); new per-SDD edge catalogue product_platform_dependencies built from the product-scoped platform_dependencies: block in the same evidence file; new federated edge catalogue cross_sdd_platform_capability derived by the aggregator joining product_platform_dependencies × capability_service on target_service_id == service_id, emitting one row per resolved (consuming-product, platform-capability) pair with orphan findings for unresolved references. SCHEMA_COMPAT unchanged (still ^2.0.0); additive minor across both new catalogues and capability column additions. v0.21.0 ships catalogue schema 2.8.0 closing the long-tail contract-consumer mapping gap (K-03a). The contracts builder now also walks the platform-profile layout `docs/domains/<dom>/contracts/{openapi,proto,avro}/<file>.<ext>` documented in reverse/workflows/contract.md, in addition to the canonical `contracts/<subdir>/<dom>/<file>.<ext>` layout — backward-compatible additive change for federated SDDs that don't carry per-domain contracts. Adds a new buildServiceContractConsumes builder that parses each service's `repos/<service>/docs/service-architecture.md` External Interfaces table, reads Outbound rows, and emits `service_contract` rows with role=consumes via an adopter-supplied `.sdd/service-contract-aliases.yaml` (case-insensitive interface_aliases + interface_contains substring tier + same_product_inference templates with `{prefix}` substitution). Schema 2.8.0 marks service_contract.contract_id as external:true so federated SDDs can emit consumes rows pointing to platform-root contracts; aggregator validates the merged catalogue. Resolution failures become convention findings, not FK-invalid rows. Pattern documented in sdd-method ADR 0147. SCHEMA_COMPAT unchanged (still ^2.0.0). v0.19.0 ships catalogue schema 2.6.0 (lockstep with sdd-method): adds optional `sub_integrations:` array on integration-manifest.yaml per ADR 0144. Multi-provider integration monoliths (modernisation-in-flight or intentional permanent gateways brokering N providers) can declare each provider; the integrations.ts builder emits one integrations.csv row per sub_integration with parent_product_id = umbrella SDD's integrationId. Uses the existing parent_product_id column — no new schema columns. Backward compatible (optional field); SDDs without sub_integrations emit identical output to pre-2.6.0. Originating motivation: connect's sdd-camera-platform-legacy covering Surfsight v2 + VisionTrack v1/v2 + SureCam in one Spring-Boot codebase. SCHEMA_COMPAT unchanged (still ^2.0.0). v0.18.0 ships catalogue schema 2.5.0 (lockstep with sdd-method): adds feature-grounding source per ADR 0143. Canonical builder walks `docs/domains/<dom>/design/<capability>/feature-grounding.md` (platform-profile) and `docs/design/integration/feature-grounding.md` (integration-product), parses the markdown table form, and emits features.csv rows (source: feature-grounding, capability-owned) plus capability_feature / feature_repo / feature_service edges derived from the table columns. Optional per-SDD `.sdd/feature-grounding-aliases.yaml` translates display names (class names, file basenames) to canonical service / repo ids. SCHEMA_COMPAT unchanged (still ^2.0.0). v0.17.0 enables multi-level federation: organisation-level SDDs can now aggregate from organisation-level children (e.g. CXS aggregating sdd-mining, sdd-latam) via optional level: organisation field on siblings, skipping manifest requirements for pure orchestration repos. v0.16.0 adds organisation-profile support for system-of-systems aggregators (e.g. CXS aggregating sdd-connect, sdd-mining, sdd-latam), closing the gap for organisation-level SDD manifests. v0.15.0 ships catalogue schema 2.4.0 (lockstep with sdd-method): adds feature_contract derived edge (forward: capability_feature ⋈ capability_contract; reverse: feature_service ⋈ service_contract) closing the Capability → Feature → Contract chain pre-implementation, plus the new DomainModel entity per ADR 0142 with domain_models / capability_domain_model / feature_domain_model catalogues sourced from a new traceability.domain_model manifest field (forward) or docs/domains/*/architecture/data-model.mermaid.md file-system scan (reverse). Platform-profile only for domain_models; the metamodel now also documents non-catalogued method artefacts (work orders, discovery stories, execution stories, traceability manifests) so it's a complete reference for the forward SDD method's artefact set. SCHEMA_COMPAT unchanged (still ^2.0.0). v0.14.1 patches v0.14.0's domains-builder fix: products-builder now also clears domain_id for non-platform-profile rows even when manifest.domainId is declared. v0.14.0 stopped emitting umbrella domain rows but products.domain_id (and the applications.csv filtered view) still pointed at them, dangling at FK validation. Per ADR 0136 + schema description for products.domain_id, app/integration/support products do not have a primary domain — the builder now honours that statement regardless of manifest declaration, and emits an inferred finding when a manifest-declared value is overridden. v0.14.0 ships two post-v0.9.0-release fixes surfaced by the connect-cohort sync: (1) sync now enforces minimum_sdd_cli_version declared by bundle manifests — previously the orchestration check existed only in the shell sync script and was a no-op when adopters used `sdd-cli sync`, leaving the safety net for stale-CLI scenarios silently absent; (2) per ADR 0136 (App and Integration Products Do Not Belong to a Primary Domain), the domains.ts catalogue builder now skips row emission for non-platform-profile SDDs — application-product and integration-product SDDs that have a docs/domains/<umbrella>/ subdirectory as a structural-organisation convention no longer emit a member-declaration row that collides on PK at aggregation against the canonical platform-profile contribution. v0.13.2 fixed the aggregator's sibling-vendored-schema cross-check to use semver range satisfaction against SCHEMA_COMPAT.catalogue_schema (^2.0.0) instead of strict equality — siblings vendored at lower minor versions inside the same major are now accepted, unblocking aggregation across federated cohorts where the canonical schema is ahead of the bundled schema. v0.13.0 ships the feature-tree.md bullet parser per sdd-method schema 2.2.0 + plan extract-feature-tree-bullets.md: application-product builders now emit features.csv rows with source: \"feature-tree\" from per-app feature-tree.md bullets, populating the previously-empty edge catalogues (persona_feature, journey_feature) for portfolio monoliths whose feature inventory lives in the bullet form. Adds the optional runway column on features.csv with adopter-owned controlled-vocabulary validation via feature-runway-vocabulary.yaml at the SDD root. v0.12.2 dedupes equivalent unmarked adopter PreToolUse entries on settings.json upsert. v0.12.0 extends the integration profileType enum to 11 values (per sdd-method ADR 0137) and fixes the init→sync conflict. v0.11.0 shipped the canonical catalogue surface per ADR 0134 + schema 2.1.0.",
3
+ "version": "0.27.0",
4
+ "description": "Method-layer CLI for SDD repository lifecycle — init, sync, validate, list, plan, generate-briefing, mcp serve, catalogue {build,aggregate,validate,version}, pack {build,validate}. v0.27.0 ships catalogue schema 2.13.0 (additive minor) implementing sdd-method ADR 0159 (Data-Model Entities as First-Class Catalogue Nodes) — the fourth instance of ADR 0157's parity principle. Four new catalogues land in one release: entities (data-model entity nodes — distinct from glossary_items vocabulary and from domain_models files); service_entity (services touching entities, relation=owns from Data Store Mapping tables); c4_container_entity (transitive: service_entity ⋈ c4_containers.service_id); c4_system_entity (aggregation: c4_container_entity ⋈ c4_containers.system_id with container_count). Five walkers: entities-manifest (forward: models[].entities[] in glossary-alignment-manifest.yaml; handles platform-wide non-canonical domain, duplicate model entries, superseded status with superseded_by); entities-mermaid (reverse: parses erDiagram blocks in domain_models doc_paths; handles UPPER_SNAKE/PascalCase/lowercase entity authoring, multi-erDiagram-per-file with within-file dedup, Mermaid comments, relationship-arrow skipping, mixed-diagram-types-per-file); service-entity-tables (reverse primary: ## Data Store Mapping markdown tables with heading + column-shape variants, compound owning-service split on ' / ', trailing-parenthetical-annotation strip, cross-domain entity-resolution fallback); c4-container-entity + c4-system-entity (pure derivations, graceful empty-input). New optional alias map at docs/platform/reference/service-name-aliases.yaml resolves adopter display names ('App Shell UI', 'Cloud Bridge', etc.) to canonical services.id; graceful degradation when absent. New entity-aware slug helper (entity-slug.ts) adds an ALLCAPS-then-Pascal split rule on top of the base slugify so OBUConfigurationTemplate and OBU_CONFIGURATION_TEMPLATE produce the same slug — kept local to the entity walkers to avoid affecting events/contracts/capabilities (per ADR 0159 §4.6 deferred decision). Phase 1.1 entity_glossary lift: now also appends rows from entities.csv (reverse-method side) when glossary_term FK is populated, on top of the existing forward-method emission per ADR 0158. Cross-adopter regression: contextua (forward, pre-lock) — entities=411 (manifest-sourced), service_entity / c4_container_entity / c4_system_entity = 0 (empty-input regression-checked); FK PASS. Connect (reverse, mono-SDD platform-product) — entities=263 (Mermaid-extracted across 11 domains; matches Phase Pre prototype), service_entity=97 (heuristic-only resolution against the Data Store Mapping tables; ~135-155 expected after alias-map authoring per ADR 0159 §4.7), c4_container_entity=88, c4_system_entity=82, entity_glossary lifts from 6→100; FK PASS. Phase Pre prototypes (sdd-method/research/adr-0159-prototypes/) ran the walkers as throw-away Python against both adopters before committing to the spec — first ADR in the parity series to formalise this discipline after the 0.26.0→0.26.1 patch cycle showed real-data validation was needed. SCHEMA_COMPAT unchanged (^2.0.0). v0.26.1 fixed two Phase 1 outcomes from v0.26.0's three-ADR rollout, reported by adopter cross-validation. (a) ADR 0156 events walker: required explicit `id:` field on event-catalog.yaml entries, but the original coordination doc spec was \"derive id from name (slugged)\". Connect's authoring uses `name:` only, so all ~62 events skipped in 0.26.0. Walker now derives id-from-name when id absent (lowercase, hyphenate camelCase boundaries, replace non-alphanumerics with hyphens; explicit id wins when both present; within-domain slug collisions fire divergence finding). (b) ADR 0157 §4.2 amendment: repo_contract had only `contracts.source_repo_id` as its reverse derivation, but Connect's 0/30 source_repo_id outcome left them empty. Added a universal Path X analogous to §4.3 — `service_contract ⋈ services.primary_repo_id` (a service exposing a contract is implemented by a repo; the repo \"owns\" the contract). Schema 2.12.0 unchanged; SCHEMA_COMPAT (^2.0.0) unchanged; pure derivation-logic patch. Cross-adopter regression: contextua-platform — 108 repo_contract rows preserved (Path X reproduces forward-path edges; dedup keeps 108 net); Connect expects ~57 new rows via Path X plus ~62 events plus all downstream service_event edges once they rebuild. v0.26.0 ships catalogue schema 2.12.0 (additive minor) implementing three ADRs in one release: ADR 0156 (Event Catalogue Multi-Source Ingestion) adds the reverse-method `docs/domains/<domain>/contracts/events/event-catalog.yaml` walker alongside the existing forward avsc path — YAML wins on name/domain/publisher/transport/consumers; avsc augments schema_path/version when YAML is null. Transport enum opens (no hardcoded \"nats\" default); recommended values surface a convention finding when violated. service_event edges populate from YAML's publisher + consumers[] in addition to repo-config events.produces/consumes. ADR 0157 (Forward-Declared / Reverse-Derived Parity for Edge Catalogues) codifies the principle that every edge with a forward declared source MUST also have a reverse derived source, applied here to repo_capability + repo_contract: reverse derivations add `capability_service ⋈ services.primary_repo_id` (universal Path X) and `capability_feature ⋈ feature_repo` (Path Y via ADR 0143 evidence) for repo_capability, and `contracts.source_repo_id` denormalisation for repo_contract — alongside the existing forward-declared `additional_context:` / `repo-config.contracts:` paths. The orphan-finding pattern surfaces when reverse paths can't derive (e.g. capability_service rows referencing services with empty primary_repo_id). ADR 0158 (Glossary Cross-Reference Multi-Source Ingestion) extends glossary_xref ingestion from one walker to four (forward declared pair-form, reverse cross_domain_terms, reverse multi-domain conflicts with field-inspection disambiguation, forward supersedes via models[].entities[].superseded_by) plus introduces a new sibling edge catalogue entity_glossary for data-model-entity → glossary-term mappings (status ∈ {aligned, matched_direct}). Dedupe by (domain, entity_name, glossary_item_id) collapses same-domain multi-diagram entries while preserving cross-domain cross-level cataloguing. glossary_xref.relation enum extends from {alias-of, conflicts-with} to {alias-of, conflicts-with, references, supersedes}. SCHEMA_COMPAT unchanged (^2.0.0); additive minor across all three ADRs. Cross-adopter regression verified: contextua's existing forward-path rows (12 repo_contract, 78 events, 42 service_event) preserved exactly; new reverse-path additions (+30 repo_capability via Path X; +10 entity_glossary). v0.25.3 ships catalogue schema 2.11.0 (additive minor): relaxes c4_systems.product_id to a nullable FK. Every product is a system, but not every system is a product — external/SaaS systems catalogued as c4_systems (e.g. Salesforce, DocuSign, Zendesk) legitimately have no owning product. The FK + column were nullable: false, so organisation-level aggregation FAILed with dangling-FK errors on c4_systems rows whose product_id is empty (63 such across the bko/latam/masternaut platforms). The FK validator already passes nullable empty values (fk-validator.test.ts \"treats nullable FK with empty value as PASS\"), so no logic change. Builds with populated product_id (e.g. connect, where every c4_system has an owning product) are unaffected — nullable is strictly more permissive. SCHEMA_COMPAT unchanged (still ^2.0.0); backward compatible — existing 2.10.0 catalogues read unchanged, no migration. v0.25.2 fixes a sync bug: bundle.ts inferred is_forward_base from isBundleName (true for ANY known bundle) instead of isForwardBase, so an additive bundle that omits is_forward_base in its manifest — every sdd-method-cut reverse-extension-baseline — was misclassified as a forward base, making `sdd-cli sync` throw \"Forward-base bundle reverse-extension-baseline has no profile mapping\" and blocking adopters from layering the reverse extension over a forward base. Inference now uses isForwardBase (additive bundles correctly resolve to false). v0.25.1 is a conformance patch: v0.25.0's notes advertised that the legacy c4_containers types Infrastructure / External System \"remain recognised-but-WARNed during the 2.x line\", but no code emitted that finding (the builder-spec's \"a conforming builder MUST emit [finding] convention\" was unimplemented). v0.25.1 adds checkContainerTypeAdvisory, wired into both `catalogue build` and `catalogue validate`, emitting a `convention` finding for any c4_containers.type outside the canonical c4_container_type set {Application, Data Store}. It reads the allowed values from the schema enum (no hardcoded list) and self-disables once the enum is bound via column_enums (the 3.0.0 hard-fail path) or removed — handing off cleanly at the major bump with no double-reporting. The validate path has teeth (it fires over an existing catalogues/ dir — e.g. an adopter who upgraded sdd-cli but has not yet rebuilt a catalogue still carrying Infrastructure rows from the old builder, which is the warn-then-enforce migration window ADR 0155 §4.3 relies on before 3.0.0); the build path is defensive (the canonical builder derives type from the C4 macro and cannot emit a legacy value). No schema change; SCHEMA_COMPAT unchanged (^2.0.0); patch release. v0.25.0 ships catalogue schema 2.10.0 (lockstep with sdd-method ADR 0155 — Align C4 Catalogue Capture with Strict C4 Abstractions), bringing the catalogue's C4 layer into line with c4model.com/abstractions. New node catalogue c4_external_systems (C4 L1 external software systems extracted from System_Ext(...) / Container_Ext(...) on L1+L2 mermaid; id = ext-{slug}); new edges persona_c4system (the C4 Person-uses-System relationship, mapping Person(...) actors to personas rows — the C4 Person abstraction reuses Persona) and system_external_dependency (system integrates-with external, from Rel(...) lines, collapsed to system level per ADR 0155 §4.2). New advisory enum c4_container_type = {Application, Data Store}: the c4-containers builder now types ContainerQueue as Data Store (was the non-canonical \"Infrastructure\") and no longer emits Container_Ext as an internal container row (external containers are catalogued as c4_external_systems); the legacy types Infrastructure / External System remain recognised-but-WARNed during the 2.x line and are removed at the 3.0.0 major bump (the enum is intentionally not bound in column_enums until then). The aggregator dedups c4_external_systems by id across SDDs rather than failing the duplicate-PK check — the one narrowly-scoped exception per ADR 0134, since the same external system (e.g. ext-google-maps) is legitimately declared by multiple SDDs; attribute conflicts on a shared id surface as a convention finding. SCHEMA_COMPAT unchanged (still ^2.0.0); additive minor. v0.24.0 ships sdd-mcp Phase 8 — catalogue resources + tools on the read-only MCP server (sdd-method ADR 0128 + ADR 0150). New resources: sdd://catalogue/schema (vendored canonical schema as JSON), sdd://catalogue/metamodel, sdd://catalogue/category-taxonomy, sdd://catalogue (list of built catalogues), and sdd://catalogue/{name} (rows from catalogues/{name}.csv, validated against the schema, distinguishing not-declared from not-built). New tools: query_catalogue_coverage (row count + internal-FK pass), find_products_by_category, find_orphan_rows (broken internal FK targets), and query_edges_for_entity (every edge row referencing an entity). All reuse the existing src/lib/catalogue schema-loader + csv-reader rather than re-parsing; FK checks consider internal FKs only per ADR 0134 (external FKs are validated at aggregation). Markdown resources try the post-IA path (guides/, standards/) then fall back, returning a structured 'run sdd-cli sync' error when absent. v0.23.1 patches v0.23.0: `sdd-cli pack build` now populates source_commit + source_branch in the rendered BUNDLE_MANIFEST.yaml from `git rev-parse HEAD` / `git rev-parse --abbrev-ref HEAD` against the producer-repo working tree, matching sdd-method's build-method-baseline-bundle.sh provenance behaviour. Non-git producer dirs (CI artefact directories etc.) get the sentinel \"uncommitted\" so consumer-side parseManifest (which rejects empty source_commit) still accepts the bundle. Pre-v0.23.1 packs wrote empty strings and were unsyncable — discovered during the contextua-platform Phase 7 first-adopter pilot (ADR 0151) when operations-console refused the first build of contextua-app-context-pack@v0.1.0. v0.23.0 ships the adopter pack producer + consumer surface per sdd-method ADR 0151 (companion plan adopter-bundle-producer-model.md Phases 3a + 3b + 3c). New `pack` verb with build and validate subcommands lets platform-profile adopters (contextua-platform, CXS Connect) produce additive-layer bundles from a context-pack-seed.yaml declaration. The builder validates the seed against the canonical schema, resolves include: directives across files, expands managed_paths (literal + glob against the producer working tree), runs a producer-side leakage check (disjointness with the declared forward base + disjointness with declared forbidden_paths globs), stages the payload tree, emits SHA-256 checksums per managed file, renders BUNDLE_MANIFEST.yaml mirroring the .hbs template shape, and produces <pack-name>-v<semver>.tar.gz + sidecar .sha256. Consumer-side enforcement extends `sdd-cli sync` for the multi-bundle lock chain: requires_forward_base resolution verifies the consumer's lock carries a compatible forward base; requires_pack resolution enforces vertical-extension dependencies with full semver-range support (caret with pre-1.0 narrow per npm convention, tilde, exact pin, >=); the existing cross-bundle path-ownership check now functions for adopter pack names too (consumer-side leakage assertion); produced_by_adopter / scope / requires_forward_base / requires_pack carry from the manifest into the lock entry as additive optional fields preserving lock_version: 2. New `sdd-cli sync --config <path>` reads a multi-bundle method-baseline.config.yaml (ordered bundles[].source list) and iterates each through the single-bundle sync engine — mutually exclusive with --bundle. `sdd-cli list` surfaces adopter pack provenance: forward-base version in the repo line plus indented `+ <pack-name> <version> from <adopter-repo> [requires <base-pack>]` lines beneath; --verbose adds per-bundle managed_path counts; JSON format adds a per-repo bundles[] array carrying full provenance. Type relaxation: BundleManifest.bundleName and BundleEntry.name widened from the closed BundleName enum to string (adopter pack names are arbitrary per ADR 0151); the closed enum still applies to sdd-method forward bases, validated at parse time only when is_forward_base: true. BundleManifest parser migrated from line-by-line scalar regex to the existing yaml library dependency for nested requires_forward_base / requires_pack object parsing. v0.22.0 bundles three landed scopes. (a) ADR 0141 Phase 5 — `--agent-harness` flag on init/sync now accepts `github-copilot-cli` as the second reference implementation alongside the `claude-code` default; Copilot CLI sync writes `.github/hooks/{pre-tool-use,session-start}.json` with the same sentinel-based ownership pattern as the Claude Code `.claude/settings.json` block. Default changes from \"unset\" to `claude-code`; existing adopters on v0.12.2+ get sentinel-tagged-in-place via the dedupe pre-pass. Unknown harness values fail loudly instead of warning. (b) ADR 0148 Phase 4 — init and sync now emit `agent-instructions.md` at the SDD root (harness-neutral, fully method-managed, unconditional overwrite) plus a thin harness wrapper (`CLAUDE.md` under claude-code, `AGENTS.md` under github-copilot-cli) with `<!-- method-managed: begin/end -->` markers; adopter content around the marker block survives sync via the existing `writeMarkedBlockFile` machinery. The v0.3–v0.21 `generate-claude-md` verb + native rich-content renderer retire; the new `generate-briefing` verb regenerates both files from the on-disk templates for the no-bundle-sync case. Older bundles pre-dating ADR 0148 templates sync gracefully with a \"Skipped\" log line. Existing repos carrying a hand-rolled CLAUDE.md without markers will see the wrapper rewrite refused on first sync; pass --allow-overwrite after rehoming any custom content (covered in the upstream agent-instructions-migration-guide). (c) Catalogue schema 2.9.0 (lockstep with sdd-method v0.10.0 reverse-extension-baseline v0.9.0) carrying the Track 2 cohort-sweep field additions per content/plans/v0-9-0-cohort-sweep-derived-bundle.md: capabilities now carries data_subset (foundational/synthesis-tier keying axis) + slice_scope (multi-app-group capability slicing — same capability_id may appear with distinct slice_scope values, row identity becomes (id, slice_scope)); new per-feature edge catalogue feature_subscription_channels built from reverse-evidence/feature-grounding-evidence.yaml subscription_channels: entries (AppSync WebSocket / Pekko WS / MQTT / SSE channel layer, peer of graphql_operations: per resolved §1, kebab name + transport + evidence + optional payload_ref); new per-SDD edge catalogue product_platform_dependencies built from the product-scoped platform_dependencies: block in the same evidence file; new federated edge catalogue cross_sdd_platform_capability derived by the aggregator joining product_platform_dependencies × capability_service on target_service_id == service_id, emitting one row per resolved (consuming-product, platform-capability) pair with orphan findings for unresolved references. SCHEMA_COMPAT unchanged (still ^2.0.0); additive minor across both new catalogues and capability column additions. v0.21.0 ships catalogue schema 2.8.0 closing the long-tail contract-consumer mapping gap (K-03a). The contracts builder now also walks the platform-profile layout `docs/domains/<dom>/contracts/{openapi,proto,avro}/<file>.<ext>` documented in reverse/workflows/contract.md, in addition to the canonical `contracts/<subdir>/<dom>/<file>.<ext>` layout — backward-compatible additive change for federated SDDs that don't carry per-domain contracts. Adds a new buildServiceContractConsumes builder that parses each service's `repos/<service>/docs/service-architecture.md` External Interfaces table, reads Outbound rows, and emits `service_contract` rows with role=consumes via an adopter-supplied `.sdd/service-contract-aliases.yaml` (case-insensitive interface_aliases + interface_contains substring tier + same_product_inference templates with `{prefix}` substitution). Schema 2.8.0 marks service_contract.contract_id as external:true so federated SDDs can emit consumes rows pointing to platform-root contracts; aggregator validates the merged catalogue. Resolution failures become convention findings, not FK-invalid rows. Pattern documented in sdd-method ADR 0147. SCHEMA_COMPAT unchanged (still ^2.0.0). v0.19.0 ships catalogue schema 2.6.0 (lockstep with sdd-method): adds optional `sub_integrations:` array on integration-manifest.yaml per ADR 0144. Multi-provider integration monoliths (modernisation-in-flight or intentional permanent gateways brokering N providers) can declare each provider; the integrations.ts builder emits one integrations.csv row per sub_integration with parent_product_id = umbrella SDD's integrationId. Uses the existing parent_product_id column — no new schema columns. Backward compatible (optional field); SDDs without sub_integrations emit identical output to pre-2.6.0. Originating motivation: connect's sdd-camera-platform-legacy covering Surfsight v2 + VisionTrack v1/v2 + SureCam in one Spring-Boot codebase. SCHEMA_COMPAT unchanged (still ^2.0.0). v0.18.0 ships catalogue schema 2.5.0 (lockstep with sdd-method): adds feature-grounding source per ADR 0143. Canonical builder walks `docs/domains/<dom>/design/<capability>/feature-grounding.md` (platform-profile) and `docs/design/integration/feature-grounding.md` (integration-product), parses the markdown table form, and emits features.csv rows (source: feature-grounding, capability-owned) plus capability_feature / feature_repo / feature_service edges derived from the table columns. Optional per-SDD `.sdd/feature-grounding-aliases.yaml` translates display names (class names, file basenames) to canonical service / repo ids. SCHEMA_COMPAT unchanged (still ^2.0.0). v0.17.0 enables multi-level federation: organisation-level SDDs can now aggregate from organisation-level children (e.g. CXS aggregating sdd-mining, sdd-latam) via optional level: organisation field on siblings, skipping manifest requirements for pure orchestration repos. v0.16.0 adds organisation-profile support for system-of-systems aggregators (e.g. CXS aggregating sdd-connect, sdd-mining, sdd-latam), closing the gap for organisation-level SDD manifests. v0.15.0 ships catalogue schema 2.4.0 (lockstep with sdd-method): adds feature_contract derived edge (forward: capability_feature ⋈ capability_contract; reverse: feature_service ⋈ service_contract) closing the Capability → Feature → Contract chain pre-implementation, plus the new DomainModel entity per ADR 0142 with domain_models / capability_domain_model / feature_domain_model catalogues sourced from a new traceability.domain_model manifest field (forward) or docs/domains/*/architecture/data-model.mermaid.md file-system scan (reverse). Platform-profile only for domain_models; the metamodel now also documents non-catalogued method artefacts (work orders, discovery stories, execution stories, traceability manifests) so it's a complete reference for the forward SDD method's artefact set. SCHEMA_COMPAT unchanged (still ^2.0.0). v0.14.1 patches v0.14.0's domains-builder fix: products-builder now also clears domain_id for non-platform-profile rows even when manifest.domainId is declared. v0.14.0 stopped emitting umbrella domain rows but products.domain_id (and the applications.csv filtered view) still pointed at them, dangling at FK validation. Per ADR 0136 + schema description for products.domain_id, app/integration/support products do not have a primary domain — the builder now honours that statement regardless of manifest declaration, and emits an inferred finding when a manifest-declared value is overridden. v0.14.0 ships two post-v0.9.0-release fixes surfaced by the connect-cohort sync: (1) sync now enforces minimum_sdd_cli_version declared by bundle manifests — previously the orchestration check existed only in the shell sync script and was a no-op when adopters used `sdd-cli sync`, leaving the safety net for stale-CLI scenarios silently absent; (2) per ADR 0136 (App and Integration Products Do Not Belong to a Primary Domain), the domains.ts catalogue builder now skips row emission for non-platform-profile SDDs — application-product and integration-product SDDs that have a docs/domains/<umbrella>/ subdirectory as a structural-organisation convention no longer emit a member-declaration row that collides on PK at aggregation against the canonical platform-profile contribution. v0.13.2 fixed the aggregator's sibling-vendored-schema cross-check to use semver range satisfaction against SCHEMA_COMPAT.catalogue_schema (^2.0.0) instead of strict equality — siblings vendored at lower minor versions inside the same major are now accepted, unblocking aggregation across federated cohorts where the canonical schema is ahead of the bundled schema. v0.13.0 ships the feature-tree.md bullet parser per sdd-method schema 2.2.0 + plan extract-feature-tree-bullets.md: application-product builders now emit features.csv rows with source: \"feature-tree\" from per-app feature-tree.md bullets, populating the previously-empty edge catalogues (persona_feature, journey_feature) for portfolio monoliths whose feature inventory lives in the bullet form. Adds the optional runway column on features.csv with adopter-owned controlled-vocabulary validation via feature-runway-vocabulary.yaml at the SDD root. v0.12.2 dedupes equivalent unmarked adopter PreToolUse entries on settings.json upsert. v0.12.0 extends the integration profileType enum to 11 values (per sdd-method ADR 0137) and fixes the init→sync conflict. v0.11.0 shipped the canonical catalogue surface per ADR 0134 + schema 2.1.0.",
5
5
  "keywords": [
6
6
  "sdd-method",
7
7
  "sdd",