@unified-product-graph/core 0.11.5 → 0.11.6

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
@@ -706,7 +706,7 @@ var UPG_DOMAINS = [
706
706
  id: "foundations",
707
707
  label: "Foundations",
708
708
  description: "The shared specifications and foundational primitives a product organisation stewards or implements everywhere. Specifications are governed specs (query languages, protocols, data formats, encodings) like GROQ or Portable Text; primitives are the compositional units those specs define (a block, a reference, a query value). Both are registry-hostable canonicals that products implement, expose, or conform to. Distinct from a product feature: a specification has no single owner, no P&L, and no buyer; it is the rulebook many products point at.",
709
- types: ["specification", "primitive"]
709
+ types: ["specification", "primitive", "operating_lifecycle", "operating_stage"]
710
710
  }
711
711
  ];
712
712
  var UPG_ENTITY_TO_DOMAIN = Object.freeze(
@@ -729,6 +729,8 @@ var UPG_ENTITY_META = [
729
729
  // Foundations (0.9.12): shared specifications + the primitives they define.
730
730
  { name: "specification", type_id: "ent_352", maturity: "proposed", since: "0.9.12" },
731
731
  { name: "primitive", type_id: "ent_353", maturity: "proposed", since: "0.9.12" },
732
+ { name: "operating_lifecycle", type_id: "ent_355", maturity: "proposed", since: "0.11.6" },
733
+ { name: "operating_stage", type_id: "ent_356", maturity: "proposed", since: "0.11.6" },
732
734
  // ── Strategic ──
733
735
  { name: "product", type_id: "ent_001", maturity: "stable", since: "0.1.0" },
734
736
  { name: "outcome", type_id: "ent_002", maturity: "stable", since: "0.1.0" },
@@ -1229,6 +1231,9 @@ var UPG_EDGE_CATALOG = {
1229
1231
  persona_pursues_job: { forward_verb: "pursues", reverse_verb: "pursued_by", classification: "semantic", source_type: "persona", target_type: "job" },
1230
1232
  persona_experiences_need: { forward_verb: "experiences", reverse_verb: "experienced_by", classification: "semantic", source_type: "persona", target_type: "need" },
1231
1233
  persona_aspires_to_desired_outcome: { forward_verb: "aspires_to", reverse_verb: "aspirational_for", classification: "hierarchy", source_type: "persona", target_type: "desired_outcome" },
1234
+ // Delegation (0.11.6): a persona delegates work to another. The common case is human -> agent
1235
+ // (Content Ops Lead -> Content Agent), but it also expresses human -> human (editor -> reviewer).
1236
+ persona_delegates_to_persona: { forward_verb: "delegates_to", reverse_verb: "delegated_by", classification: "semantic", source_type: "persona", target_type: "persona" },
1232
1237
  persona_incurs_switching_cost: { forward_verb: "incurs", reverse_verb: "incurred_by", classification: "hierarchy", source_type: "persona", target_type: "switching_cost" },
1233
1238
  job_surfaces_need: { forward_verb: "surfaces", reverse_verb: "surfaces_from", classification: "causal", source_type: "job", target_type: "need" },
1234
1239
  job_motivates_desired_outcome: { forward_verb: "motivates", reverse_verb: "motivated_by", classification: "causal", source_type: "job", target_type: "desired_outcome" },
@@ -3210,8 +3215,13 @@ var UPG_EDGE_CATALOG = {
3210
3215
  specification_competes_with_specification: { forward_verb: "competes_with", reverse_verb: "competes_with", classification: "semantic", source_type: "specification", target_type: "specification" },
3211
3216
  primitive_defined_by_specification: { forward_verb: "defined_by", reverse_verb: "defines", classification: "semantic", source_type: "primitive", target_type: "specification" },
3212
3217
  primitive_composes_primitive: { forward_verb: "composes", reverse_verb: "composed_by", classification: "hierarchy", source_type: "primitive", target_type: "primitive" },
3218
+ operating_lifecycle_contains_operating_stage: { forward_verb: "contains", reverse_verb: "belongs_to", classification: "hierarchy", source_type: "operating_lifecycle", target_type: "operating_stage" },
3213
3219
  // Stewardship: a registry specification is governed by a (registry-hostable) organization (0.9.13).
3214
- specification_governed_by_organization: { forward_verb: "governed_by", reverse_verb: "governs", classification: "semantic", source_type: "specification", target_type: "organization" }
3220
+ specification_governed_by_organization: { forward_verb: "governed_by", reverse_verb: "governs", classification: "semantic", source_type: "specification", target_type: "organization" },
3221
+ // Operating-lifecycle cross-edges (0.11.6): a product's journey phase realises a canonical
3222
+ // operating stage (the cross-surface join key); a stage is measured by a rollup metric (loop close).
3223
+ journey_phase_realises_operating_stage: { forward_verb: "realises", reverse_verb: "realised_by", classification: "cross-domain", source_type: "journey_phase", target_type: "operating_stage" },
3224
+ operating_stage_measured_by_metric: { forward_verb: "measured_by", reverse_verb: "measures", classification: "cross-domain", source_type: "operating_stage", target_type: "metric" }
3215
3225
  };
3216
3226
  var UPG_POLYMORPHIC_EDGE_KEYS = [
3217
3227
  // Universal semantic verbs
@@ -3367,6 +3377,9 @@ var UPG_VALID_CHILDREN = {
3367
3377
  // primitive_composes_primitive catalog edges.
3368
3378
  specification: ["specification"],
3369
3379
  primitive: ["primitive"],
3380
+ // An operating_lifecycle (e.g. the content-ops lifecycle) contains its ordered
3381
+ // operating_stage children. Backs the operating_lifecycle_contains_operating_stage edge.
3382
+ operating_lifecycle: ["operating_stage"],
3370
3383
  // ── Product (root) ─────────────────────────────────────────────────────────
3371
3384
  product: [
3372
3385
  // Strategy
@@ -6430,9 +6443,13 @@ function getLifecycleForType(entityType) {
6430
6443
  return UPG_LIFECYCLES.find((l) => l.entity_type === entityType);
6431
6444
  }
6432
6445
  var UPG_LIFECYCLE_FREE_TYPES = /* @__PURE__ */ new Set([
6433
- // ── Foundations (1 of 2): a primitive either exists or is deprecated; no
6434
- // phase ladder (like metric). `specification` carries a lifecycle. ──
6446
+ // ── Foundations (3 of 4): a primitive either exists or is deprecated; no
6447
+ // phase ladder (like metric). `operating_lifecycle`/`operating_stage` are
6448
+ // static ordered reference data (the loop is a `cyclic` flag, not a state
6449
+ // machine). `specification` carries a lifecycle. ──
6435
6450
  "primitive",
6451
+ "operating_lifecycle",
6452
+ "operating_stage",
6436
6453
  // ── User (5): personas and JTBD atoms are reference data ──────────────────
6437
6454
  "persona",
6438
6455
  "job",
@@ -9861,7 +9878,7 @@ var UPG_PROPERTY_SCHEMA = {
9861
9878
  },
9862
9879
  // CodeRepositoryProperties: Code repository.
9863
9880
  code_repository: {
9864
- repo_url: { type: "string", description: "URL" },
9881
+ repo_url: { type: "string", description: "URL", modifier: "volatile" },
9865
9882
  default_branch: { type: "string", description: "Default branch" },
9866
9883
  language: { type: "string", description: "Primary programming language" },
9867
9884
  ci_status: { type: "string", enum: ["passing", "failing", "unknown"], description: "Current CI status" },
@@ -10122,7 +10139,7 @@ var UPG_PROPERTY_SCHEMA = {
10122
10139
  data_classification: {
10123
10140
  level: { type: "string", enum: ["public", "internal", "confidential", "restricted"], description: "Sensitivity level" },
10124
10141
  handling_requirements: { type: "string", description: "Handling rules" },
10125
- examples: { type: "string", description: "Example data covered" },
10142
+ examples: { type: "string[]", description: "Example data covered" },
10126
10143
  retention_period: { type: "string", description: "Retention period" },
10127
10144
  encryption_required: { type: "boolean", description: "Whether encryption is mandatory" }
10128
10145
  },
@@ -10616,7 +10633,7 @@ var UPG_PROPERTY_SCHEMA = {
10616
10633
  feature_area: {
10617
10634
  scope_summary: { type: "string", description: "One-line scope description. Disambiguates from sibling areas at a glance." },
10618
10635
  owning_team: { type: "string", description: "Team identifier or slug. Free-form display. Canonical relationship is the `team_owns_feature_area` edge." },
10619
- feature_count: { type: "number", description: "Approximate feature count under this area. Snapshot; `feature_area_contains_feature` edges are the source of truth." },
10636
+ feature_count: { type: "number", description: "Approximate feature count under this area. Snapshot; `feature_area_contains_feature` edges are the source of truth.", modifier: "derived" },
10620
10637
  owner: { type: "string", description: "Area owner (handle or email)" },
10621
10638
  priority: { type: "string", enum: ["urgent", "high", "medium", "low", "none"], description: "Importance to the product overall" },
10622
10639
  maturity: { type: "string", enum: ["nascent", "growing", "mature", "legacy"], description: "Maturity. `nascent` = newly-formed grouping. `mature` = established surface. `legacy` = being phased out for a successor." },
@@ -10733,7 +10750,7 @@ var UPG_PROPERTY_SCHEMA = {
10733
10750
  // FunnelProperties: Funnel entity.
10734
10751
  funnel: {
10735
10752
  funnel_type: { type: "string", enum: ["acquisition", "activation", "retention", "revenue", "referral", "custom"], description: "Which stage of the customer lifecycle this funnel measures" },
10736
- step_count: { type: "number", description: "Number of steps in the funnel" },
10753
+ step_count: { type: "number", description: "Number of steps in the funnel", modifier: "derived" },
10737
10754
  overall_conversion_rate: { type: "number", description: "End-to-end conversion rate through the funnel (0-1)" }
10738
10755
  },
10739
10756
  // FunnelStepProperties: FunnelStep entity.
@@ -10886,7 +10903,7 @@ var UPG_PROPERTY_SCHEMA = {
10886
10903
  },
10887
10904
  required: ["value", "label"]
10888
10905
  },
10889
- evidence_count: { type: "number", description: "Supporting observations, quotes, or evidence items. Higher counts increase confidence." },
10906
+ evidence_count: { type: "number", description: "Supporting observations, quotes, or evidence items. Higher counts increase confidence.", modifier: "derived" },
10890
10907
  novelty: { type: "string", enum: ["known", "surprising", "contradictory"], description: "Novelty against existing knowledge. `known` = confirms what we already believed. `surprising` = challenges or extends our understanding. `contradictory` = directly conflicts with a prior assumption." },
10891
10908
  actionability: { type: "string", enum: ["immediate", "needs_validation", "informational"], description: "Current actionability. `immediate` = clear action, no further research needed. `needs_validation` = promising but requires more evidence. `informational` = important context, no direct action." },
10892
10909
  source_method: { type: "string", description: 'Producing research method. @example "usability_study", "interview_series", "survey"' },
@@ -11560,7 +11577,8 @@ var UPG_PROPERTY_SCHEMA = {
11560
11577
  motivation: { type: "string", description: 'Primary motivation or driving need @example "Making confident, evidence-based decisions"' },
11561
11578
  tech_comfort: { type: "string", enum: ["low", "medium", "high", "expert", "other"], description: "Tech comfort. Closed set so personas across products compare on the same axis. Free-text colour belongs in `context` or `motivation`." },
11562
11579
  domain_expertise: { type: "string", description: 'Industry or domain knowledge this persona brings @example "10+ years SaaS experience", "New to healthcare IT"' },
11563
- audience_role: { type: "string", enum: ["buyer", "user", "champion", "influencer", "partner"], description: 'Role in the buying / adoption decision (the decision-making-unit split): who signs (buyer) vs who uses (user) vs who advocates internally (champion) vs who shapes the choice (influencer) vs who delivers / implements (partner). A portfolio must separate the economic buyer from the practitioner user; they are distinct personas with distinct jobs. Closed set so roles compare across products. @example "buyer"' }
11580
+ audience_role: { type: "string", enum: ["buyer", "user", "champion", "influencer", "partner"], description: 'Role in the buying / adoption decision (the decision-making-unit split): who signs (buyer) vs who uses (user) vs who advocates internally (champion) vs who shapes the choice (influencer) vs who delivers / implements (partner). A portfolio must separate the economic buyer from the practitioner user; they are distinct personas with distinct jobs. Closed set so roles compare across products. @example "buyer"' },
11581
+ actor_kind: { type: "string", enum: ["human", "agent", "system"], description: "Who performs the work: a human archetype (default; absent = human, no migration), an autonomous AI agent (e.g. Content Agent), or a non-agentic platform service. An agent persona participates in journeys via the same persona machinery and is delegated to via persona_delegates_to_persona. Human-coverage / segmentation metrics count human only; agent/system opt-in." }
11564
11582
  },
11565
11583
  // PipelineSalesProperties: Sales pipeline.
11566
11584
  pipeline_sales: {
@@ -11623,6 +11641,21 @@ var UPG_PROPERTY_SCHEMA = {
11623
11641
  defined_by: { type: "string", description: "The `specification/<slug>` this primitive comes from; nullable for spec-less internal primitives. Mirrors the `primitive_defined_by_specification` edge for quick lookup." },
11624
11642
  since: { type: "string", description: "Year or version the primitive was introduced." }
11625
11643
  },
11644
+ // OperatingLifecycleProperties: a canonical ordered (often cyclic) operating process products' journey phases map onto.
11645
+ operating_lifecycle: {
11646
+ label: { type: "string", description: "Human-readable name of the operating process." },
11647
+ cyclic: { type: "boolean", description: "True if the process loops (e.g. Analyze \u2192 Extend \u2192 Plan). Rendered linearly by stage_order with the wrap on the final stage." },
11648
+ source: { type: "string", description: 'Origin of the canonical model (e.g. "Sanity official content-ops lifecycle").' }
11649
+ },
11650
+ // OperatingStageProperties: one ordered stage of an operating_lifecycle.
11651
+ operating_stage: {
11652
+ stage_order: { type: "number", description: "Ordered position within the lifecycle, 0-indexed." },
11653
+ label: { type: "string", description: "Human-readable stage name." },
11654
+ goal: { type: "string", description: "What this stage accomplishes." },
11655
+ owner_role: { type: "string", description: "Role that owns the stage (free-text role label)." },
11656
+ os_analogy: { type: "string", description: 'The Content-OS analogy from the source volume (e.g. "Drivers + daemons / cron").' },
11657
+ next_stage: { type: "string", description: "Label of the next stage; on the final stage of a cyclic lifecycle this carries the wrap." }
11658
+ },
11626
11659
  // PrivacyPolicyProperties: Privacy policy.
11627
11660
  privacy_policy: {
11628
11661
  version: { type: "string", description: "Version identifier of the policy" },
@@ -12023,7 +12056,7 @@ var UPG_PROPERTY_SCHEMA = {
12023
12056
  service_level_indicator: {
12024
12057
  metric_name: { type: "string", description: 'Indicator metric name. @example "Request latency p99", "Error rate", "Availability"' },
12025
12058
  threshold: { type: "number", description: 'Threshold that defines a "good" event. @example 200 (ms latency), 0.01 (1% error rate), 99.9 (% availability)' },
12026
- current_value: { type: "number", description: "Current observed value. Compared against `threshold` for SLO compliance. @example 150 (ms), 0.003 (0.3% error rate)" },
12059
+ current_value: { type: "number", description: "Current observed value. Compared against `threshold` for SLO compliance. @example 150 (ms), 0.003 (0.3% error rate)", modifier: "snapshot" },
12027
12060
  unit: { type: "string", description: 'Unit of measurement. Required to interpret `threshold` and `current_value`. @example "ms", "%", "req/s", "errors/min"' },
12028
12061
  aggregation: { type: "string", enum: ["avg", "sum", "max", "min", "p50", "p95", "p99", "count"], description: 'Aggregation over the evaluation window. p99 and avg tell different stories. @example "p99" for tail latency, "avg" for mean throughput, "count" for total events' },
12029
12062
  measurement_query: { type: "string", description: "Query expression that produces `current_value`. Free-form to fit PromQL, Datadog query strings, SQL, or vendor-specific DSLs. @example 'sum(rate(http_requests_total{status=~\"5..\"}[5m])) / sum(rate(http_requests_total[5m]))'" },
@@ -12569,7 +12602,7 @@ var UPG_PROPERTY_SCHEMA = {
12569
12602
  completed_at: { type: "string", description: "ISO timestamp when the run completed" },
12570
12603
  run_status: { type: "string", enum: ["pending", "running", "completed", "failed", "canceled"], description: "Current execution status of the run" },
12571
12604
  triggering_event: { type: "string", description: "Event or action that triggered this run" },
12572
- step_count: { type: "number", description: "Number of steps executed in this run" },
12605
+ step_count: { type: "number", description: "Number of steps executed in this run", modifier: "derived" },
12573
12606
  total_tokens: { type: "number", description: "Total tokens consumed across all steps" },
12574
12607
  total_cost: { type: "number", description: "Total monetary cost of the run" },
12575
12608
  error_message: { type: "string", description: "Error message if the run failed" }
@@ -12577,8 +12610,8 @@ var UPG_PROPERTY_SCHEMA = {
12577
12610
  // WorkflowTemplateProperties: Workflow template.
12578
12611
  workflow_template: {
12579
12612
  template_type: { type: "string", enum: ["sequential", "parallel", "conditional", "loop"], description: "Execution pattern for the workflow steps" },
12580
- step_count: { type: "number", description: "Number of steps in the workflow" },
12581
- agent_count: { type: "number", description: "Number of agents involved in the workflow" },
12613
+ step_count: { type: "number", description: "Number of steps in the workflow", modifier: "derived" },
12614
+ agent_count: { type: "number", description: "Number of agents involved in the workflow", modifier: "derived" },
12582
12615
  estimated_duration: { type: "string", description: "Estimated wall-clock duration of a full run" },
12583
12616
  state_schema: { type: "string", description: "Schema describing the workflow's state object" },
12584
12617
  checkpoint_enabled: { type: "boolean", description: "Whether the workflow supports checkpointing for recovery" },
@@ -19077,6 +19110,8 @@ var ENTITY_EMOJI = {
19077
19110
  pricing_strategy: "\u{1F4B1}",
19078
19111
  pricing_tier: "\u{1F949}",
19079
19112
  primitive: "\u{1F4CB}",
19113
+ operating_lifecycle: "\u{1F504}",
19114
+ operating_stage: "\u{1F539}",
19080
19115
  privacy_policy: "\u{1F6E1}\uFE0F",
19081
19116
  product: "\u{1F9EC}",
19082
19117
  product_area: "\u{1FA80}",
@@ -22889,7 +22924,7 @@ var WORKSPACE_GUIDE = {
22889
22924
  var FOUNDATIONS_GUIDE = {
22890
22925
  domain_id: "foundations",
22891
22926
  anchor_entity: "specification",
22892
- creation_sequence: ["specification", "primitive"],
22927
+ creation_sequence: ["specification", "primitive", "operating_lifecycle", "operating_stage"],
22893
22928
  patterns: [
22894
22929
  {
22895
22930
  name: "Specification defines primitives",
@@ -26256,6 +26291,7 @@ var UPG_REGIONS = [
26256
26291
  "persona_experiences_need",
26257
26292
  "persona_aspires_to_desired_outcome",
26258
26293
  "persona_incurs_switching_cost",
26294
+ "persona_delegates_to_persona",
26259
26295
  "job_surfaces_need"
26260
26296
  ],
26261
26297
  boundary_edges: [
@@ -28275,6 +28311,14 @@ var UPG_REGIONS = [
28275
28311
  {
28276
28312
  type: "primitive",
28277
28313
  role: "container"
28314
+ },
28315
+ {
28316
+ type: "operating_lifecycle",
28317
+ role: "container"
28318
+ },
28319
+ {
28320
+ type: "operating_stage",
28321
+ role: "leaf"
28278
28322
  }
28279
28323
  ],
28280
28324
  anchor: {
@@ -28287,9 +28331,21 @@ var UPG_REGIONS = [
28287
28331
  "specification_extends_specification",
28288
28332
  "specification_competes_with_specification",
28289
28333
  "primitive_defined_by_specification",
28290
- "primitive_composes_primitive"
28334
+ "primitive_composes_primitive",
28335
+ "operating_lifecycle_contains_operating_stage"
28291
28336
  ],
28292
- boundary_edges: []
28337
+ boundary_edges: [
28338
+ {
28339
+ direction: "import",
28340
+ edge_id: "journey_phase_realises_operating_stage",
28341
+ crosses_into: "experience_design_brand"
28342
+ },
28343
+ {
28344
+ direction: "export",
28345
+ edge_id: "operating_stage_measured_by_metric",
28346
+ crosses_into: "analytics_data"
28347
+ }
28348
+ ]
28293
28349
  }
28294
28350
  ];
28295
28351
  var UPG_REGION_MAP = Object.fromEntries(UPG_REGIONS.map((r) => [r.id, r]));
@@ -28815,7 +28871,7 @@ function isCanonical(text) {
28815
28871
  }
28816
28872
 
28817
28873
  // src/index.ts
28818
- var UPG_VERSION = "0.11.5";
28874
+ var UPG_VERSION = "0.11.6";
28819
28875
  var UPG_FORMAT_VERSION = "0.4.0";
28820
28876
  var MARKDOWN_FORMAT_VERSION = "0.1";
28821
28877
  var UPG_TYPES = getTypes();