@unified-product-graph/core 0.17.8 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -516,27 +516,27 @@ function getDomainIdForType(entityType) {
516
516
  // src/registry/entity-meta.ts
517
517
  var UPG_ENTITY_META = [
518
518
  // Foundations (0.9.12): shared specifications + the primitives they define.
519
- { name: "specification", type_id: "ent_352", maturity: "proposed", since: "0.9.12" },
520
- { name: "primitive", type_id: "ent_353", maturity: "proposed", since: "0.9.12" },
521
- { name: "operating_lifecycle", type_id: "ent_355", maturity: "proposed", since: "0.11.6" },
522
- { name: "operating_stage", type_id: "ent_356", maturity: "proposed", since: "0.11.6" },
519
+ { name: "specification", type_id: "ent_352", maturity: "proposed", since: "0.9.12", portfolio_shared: true },
520
+ { name: "primitive", type_id: "ent_353", maturity: "proposed", since: "0.9.12", portfolio_shared: true },
521
+ { name: "operating_lifecycle", type_id: "ent_355", maturity: "proposed", since: "0.11.6", portfolio_shared: true },
522
+ { name: "operating_stage", type_id: "ent_356", maturity: "proposed", since: "0.11.6", portfolio_shared: true },
523
523
  // ── Strategic ──
524
524
  { name: "product", type_id: "ent_001", maturity: "stable", since: "0.1.0" },
525
- { name: "outcome", type_id: "ent_002", maturity: "stable", since: "0.1.0" },
525
+ { name: "outcome", type_id: "ent_002", maturity: "stable", since: "0.1.0", portfolio_shared: true },
526
526
  { name: "kpi", type_id: "ent_003", maturity: "deprecated", since: "0.1.0", deprecated_in: "0.1.0", replacement: "metric" },
527
- { name: "objective", type_id: "ent_004", maturity: "stable", since: "0.1.0" },
528
- { name: "key_result", type_id: "ent_005", maturity: "stable", since: "0.1.0" },
529
- { name: "metric", type_id: "ent_006", maturity: "stable", since: "0.1.0" },
527
+ { name: "objective", type_id: "ent_004", maturity: "stable", since: "0.1.0", portfolio_shared: true },
528
+ { name: "key_result", type_id: "ent_005", maturity: "stable", since: "0.1.0", portfolio_shared: true },
529
+ { name: "metric", type_id: "ent_006", maturity: "stable", since: "0.1.0", portfolio_shared: true },
530
530
  // F7 (UPG-673): graduated proposed → stable at v0.9.x — proposed since 0.2.2,
531
531
  // the metric-quality assessment artefact is settled with no open restructure.
532
532
  { name: "metric_quality_assessment", type_id: "ent_339", maturity: "stable", since: "0.2.2" },
533
- { name: "vision", type_id: "ent_007", maturity: "stable", since: "0.1.0" },
534
- { name: "mission", type_id: "ent_008", maturity: "stable", since: "0.1.0" },
535
- { name: "strategic_theme", type_id: "ent_009", maturity: "stable", since: "0.1.0" },
536
- { name: "initiative", type_id: "ent_010", maturity: "stable", since: "0.1.0" },
537
- { name: "capability", type_id: "ent_011", maturity: "stable", since: "0.1.0" },
533
+ { name: "vision", type_id: "ent_007", maturity: "stable", since: "0.1.0", portfolio_shared: true },
534
+ { name: "mission", type_id: "ent_008", maturity: "stable", since: "0.1.0", portfolio_shared: true },
535
+ { name: "strategic_theme", type_id: "ent_009", maturity: "stable", since: "0.1.0", portfolio_shared: true },
536
+ { name: "initiative", type_id: "ent_010", maturity: "stable", since: "0.1.0", portfolio_shared: true },
537
+ { name: "capability", type_id: "ent_011", maturity: "stable", since: "0.1.0", portfolio_shared: true },
538
538
  { name: "value_stream", type_id: "ent_012", maturity: "stable", since: "0.1.0" },
539
- { name: "strategic_pillar", type_id: "ent_013", maturity: "stable", since: "0.1.0" },
539
+ { name: "strategic_pillar", type_id: "ent_013", maturity: "stable", since: "0.1.0", portfolio_shared: true },
540
540
  { name: "assumption", type_id: "ent_014", maturity: "stable", since: "0.1.0" },
541
541
  { name: "decision", type_id: "ent_015", maturity: "stable", since: "0.1.0" },
542
542
  { name: "constraint", type_id: "ent_348", maturity: "stable", since: "0.4.3" },
@@ -592,18 +592,18 @@ var UPG_ENTITY_META = [
592
592
  { name: "evidence", type_id: "ent_031", maturity: "stable", since: "0.1.0" },
593
593
  { name: "research_plan", type_id: "ent_032", maturity: "stable", since: "0.1.0" },
594
594
  // ── Market Intelligence ──
595
- { name: "competitor", type_id: "ent_033", maturity: "stable", since: "0.1.0" },
596
- { name: "competitor_feature", type_id: "ent_034", maturity: "stable", since: "0.1.0" },
597
- { name: "competitor_signal", type_id: "ent_354", maturity: "proposed", since: "0.10.0" },
595
+ { name: "competitor", type_id: "ent_033", maturity: "stable", since: "0.1.0", portfolio_shared: true },
596
+ { name: "competitor_feature", type_id: "ent_034", maturity: "stable", since: "0.1.0", portfolio_shared: true },
597
+ { name: "competitor_signal", type_id: "ent_354", maturity: "proposed", since: "0.10.0", portfolio_shared: true },
598
598
  { name: "market_trend", type_id: "ent_035", maturity: "stable", since: "0.1.0" },
599
- { name: "market_segment", type_id: "ent_036", maturity: "stable", since: "0.1.0" },
599
+ { name: "market_segment", type_id: "ent_036", maturity: "stable", since: "0.1.0", portfolio_shared: true },
600
600
  { name: "competitive_analysis", type_id: "ent_037", maturity: "stable", since: "0.1.0" },
601
601
  // Classification taxonomy hosted by competitive_analysis.
602
602
  // F7 (UPG-673): graduated proposed → stable at v0.9.x — two minor releases
603
603
  // stable since 0.4.0, the taxonomy-axis/value pair backs the competitive-
604
604
  // analysis classification spine with no open rename/restructure ticket.
605
- { name: "classification_axis", type_id: "ent_346", maturity: "stable", since: "0.4.0" },
606
- { name: "classification_value", type_id: "ent_347", maturity: "stable", since: "0.4.0" },
605
+ { name: "classification_axis", type_id: "ent_346", maturity: "stable", since: "0.4.0", portfolio_shared: true },
606
+ { name: "classification_value", type_id: "ent_347", maturity: "stable", since: "0.4.0", portfolio_shared: true },
607
607
  // ── UX Research ──
608
608
  { name: "research_study", type_id: "ent_038", maturity: "stable", since: "0.1.0" },
609
609
  { name: "research_insight", type_id: "ent_039", maturity: "deprecated", since: "0.1.0", deprecated_in: "0.1.0", replacement: "insight" },
@@ -625,9 +625,9 @@ var UPG_ENTITY_META = [
625
625
  { name: "how_might_we", type_id: "ent_333", maturity: "deprecated", since: "0.1.0", deprecated_in: "0.2.0", replacement: "design_question" },
626
626
  { name: "design_concept", type_id: "ent_054", maturity: "stable", since: "0.1.0" },
627
627
  { name: "prototype", type_id: "ent_055", maturity: "stable", since: "0.1.0" },
628
- { name: "design_component", type_id: "ent_056", maturity: "stable", since: "0.1.0" },
628
+ { name: "design_component", type_id: "ent_056", maturity: "stable", since: "0.1.0", portfolio_shared: true },
629
629
  { name: "design_token", type_id: "ent_057", maturity: "stable", since: "0.1.0" },
630
- { name: "brand_identity", type_id: "ent_058", maturity: "stable", since: "0.1.0" },
630
+ { name: "brand_identity", type_id: "ent_058", maturity: "stable", since: "0.1.0", portfolio_shared: true },
631
631
  { name: "brand_colour", type_id: "ent_059", maturity: "stable", since: "0.1.0" },
632
632
  { name: "brand_typography", type_id: "ent_060", maturity: "stable", since: "0.1.0" },
633
633
  { name: "brand_voice", type_id: "ent_061", maturity: "stable", since: "0.1.0" },
@@ -636,7 +636,7 @@ var UPG_ENTITY_META = [
636
636
  { name: "design_guideline", type_id: "ent_064", maturity: "stable", since: "0.1.0" },
637
637
  { name: "annotation", type_id: "ent_065", maturity: "stable", since: "0.1.0" },
638
638
  { name: "interaction_spec", type_id: "ent_066", maturity: "stable", since: "0.1.0" },
639
- { name: "design_system", type_id: "ent_067", maturity: "stable", since: "0.1.0" },
639
+ { name: "design_system", type_id: "ent_067", maturity: "stable", since: "0.1.0", portfolio_shared: true },
640
640
  { name: "user_flow", type_id: "ent_068", maturity: "stable", since: "0.1.0" },
641
641
  { name: "screen", type_id: "ent_069", maturity: "stable", since: "0.1.0" },
642
642
  { name: "screen_state", type_id: "ent_070", maturity: "stable", since: "0.1.0" },
@@ -755,15 +755,15 @@ var UPG_ENTITY_META = [
755
755
  { name: "rebuttal", type_id: "ent_140", maturity: "stable", since: "0.1.0" },
756
756
  { name: "proof_point", type_id: "ent_141", maturity: "stable", since: "0.1.0" },
757
757
  // ── Team & Organisation ──
758
- { name: "team", type_id: "ent_142", maturity: "stable", since: "0.1.0" },
758
+ { name: "team", type_id: "ent_142", maturity: "stable", since: "0.1.0", portfolio_shared: true },
759
759
  { name: "role", type_id: "ent_143", maturity: "stable", since: "0.1.0" },
760
760
  { name: "stakeholder", type_id: "ent_144", maturity: "stable", since: "0.1.0" },
761
761
  { name: "person", type_id: "ent_349", maturity: "stable", since: "0.5.0" },
762
762
  { name: "product_decision", type_id: "ent_145", maturity: "deprecated", since: "0.1.0", deprecated_in: "0.2.0", replacement: "decision" },
763
763
  { name: "team_okr", type_id: "ent_146", maturity: "stable", since: "0.1.0" },
764
764
  { name: "retrospective", type_id: "ent_147", maturity: "stable", since: "0.1.0" },
765
- { name: "dependency", type_id: "ent_148", maturity: "stable", since: "0.1.0" },
766
- { name: "department", type_id: "ent_149", maturity: "stable", since: "0.1.0" },
765
+ { name: "dependency", type_id: "ent_148", maturity: "stable", since: "0.1.0", portfolio_shared: true },
766
+ { name: "department", type_id: "ent_149", maturity: "stable", since: "0.1.0", portfolio_shared: true },
767
767
  { name: "skill", type_id: "ent_150", maturity: "stable", since: "0.1.0" },
768
768
  { name: "ceremony", type_id: "ent_151", maturity: "stable", since: "0.1.0" },
769
769
  { name: "capacity_plan", type_id: "ent_152", maturity: "stable", since: "0.1.0" },
@@ -975,6 +975,10 @@ var UPG_ENTITY_META_BY_ID = new Map(
975
975
  );
976
976
  var UPG_ACTIVE_TYPES = UPG_ENTITY_META.filter((m) => m.maturity === "stable" || m.maturity === "proposed").map((m) => m.name);
977
977
  var UPG_DEPRECATED_TYPES = UPG_ENTITY_META.filter((m) => m.maturity === "deprecated").map((m) => m.name);
978
+ var UPG_PORTFOLIO_SHARED_TYPES = UPG_ENTITY_META.filter((m) => m.portfolio_shared === true).map((m) => m.name);
979
+ function isPortfolioSharedType(name) {
980
+ return UPG_ENTITY_META_BY_NAME.get(name)?.portfolio_shared === true;
981
+ }
978
982
  function isDeprecatedType(name) {
979
983
  const meta = UPG_ENTITY_META_BY_NAME.get(name);
980
984
  return meta?.maturity === "deprecated";
@@ -10069,6 +10073,21 @@ function rotateSlug(node, next) {
10069
10073
  return node;
10070
10074
  }
10071
10075
 
10076
+ // src/grammar/cross-scope.ts
10077
+ var CURATED_CROSS_EDGE_SET = new Set(UPG_CROSS_EDGE_TYPES);
10078
+ function isCrossCapable(sourceType, targetType) {
10079
+ return isPortfolioSharedType(sourceType) || isPortfolioSharedType(targetType);
10080
+ }
10081
+ function isCuratedCrossEligible(edgeType) {
10082
+ return CURATED_CROSS_EDGE_SET.has(edgeType);
10083
+ }
10084
+ function crossProductScope(edgeType) {
10085
+ if (CURATED_CROSS_EDGE_SET.has(edgeType)) return "curated";
10086
+ const def = UPG_EDGE_CATALOG[edgeType];
10087
+ if (def && isCrossCapable(def.source_type, def.target_type)) return "provisional";
10088
+ return "resident";
10089
+ }
10090
+
10072
10091
  // src/properties/property-schema.ts
10073
10092
  var UPG_PROPERTY_SCHEMA = {
10074
10093
  // A11yAnnotationProperties: Accessibility annotation.
@@ -29725,7 +29744,7 @@ function isCanonical(text) {
29725
29744
  }
29726
29745
 
29727
29746
  // src/index.ts
29728
- var UPG_VERSION = "0.17.8";
29747
+ var UPG_VERSION = "0.19.0";
29729
29748
  var UPG_FORMAT_VERSION = "0.4.0";
29730
29749
  var MARKDOWN_FORMAT_VERSION = "0.1";
29731
29750
  var UPG_TYPES = getTypes();
@@ -29862,6 +29881,7 @@ export {
29862
29881
  UPG_PLAYBOOKS,
29863
29882
  UPG_POLYMORPHIC_EDGE_KEYS,
29864
29883
  UPG_PORTFOLIO_KINDS,
29884
+ UPG_PORTFOLIO_SHARED_TYPES,
29865
29885
  UPG_PRODUCT_STAGES,
29866
29886
  UPG_PRODUCT_STAGE_COERCION_MAP,
29867
29887
  UPG_PROPERTY_MIGRATIONS,
@@ -29900,6 +29920,7 @@ export {
29900
29920
  concernEvaluatedFor,
29901
29921
  concernFor,
29902
29922
  concernGatesFor,
29923
+ crossProductScope,
29903
29924
  describeTreePattern,
29904
29925
  edgeCarriesProperties,
29905
29926
  evaluateAntiPatterns,
@@ -29961,7 +29982,9 @@ export {
29961
29982
  isCanonical,
29962
29983
  isCanonicalProductStage,
29963
29984
  isContainmentFreeType,
29985
+ isCrossCapable,
29964
29986
  isCrossProductEligible,
29987
+ isCuratedCrossEligible,
29965
29988
  isDeliberateOnlyEdge,
29966
29989
  isDeprecatedType,
29967
29990
  isDomainGuideStep,
@@ -29972,6 +29995,7 @@ export {
29972
29995
  isLifecyclePlannedType,
29973
29996
  isPolymorphicEdge,
29974
29997
  isPortfolio,
29998
+ isPortfolioSharedType,
29975
29999
  isRecordEntity,
29976
30000
  isRegisteredPolymorphicEdge,
29977
30001
  isRuntimeStateShapedProperty,