@unified-product-graph/core 0.13.2 → 0.14.1

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.cjs CHANGED
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
8
  var __export = (target, all) => {
7
9
  for (var name in all)
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
15
17
  }
16
18
  return to;
17
19
  };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
18
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
29
 
20
30
  // src/index.ts
@@ -7605,6 +7615,53 @@ function getDeprecatedTypes() {
7605
7615
  return deprecated;
7606
7616
  }
7607
7617
  var UPG_PROPERTY_MIGRATIONS = {
7618
+ // ── v0.14.0: Pattern E — remove deprecated/ghost properties (UPG-574) ────────
7619
+ //
7620
+ // Properties marked deprecated (some "Removed in 0.9.1") that were never
7621
+ // actually removed, plus superseded soft-aliases. The RICE / opportunity-sizing
7622
+ // scoring inputs were framework-scoped from 0.9.0: their value lives on the
7623
+ // `framework_exercise` includes-edge of the rice-scoring / opportunity-sizing
7624
+ // framework, not on the entity. The remaining four are superseded by a sibling
7625
+ // (cause_category, rule_strength, size_estimate, effort). Loaders drop the
7626
+ // stranded keys; the values were never canonical on the entity.
7627
+ "0.14.0": [
7628
+ {
7629
+ kind: "drop_props",
7630
+ type: "opportunity",
7631
+ drop_props: ["reach", "frequency", "pain", "opportunity_score"],
7632
+ reason: "UPG-574: opportunity scoring (reach/frequency/pain/opportunity_score) was framework-scoped from 0.9.0 (opportunity-sizing). Apply the framework and read the value off the framework_exercise edge; the entity props are removed in 0.14.0."
7633
+ },
7634
+ {
7635
+ kind: "drop_props",
7636
+ type: "solution",
7637
+ drop_props: ["reach", "impact", "confidence", "effort", "rice_score"],
7638
+ reason: "UPG-574: RICE inputs (reach/impact/confidence/effort) and the computed rice_score were framework-scoped from 0.9.0 (rice-scoring). Apply the framework and read the score off the framework_exercise edge; the entity props are removed in 0.14.0."
7639
+ },
7640
+ {
7641
+ kind: "drop_props",
7642
+ type: "root_cause",
7643
+ drop_props: ["category", "verified"],
7644
+ reason: "UPG-574: root_cause.category was a legacy free-form field superseded by the closed-enum cause_category; verified duplicated cause_confidence === confirmed. Both removed in 0.14.0."
7645
+ },
7646
+ {
7647
+ kind: "drop_props",
7648
+ type: "design_guideline",
7649
+ drop_props: ["strictness"],
7650
+ reason: "UPG-574: design_guideline.strictness was superseded by rule_strength (a richer imperative-force enum). Removed in 0.14.0."
7651
+ },
7652
+ {
7653
+ kind: "drop_props",
7654
+ type: "behavioral_segment",
7655
+ drop_props: ["size"],
7656
+ reason: "UPG-574: behavioral_segment.size was a v0.2 alias for size_estimate. Removed in 0.14.0; use size_estimate."
7657
+ },
7658
+ {
7659
+ kind: "drop_props",
7660
+ type: "task",
7661
+ drop_props: ["estimate"],
7662
+ reason: "UPG-574: task.estimate was a story_task-collapse relic that duplicated effort. Removed in 0.14.0; use effort."
7663
+ }
7664
+ ],
7608
7665
  // ── v0.12.0: P14 Bucket C — drop the one non-derived denormalized aggregate ──
7609
7666
  //
7610
7667
  // The count caches (feature_count, evidence_count, workflow step_count /
@@ -10284,8 +10341,7 @@ var UPG_PROPERTY_SCHEMA = {
10284
10341
  source: { type: "string", enum: ["clickstream", "survey", "interview", "mixed", "inferred", "imported"], description: "Membership data source. Drives confidence weighting and refresh policy." },
10285
10342
  included_behaviors: { type: "string[]", description: "Qualifying behaviours (positive criteria, free-text labels)" },
10286
10343
  excluded_behaviors: { type: "string[]", description: "Excluding behaviours (negative criteria, free-text labels)" },
10287
- size_estimate: { type: "number", description: "Estimated current size. Snapshot value." },
10288
- size: { type: "number", description: "Size. Alias retained for the v0.2 baseline." },
10344
+ size_estimate: { type: "number", description: "Estimated current size. Snapshot value. (`size`, the v0.2 alias, removed in 0.14.0, UPG-574.)" },
10289
10345
  validity_period_start: { type: "string", description: "ISO start of the validity window. Behavioural definitions decay; outside the window the snapshot should be re-computed." },
10290
10346
  validity_period_end: { type: "string", description: "End of the window over which the segment definition is considered valid (ISO format)" }
10291
10347
  },
@@ -10902,8 +10958,7 @@ var UPG_PROPERTY_SCHEMA = {
10902
10958
  guideline_category: { type: "string", enum: ["spacing", "color", "typography", "layout", "interaction", "content"], description: "Category covered" },
10903
10959
  applies_to: { type: "string", description: "Applicable elements or contexts" },
10904
10960
  rationale: { type: "string", description: "Reasoning. Why this rule exists." },
10905
- rule_strength: { type: "string", enum: ["must", "must_not", "exception", "warning", "guideline"], description: "Imperative force. Supersedes `strictness`." },
10906
- strictness: { type: "string", enum: ["must", "should", "may"], description: "RFC-2119-flavoured binding strength" },
10961
+ rule_strength: { type: "string", enum: ["must", "must_not", "exception", "warning", "guideline"], description: "Imperative force. (Superseded the removed `strictness` field in 0.14.0, UPG-574.)" },
10907
10962
  exception_policy: { type: "string", description: "Exception request or documentation process" }
10908
10963
  },
10909
10964
  // DesignPatternProperties: Reusable design pattern.
@@ -12030,46 +12085,11 @@ var UPG_PROPERTY_SCHEMA = {
12030
12085
  rotation_cadence: { type: "string", enum: ["daily", "weekly", "biweekly", "custom"], description: "Cycle cadence. `weekly` for standard team rotations. `daily` for high-incident-volume teams." },
12031
12086
  handoff_time: { type: "string", description: 'Shift handoff time. Affects team coordination and sleep. @example "09:00 UTC", "17:00 local"' }
12032
12087
  },
12033
- // OpportunityProperties: A problem worth solving, grounded in user need and business value
12034
- opportunity: {
12035
- reach: {
12036
- type: "assessment",
12037
- scale_id: "reach_5",
12038
- description: "How many users experience this problem. @deprecated 0.9.0:a framework-scoped scoring input, not an intrinsic property. Apply the `opportunity-sizing` framework; the value lives on the framework_exercise includes-edge. Removed in 0.9.1.",
12039
- properties: {
12040
- value: { type: "number", description: "The numeric value, used for computation." },
12041
- label: { type: "string", description: "The qualitative label (what the assessor meant)." },
12042
- scale_id: { type: "string", description: "Which assessment scale this was rated on (optional)." },
12043
- normalized: { type: "number", description: "Normalized 0-1 value for cross-tool comparison (optional)." }
12044
- },
12045
- required: ["value", "label"]
12046
- },
12047
- frequency: {
12048
- type: "assessment",
12049
- scale_id: "frequency_5",
12050
- description: "How often users experience this problem. @deprecated 0.9.0:framework-scoped (opportunity-sizing). Removed in 0.9.1.",
12051
- properties: {
12052
- value: { type: "number", description: "The numeric value, used for computation." },
12053
- label: { type: "string", description: "The qualitative label (what the assessor meant)." },
12054
- scale_id: { type: "string", description: "Which assessment scale this was rated on (optional)." },
12055
- normalized: { type: "number", description: "Normalized 0-1 value for cross-tool comparison (optional)." }
12056
- },
12057
- required: ["value", "label"]
12058
- },
12059
- pain: {
12060
- type: "assessment",
12061
- scale_id: "pain_5",
12062
- description: "How painful it is when unaddressed. @deprecated 0.9.0:framework-scoped (opportunity-sizing). Removed in 0.9.1.",
12063
- properties: {
12064
- value: { type: "number", description: "The numeric value, used for computation." },
12065
- label: { type: "string", description: "The qualitative label (what the assessor meant)." },
12066
- scale_id: { type: "string", description: "Which assessment scale this was rated on (optional)." },
12067
- normalized: { type: "number", description: "Normalized 0-1 value for cross-tool comparison (optional)." }
12068
- },
12069
- required: ["value", "label"]
12070
- },
12071
- opportunity_score: { type: "number", description: "Computed: normalized_reach x normalized_frequency x normalized_pain (0-1). @deprecated 0.9.0:computed by the `opportunity-sizing` framework on its application edge, not stored on the entity. Removed in 0.9.1." }
12072
- },
12088
+ // OpportunityProperties: A problem worth solving, grounded in user need and business value.
12089
+ // No intrinsic scalar properties — defined by edges + framework-scoped scoring
12090
+ // (reach/frequency/pain/opportunity_score live on the `opportunity-sizing`
12091
+ // framework_exercise edge). Former props removed in 0.14.0 (UPG-574).
12092
+ opportunity: {},
12073
12093
  // OrganizationProperties: Organization entity.
12074
12094
  organization: {
12075
12095
  logo_url: { type: "string", description: "URL of the organisation's logo" },
@@ -12529,9 +12549,8 @@ var UPG_PROPERTY_SCHEMA = {
12529
12549
  cause_category: { type: "string", enum: ["code", "config", "process", "dependency", "data", "infrastructure", "human_error", "other"], description: "Closed-enum cause category for RCA reporting and dashboards. Distinct from the legacy free-form `category`." },
12530
12550
  cause_confidence: { type: "string", enum: ["hypothesised", "likely", "confirmed"], description: "Team certainty about this cause. `hypothesised` = educated guess. `likely` = evidence points here. `confirmed` = reproduced. Renamed from `confidence` in v0.4.0 to disambiguate from the entity-wide `UPGAssessment`-typed epistemic confidence used elsewhere. The 3-tier shape stays as a discrete RCA-lifecycle marker." },
12531
12551
  evidence_summary: { type: "string", description: "One-paragraph evidence summary. Log lines, traces, repro steps. Detailed artefacts go on linked `evidence` nodes." },
12532
- category: { type: "string", enum: ["architecture", "design", "data", "infrastructure", "process", "dependency", "other"], description: "Legacy free-form category. Retained for v0.2 baseline; new graphs prefer `cause_category`." },
12533
- affected_area: { type: "string", description: "Affected area of the system" },
12534
- verified: { type: "boolean", description: "Verified through investigation" }
12552
+ affected_area: { type: "string", description: "Affected area of the system" }
12553
+ // `category` (legacy, -> `cause_category`) and `verified` (= `cause_confidence === 'confirmed'`) removed in 0.14.0 (UPG-574).
12535
12554
  },
12536
12555
  // RunbookProperties: Runbook.
12537
12556
  runbook: {
@@ -12684,58 +12703,12 @@ var UPG_PROPERTY_SCHEMA = {
12684
12703
  post_type: { type: "string", enum: ["text", "image", "video", "carousel", "story"], description: "Format of the post" },
12685
12704
  scheduled_date: { type: "string", description: "Date the post is scheduled to publish (ISO format)" }
12686
12705
  },
12687
- // SolutionProperties: A proposed response to an opportunity
12706
+ // SolutionProperties: A proposed response to an opportunity.
12707
+ // RICE scoring inputs (reach/impact/confidence/effort) + computed rice_score
12708
+ // were framework-scoped from 0.9.0 and removed in 0.14.0 (UPG-574): they live
12709
+ // on the `rice-scoring` framework_exercise edge, not the entity.
12688
12710
  solution: {
12689
- timeline: { type: "string", description: "Estimated delivery or target timeline" },
12690
- reach: {
12691
- type: "assessment",
12692
- scale_id: "reach_5",
12693
- description: "How many users this solution reaches (1 = few, 5 = most). @deprecated 0.9.0:a framework-scoped scoring input, not an intrinsic property. Apply the `rice-scoring` framework; the value lives on the framework_exercise includes-edge. Removed in 0.9.1.",
12694
- properties: {
12695
- value: { type: "number", description: "The numeric value, used for computation." },
12696
- label: { type: "string", description: "The qualitative label (what the assessor meant)." },
12697
- scale_id: { type: "string", description: "Which assessment scale this was rated on (optional)." },
12698
- normalized: { type: "number", description: "Normalized 0-1 value for cross-tool comparison (optional)." }
12699
- },
12700
- required: ["value", "label"]
12701
- },
12702
- impact: {
12703
- type: "assessment",
12704
- scale_id: "impact_5",
12705
- description: "Expected impact on the target outcome (1 = minimal, 5 = transformative). @deprecated 0.9.0:framework-scoped (rice-scoring). Removed in 0.9.1.",
12706
- properties: {
12707
- value: { type: "number", description: "The numeric value, used for computation." },
12708
- label: { type: "string", description: "The qualitative label (what the assessor meant)." },
12709
- scale_id: { type: "string", description: "Which assessment scale this was rated on (optional)." },
12710
- normalized: { type: "number", description: "Normalized 0-1 value for cross-tool comparison (optional)." }
12711
- },
12712
- required: ["value", "label"]
12713
- },
12714
- confidence: {
12715
- type: "assessment",
12716
- scale_id: "confidence_5",
12717
- description: "How confident the team is in this solution (1 = speculative, 5 = proven). @deprecated 0.9.0:framework-scoped (rice-scoring). Removed in 0.9.1.",
12718
- properties: {
12719
- value: { type: "number", description: "The numeric value, used for computation." },
12720
- label: { type: "string", description: "The qualitative label (what the assessor meant)." },
12721
- scale_id: { type: "string", description: "Which assessment scale this was rated on (optional)." },
12722
- normalized: { type: "number", description: "Normalized 0-1 value for cross-tool comparison (optional)." }
12723
- },
12724
- required: ["value", "label"]
12725
- },
12726
- effort: {
12727
- type: "assessment",
12728
- scale_id: "effort_5",
12729
- description: "Level of effort required to implement (1 = trivial, 5 = very large). @deprecated 0.9.0:effort is a framework-scoped scoring input (it varies by assessor and method), not an intrinsic property. Removed in 0.9.1.",
12730
- properties: {
12731
- value: { type: "number", description: "The numeric value, used for computation." },
12732
- label: { type: "string", description: "The qualitative label (what the assessor meant)." },
12733
- scale_id: { type: "string", description: "Which assessment scale this was rated on (optional)." },
12734
- normalized: { type: "number", description: "Normalized 0-1 value for cross-tool comparison (optional)." }
12735
- },
12736
- required: ["value", "label"]
12737
- },
12738
- rice_score: { type: "number", description: "Computed: (reach \xD7 impact \xD7 confidence) / effort. @deprecated 0.9.0:computed by the `rice-scoring` framework on its application edge, not stored on the entity. Removed in 0.9.1." }
12711
+ timeline: { type: "string", description: "Estimated delivery or target timeline" }
12739
12712
  },
12740
12713
  // SpecificationProperties: A governed specification: a query language, protocol, data format, encoding,
12741
12714
  specification: {
@@ -12893,8 +12866,8 @@ var UPG_PROPERTY_SCHEMA = {
12893
12866
  effort: { type: "string", description: 'Effort estimate (e.g. "2h", "1d", "3 points"). Use a consistent unit within your team.' },
12894
12867
  priority: { type: "string", enum: ["urgent", "high", "medium", "low", "none"], description: "Relative importance against other tasks" },
12895
12868
  due_date: { type: "string", description: "ISO date due. Typically bounded by the containing story's due date." },
12896
- labels: { type: "string[]", description: "Free-form classification tags. Applied uniformly across work item types." },
12897
- estimate: { type: "string", description: 'Story-point or sizing estimate. String to support fibonacci, t-shirt sizes, or custom scales (e.g. "5", "M", "3 pts"). Absorbed from `StoryTaskProperties` when `story_task` collapsed into `task` (v0.4.0).' }
12869
+ labels: { type: "string[]", description: "Free-form classification tags. Applied uniformly across work item types." }
12870
+ // `estimate` (story_task collapse relic, duplicated `effort`) removed in 0.14.0 (UPG-574).
12898
12871
  },
12899
12872
  // TeamProperties: Team entity.
12900
12873
  team: {
@@ -29230,7 +29203,7 @@ function validateExpression(expr) {
29230
29203
  }
29231
29204
 
29232
29205
  // src/format/canonical.ts
29233
- var import_node_crypto = require("crypto");
29206
+ var nodeCrypto = __toESM(require("crypto"), 1);
29234
29207
  var UPG_CANONICAL_FORMAT_VERSION = "1.0.0";
29235
29208
  var INTEGRITY_HASH_PRIMITIVE = "sha256";
29236
29209
  var INTEGRITY_DIGEST_HEX = 32;
@@ -29406,7 +29379,7 @@ function portfolioBody(doc) {
29406
29379
  function computeBodyChecksum(doc) {
29407
29380
  const body = isPortfolio(doc) ? portfolioBody(doc) : singleBody(doc);
29408
29381
  const content = JSON.stringify(body);
29409
- return (0, import_node_crypto.createHash)(INTEGRITY_HASH_PRIMITIVE).update(content).digest("hex").slice(0, INTEGRITY_DIGEST_HEX);
29382
+ return nodeCrypto.createHash(INTEGRITY_HASH_PRIMITIVE).update(content).digest("hex").slice(0, INTEGRITY_DIGEST_HEX);
29410
29383
  }
29411
29384
  function isPortfolio(doc) {
29412
29385
  return doc.type === "portfolio" || "cross_edges" in doc;
@@ -29544,7 +29517,7 @@ function isCanonical(text) {
29544
29517
  }
29545
29518
 
29546
29519
  // src/index.ts
29547
- var UPG_VERSION = "0.13.2";
29520
+ var UPG_VERSION = "0.14.1";
29548
29521
  var UPG_FORMAT_VERSION = "0.4.0";
29549
29522
  var MARKDOWN_FORMAT_VERSION = "0.1";
29550
29523
  var UPG_TYPES = getTypes();