@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.js CHANGED
@@ -494,7 +494,7 @@ var UPG_DOMAINS = [
494
494
  id: "foundations",
495
495
  label: "Foundations",
496
496
  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.",
497
- types: ["specification", "primitive"]
497
+ types: ["specification", "primitive", "operating_lifecycle", "operating_stage"]
498
498
  }
499
499
  ];
500
500
  var UPG_ENTITY_TO_DOMAIN = Object.freeze(
@@ -517,6 +517,8 @@ var UPG_ENTITY_META = [
517
517
  // Foundations (0.9.12): shared specifications + the primitives they define.
518
518
  { name: "specification", type_id: "ent_352", maturity: "proposed", since: "0.9.12" },
519
519
  { name: "primitive", type_id: "ent_353", maturity: "proposed", since: "0.9.12" },
520
+ { name: "operating_lifecycle", type_id: "ent_355", maturity: "proposed", since: "0.11.6" },
521
+ { name: "operating_stage", type_id: "ent_356", maturity: "proposed", since: "0.11.6" },
520
522
  // ── Strategic ──
521
523
  { name: "product", type_id: "ent_001", maturity: "stable", since: "0.1.0" },
522
524
  { name: "outcome", type_id: "ent_002", maturity: "stable", since: "0.1.0" },
@@ -1017,6 +1019,9 @@ var UPG_EDGE_CATALOG = {
1017
1019
  persona_pursues_job: { forward_verb: "pursues", reverse_verb: "pursued_by", classification: "semantic", source_type: "persona", target_type: "job" },
1018
1020
  persona_experiences_need: { forward_verb: "experiences", reverse_verb: "experienced_by", classification: "semantic", source_type: "persona", target_type: "need" },
1019
1021
  persona_aspires_to_desired_outcome: { forward_verb: "aspires_to", reverse_verb: "aspirational_for", classification: "hierarchy", source_type: "persona", target_type: "desired_outcome" },
1022
+ // Delegation (0.11.6): a persona delegates work to another. The common case is human -> agent
1023
+ // (Content Ops Lead -> Content Agent), but it also expresses human -> human (editor -> reviewer).
1024
+ persona_delegates_to_persona: { forward_verb: "delegates_to", reverse_verb: "delegated_by", classification: "semantic", source_type: "persona", target_type: "persona" },
1020
1025
  persona_incurs_switching_cost: { forward_verb: "incurs", reverse_verb: "incurred_by", classification: "hierarchy", source_type: "persona", target_type: "switching_cost" },
1021
1026
  job_surfaces_need: { forward_verb: "surfaces", reverse_verb: "surfaces_from", classification: "causal", source_type: "job", target_type: "need" },
1022
1027
  job_motivates_desired_outcome: { forward_verb: "motivates", reverse_verb: "motivated_by", classification: "causal", source_type: "job", target_type: "desired_outcome" },
@@ -2998,8 +3003,13 @@ var UPG_EDGE_CATALOG = {
2998
3003
  specification_competes_with_specification: { forward_verb: "competes_with", reverse_verb: "competes_with", classification: "semantic", source_type: "specification", target_type: "specification" },
2999
3004
  primitive_defined_by_specification: { forward_verb: "defined_by", reverse_verb: "defines", classification: "semantic", source_type: "primitive", target_type: "specification" },
3000
3005
  primitive_composes_primitive: { forward_verb: "composes", reverse_verb: "composed_by", classification: "hierarchy", source_type: "primitive", target_type: "primitive" },
3006
+ operating_lifecycle_contains_operating_stage: { forward_verb: "contains", reverse_verb: "belongs_to", classification: "hierarchy", source_type: "operating_lifecycle", target_type: "operating_stage" },
3001
3007
  // Stewardship: a registry specification is governed by a (registry-hostable) organization (0.9.13).
3002
- specification_governed_by_organization: { forward_verb: "governed_by", reverse_verb: "governs", classification: "semantic", source_type: "specification", target_type: "organization" }
3008
+ specification_governed_by_organization: { forward_verb: "governed_by", reverse_verb: "governs", classification: "semantic", source_type: "specification", target_type: "organization" },
3009
+ // Operating-lifecycle cross-edges (0.11.6): a product's journey phase realises a canonical
3010
+ // operating stage (the cross-surface join key); a stage is measured by a rollup metric (loop close).
3011
+ journey_phase_realises_operating_stage: { forward_verb: "realises", reverse_verb: "realised_by", classification: "cross-domain", source_type: "journey_phase", target_type: "operating_stage" },
3012
+ operating_stage_measured_by_metric: { forward_verb: "measured_by", reverse_verb: "measures", classification: "cross-domain", source_type: "operating_stage", target_type: "metric" }
3003
3013
  };
3004
3014
  var UPG_POLYMORPHIC_EDGE_KEYS = [
3005
3015
  // Universal semantic verbs
@@ -3155,6 +3165,9 @@ var UPG_VALID_CHILDREN = {
3155
3165
  // primitive_composes_primitive catalog edges.
3156
3166
  specification: ["specification"],
3157
3167
  primitive: ["primitive"],
3168
+ // An operating_lifecycle (e.g. the content-ops lifecycle) contains its ordered
3169
+ // operating_stage children. Backs the operating_lifecycle_contains_operating_stage edge.
3170
+ operating_lifecycle: ["operating_stage"],
3158
3171
  // ── Product (root) ─────────────────────────────────────────────────────────
3159
3172
  product: [
3160
3173
  // Strategy
@@ -6218,9 +6231,13 @@ function getLifecycleForType(entityType) {
6218
6231
  return UPG_LIFECYCLES.find((l) => l.entity_type === entityType);
6219
6232
  }
6220
6233
  var UPG_LIFECYCLE_FREE_TYPES = /* @__PURE__ */ new Set([
6221
- // ── Foundations (1 of 2): a primitive either exists or is deprecated; no
6222
- // phase ladder (like metric). `specification` carries a lifecycle. ──
6234
+ // ── Foundations (3 of 4): a primitive either exists or is deprecated; no
6235
+ // phase ladder (like metric). `operating_lifecycle`/`operating_stage` are
6236
+ // static ordered reference data (the loop is a `cyclic` flag, not a state
6237
+ // machine). `specification` carries a lifecycle. ──
6223
6238
  "primitive",
6239
+ "operating_lifecycle",
6240
+ "operating_stage",
6224
6241
  // ── User (5): personas and JTBD atoms are reference data ──────────────────
6225
6242
  "persona",
6226
6243
  "job",
@@ -9649,7 +9666,7 @@ var UPG_PROPERTY_SCHEMA = {
9649
9666
  },
9650
9667
  // CodeRepositoryProperties: Code repository.
9651
9668
  code_repository: {
9652
- repo_url: { type: "string", description: "URL" },
9669
+ repo_url: { type: "string", description: "URL", modifier: "volatile" },
9653
9670
  default_branch: { type: "string", description: "Default branch" },
9654
9671
  language: { type: "string", description: "Primary programming language" },
9655
9672
  ci_status: { type: "string", enum: ["passing", "failing", "unknown"], description: "Current CI status" },
@@ -9910,7 +9927,7 @@ var UPG_PROPERTY_SCHEMA = {
9910
9927
  data_classification: {
9911
9928
  level: { type: "string", enum: ["public", "internal", "confidential", "restricted"], description: "Sensitivity level" },
9912
9929
  handling_requirements: { type: "string", description: "Handling rules" },
9913
- examples: { type: "string", description: "Example data covered" },
9930
+ examples: { type: "string[]", description: "Example data covered" },
9914
9931
  retention_period: { type: "string", description: "Retention period" },
9915
9932
  encryption_required: { type: "boolean", description: "Whether encryption is mandatory" }
9916
9933
  },
@@ -10404,7 +10421,7 @@ var UPG_PROPERTY_SCHEMA = {
10404
10421
  feature_area: {
10405
10422
  scope_summary: { type: "string", description: "One-line scope description. Disambiguates from sibling areas at a glance." },
10406
10423
  owning_team: { type: "string", description: "Team identifier or slug. Free-form display. Canonical relationship is the `team_owns_feature_area` edge." },
10407
- feature_count: { type: "number", description: "Approximate feature count under this area. Snapshot; `feature_area_contains_feature` edges are the source of truth." },
10424
+ feature_count: { type: "number", description: "Approximate feature count under this area. Snapshot; `feature_area_contains_feature` edges are the source of truth.", modifier: "derived" },
10408
10425
  owner: { type: "string", description: "Area owner (handle or email)" },
10409
10426
  priority: { type: "string", enum: ["urgent", "high", "medium", "low", "none"], description: "Importance to the product overall" },
10410
10427
  maturity: { type: "string", enum: ["nascent", "growing", "mature", "legacy"], description: "Maturity. `nascent` = newly-formed grouping. `mature` = established surface. `legacy` = being phased out for a successor." },
@@ -10521,7 +10538,7 @@ var UPG_PROPERTY_SCHEMA = {
10521
10538
  // FunnelProperties: Funnel entity.
10522
10539
  funnel: {
10523
10540
  funnel_type: { type: "string", enum: ["acquisition", "activation", "retention", "revenue", "referral", "custom"], description: "Which stage of the customer lifecycle this funnel measures" },
10524
- step_count: { type: "number", description: "Number of steps in the funnel" },
10541
+ step_count: { type: "number", description: "Number of steps in the funnel", modifier: "derived" },
10525
10542
  overall_conversion_rate: { type: "number", description: "End-to-end conversion rate through the funnel (0-1)" }
10526
10543
  },
10527
10544
  // FunnelStepProperties: FunnelStep entity.
@@ -10674,7 +10691,7 @@ var UPG_PROPERTY_SCHEMA = {
10674
10691
  },
10675
10692
  required: ["value", "label"]
10676
10693
  },
10677
- evidence_count: { type: "number", description: "Supporting observations, quotes, or evidence items. Higher counts increase confidence." },
10694
+ evidence_count: { type: "number", description: "Supporting observations, quotes, or evidence items. Higher counts increase confidence.", modifier: "derived" },
10678
10695
  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." },
10679
10696
  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." },
10680
10697
  source_method: { type: "string", description: 'Producing research method. @example "usability_study", "interview_series", "survey"' },
@@ -11348,7 +11365,8 @@ var UPG_PROPERTY_SCHEMA = {
11348
11365
  motivation: { type: "string", description: 'Primary motivation or driving need @example "Making confident, evidence-based decisions"' },
11349
11366
  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`." },
11350
11367
  domain_expertise: { type: "string", description: 'Industry or domain knowledge this persona brings @example "10+ years SaaS experience", "New to healthcare IT"' },
11351
- 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"' }
11368
+ 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"' },
11369
+ 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." }
11352
11370
  },
11353
11371
  // PipelineSalesProperties: Sales pipeline.
11354
11372
  pipeline_sales: {
@@ -11411,6 +11429,21 @@ var UPG_PROPERTY_SCHEMA = {
11411
11429
  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." },
11412
11430
  since: { type: "string", description: "Year or version the primitive was introduced." }
11413
11431
  },
11432
+ // OperatingLifecycleProperties: a canonical ordered (often cyclic) operating process products' journey phases map onto.
11433
+ operating_lifecycle: {
11434
+ label: { type: "string", description: "Human-readable name of the operating process." },
11435
+ 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." },
11436
+ source: { type: "string", description: 'Origin of the canonical model (e.g. "Sanity official content-ops lifecycle").' }
11437
+ },
11438
+ // OperatingStageProperties: one ordered stage of an operating_lifecycle.
11439
+ operating_stage: {
11440
+ stage_order: { type: "number", description: "Ordered position within the lifecycle, 0-indexed." },
11441
+ label: { type: "string", description: "Human-readable stage name." },
11442
+ goal: { type: "string", description: "What this stage accomplishes." },
11443
+ owner_role: { type: "string", description: "Role that owns the stage (free-text role label)." },
11444
+ os_analogy: { type: "string", description: 'The Content-OS analogy from the source volume (e.g. "Drivers + daemons / cron").' },
11445
+ next_stage: { type: "string", description: "Label of the next stage; on the final stage of a cyclic lifecycle this carries the wrap." }
11446
+ },
11414
11447
  // PrivacyPolicyProperties: Privacy policy.
11415
11448
  privacy_policy: {
11416
11449
  version: { type: "string", description: "Version identifier of the policy" },
@@ -11811,7 +11844,7 @@ var UPG_PROPERTY_SCHEMA = {
11811
11844
  service_level_indicator: {
11812
11845
  metric_name: { type: "string", description: 'Indicator metric name. @example "Request latency p99", "Error rate", "Availability"' },
11813
11846
  threshold: { type: "number", description: 'Threshold that defines a "good" event. @example 200 (ms latency), 0.01 (1% error rate), 99.9 (% availability)' },
11814
- current_value: { type: "number", description: "Current observed value. Compared against `threshold` for SLO compliance. @example 150 (ms), 0.003 (0.3% error rate)" },
11847
+ 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" },
11815
11848
  unit: { type: "string", description: 'Unit of measurement. Required to interpret `threshold` and `current_value`. @example "ms", "%", "req/s", "errors/min"' },
11816
11849
  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' },
11817
11850
  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]))'" },
@@ -12357,7 +12390,7 @@ var UPG_PROPERTY_SCHEMA = {
12357
12390
  completed_at: { type: "string", description: "ISO timestamp when the run completed" },
12358
12391
  run_status: { type: "string", enum: ["pending", "running", "completed", "failed", "canceled"], description: "Current execution status of the run" },
12359
12392
  triggering_event: { type: "string", description: "Event or action that triggered this run" },
12360
- step_count: { type: "number", description: "Number of steps executed in this run" },
12393
+ step_count: { type: "number", description: "Number of steps executed in this run", modifier: "derived" },
12361
12394
  total_tokens: { type: "number", description: "Total tokens consumed across all steps" },
12362
12395
  total_cost: { type: "number", description: "Total monetary cost of the run" },
12363
12396
  error_message: { type: "string", description: "Error message if the run failed" }
@@ -12365,8 +12398,8 @@ var UPG_PROPERTY_SCHEMA = {
12365
12398
  // WorkflowTemplateProperties: Workflow template.
12366
12399
  workflow_template: {
12367
12400
  template_type: { type: "string", enum: ["sequential", "parallel", "conditional", "loop"], description: "Execution pattern for the workflow steps" },
12368
- step_count: { type: "number", description: "Number of steps in the workflow" },
12369
- agent_count: { type: "number", description: "Number of agents involved in the workflow" },
12401
+ step_count: { type: "number", description: "Number of steps in the workflow", modifier: "derived" },
12402
+ agent_count: { type: "number", description: "Number of agents involved in the workflow", modifier: "derived" },
12370
12403
  estimated_duration: { type: "string", description: "Estimated wall-clock duration of a full run" },
12371
12404
  state_schema: { type: "string", description: "Schema describing the workflow's state object" },
12372
12405
  checkpoint_enabled: { type: "boolean", description: "Whether the workflow supports checkpointing for recovery" },
@@ -18865,6 +18898,8 @@ var ENTITY_EMOJI = {
18865
18898
  pricing_strategy: "\u{1F4B1}",
18866
18899
  pricing_tier: "\u{1F949}",
18867
18900
  primitive: "\u{1F4CB}",
18901
+ operating_lifecycle: "\u{1F504}",
18902
+ operating_stage: "\u{1F539}",
18868
18903
  privacy_policy: "\u{1F6E1}\uFE0F",
18869
18904
  product: "\u{1F9EC}",
18870
18905
  product_area: "\u{1FA80}",
@@ -22677,7 +22712,7 @@ var WORKSPACE_GUIDE = {
22677
22712
  var FOUNDATIONS_GUIDE = {
22678
22713
  domain_id: "foundations",
22679
22714
  anchor_entity: "specification",
22680
- creation_sequence: ["specification", "primitive"],
22715
+ creation_sequence: ["specification", "primitive", "operating_lifecycle", "operating_stage"],
22681
22716
  patterns: [
22682
22717
  {
22683
22718
  name: "Specification defines primitives",
@@ -26044,6 +26079,7 @@ var UPG_REGIONS = [
26044
26079
  "persona_experiences_need",
26045
26080
  "persona_aspires_to_desired_outcome",
26046
26081
  "persona_incurs_switching_cost",
26082
+ "persona_delegates_to_persona",
26047
26083
  "job_surfaces_need"
26048
26084
  ],
26049
26085
  boundary_edges: [
@@ -28063,6 +28099,14 @@ var UPG_REGIONS = [
28063
28099
  {
28064
28100
  type: "primitive",
28065
28101
  role: "container"
28102
+ },
28103
+ {
28104
+ type: "operating_lifecycle",
28105
+ role: "container"
28106
+ },
28107
+ {
28108
+ type: "operating_stage",
28109
+ role: "leaf"
28066
28110
  }
28067
28111
  ],
28068
28112
  anchor: {
@@ -28075,9 +28119,21 @@ var UPG_REGIONS = [
28075
28119
  "specification_extends_specification",
28076
28120
  "specification_competes_with_specification",
28077
28121
  "primitive_defined_by_specification",
28078
- "primitive_composes_primitive"
28122
+ "primitive_composes_primitive",
28123
+ "operating_lifecycle_contains_operating_stage"
28079
28124
  ],
28080
- boundary_edges: []
28125
+ boundary_edges: [
28126
+ {
28127
+ direction: "import",
28128
+ edge_id: "journey_phase_realises_operating_stage",
28129
+ crosses_into: "experience_design_brand"
28130
+ },
28131
+ {
28132
+ direction: "export",
28133
+ edge_id: "operating_stage_measured_by_metric",
28134
+ crosses_into: "analytics_data"
28135
+ }
28136
+ ]
28081
28137
  }
28082
28138
  ];
28083
28139
  var UPG_REGION_MAP = Object.fromEntries(UPG_REGIONS.map((r) => [r.id, r]));
@@ -28603,7 +28659,7 @@ function isCanonical(text) {
28603
28659
  }
28604
28660
 
28605
28661
  // src/index.ts
28606
- var UPG_VERSION = "0.11.5";
28662
+ var UPG_VERSION = "0.11.6";
28607
28663
  var UPG_FORMAT_VERSION = "0.4.0";
28608
28664
  var MARKDOWN_FORMAT_VERSION = "0.1";
28609
28665
  var UPG_TYPES = getTypes();