@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/dist/index.d.cts
CHANGED
|
@@ -5793,6 +5793,20 @@ declare const UPG_EDGE_CATALOG: {
|
|
|
5793
5793
|
source_type: string;
|
|
5794
5794
|
target_type: string;
|
|
5795
5795
|
};
|
|
5796
|
+
organization_thinks_in_workspace: {
|
|
5797
|
+
forward_verb: string;
|
|
5798
|
+
reverse_verb: string;
|
|
5799
|
+
classification: "hierarchy";
|
|
5800
|
+
source_type: string;
|
|
5801
|
+
target_type: string;
|
|
5802
|
+
};
|
|
5803
|
+
product_area_thinks_in_workspace: {
|
|
5804
|
+
forward_verb: string;
|
|
5805
|
+
reverse_verb: string;
|
|
5806
|
+
classification: "hierarchy";
|
|
5807
|
+
source_type: string;
|
|
5808
|
+
target_type: string;
|
|
5809
|
+
};
|
|
5796
5810
|
product_thinks_in_workspace: {
|
|
5797
5811
|
forward_verb: string;
|
|
5798
5812
|
reverse_verb: string;
|
|
@@ -5800,7 +5814,7 @@ declare const UPG_EDGE_CATALOG: {
|
|
|
5800
5814
|
source_type: string;
|
|
5801
5815
|
target_type: string;
|
|
5802
5816
|
};
|
|
5803
|
-
|
|
5817
|
+
workspace_produced_node: {
|
|
5804
5818
|
forward_verb: string;
|
|
5805
5819
|
reverse_verb: string;
|
|
5806
5820
|
classification: "causal";
|
|
@@ -7672,7 +7686,7 @@ declare function isDeliberateOnlyEdge(type: string): boolean;
|
|
|
7672
7686
|
/**
|
|
7673
7687
|
* Canonical allow-list of edges that use the `'node'` wildcard endpoint.
|
|
7674
7688
|
*
|
|
7675
|
-
*
|
|
7689
|
+
* Eight semantic families are sanctioned:
|
|
7676
7690
|
*
|
|
7677
7691
|
* 1. **Universal semantic verbs**: any node can inform / constrain / inspire
|
|
7678
7692
|
* any other node. The meaning is deliberately abstract; consumers render
|
|
@@ -7687,6 +7701,15 @@ declare function isDeliberateOnlyEdge(type: string): boolean;
|
|
|
7687
7701
|
* 5. **Framework exercises**: a framework_exercise can include any entity type
|
|
7688
7702
|
* it scores. The technique is type-agnostic, so binding the target would
|
|
7689
7703
|
* re-weld frameworks to one entity type — the limitation this edge removes.
|
|
7704
|
+
* 6. **Universal classification**: any node can be classified against a
|
|
7705
|
+
* classification_value. Classification schemes are type-agnostic.
|
|
7706
|
+
* 7. **Work-item issue links**: blocks/relates/duplicates spans the work-item
|
|
7707
|
+
* set {feature, epic, user_story, task, bug} — endpoint-polymorphic over a
|
|
7708
|
+
* bounded family, not the full type universe.
|
|
7709
|
+
* 8. **Workspace provenance** (WS3, 2026-07-05): a workspace's commit loop can
|
|
7710
|
+
* produce any entity type arranged in it (decision, feature, persona, ...).
|
|
7711
|
+
* Widened from the single-target `workspace_produced_decision`; see
|
|
7712
|
+
* `UPG_EDGE_MIGRATIONS` for the rename rule.
|
|
7690
7713
|
*
|
|
7691
7714
|
* Adding a new polymorphic edge requires extending this array AND the
|
|
7692
7715
|
* spec-integrity regression test, which forces a conscious decision and
|
|
@@ -22495,7 +22518,7 @@ declare function isCanonical(text: string): boolean;
|
|
|
22495
22518
|
* it stamps the `upg_version` field of every `.upg` file written by the SDK.
|
|
22496
22519
|
* The `check:version-lockstep` gate enforces this at release time.
|
|
22497
22520
|
*/
|
|
22498
|
-
declare const UPG_VERSION: "0.
|
|
22521
|
+
declare const UPG_VERSION: "0.22.0";
|
|
22499
22522
|
/**
|
|
22500
22523
|
* The `.upg` JSON document format version. Written to the `upg_version` field.
|
|
22501
22524
|
* Evolves independently from `UPG_VERSION` (the catalogue version).
|
package/dist/index.d.ts
CHANGED
|
@@ -5793,6 +5793,20 @@ declare const UPG_EDGE_CATALOG: {
|
|
|
5793
5793
|
source_type: string;
|
|
5794
5794
|
target_type: string;
|
|
5795
5795
|
};
|
|
5796
|
+
organization_thinks_in_workspace: {
|
|
5797
|
+
forward_verb: string;
|
|
5798
|
+
reverse_verb: string;
|
|
5799
|
+
classification: "hierarchy";
|
|
5800
|
+
source_type: string;
|
|
5801
|
+
target_type: string;
|
|
5802
|
+
};
|
|
5803
|
+
product_area_thinks_in_workspace: {
|
|
5804
|
+
forward_verb: string;
|
|
5805
|
+
reverse_verb: string;
|
|
5806
|
+
classification: "hierarchy";
|
|
5807
|
+
source_type: string;
|
|
5808
|
+
target_type: string;
|
|
5809
|
+
};
|
|
5796
5810
|
product_thinks_in_workspace: {
|
|
5797
5811
|
forward_verb: string;
|
|
5798
5812
|
reverse_verb: string;
|
|
@@ -5800,7 +5814,7 @@ declare const UPG_EDGE_CATALOG: {
|
|
|
5800
5814
|
source_type: string;
|
|
5801
5815
|
target_type: string;
|
|
5802
5816
|
};
|
|
5803
|
-
|
|
5817
|
+
workspace_produced_node: {
|
|
5804
5818
|
forward_verb: string;
|
|
5805
5819
|
reverse_verb: string;
|
|
5806
5820
|
classification: "causal";
|
|
@@ -7672,7 +7686,7 @@ declare function isDeliberateOnlyEdge(type: string): boolean;
|
|
|
7672
7686
|
/**
|
|
7673
7687
|
* Canonical allow-list of edges that use the `'node'` wildcard endpoint.
|
|
7674
7688
|
*
|
|
7675
|
-
*
|
|
7689
|
+
* Eight semantic families are sanctioned:
|
|
7676
7690
|
*
|
|
7677
7691
|
* 1. **Universal semantic verbs**: any node can inform / constrain / inspire
|
|
7678
7692
|
* any other node. The meaning is deliberately abstract; consumers render
|
|
@@ -7687,6 +7701,15 @@ declare function isDeliberateOnlyEdge(type: string): boolean;
|
|
|
7687
7701
|
* 5. **Framework exercises**: a framework_exercise can include any entity type
|
|
7688
7702
|
* it scores. The technique is type-agnostic, so binding the target would
|
|
7689
7703
|
* re-weld frameworks to one entity type — the limitation this edge removes.
|
|
7704
|
+
* 6. **Universal classification**: any node can be classified against a
|
|
7705
|
+
* classification_value. Classification schemes are type-agnostic.
|
|
7706
|
+
* 7. **Work-item issue links**: blocks/relates/duplicates spans the work-item
|
|
7707
|
+
* set {feature, epic, user_story, task, bug} — endpoint-polymorphic over a
|
|
7708
|
+
* bounded family, not the full type universe.
|
|
7709
|
+
* 8. **Workspace provenance** (WS3, 2026-07-05): a workspace's commit loop can
|
|
7710
|
+
* produce any entity type arranged in it (decision, feature, persona, ...).
|
|
7711
|
+
* Widened from the single-target `workspace_produced_decision`; see
|
|
7712
|
+
* `UPG_EDGE_MIGRATIONS` for the rename rule.
|
|
7690
7713
|
*
|
|
7691
7714
|
* Adding a new polymorphic edge requires extending this array AND the
|
|
7692
7715
|
* spec-integrity regression test, which forces a conscious decision and
|
|
@@ -22495,7 +22518,7 @@ declare function isCanonical(text: string): boolean;
|
|
|
22495
22518
|
* it stamps the `upg_version` field of every `.upg` file written by the SDK.
|
|
22496
22519
|
* The `check:version-lockstep` gate enforces this at release time.
|
|
22497
22520
|
*/
|
|
22498
|
-
declare const UPG_VERSION: "0.
|
|
22521
|
+
declare const UPG_VERSION: "0.22.0";
|
|
22499
22522
|
/**
|
|
22500
22523
|
* The `.upg` JSON document format version. Written to the `upg_version` field.
|
|
22501
22524
|
* Evolves independently from `UPG_VERSION` (the catalogue version).
|
package/dist/index.js
CHANGED
|
@@ -2302,8 +2302,31 @@ var UPG_EDGE_CATALOG = {
|
|
|
2302
2302
|
product_cannibalises_product: { forward_verb: "cannibalises", reverse_verb: "cannibalised_by", classification: "causal", source_type: "product", target_type: "product" },
|
|
2303
2303
|
product_succeeds_product: { forward_verb: "succeeds", reverse_verb: "succeeded_by", classification: "causal", source_type: "product", target_type: "product" },
|
|
2304
2304
|
// 8.3 Workspace Edges
|
|
2305
|
+
// Altitude anchors (WS3, 2026-07-05): a workspace scopes to exactly one of
|
|
2306
|
+
// three legal altitudes — organization / product_area ("plane") / product —
|
|
2307
|
+
// each a typed hierarchy edge, not a polymorphic `_node` wildcard. Per the
|
|
2308
|
+
// enum-vs-polymorphism ADR (2026-06-16), this family fails universality
|
|
2309
|
+
// (the anchor set is a closed altitude ladder, not "any entity") and is
|
|
2310
|
+
// structural (it must resolve through `resolveContainmentEdge`/`get_tree`),
|
|
2311
|
+
// so it stays enumerated — the same shape `feature`'s five typed parent
|
|
2312
|
+
// edges already use. Same verb pair across all three altitudes. Neither new
|
|
2313
|
+
// edge is cross_product_eligible: an org/plane-altitude workspace lives in
|
|
2314
|
+
// the same portfolio-level `.upg` as its anchor, same as sibling containment
|
|
2315
|
+
// edges (organization_organised_into_product_area, portfolio_contains_product).
|
|
2316
|
+
organization_thinks_in_workspace: { forward_verb: "thinks_in", reverse_verb: "thinks_for", classification: "hierarchy", source_type: "organization", target_type: "workspace" },
|
|
2317
|
+
product_area_thinks_in_workspace: { forward_verb: "thinks_in", reverse_verb: "thinks_for", classification: "hierarchy", source_type: "product_area", target_type: "workspace" },
|
|
2305
2318
|
product_thinks_in_workspace: { forward_verb: "thinks_in", reverse_verb: "thinks_for", classification: "hierarchy", source_type: "product", target_type: "workspace" },
|
|
2306
|
-
|
|
2319
|
+
// Commit provenance (WS3, 2026-07-05): widened from the single-target
|
|
2320
|
+
// `workspace_produced_decision` to the `node` wildcard — a workspace's
|
|
2321
|
+
// commit loop can legitimately produce any entity type arranged in it
|
|
2322
|
+
// (decision, feature, persona, ...), so per the same ADR test this family
|
|
2323
|
+
// is universal + non-structural (provenance metadata, not the produced
|
|
2324
|
+
// node's real containment edge) and collapses polymorphic, mirroring
|
|
2325
|
+
// `decision_produces_node`. See UPG_EDGE_MIGRATIONS for the rename rule.
|
|
2326
|
+
// Edge-provenance (which workspace produced a committed *edge*, not just a
|
|
2327
|
+
// node) has no schema mechanism yet — deliberately deferred, see the WS3
|
|
2328
|
+
// proposal doc, ripple map "surprises" #3.
|
|
2329
|
+
workspace_produced_node: { forward_verb: "produced", reverse_verb: "produced_in", classification: "causal", source_type: "workspace", target_type: "node" },
|
|
2307
2330
|
// ── P14 edges (replacing foreign-key properties) ─────────────────────────
|
|
2308
2331
|
feature_addresses_job: { forward_verb: "addresses", reverse_verb: "addressed_by", classification: "cross-domain", source_type: "feature", target_type: "job" },
|
|
2309
2332
|
feature_drives_key_result: { forward_verb: "drives", reverse_verb: "driven_by", classification: "cross-domain", source_type: "feature", target_type: "key_result" },
|
|
@@ -3246,7 +3269,10 @@ var UPG_POLYMORPHIC_EDGE_KEYS = [
|
|
|
3246
3269
|
// intended semantic domain; the endpoints are the `node` wildcard.
|
|
3247
3270
|
"work_item_blocks_work_item",
|
|
3248
3271
|
"work_item_relates_to_work_item",
|
|
3249
|
-
"work_item_duplicates_work_item"
|
|
3272
|
+
"work_item_duplicates_work_item",
|
|
3273
|
+
// Workspace provenance (WS3, 2026-07-05): a workspace can produce any
|
|
3274
|
+
// entity type arranged in it. Widened from workspace_produced_decision.
|
|
3275
|
+
"workspace_produced_node"
|
|
3250
3276
|
];
|
|
3251
3277
|
var _POLY_KEY_SET = new Set(UPG_POLYMORPHIC_EDGE_KEYS);
|
|
3252
3278
|
function isPolymorphicEdge(key) {
|
|
@@ -4008,13 +4034,19 @@ var UPG_VALID_CHILDREN = {
|
|
|
4008
4034
|
// ── Portfolio layer hierarchy ────────────────────────────────────────────────
|
|
4009
4035
|
// organization → product_area is the org-axis anchor (who owns what);
|
|
4010
4036
|
// organization → portfolio is the strategic-axis anchor (where you invest).
|
|
4011
|
-
organization
|
|
4037
|
+
// organization → workspace (WS3, 2026-07-05): org-altitude workspace anchor
|
|
4038
|
+
// (organization_thinks_in_workspace) — a workspace scoped to org altitude
|
|
4039
|
+
// lives in the same portfolio-level graph as its organization node.
|
|
4040
|
+
organization: ["portfolio", "product_area", "workspace"],
|
|
4012
4041
|
// portfolios can nest (multi-level investment structures).
|
|
4013
4042
|
portfolio: ["product", "portfolio"],
|
|
4014
4043
|
// product_area is the organisational container for products and can
|
|
4015
4044
|
// nest (parent → sub-area). product_area also groups features; the
|
|
4016
|
-
// "Studio area owns 6 features" mental model.
|
|
4017
|
-
|
|
4045
|
+
// "Studio area owns 6 features" mental model. product_area → workspace
|
|
4046
|
+
// (WS3, 2026-07-05): plane-altitude workspace anchor
|
|
4047
|
+
// (product_area_thinks_in_workspace) — "plane" is Entopo's app-level name
|
|
4048
|
+
// for product_area, not a distinct spec entity.
|
|
4049
|
+
product_area: ["product", "product_area", "feature", "workspace"]
|
|
4018
4050
|
};
|
|
4019
4051
|
function getValidChildren(entityType) {
|
|
4020
4052
|
return UPG_VALID_CHILDREN[entityType] ?? [];
|
|
@@ -8791,6 +8823,25 @@ function getScalarToEdgeMigrations(fromVersion, toVersion) {
|
|
|
8791
8823
|
return result;
|
|
8792
8824
|
}
|
|
8793
8825
|
var UPG_EDGE_MIGRATIONS = {
|
|
8826
|
+
// (target version TBD at release ceremony — pencilled at 0.22.0, the next
|
|
8827
|
+
// breaking slot after 0.21.0 per the docket; adjust the key if Wave 4
|
|
8828
|
+
// claims it first.) WS3 commit-provenance collapse (2026-07-05, ratified):
|
|
8829
|
+
// `workspace_produced_decision` widens to the `node` wildcard endpoint —
|
|
8830
|
+
// a workspace's commit loop can legitimately produce any entity type
|
|
8831
|
+
// arranged in it (decision, feature, persona, ...), not just decisions.
|
|
8832
|
+
// No flip (source stays workspace); the target node's concrete type is
|
|
8833
|
+
// unchanged (still a decision), only the edge key + catalog target_type
|
|
8834
|
+
// widen. See the enum-vs-polymorphism ADR and the WS3 proposal doc for
|
|
8835
|
+
// the full reasoning (mirrors decision_produces_node).
|
|
8836
|
+
"0.22.0": [
|
|
8837
|
+
// No requires_target_type: the destination's target_type is the `node`
|
|
8838
|
+
// wildcard, and the endpoint guard is checked against the catalog's
|
|
8839
|
+
// declared type (per the spec-integrity "endpoint guards match the
|
|
8840
|
+
// catalog entry" test), not the concrete instance type — a concrete
|
|
8841
|
+
// `decision` instance would never satisfy a literal 'node' guard at
|
|
8842
|
+
// runtime. Gate only on the unwidened source endpoint.
|
|
8843
|
+
{ 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." }
|
|
8844
|
+
],
|
|
8794
8845
|
"0.9.9": [
|
|
8795
8846
|
// (since v0.9.9, UPG-664/UPG-678) Validation experiment-model + test_plan
|
|
8796
8847
|
// re-home. The validation chain is reshaped to the single-parent line
|
|
@@ -29641,7 +29692,7 @@ function isCanonical(text) {
|
|
|
29641
29692
|
}
|
|
29642
29693
|
|
|
29643
29694
|
// src/index.ts
|
|
29644
|
-
var UPG_VERSION = "0.
|
|
29695
|
+
var UPG_VERSION = "0.22.0";
|
|
29645
29696
|
var UPG_FORMAT_VERSION = "0.4.0";
|
|
29646
29697
|
var MARKDOWN_FORMAT_VERSION = "0.1";
|
|
29647
29698
|
var UPG_TYPES = getTypes();
|