@unified-product-graph/core 0.21.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.cjs +57 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +26 -3
- package/dist/index.d.ts +26 -3
- package/dist/index.js +57 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
The TypeScript core for the **Unified Product Graph (UPG)**, an open specification that gives product tools a shared vocabulary for entities, edges, and frameworks.
|
|
9
9
|
|
|
10
|
-
320 entity types across 37 domains.
|
|
10
|
+
320 entity types across 37 domains. 1039 typed edges. 46 canonical framework definitions, with more added as each is reviewed.
|
|
11
11
|
|
|
12
12
|
## Install
|
|
13
13
|
|
package/dist/index.cjs
CHANGED
|
@@ -2557,8 +2557,31 @@ var UPG_EDGE_CATALOG = {
|
|
|
2557
2557
|
product_cannibalises_product: { forward_verb: "cannibalises", reverse_verb: "cannibalised_by", classification: "causal", source_type: "product", target_type: "product" },
|
|
2558
2558
|
product_succeeds_product: { forward_verb: "succeeds", reverse_verb: "succeeded_by", classification: "causal", source_type: "product", target_type: "product" },
|
|
2559
2559
|
// 8.3 Workspace Edges
|
|
2560
|
+
// Altitude anchors (WS3, 2026-07-05): a workspace scopes to exactly one of
|
|
2561
|
+
// three legal altitudes — organization / product_area ("plane") / product —
|
|
2562
|
+
// each a typed hierarchy edge, not a polymorphic `_node` wildcard. Per the
|
|
2563
|
+
// enum-vs-polymorphism ADR (2026-06-16), this family fails universality
|
|
2564
|
+
// (the anchor set is a closed altitude ladder, not "any entity") and is
|
|
2565
|
+
// structural (it must resolve through `resolveContainmentEdge`/`get_tree`),
|
|
2566
|
+
// so it stays enumerated — the same shape `feature`'s five typed parent
|
|
2567
|
+
// edges already use. Same verb pair across all three altitudes. Neither new
|
|
2568
|
+
// edge is cross_product_eligible: an org/plane-altitude workspace lives in
|
|
2569
|
+
// the same portfolio-level `.upg` as its anchor, same as sibling containment
|
|
2570
|
+
// edges (organization_organised_into_product_area, portfolio_contains_product).
|
|
2571
|
+
organization_thinks_in_workspace: { forward_verb: "thinks_in", reverse_verb: "thinks_for", classification: "hierarchy", source_type: "organization", target_type: "workspace" },
|
|
2572
|
+
product_area_thinks_in_workspace: { forward_verb: "thinks_in", reverse_verb: "thinks_for", classification: "hierarchy", source_type: "product_area", target_type: "workspace" },
|
|
2560
2573
|
product_thinks_in_workspace: { forward_verb: "thinks_in", reverse_verb: "thinks_for", classification: "hierarchy", source_type: "product", target_type: "workspace" },
|
|
2561
|
-
|
|
2574
|
+
// Commit provenance (WS3, 2026-07-05): widened from the single-target
|
|
2575
|
+
// `workspace_produced_decision` to the `node` wildcard — a workspace's
|
|
2576
|
+
// commit loop can legitimately produce any entity type arranged in it
|
|
2577
|
+
// (decision, feature, persona, ...), so per the same ADR test this family
|
|
2578
|
+
// is universal + non-structural (provenance metadata, not the produced
|
|
2579
|
+
// node's real containment edge) and collapses polymorphic, mirroring
|
|
2580
|
+
// `decision_produces_node`. See UPG_EDGE_MIGRATIONS for the rename rule.
|
|
2581
|
+
// Edge-provenance (which workspace produced a committed *edge*, not just a
|
|
2582
|
+
// node) has no schema mechanism yet — deliberately deferred, see the WS3
|
|
2583
|
+
// proposal doc, ripple map "surprises" #3.
|
|
2584
|
+
workspace_produced_node: { forward_verb: "produced", reverse_verb: "produced_in", classification: "causal", source_type: "workspace", target_type: "node" },
|
|
2562
2585
|
// ── P14 edges (replacing foreign-key properties) ─────────────────────────
|
|
2563
2586
|
feature_addresses_job: { forward_verb: "addresses", reverse_verb: "addressed_by", classification: "cross-domain", source_type: "feature", target_type: "job" },
|
|
2564
2587
|
feature_drives_key_result: { forward_verb: "drives", reverse_verb: "driven_by", classification: "cross-domain", source_type: "feature", target_type: "key_result" },
|
|
@@ -3501,7 +3524,10 @@ var UPG_POLYMORPHIC_EDGE_KEYS = [
|
|
|
3501
3524
|
// intended semantic domain; the endpoints are the `node` wildcard.
|
|
3502
3525
|
"work_item_blocks_work_item",
|
|
3503
3526
|
"work_item_relates_to_work_item",
|
|
3504
|
-
"work_item_duplicates_work_item"
|
|
3527
|
+
"work_item_duplicates_work_item",
|
|
3528
|
+
// Workspace provenance (WS3, 2026-07-05): a workspace can produce any
|
|
3529
|
+
// entity type arranged in it. Widened from workspace_produced_decision.
|
|
3530
|
+
"workspace_produced_node"
|
|
3505
3531
|
];
|
|
3506
3532
|
var _POLY_KEY_SET = new Set(UPG_POLYMORPHIC_EDGE_KEYS);
|
|
3507
3533
|
function isPolymorphicEdge(key) {
|
|
@@ -4263,13 +4289,19 @@ var UPG_VALID_CHILDREN = {
|
|
|
4263
4289
|
// ── Portfolio layer hierarchy ────────────────────────────────────────────────
|
|
4264
4290
|
// organization → product_area is the org-axis anchor (who owns what);
|
|
4265
4291
|
// organization → portfolio is the strategic-axis anchor (where you invest).
|
|
4266
|
-
organization
|
|
4292
|
+
// organization → workspace (WS3, 2026-07-05): org-altitude workspace anchor
|
|
4293
|
+
// (organization_thinks_in_workspace) — a workspace scoped to org altitude
|
|
4294
|
+
// lives in the same portfolio-level graph as its organization node.
|
|
4295
|
+
organization: ["portfolio", "product_area", "workspace"],
|
|
4267
4296
|
// portfolios can nest (multi-level investment structures).
|
|
4268
4297
|
portfolio: ["product", "portfolio"],
|
|
4269
4298
|
// product_area is the organisational container for products and can
|
|
4270
4299
|
// nest (parent → sub-area). product_area also groups features; the
|
|
4271
|
-
// "Studio area owns 6 features" mental model.
|
|
4272
|
-
|
|
4300
|
+
// "Studio area owns 6 features" mental model. product_area → workspace
|
|
4301
|
+
// (WS3, 2026-07-05): plane-altitude workspace anchor
|
|
4302
|
+
// (product_area_thinks_in_workspace) — "plane" is Entopo's app-level name
|
|
4303
|
+
// for product_area, not a distinct spec entity.
|
|
4304
|
+
product_area: ["product", "product_area", "feature", "workspace"]
|
|
4273
4305
|
};
|
|
4274
4306
|
function getValidChildren(entityType) {
|
|
4275
4307
|
return UPG_VALID_CHILDREN[entityType] ?? [];
|
|
@@ -9046,6 +9078,25 @@ function getScalarToEdgeMigrations(fromVersion, toVersion) {
|
|
|
9046
9078
|
return result;
|
|
9047
9079
|
}
|
|
9048
9080
|
var UPG_EDGE_MIGRATIONS = {
|
|
9081
|
+
// (target version TBD at release ceremony — pencilled at 0.22.0, the next
|
|
9082
|
+
// breaking slot after 0.21.0 per the docket; adjust the key if Wave 4
|
|
9083
|
+
// claims it first.) WS3 commit-provenance collapse (2026-07-05, ratified):
|
|
9084
|
+
// `workspace_produced_decision` widens to the `node` wildcard endpoint —
|
|
9085
|
+
// a workspace's commit loop can legitimately produce any entity type
|
|
9086
|
+
// arranged in it (decision, feature, persona, ...), not just decisions.
|
|
9087
|
+
// No flip (source stays workspace); the target node's concrete type is
|
|
9088
|
+
// unchanged (still a decision), only the edge key + catalog target_type
|
|
9089
|
+
// widen. See the enum-vs-polymorphism ADR and the WS3 proposal doc for
|
|
9090
|
+
// the full reasoning (mirrors decision_produces_node).
|
|
9091
|
+
"0.22.0": [
|
|
9092
|
+
// No requires_target_type: the destination's target_type is the `node`
|
|
9093
|
+
// wildcard, and the endpoint guard is checked against the catalog's
|
|
9094
|
+
// declared type (per the spec-integrity "endpoint guards match the
|
|
9095
|
+
// catalog entry" test), not the concrete instance type — a concrete
|
|
9096
|
+
// `decision` instance would never satisfy a literal 'node' guard at
|
|
9097
|
+
// runtime. Gate only on the unwidened source endpoint.
|
|
9098
|
+
{ kind: "rename", from: "workspace_produced_decision", to: "workspace_produced_node", requires_source_type: "workspace", reason: "WS3 commit-provenance collapse (2026-07-05, Captain-ratified). workspace_produced_decision widens to the polymorphic workspace_produced_node: a workspace commit can legitimately produce any entity type, not just a decision. No flip; only the target_type widens from decision to the node wildcard." }
|
|
9099
|
+
],
|
|
9049
9100
|
"0.9.9": [
|
|
9050
9101
|
// (since v0.9.9, UPG-664/UPG-678) Validation experiment-model + test_plan
|
|
9051
9102
|
// re-home. The validation chain is reshaped to the single-parent line
|
|
@@ -29896,7 +29947,7 @@ function isCanonical(text) {
|
|
|
29896
29947
|
}
|
|
29897
29948
|
|
|
29898
29949
|
// src/index.ts
|
|
29899
|
-
var UPG_VERSION = "0.
|
|
29950
|
+
var UPG_VERSION = "0.22.0";
|
|
29900
29951
|
var UPG_FORMAT_VERSION = "0.4.0";
|
|
29901
29952
|
var MARKDOWN_FORMAT_VERSION = "0.1";
|
|
29902
29953
|
var UPG_TYPES = getTypes();
|