@unified-product-graph/core 0.20.2 → 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/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
- workspace_produced_decision: { forward_verb: "produced", reverse_verb: "produced_in", classification: "causal", source_type: "workspace", target_type: "decision" },
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: ["portfolio", "product_area"],
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
- product_area: ["product", "product_area", "feature"]
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] ?? [];
@@ -4097,37 +4129,6 @@ var PRODUCT_LIFECYCLE = {
4097
4129
  }
4098
4130
  ]
4099
4131
  };
4100
- var RESEARCH_STUDY_LIFECYCLE = {
4101
- entity_type: "research_study",
4102
- initial_phase: "planned",
4103
- terminal_phases: ["complete"],
4104
- phases: [
4105
- {
4106
- id: "planned",
4107
- label: "Planned",
4108
- description: "The study has been scoped and scheduled. Research questions are defined, method is chosen, participants have not yet been recruited or sessions started.",
4109
- transitions_to: ["in_progress"]
4110
- },
4111
- {
4112
- id: "in_progress",
4113
- label: "In Progress",
4114
- description: "Research sessions are actively running. Participants are being interviewed, observed, or surveyed. Data is being collected.",
4115
- transitions_to: ["analysing"]
4116
- },
4117
- {
4118
- id: "analysing",
4119
- label: "Analysing",
4120
- description: "Data collection is complete. The team is reviewing recordings, notes, and responses to identify patterns and insights.",
4121
- transitions_to: ["complete"]
4122
- },
4123
- {
4124
- id: "complete",
4125
- label: "Complete",
4126
- description: "Analysis is done. Insights have been captured and shared. The study is a historical record.",
4127
- transitions_to: []
4128
- }
4129
- ]
4130
- };
4131
4132
  var NEED_LIFECYCLE = {
4132
4133
  entity_type: "need",
4133
4134
  initial_phase: "raw",
@@ -4209,74 +4210,6 @@ var SOLUTION_LIFECYCLE = {
4209
4210
  }
4210
4211
  ]
4211
4212
  };
4212
- var HYPOTHESIS_CLAIM_LIFECYCLE = {
4213
- entity_type: "hypothesis",
4214
- initial_phase: "drafted",
4215
- terminal_phases: ["validated", "invalidated", "archived"],
4216
- phases: [
4217
- {
4218
- id: "drafted",
4219
- label: "Drafted",
4220
- description: "The claim is being written. We_believe / will_result_in / we_know_when may not yet be complete. Not yet committed for testing.",
4221
- transitions_to: ["active", "archived"]
4222
- },
4223
- {
4224
- id: "active",
4225
- label: "Active",
4226
- description: "The claim is committed and being tested. Experiments may be running; evidence may be accruing via supports/refutes edges. current_confidence updates as evidence weight shifts.",
4227
- transitions_to: ["validated", "invalidated", "archived"]
4228
- },
4229
- {
4230
- id: "validated",
4231
- label: "Validated",
4232
- description: "Evidence sufficiently supports the claim. The belief held. Reopens to `active` if new evidence materially changes the picture.",
4233
- transitions_to: ["active"]
4234
- },
4235
- {
4236
- id: "invalidated",
4237
- label: "Invalidated",
4238
- description: "Evidence sufficiently refutes the claim. The belief did not hold. Reopens to `active` if new evidence materially changes the picture.",
4239
- transitions_to: ["active"]
4240
- },
4241
- {
4242
- id: "archived",
4243
- label: "Archived",
4244
- description: "Set aside without resolution: superseded by a new claim, deprioritised, or no longer relevant. Reopens to `active` if revisited.",
4245
- transitions_to: ["active"]
4246
- }
4247
- ]
4248
- };
4249
- var EXPERIMENT_LIFECYCLE = {
4250
- entity_type: "experiment",
4251
- initial_phase: "planned",
4252
- terminal_phases: ["done"],
4253
- phases: [
4254
- {
4255
- id: "planned",
4256
- label: "Planned",
4257
- description: "The experiment has been designed. Method, sample size, success criteria, and timeline are defined. It has not started yet.",
4258
- transitions_to: ["running"]
4259
- },
4260
- {
4261
- id: "running",
4262
- label: "Running",
4263
- description: "The experiment is live and collecting data. Traffic is being split, interviews are being conducted, or surveys are being distributed.",
4264
- transitions_to: ["analysing"]
4265
- },
4266
- {
4267
- id: "analysing",
4268
- label: "Analysing",
4269
- description: "Data collection is complete. The team is reviewing results, running statistical analysis, and deriving conclusions.",
4270
- transitions_to: ["done"]
4271
- },
4272
- {
4273
- id: "done",
4274
- label: "Done",
4275
- description: "The experiment is concluded. Learnings have been captured. The experiment is a historical record.",
4276
- transitions_to: []
4277
- }
4278
- ]
4279
- };
4280
4213
  var EXPERIMENT_PLAN_LIFECYCLE = {
4281
4214
  entity_type: "experiment_plan",
4282
4215
  initial_phase: "drafted",
@@ -4308,31 +4241,6 @@ var EXPERIMENT_PLAN_LIFECYCLE = {
4308
4241
  }
4309
4242
  ]
4310
4243
  };
4311
- var EXPERIMENT_RUN_LIFECYCLE = {
4312
- entity_type: "experiment_run",
4313
- initial_phase: "in_progress",
4314
- terminal_phases: ["complete", "aborted"],
4315
- phases: [
4316
- {
4317
- id: "in_progress",
4318
- label: "In Progress",
4319
- description: "The run is actively collecting data. Traffic is being split, interviews are happening, or surveys are out. Outcome and disposition are not yet recorded.",
4320
- transitions_to: ["complete", "aborted"]
4321
- },
4322
- {
4323
- id: "complete",
4324
- label: "Complete",
4325
- description: "Data collection finished and a disposition was recorded (confirmed, disconfirmed, or inconclusive). Learnings captured; outcome edges (validates, produced_insight, informed_decision) wired to downstream entities.",
4326
- transitions_to: []
4327
- },
4328
- {
4329
- id: "aborted",
4330
- label: "Aborted",
4331
- description: "Terminated early without a valid finding: infrastructure failure, exposure threshold not met, or the underlying plan was withdrawn. No disposition recorded.",
4332
- transitions_to: []
4333
- }
4334
- ]
4335
- };
4336
4244
  var RESEARCH_PLAN_LIFECYCLE = {
4337
4245
  entity_type: "research_plan",
4338
4246
  initial_phase: "draft",
@@ -4500,31 +4408,6 @@ var USER_ADVISORY_BOARD_LIFECYCLE = {
4500
4408
  }
4501
4409
  ]
4502
4410
  };
4503
- var DESIGN_SPRINT_LIFECYCLE = {
4504
- entity_type: "design_sprint",
4505
- initial_phase: "planning",
4506
- terminal_phases: ["completed"],
4507
- phases: [
4508
- {
4509
- id: "planning",
4510
- label: "Planning",
4511
- description: "The sprint challenge has been defined. Participants are identified. Space and materials are being arranged.",
4512
- transitions_to: ["in_progress"]
4513
- },
4514
- {
4515
- id: "in_progress",
4516
- label: "In Progress",
4517
- description: "The sprint is running. The team is moving through understand, sketch, decide, prototype, and test phases.",
4518
- transitions_to: ["completed"]
4519
- },
4520
- {
4521
- id: "completed",
4522
- label: "Completed",
4523
- description: "The sprint has concluded. Decisions and prototypes have been captured. Learnings inform next steps.",
4524
- transitions_to: []
4525
- }
4526
- ]
4527
- };
4528
4411
  var OBJECTIVE_LIFECYCLE = {
4529
4412
  entity_type: "objective",
4530
4413
  initial_phase: "draft",
@@ -4674,37 +4557,6 @@ var STRATEGIC_PILLAR_LIFECYCLE = {
4674
4557
  }
4675
4558
  ]
4676
4559
  };
4677
- var ASSUMPTION_LIFECYCLE = {
4678
- entity_type: "assumption",
4679
- initial_phase: "untested",
4680
- terminal_phases: ["validated", "invalidated"],
4681
- phases: [
4682
- {
4683
- id: "untested",
4684
- label: "Untested",
4685
- description: "Stated and acknowledged, awaiting systematic test. Some strategic assumptions stay untested by design.",
4686
- transitions_to: ["testing"]
4687
- },
4688
- {
4689
- id: "testing",
4690
- label: "Testing",
4691
- description: "An experiment or research activity is underway to test this assumption. Evidence is being gathered.",
4692
- transitions_to: ["validated", "invalidated"]
4693
- },
4694
- {
4695
- id: "validated",
4696
- label: "Validated",
4697
- description: "Evidence supports the assumption. The belief has been confirmed. Decisions resting on it are on firmer ground.",
4698
- transitions_to: []
4699
- },
4700
- {
4701
- id: "invalidated",
4702
- label: "Invalidated",
4703
- description: "Evidence contradicts the assumption. Decisions or plans that rested on it should be revisited.",
4704
- transitions_to: []
4705
- }
4706
- ]
4707
- };
4708
4560
  var STRATEGIC_QUESTION_LIFECYCLE = {
4709
4561
  entity_type: "strategic_question",
4710
4562
  initial_phase: "open",
@@ -4813,31 +4665,6 @@ var FEATURE_LIFECYCLE = {
4813
4665
  }
4814
4666
  ]
4815
4667
  };
4816
- var EPIC_LIFECYCLE = {
4817
- entity_type: "epic",
4818
- initial_phase: "todo",
4819
- terminal_phases: ["done"],
4820
- phases: [
4821
- {
4822
- id: "todo",
4823
- label: "To Do",
4824
- description: "The epic has been defined and scoped but work has not started. It is in the backlog.",
4825
- transitions_to: ["in_progress"]
4826
- },
4827
- {
4828
- id: "in_progress",
4829
- label: "In Progress",
4830
- description: "Work on the epic is underway. Stories are being pulled into sprints.",
4831
- transitions_to: ["done"]
4832
- },
4833
- {
4834
- id: "done",
4835
- label: "Done",
4836
- description: "All stories in the epic have been completed and the epic goal has been achieved.",
4837
- transitions_to: []
4838
- }
4839
- ]
4840
- };
4841
4668
  var RELEASE_LIFECYCLE = {
4842
4669
  entity_type: "release",
4843
4670
  initial_phase: "planned",
@@ -4863,74 +4690,6 @@ var RELEASE_LIFECYCLE = {
4863
4690
  }
4864
4691
  ]
4865
4692
  };
4866
- var TASK_LIFECYCLE = {
4867
- entity_type: "task",
4868
- initial_phase: "todo",
4869
- terminal_phases: ["done"],
4870
- phases: [
4871
- {
4872
- id: "todo",
4873
- label: "To Do",
4874
- description: "The task is defined and ready to be picked up.",
4875
- transitions_to: ["in_progress"]
4876
- },
4877
- {
4878
- id: "in_progress",
4879
- label: "In Progress",
4880
- description: "A team member is actively working on this task.",
4881
- transitions_to: ["in_review", "done"]
4882
- },
4883
- {
4884
- id: "in_review",
4885
- label: "In Review",
4886
- description: "Work is complete and awaiting review, approval, or verification.",
4887
- transitions_to: ["in_progress", "done"]
4888
- },
4889
- {
4890
- id: "done",
4891
- label: "Done",
4892
- description: "The task is complete and verified.",
4893
- transitions_to: []
4894
- }
4895
- ]
4896
- };
4897
- var BUG_LIFECYCLE = {
4898
- entity_type: "bug",
4899
- initial_phase: "open",
4900
- terminal_phases: ["verified", "wont_fix"],
4901
- phases: [
4902
- {
4903
- id: "open",
4904
- label: "Open",
4905
- description: "The bug has been reported but not yet triaged or assigned.",
4906
- transitions_to: ["in_progress", "wont_fix"]
4907
- },
4908
- {
4909
- id: "in_progress",
4910
- label: "In Progress",
4911
- description: "A developer is investigating and/or fixing the bug.",
4912
- transitions_to: ["fixed", "wont_fix"]
4913
- },
4914
- {
4915
- id: "fixed",
4916
- label: "Fixed",
4917
- description: "A fix has been implemented and merged. Awaiting verification in the target environment.",
4918
- transitions_to: ["verified", "open"]
4919
- },
4920
- {
4921
- id: "verified",
4922
- label: "Verified",
4923
- description: "The fix has been confirmed to resolve the bug in the target environment.",
4924
- transitions_to: []
4925
- },
4926
- {
4927
- id: "wont_fix",
4928
- label: "Won't Fix",
4929
- description: "Declined: by design, too costly relative to impact, or superseded by other work.",
4930
- transitions_to: []
4931
- }
4932
- ]
4933
- };
4934
4693
  var ROADMAP_ITEM_LIFECYCLE = {
4935
4694
  entity_type: "roadmap_item",
4936
4695
  initial_phase: "planned",
@@ -5073,37 +4832,6 @@ var DESIGN_CONCEPT_LIFECYCLE = {
5073
4832
  }
5074
4833
  ]
5075
4834
  };
5076
- var PROTOTYPE_LIFECYCLE = {
5077
- entity_type: "prototype",
5078
- initial_phase: "untested",
5079
- terminal_phases: ["passed", "failed"],
5080
- phases: [
5081
- {
5082
- id: "untested",
5083
- label: "Untested",
5084
- description: "The prototype has been built but has not yet been put in front of users.",
5085
- transitions_to: ["testing"]
5086
- },
5087
- {
5088
- id: "testing",
5089
- label: "Testing",
5090
- description: "The prototype is being tested with users. Sessions are underway.",
5091
- transitions_to: ["passed", "failed"]
5092
- },
5093
- {
5094
- id: "passed",
5095
- label: "Passed",
5096
- description: "Testing confirmed the design concept works for users. It is ready to inform detailed design or development.",
5097
- transitions_to: []
5098
- },
5099
- {
5100
- id: "failed",
5101
- label: "Failed",
5102
- description: "Testing revealed significant usability or concept problems. Learnings will inform a new design direction.",
5103
- transitions_to: []
5104
- }
5105
- ]
5106
- };
5107
4835
  var BRAND_IDENTITY_LIFECYCLE = {
5108
4836
  entity_type: "brand_identity",
5109
4837
  initial_phase: "exploratory",
@@ -5129,6 +4857,43 @@ var BRAND_IDENTITY_LIFECYCLE = {
5129
4857
  }
5130
4858
  ]
5131
4859
  };
4860
+ var SCREEN_LIFECYCLE = {
4861
+ entity_type: "screen",
4862
+ initial_phase: "draft",
4863
+ terminal_phases: ["deprecated"],
4864
+ phases: [
4865
+ {
4866
+ id: "draft",
4867
+ label: "Draft",
4868
+ description: "The screen is a rough idea: named and scoped, but not yet worked in a design tool.",
4869
+ transitions_to: ["in_design"]
4870
+ },
4871
+ {
4872
+ id: "in_design",
4873
+ label: "In Design",
4874
+ description: "The screen is being designed: wireframes, mockups, or prototypes are in progress. May fall back to `draft` if the approach is rethought from scratch.",
4875
+ transitions_to: ["built", "draft"]
4876
+ },
4877
+ {
4878
+ id: "built",
4879
+ label: "Built",
4880
+ description: "The screen has been implemented in code. It exists in a build but is not yet live for users. May return to `in_design` if implementation surfaces a design gap.",
4881
+ transitions_to: ["shipped", "in_design"]
4882
+ },
4883
+ {
4884
+ id: "shipped",
4885
+ label: "Shipped",
4886
+ description: "The screen is live in production and reachable by users.",
4887
+ transitions_to: ["deprecated"]
4888
+ },
4889
+ {
4890
+ id: "deprecated",
4891
+ label: "Deprecated",
4892
+ description: "The screen has been retired. It is no longer reachable, or is being phased out in favour of a replacement.",
4893
+ transitions_to: []
4894
+ }
4895
+ ]
4896
+ };
5132
4897
  var SERVICE_LIFECYCLE = {
5133
4898
  entity_type: "service",
5134
4899
  initial_phase: "development",
@@ -5210,43 +4975,6 @@ var FEATURE_FLAG_LIFECYCLE = {
5210
4975
  }
5211
4976
  ]
5212
4977
  };
5213
- var TECHNICAL_DEBT_ITEM_LIFECYCLE = {
5214
- entity_type: "technical_debt_item",
5215
- initial_phase: "identified",
5216
- terminal_phases: ["resolved", "accepted"],
5217
- phases: [
5218
- {
5219
- id: "identified",
5220
- label: "Identified",
5221
- description: "The debt has been recognised and documented. It has not yet been triaged for action.",
5222
- transitions_to: ["acknowledged", "accepted"]
5223
- },
5224
- {
5225
- id: "acknowledged",
5226
- label: "Acknowledged",
5227
- description: "The team agrees the debt exists and has assessed its severity. A decision on when to address it is pending.",
5228
- transitions_to: ["in_progress", "accepted"]
5229
- },
5230
- {
5231
- id: "in_progress",
5232
- label: "In Progress",
5233
- description: "Work is underway to address and remediate the debt.",
5234
- transitions_to: ["resolved"]
5235
- },
5236
- {
5237
- id: "resolved",
5238
- label: "Resolved",
5239
- description: "The debt has been addressed. The code or system has been improved.",
5240
- transitions_to: []
5241
- },
5242
- {
5243
- id: "accepted",
5244
- label: "Accepted",
5245
- description: "A conscious decision to live with the debt. Remediation cost outweighs current value.",
5246
- transitions_to: []
5247
- }
5248
- ]
5249
- };
5250
4978
  var INVESTIGATION_LIFECYCLE = {
5251
4979
  entity_type: "investigation",
5252
4980
  initial_phase: "open",
@@ -5377,49 +5105,6 @@ var INCIDENT_LIFECYCLE = {
5377
5105
  }
5378
5106
  ]
5379
5107
  };
5380
- var VULNERABILITY_LIFECYCLE = {
5381
- entity_type: "vulnerability",
5382
- initial_phase: "open",
5383
- terminal_phases: ["resolved", "accepted"],
5384
- phases: [
5385
- {
5386
- id: "open",
5387
- label: "Open",
5388
- description: "The vulnerability has been identified. It has not yet been assessed for severity or assigned for remediation.",
5389
- transitions_to: ["triaged"]
5390
- },
5391
- {
5392
- id: "triaged",
5393
- label: "Triaged",
5394
- description: "The vulnerability has been assessed. CVSS score assigned. Priority and ownership determined.",
5395
- transitions_to: ["in_progress", "accepted"]
5396
- },
5397
- {
5398
- id: "in_progress",
5399
- label: "In Progress",
5400
- description: "Remediation work is actively underway. A fix is being developed or a compensating control is being implemented.",
5401
- transitions_to: ["mitigated", "resolved"]
5402
- },
5403
- {
5404
- id: "mitigated",
5405
- label: "Mitigated",
5406
- description: "A compensating control is in place. Immediate risk is reduced but the root vulnerability has not been patched.",
5407
- transitions_to: ["resolved", "accepted"]
5408
- },
5409
- {
5410
- id: "resolved",
5411
- label: "Resolved",
5412
- description: "The vulnerability has been fully remediated. The underlying issue is patched or eliminated.",
5413
- transitions_to: []
5414
- },
5415
- {
5416
- id: "accepted",
5417
- label: "Accepted",
5418
- description: "Formally acknowledged by the security team. Remediation is parked: low severity, compensating controls, or cost/benefit analysis.",
5419
- transitions_to: []
5420
- }
5421
- ]
5422
- };
5423
5108
  var SECURITY_CONTROL_LIFECYCLE = {
5424
5109
  entity_type: "security_control",
5425
5110
  initial_phase: "planned",
@@ -5451,49 +5136,6 @@ var SECURITY_CONTROL_LIFECYCLE = {
5451
5136
  }
5452
5137
  ]
5453
5138
  };
5454
- var A11Y_ISSUE_LIFECYCLE = {
5455
- entity_type: "a11y_issue",
5456
- initial_phase: "open",
5457
- terminal_phases: ["verified", "accepted"],
5458
- phases: [
5459
- {
5460
- id: "open",
5461
- label: "Open",
5462
- description: "The accessibility issue has been identified. It has not yet been triaged for severity or assigned for remediation.",
5463
- transitions_to: ["triaged"]
5464
- },
5465
- {
5466
- id: "triaged",
5467
- label: "Triaged",
5468
- description: "The issue has been assessed for severity and mapped to the affected WCAG criterion. Priority has been assigned.",
5469
- transitions_to: ["in_progress", "accepted"]
5470
- },
5471
- {
5472
- id: "in_progress",
5473
- label: "In Progress",
5474
- description: "A developer or designer is actively working to fix the accessibility issue.",
5475
- transitions_to: ["fixed"]
5476
- },
5477
- {
5478
- id: "fixed",
5479
- label: "Fixed",
5480
- description: "The fix has been implemented. Awaiting verification with assistive technology.",
5481
- transitions_to: ["verified", "in_progress"]
5482
- },
5483
- {
5484
- id: "verified",
5485
- label: "Verified",
5486
- description: "The fix has been confirmed to resolve the accessibility barrier using appropriate assistive technology.",
5487
- transitions_to: []
5488
- },
5489
- {
5490
- id: "accepted",
5491
- label: "Accepted",
5492
- description: "The team has formally acknowledged this issue and made a documented decision not to fix it at this time.",
5493
- transitions_to: []
5494
- }
5495
- ]
5496
- };
5497
5139
  var DATA_PIPELINE_LIFECYCLE = {
5498
5140
  entity_type: "data_pipeline",
5499
5141
  initial_phase: "building",
@@ -5568,37 +5210,6 @@ var AI_MODEL_LIFECYCLE = {
5568
5210
  }
5569
5211
  ]
5570
5212
  };
5571
- var EVAL_RUN_LIFECYCLE = {
5572
- entity_type: "eval_run",
5573
- initial_phase: "planned",
5574
- terminal_phases: ["complete", "failed"],
5575
- phases: [
5576
- {
5577
- id: "planned",
5578
- label: "Planned",
5579
- description: "The run has been queued. It has not yet started executing.",
5580
- transitions_to: ["running"]
5581
- },
5582
- {
5583
- id: "running",
5584
- label: "Running",
5585
- description: "Actively executing. Prompts are being sent and responses scored.",
5586
- transitions_to: ["complete", "failed"]
5587
- },
5588
- {
5589
- id: "complete",
5590
- label: "Complete",
5591
- description: "The run finished successfully. Scores and results are available.",
5592
- transitions_to: []
5593
- },
5594
- {
5595
- id: "failed",
5596
- label: "Failed",
5597
- description: "Failed to complete: API error, timeout, or infrastructure failure. Create a new run to retry.",
5598
- transitions_to: []
5599
- }
5600
- ]
5601
- };
5602
5213
  var WORKFLOW_RUN_LIFECYCLE = {
5603
5214
  entity_type: "workflow_run",
5604
5215
  initial_phase: "pending",
@@ -5835,29 +5446,6 @@ var TEST_PLAN_LIFECYCLE = {
5835
5446
  { id: "cancelled", label: "Cancelled", description: "Plan was abandoned mid-flight: assumption changed, priorities shifted, or the underlying code went away.", transitions_to: [] }
5836
5447
  ]
5837
5448
  };
5838
- var FEASIBILITY_STUDY_LIFECYCLE = {
5839
- entity_type: "feasibility_study",
5840
- initial_phase: "scoped",
5841
- terminal_phases: ["concluded", "abandoned"],
5842
- phases: [
5843
- { id: "scoped", label: "Scoped", description: "Study has been framed: questions, methods, and budget are agreed.", transitions_to: ["analysing", "abandoned"] },
5844
- { id: "analysing", label: "Analysing", description: "Active analysis. Data is being gathered and synthesised.", transitions_to: ["concluded", "abandoned"] },
5845
- { id: "concluded", label: "Concluded", description: "Study reached a conclusion. Findings inform a go/no-go decision.", transitions_to: [] },
5846
- { id: "abandoned", label: "Abandoned", description: "Study was stopped before reaching a conclusion. Captured for the record.", transitions_to: [] }
5847
- ]
5848
- };
5849
- var AI_EXPERIMENT_LIFECYCLE = {
5850
- entity_type: "ai_experiment",
5851
- initial_phase: "planned",
5852
- terminal_phases: ["completed", "abandoned"],
5853
- phases: [
5854
- { id: "planned", label: "Planned", description: "Experiment has been designed but is not yet running.", transitions_to: ["running", "abandoned"] },
5855
- { id: "running", label: "Running", description: "Experiment is actively executing: model is being trained, evaluated, or compared.", transitions_to: ["analysed", "abandoned"] },
5856
- { id: "analysed", label: "Analysed", description: "Run is finished and results are being reviewed.", transitions_to: ["completed", "abandoned"] },
5857
- { id: "completed", label: "Completed", description: "Findings captured. Linked learnings drive downstream decisions.", transitions_to: [] },
5858
- { id: "abandoned", label: "Abandoned", description: "Experiment was stopped before producing usable findings.", transitions_to: [] }
5859
- ]
5860
- };
5861
5449
  var AI_DATASET_LIFECYCLE = {
5862
5450
  entity_type: "ai_dataset",
5863
5451
  initial_phase: "collecting",
@@ -5880,17 +5468,6 @@ var AI_GUARDRAIL_LIFECYCLE = {
5880
5468
  { id: "removed", label: "Removed", description: "Guardrail is no longer enforced. May reopen to active if reinstated.", transitions_to: ["active"] }
5881
5469
  ]
5882
5470
  };
5883
- var HALLUCINATION_REPORT_LIFECYCLE = {
5884
- entity_type: "hallucination_report",
5885
- initial_phase: "reported",
5886
- terminal_phases: ["resolved", "accepted"],
5887
- phases: [
5888
- { id: "reported", label: "Reported", description: "A hallucination has been observed and logged. Not yet investigated.", transitions_to: ["investigating"] },
5889
- { id: "investigating", label: "Investigating", description: "Active investigation: root cause analysis, reproduction, scope.", transitions_to: ["resolved", "accepted"] },
5890
- { id: "resolved", label: "Resolved", description: "A fix has shipped. Future occurrences should not happen.", transitions_to: ["investigating"] },
5891
- { id: "accepted", label: "Accepted", description: "Known limitation that will not be fixed in this iteration. Documented for users.", transitions_to: ["investigating"] }
5892
- ]
5893
- };
5894
5471
  var MODEL_COMPARISON_LIFECYCLE = {
5895
5472
  entity_type: "model_comparison",
5896
5473
  initial_phase: "planned",
@@ -5936,17 +5513,6 @@ var BUSINESS_MODEL_LIFECYCLE = {
5936
5513
  { id: "pivoted", label: "Pivoted", description: "Model became something structurally different. Captured as a milestone before the new model takes over.", transitions_to: [] }
5937
5514
  ]
5938
5515
  };
5939
- var VALUE_PROPOSITION_LIFECYCLE = {
5940
- entity_type: "value_proposition",
5941
- initial_phase: "drafted",
5942
- terminal_phases: ["validated", "invalidated"],
5943
- phases: [
5944
- { id: "drafted", label: "Drafted", description: "Statement of value has been articulated. Not yet tested.", transitions_to: ["testing", "invalidated"] },
5945
- { id: "testing", label: "Testing", description: "Statement is being tested against the target audience.", transitions_to: ["validated", "invalidated"] },
5946
- { id: "validated", label: "Validated", description: "Audience response confirms the value resonates. Forms the messaging foundation.", transitions_to: ["testing"] },
5947
- { id: "invalidated", label: "Invalidated", description: "Statement did not resonate. May reopen to drafted for a rewrite.", transitions_to: ["drafted"] }
5948
- ]
5949
- };
5950
5516
  var REVENUE_STREAM_LIFECYCLE = {
5951
5517
  entity_type: "revenue_stream",
5952
5518
  initial_phase: "proposed",
@@ -5958,29 +5524,6 @@ var REVENUE_STREAM_LIFECYCLE = {
5958
5524
  { id: "sunset", label: "Sunset", description: "Stream is being wound down. May reopen to piloting if revived.", transitions_to: ["piloting"] }
5959
5525
  ]
5960
5526
  };
5961
- var SUPPORT_TICKET_LIFECYCLE = {
5962
- entity_type: "support_ticket",
5963
- initial_phase: "opened",
5964
- terminal_phases: ["resolved", "closed"],
5965
- phases: [
5966
- { id: "opened", label: "Opened", description: "Ticket has been filed. Not yet looked at.", transitions_to: ["triaged"] },
5967
- { id: "triaged", label: "Triaged", description: "Ticket has been categorised, prioritised, and assigned. Ready for work.", transitions_to: ["in_progress"] },
5968
- { id: "in_progress", label: "In Progress", description: "Support is actively working on the ticket.", transitions_to: ["resolved", "triaged"] },
5969
- { id: "resolved", label: "Resolved", description: "Support believes the issue is fixed. Awaiting customer confirmation.", transitions_to: ["in_progress", "closed"] },
5970
- { id: "closed", label: "Closed", description: "Customer has confirmed. Ticket is fully done.", transitions_to: [] }
5971
- ]
5972
- };
5973
- var CUSTOMER_FEEDBACK_LIFECYCLE = {
5974
- entity_type: "customer_feedback",
5975
- initial_phase: "received",
5976
- terminal_phases: ["actioned", "acknowledged"],
5977
- phases: [
5978
- { id: "received", label: "Received", description: "Feedback has been captured. Not yet processed.", transitions_to: ["triaged"] },
5979
- { id: "triaged", label: "Triaged", description: "Feedback has been categorised and routed. Decision on action is pending.", transitions_to: ["actioned", "acknowledged"] },
5980
- { id: "actioned", label: "Actioned", description: "Feedback drove a change (a feature, a process, a doc update). Captured for the record.", transitions_to: [] },
5981
- { id: "acknowledged", label: "Acknowledged", description: "Feedback was read and considered but will not drive a change. Customer has been thanked.", transitions_to: [] }
5982
- ]
5983
- };
5984
5527
  var CUSTOMER_HEALTH_SCORE_LIFECYCLE = {
5985
5528
  entity_type: "customer_health_score",
5986
5529
  initial_phase: "monitoring",
@@ -6184,6 +5727,43 @@ var SALES_DEAL_TEMPLATE = {
6184
5727
  { id: "closed_lost", label: "Closed Lost", description: "Deal did not close. A re-engaged prospect becomes a new `deal` rather than reviving this one.", transitions_to: [] }
6185
5728
  ]
6186
5729
  };
5730
+ var VALIDATION_TEMPLATE = {
5731
+ template_id: "VALIDATION",
5732
+ initial_phase: "untested",
5733
+ terminal_phases: ["validated", "invalidated", "archived"],
5734
+ phases: [
5735
+ { id: "untested", label: "Untested", description: "Articulated but not yet examined against evidence.", transitions_to: ["testing"] },
5736
+ { id: "testing", label: "Testing", description: "Actively gathering evidence for or against the claim.", transitions_to: ["validated", "invalidated"] },
5737
+ { id: "validated", label: "Validated", description: "Evidence supports the claim. Treated as true until contradicted.", transitions_to: ["archived"] },
5738
+ { id: "invalidated", label: "Invalidated", description: "Evidence contradicts the claim. May re-test if new evidence appears.", transitions_to: ["archived", "testing"] },
5739
+ { id: "archived", label: "Archived", description: "Settled and retained for provenance. No longer active.", transitions_to: [] }
5740
+ ]
5741
+ };
5742
+ var INCIDENT_TEMPLATE = {
5743
+ template_id: "INCIDENT",
5744
+ initial_phase: "open",
5745
+ terminal_phases: ["resolved", "closed", "wont_fix"],
5746
+ phases: [
5747
+ { id: "open", label: "Open", description: "Surfaced and logged. Not yet triaged.", transitions_to: ["triaged"] },
5748
+ { id: "triaged", label: "Triaged", description: "Assessed for severity and ownership. Routed for work or dispositioned.", transitions_to: ["in_progress", "resolved", "wont_fix"] },
5749
+ { id: "in_progress", label: "In Progress", description: "Actively being worked toward a fix.", transitions_to: ["resolved", "wont_fix"] },
5750
+ { id: "resolved", label: "Resolved", description: "Addressed and verified. May reopen to `triaged` on regression.", transitions_to: ["closed", "triaged"] },
5751
+ { id: "closed", label: "Closed", description: "Administratively closed (duplicate, withdrawn, or no longer relevant).", transitions_to: [] },
5752
+ { id: "wont_fix", label: "Won't Fix", description: "Triaged as not to be actioned. Reason should be documented.", transitions_to: [] }
5753
+ ]
5754
+ };
5755
+ var STUDY_TEMPLATE = {
5756
+ template_id: "STUDY",
5757
+ initial_phase: "planned",
5758
+ terminal_phases: ["complete", "abandoned"],
5759
+ phases: [
5760
+ { id: "planned", label: "Planned", description: "Scoped and scheduled. Not yet started.", transitions_to: ["running"] },
5761
+ { id: "running", label: "Running", description: "Actively executing: collecting data or running the protocol.", transitions_to: ["analysing", "abandoned"] },
5762
+ { id: "analysing", label: "Analysing", description: "Execution done; results are being analysed and written up.", transitions_to: ["complete", "abandoned"] },
5763
+ { id: "complete", label: "Complete", description: "Analysed and concluded. Findings captured.", transitions_to: [] },
5764
+ { id: "abandoned", label: "Abandoned", description: "Stopped before completion (killed, timed out, or superseded).", transitions_to: [] }
5765
+ ]
5766
+ };
6187
5767
  var TEMPLATE_LIFECYCLES = [
6188
5768
  // Publishing lifecycle
6189
5769
  fromTemplate("content_piece", PUBLISHING_TEMPLATE),
@@ -6283,10 +5863,11 @@ var TEMPLATE_LIFECYCLES = [
6283
5863
  fromTemplate("access_policy", APPROVAL_TEMPLATE),
6284
5864
  fromTemplate("privacy_policy", APPROVAL_TEMPLATE),
6285
5865
  // ── Phase C: MATURITY (alpha / beta / ga / deprecated) ──────────────────────
5866
+ // screen removed (UPG-690 Q3, 0.21.0): hand-authored SCREEN_LIFECYCLE below —
5867
+ // the build-pipeline IS the real lifecycle, MATURITY was the mis-fit.
6286
5868
  fromTemplate("design_system", MATURITY_TEMPLATE),
6287
5869
  fromTemplate("design_component", MATURITY_TEMPLATE),
6288
5870
  fromTemplate("design_pattern", MATURITY_TEMPLATE),
6289
- fromTemplate("screen", MATURITY_TEMPLATE),
6290
5871
  fromTemplate("brand_logo", MATURITY_TEMPLATE),
6291
5872
  fromTemplate("certification", MATURITY_TEMPLATE),
6292
5873
  fromTemplate("data_source", MATURITY_TEMPLATE),
@@ -6296,12 +5877,44 @@ var TEMPLATE_LIFECYCLES = [
6296
5877
  fromTemplate("agent_task", WORK_ITEM_TEMPLATE),
6297
5878
  fromTemplate("agent_skill", WORK_ITEM_TEMPLATE),
6298
5879
  fromTemplate("agent_hook", WORK_ITEM_TEMPLATE),
5880
+ // UPG-690 (0.21.0): task (exact match) + epic (todo→in_progress→done ⊆ WORK_ITEM,
5881
+ // in_review becomes available — non-breaking widening) folded off hand-authored.
5882
+ fromTemplate("task", WORK_ITEM_TEMPLATE),
5883
+ fromTemplate("epic", WORK_ITEM_TEMPLATE),
6299
5884
  // ── Phase B: RISK_ITEM (identified → assessed → mitigated/accepted/closed) ──
6300
5885
  fromTemplate("threat", RISK_ITEM_TEMPLATE),
6301
5886
  fromTemplate("risk", RISK_ITEM_TEMPLATE),
6302
5887
  fromTemplate("compliance_requirement", RISK_ITEM_TEMPLATE),
6303
5888
  // ── Phase B: SALES_DEAL (qualified → proposal → negotiation → won/lost) ─────
6304
- fromTemplate("deal", SALES_DEAL_TEMPLATE)
5889
+ fromTemplate("deal", SALES_DEAL_TEMPLATE),
5890
+ // ── STUDY (planned → running → analysing → complete / abandoned) ───────────
5891
+ // UPG-690 (0.21.0): time-boxed investigations folded off bespoke singletons.
5892
+ // `model_comparison` stays bespoke — its publish/archive tail is a weak fit.
5893
+ fromTemplate("experiment", STUDY_TEMPLATE),
5894
+ fromTemplate("experiment_run", STUDY_TEMPLATE),
5895
+ fromTemplate("research_study", STUDY_TEMPLATE),
5896
+ fromTemplate("design_sprint", STUDY_TEMPLATE),
5897
+ fromTemplate("feasibility_study", STUDY_TEMPLATE),
5898
+ fromTemplate("ai_experiment", STUDY_TEMPLATE),
5899
+ fromTemplate("eval_run", STUDY_TEMPLATE),
5900
+ // ── VALIDATION (untested → testing → validated / invalidated → archived) ───
5901
+ // UPG-690 (0.21.0): claims-tested-to-a-verdict folded off bespoke singletons.
5902
+ // `business_model` stays bespoke — its `pivoted` terminal is a strategic
5903
+ // outcome, not a verdict.
5904
+ fromTemplate("assumption", VALIDATION_TEMPLATE),
5905
+ fromTemplate("prototype", VALIDATION_TEMPLATE),
5906
+ fromTemplate("value_proposition", VALIDATION_TEMPLATE),
5907
+ fromTemplate("hypothesis", VALIDATION_TEMPLATE),
5908
+ // ── INCIDENT (open → triaged → in_progress → resolved / closed / wont_fix) ─
5909
+ // UPG-690 (0.21.0): triage-to-resolution defect/ticket family folded off
5910
+ // bespoke singletons. `incident` stays bespoke (richer SRE flow).
5911
+ fromTemplate("support_ticket", INCIDENT_TEMPLATE),
5912
+ fromTemplate("bug", INCIDENT_TEMPLATE),
5913
+ fromTemplate("a11y_issue", INCIDENT_TEMPLATE),
5914
+ fromTemplate("vulnerability", INCIDENT_TEMPLATE),
5915
+ fromTemplate("hallucination_report", INCIDENT_TEMPLATE),
5916
+ fromTemplate("technical_debt_item", INCIDENT_TEMPLATE),
5917
+ fromTemplate("customer_feedback", INCIDENT_TEMPLATE)
6305
5918
  ];
6306
5919
  var FRAMEWORK_EXERCISE_LIFECYCLE = {
6307
5920
  entity_type: "framework_exercise",
@@ -6375,21 +5988,15 @@ var UPG_LIFECYCLES = [
6375
5988
  // Foundations (0.9.12)
6376
5989
  SPECIFICATION_LIFECYCLE,
6377
5990
  // Discovery & Validation
6378
- RESEARCH_STUDY_LIFECYCLE,
6379
5991
  NEED_LIFECYCLE,
6380
5992
  OPPORTUNITY_LIFECYCLE,
6381
5993
  SOLUTION_LIFECYCLE,
6382
- HYPOTHESIS_CLAIM_LIFECYCLE,
6383
- // canonical 'hypothesis' lifecycle. The pre-v0.2.8 legacy binding (untested → testing → resolved) was removed in 0.13.0 Wave 1 (UPG-685 T0.3): it was a dead second binding for the same entity_type, always shadowed by this one, and the legacy-status remap lives in UPG_*_MIGRATIONS, not a live lifecycle.
6384
- EXPERIMENT_LIFECYCLE,
6385
5994
  EXPERIMENT_PLAN_LIFECYCLE,
6386
- EXPERIMENT_RUN_LIFECYCLE,
6387
5995
  RESEARCH_PLAN_LIFECYCLE,
6388
5996
  FEEDBACK_PROGRAM_LIFECYCLE,
6389
5997
  FEATURE_REQUEST_LIFECYCLE,
6390
5998
  BETA_PROGRAM_LIFECYCLE,
6391
5999
  USER_ADVISORY_BOARD_LIFECYCLE,
6392
- DESIGN_SPRINT_LIFECYCLE,
6393
6000
  // Strategy & Product Specification
6394
6001
  OUTCOME_LIFECYCLE,
6395
6002
  VISION_LIFECYCLE,
@@ -6400,39 +6007,31 @@ var UPG_LIFECYCLES = [
6400
6007
  STRATEGIC_THEME_LIFECYCLE,
6401
6008
  INITIATIVE_LIFECYCLE,
6402
6009
  STRATEGIC_PILLAR_LIFECYCLE,
6403
- ASSUMPTION_LIFECYCLE,
6404
6010
  STRATEGIC_QUESTION_LIFECYCLE,
6405
6011
  FEATURE_AREA_LIFECYCLE,
6406
6012
  FEATURE_LIFECYCLE,
6407
- EPIC_LIFECYCLE,
6408
6013
  // user_story is lifecycle-free (declared in UPG_LIFECYCLE_FREE_TYPES below).
6409
- // story_task lifecycle removed v0.4.0; collapsed into task (TASK_LIFECYCLE,
6410
- // WORK_ITEM_TEMPLATE).
6014
+ // story_task lifecycle removed v0.4.0; collapsed into task. task + epic are
6015
+ // now WORK_ITEM-template-derived (UPG-690, 0.21.0) — see TEMPLATE_LIFECYCLES.
6411
6016
  RELEASE_LIFECYCLE,
6412
- TASK_LIFECYCLE,
6413
- BUG_LIFECYCLE,
6414
6017
  ROADMAP_ITEM_LIFECYCLE,
6415
6018
  PLANNING_CYCLE_LIFECYCLE,
6416
6019
  IP_ASSET_LIFECYCLE,
6417
6020
  CONTRACT_LIFECYCLE,
6418
6021
  DESIGN_CONCEPT_LIFECYCLE,
6419
- PROTOTYPE_LIFECYCLE,
6420
6022
  BRAND_IDENTITY_LIFECYCLE,
6023
+ SCREEN_LIFECYCLE,
6421
6024
  // Engineering & Operations
6422
6025
  SERVICE_LIFECYCLE,
6423
6026
  DEPLOYMENT_LIFECYCLE,
6424
6027
  FEATURE_FLAG_LIFECYCLE,
6425
- TECHNICAL_DEBT_ITEM_LIFECYCLE,
6426
6028
  INVESTIGATION_LIFECYCLE,
6427
6029
  EXTERNAL_API_LIFECYCLE,
6428
6030
  DATABASE_SCHEMA_LIFECYCLE,
6429
6031
  INCIDENT_LIFECYCLE,
6430
- VULNERABILITY_LIFECYCLE,
6431
6032
  SECURITY_CONTROL_LIFECYCLE,
6432
- A11Y_ISSUE_LIFECYCLE,
6433
6033
  DATA_PIPELINE_LIFECYCLE,
6434
6034
  AI_MODEL_LIFECYCLE,
6435
- EVAL_RUN_LIFECYCLE,
6436
6035
  WORKFLOW_RUN_LIFECYCLE,
6437
6036
  AGENT_DEFINITION_LIFECYCLE,
6438
6037
  AGENT_SESSION_LIFECYCLE,
@@ -6445,22 +6044,16 @@ var UPG_LIFECYCLES = [
6445
6044
  RESEARCH_QUESTION_LIFECYCLE,
6446
6045
  INTERVIEW_GUIDE_LIFECYCLE,
6447
6046
  TEST_PLAN_LIFECYCLE,
6448
- FEASIBILITY_STUDY_LIFECYCLE,
6449
6047
  // AI workflow
6450
- AI_EXPERIMENT_LIFECYCLE,
6451
6048
  AI_DATASET_LIFECYCLE,
6452
6049
  AI_GUARDRAIL_LIFECYCLE,
6453
- HALLUCINATION_REPORT_LIFECYCLE,
6454
6050
  MODEL_COMPARISON_LIFECYCLE,
6455
6051
  PROMPT_VERSION_LIFECYCLE,
6456
6052
  EVAL_BENCHMARK_LIFECYCLE,
6457
6053
  // Business Model
6458
6054
  BUSINESS_MODEL_LIFECYCLE,
6459
- VALUE_PROPOSITION_LIFECYCLE,
6460
6055
  REVENUE_STREAM_LIFECYCLE,
6461
6056
  // Customer Success
6462
- SUPPORT_TICKET_LIFECYCLE,
6463
- CUSTOMER_FEEDBACK_LIFECYCLE,
6464
6057
  CUSTOMER_HEALTH_SCORE_LIFECYCLE,
6465
6058
  PLAYBOOK_LIFECYCLE,
6466
6059
  // Team & Organisation
@@ -7574,6 +7167,64 @@ function getDeprecatedTypes() {
7574
7167
  return deprecated;
7575
7168
  }
7576
7169
  var UPG_PROPERTY_MIGRATIONS = {
7170
+ // ── v0.21.0: UPG-690 D.1 — collapse residual *_status shadows into status ────
7171
+ //
7172
+ // Six `*_status` enum properties that re-encode their entity's own lifecycle
7173
+ // phases (the residual Pattern-D shadows not caught by the 0.15.0 sweep, now
7174
+ // that the entities sit on shared templates). Each is removed; the authored
7175
+ // value LIFTS to UPGBaseNode.status, remapping where the property vocabulary
7176
+ // diverged from the (template) lifecycle. `security_policy.policy_status` was
7177
+ // deliberately EXCLUDED (Captain 2026-07-04): its active/under_review/retired
7178
+ // values are an operational-status axis distinct from its APPROVAL lifecycle
7179
+ // (active != approved) — a distinct-axis keeper, not a shadow.
7180
+ "0.21.0": [
7181
+ {
7182
+ kind: "lift_property_to_top_level",
7183
+ type: "brand_identity",
7184
+ from_property: "brand_stage",
7185
+ to: "status",
7186
+ reason: "UPG-690 D.1: brand_stage (exploratory/defined/mature) is an exact shadow of the brand_identity lifecycle. Removed in 0.21.0; lifts to status verbatim."
7187
+ },
7188
+ {
7189
+ kind: "lift_property_to_top_level",
7190
+ type: "deliverable",
7191
+ from_property: "deliverable_status",
7192
+ to: "status",
7193
+ value_map: { not_started: "todo", accepted: "done", rejected: "done" },
7194
+ reason: "UPG-690 D.1: deliverable_status re-encoded the deliverable WORK_ITEM lifecycle. Removed in 0.21.0; lifts to status with not_started -> todo, accepted/rejected -> done."
7195
+ },
7196
+ {
7197
+ kind: "lift_property_to_top_level",
7198
+ type: "press_release",
7199
+ from_property: "pr_status",
7200
+ to: "status",
7201
+ value_map: { in_review: "review", distributed: "published" },
7202
+ reason: "UPG-690 D.1: pr_status re-encoded the press_release PUBLISHING lifecycle. Removed in 0.21.0; lifts to status with in_review -> review, distributed -> published."
7203
+ },
7204
+ {
7205
+ kind: "lift_property_to_top_level",
7206
+ type: "program",
7207
+ from_property: "program_status",
7208
+ to: "status",
7209
+ value_map: { on_hold: "paused", cancelled: "sunset" },
7210
+ reason: "UPG-690 D.1: program_status re-encoded the program OPERATIONAL lifecycle. Removed in 0.21.0; lifts to status with on_hold -> paused, cancelled -> sunset."
7211
+ },
7212
+ {
7213
+ kind: "lift_property_to_top_level",
7214
+ type: "project",
7215
+ from_property: "project_status",
7216
+ to: "status",
7217
+ value_map: { on_hold: "paused", cancelled: "sunset" },
7218
+ reason: "UPG-690 D.1: project_status re-encoded the project OPERATIONAL lifecycle. Removed in 0.21.0; lifts to status with on_hold -> paused, cancelled -> sunset."
7219
+ },
7220
+ {
7221
+ kind: "lift_property_to_top_level",
7222
+ type: "screen",
7223
+ from_property: "screen_status",
7224
+ to: "status",
7225
+ reason: "UPG-690 D.3/Q3: screen flips from MATURITY to a hand-authored build-pipeline lifecycle (draft/in_design/built/shipped/deprecated); screen_status already carried those exact values. Removed in 0.21.0; lifts to status verbatim."
7226
+ }
7227
+ ],
7577
7228
  // ── v0.16.0: Pattern G — open-standard data boundary (UPG-691) ───────────────
7578
7229
  //
7579
7230
  // The portable graph holds modeling knowledge, not PII, registry filings,
@@ -9172,6 +8823,25 @@ function getScalarToEdgeMigrations(fromVersion, toVersion) {
9172
8823
  return result;
9173
8824
  }
9174
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
+ ],
9175
8845
  "0.9.9": [
9176
8846
  // (since v0.9.9, UPG-664/UPG-678) Validation experiment-model + test_plan
9177
8847
  // re-home. The validation chain is reshaped to the single-parent line
@@ -9998,19 +9668,7 @@ var UPG_STATUS_MIGRATIONS = {
9998
9668
  retired: "deprecated"
9999
9669
  },
10000
9670
  // ── Discovery & Validation ───────────────────────────────────────────────
10001
- hypothesis: {
10002
- // Lifecycle: [drafted, active, validated, invalidated, archived]
10003
- // Legacy pre-v0.2.8 vocabulary mapped via UPG_PROPERTY_MIGRATIONS for
10004
- // property→top-level lifts, but raw top-level legacy values surface
10005
- // when authors set `status: untested` directly without going through
10006
- // the property bag.
10007
- untested: "drafted",
10008
- testing: "active",
10009
- proposed: "drafted",
10010
- deferred: "archived",
10011
- resolved: "active"
10012
- // ambiguous: prefer active until evidence settles
10013
- },
9671
+ // (hypothesis moved to the VALIDATION template fold section below, 0.21.0)
10014
9672
  opportunity: {
10015
9673
  // Lifecycle: [identified, validated, deferred] (no terminal phases)
10016
9674
  // Common authoring leftovers from pre-canonical Lean Canvas
@@ -10062,7 +9720,118 @@ var UPG_STATUS_MIGRATIONS = {
10062
9720
  archived: "sunset",
10063
9721
  retired: "sunset"
10064
9722
  },
10065
- // ── DevOps: incident ─────────────────────────────────────────────────────
9723
+ // ── VALIDATION template fold (UPG-690, 0.21.0) ───────────────────────────
9724
+ // Bespoke claim vocabularies remapped onto VALIDATION
9725
+ // [untested, testing, validated, invalidated, archived].
9726
+ // `assumption` already matches (untested, testing, validated, invalidated) —
9727
+ // no migration entry needed.
9728
+ prototype: {
9729
+ // was [untested, testing, passed, failed]
9730
+ passed: "validated",
9731
+ failed: "invalidated"
9732
+ },
9733
+ value_proposition: {
9734
+ // was [drafted, testing, validated, invalidated]
9735
+ drafted: "untested"
9736
+ },
9737
+ hypothesis: {
9738
+ // was [drafted, active, validated, invalidated, archived] (HYPOTHESIS_CLAIM
9739
+ // const, re-homed to entity_type 'hypothesis' at v0.4.0). The legacy
9740
+ // pre-v0.2.8 [untested, testing, resolved] mapping already lived here; it is
9741
+ // now consistent with the VALIDATION spine.
9742
+ drafted: "untested",
9743
+ active: "testing",
9744
+ // pre-v0.2.8 legacy values (kept from the prior hypothesis migration):
9745
+ proposed: "untested",
9746
+ deferred: "archived",
9747
+ resolved: "validated"
9748
+ // ambiguous historically; prefer validated on resolve
9749
+ },
9750
+ // ── STUDY template fold (UPG-690, 0.21.0) ────────────────────────────────
9751
+ // Bespoke run/study vocabularies remapped onto STUDY
9752
+ // [planned, running, analysing, complete, abandoned].
9753
+ experiment: {
9754
+ // was [planned, running, analysing, done]
9755
+ done: "complete"
9756
+ },
9757
+ experiment_run: {
9758
+ // was [in_progress, complete, aborted]
9759
+ in_progress: "running",
9760
+ aborted: "abandoned"
9761
+ },
9762
+ research_study: {
9763
+ // was [planned, in_progress, analysing, complete]
9764
+ in_progress: "running"
9765
+ },
9766
+ design_sprint: {
9767
+ // was [planning, in_progress, completed]
9768
+ planning: "planned",
9769
+ in_progress: "running",
9770
+ completed: "complete"
9771
+ },
9772
+ feasibility_study: {
9773
+ // was [scoped, analysing, concluded, abandoned]
9774
+ scoped: "planned",
9775
+ concluded: "complete"
9776
+ },
9777
+ ai_experiment: {
9778
+ // was [planned, running, analysed, completed, abandoned]
9779
+ analysed: "analysing",
9780
+ completed: "complete"
9781
+ },
9782
+ eval_run: {
9783
+ // was [planned, running, complete, failed]. `failed` = the run did not
9784
+ // finish cleanly (errored / killed) → abandoned. A completed run whose
9785
+ // result was negative stays `complete` (the verdict lives elsewhere).
9786
+ failed: "abandoned"
9787
+ },
9788
+ // ── INCIDENT template fold (UPG-690, 0.21.0) ─────────────────────────────
9789
+ // Bespoke triage vocabularies remapped onto INCIDENT
9790
+ // [open, triaged, in_progress, resolved, closed, wont_fix]. `incident` itself
9791
+ // is NOT folded (stays bespoke; see the DevOps entry below).
9792
+ support_ticket: {
9793
+ // was [opened, triaged, in_progress, resolved, closed]
9794
+ opened: "open"
9795
+ },
9796
+ bug: {
9797
+ // was [open, in_progress, fixed, verified, wont_fix]
9798
+ fixed: "in_progress",
9799
+ // fixed-but-not-verified is still work in progress
9800
+ verified: "resolved"
9801
+ },
9802
+ a11y_issue: {
9803
+ // was [open, triaged, in_progress, fixed, verified, accepted]
9804
+ fixed: "in_progress",
9805
+ verified: "resolved",
9806
+ accepted: "resolved"
9807
+ // verified-and-accepted == resolved
9808
+ },
9809
+ vulnerability: {
9810
+ // was [open, triaged, in_progress, mitigated, resolved, accepted]
9811
+ mitigated: "in_progress",
9812
+ // mitigation applied, not yet fully resolved
9813
+ accepted: "resolved"
9814
+ },
9815
+ hallucination_report: {
9816
+ // was [reported, investigating, resolved, accepted]
9817
+ reported: "open",
9818
+ investigating: "in_progress",
9819
+ accepted: "resolved"
9820
+ },
9821
+ technical_debt_item: {
9822
+ // was [identified, acknowledged, in_progress, resolved, accepted]
9823
+ identified: "open",
9824
+ acknowledged: "triaged",
9825
+ accepted: "resolved"
9826
+ },
9827
+ customer_feedback: {
9828
+ // was [received, triaged, actioned, acknowledged]
9829
+ received: "open",
9830
+ actioned: "resolved",
9831
+ acknowledged: "closed"
9832
+ // noted with no action == administratively closed
9833
+ },
9834
+ // ── DevOps: incident (stays bespoke — richer SRE flow, not folded) ────────
10066
9835
  incident: {
10067
9836
  // Lifecycle: [detected, triaged, contained, resolved, mitigated]
10068
9837
  open: "detected",
@@ -10071,6 +9840,16 @@ var UPG_STATUS_MIGRATIONS = {
10071
9840
  in_progress: "triaged",
10072
9841
  closed: "resolved",
10073
9842
  fixed: "resolved"
9843
+ },
9844
+ // ── UX/Design: screen (UPG-690 Q3/D.3, 0.21.0) — MATURITY → build-pipeline
9845
+ // flip. Old lifecycle [alpha, beta, ga, deprecated]; new SCREEN_LIFECYCLE
9846
+ // [draft, in_design, built, shipped, deprecated]. `deprecated` IS canonical
9847
+ // in both (no rewrite needed); omitted per the no-identity-entries doctrine
9848
+ // (see status-migrations.test.ts).
9849
+ screen: {
9850
+ alpha: "built",
9851
+ beta: "shipped",
9852
+ ga: "shipped"
10074
9853
  }
10075
9854
  };
10076
9855
  function migrateStatusValue(entityType, currentStatus) {
@@ -10530,7 +10309,6 @@ var UPG_PROPERTY_SCHEMA = {
10530
10309
  personality_traits: { type: "string[]", description: 'Core personality traits of the brand (e.g. "bold", "approachable", "innovative")' },
10531
10310
  tagline: { type: "string", description: 'Brand tagline or slogan (e.g. "Just Do It", "Think Different")' },
10532
10311
  mission_statement: { type: "string", description: "Mission statement: what the brand exists to do." },
10533
- brand_stage: { type: "string", enum: ["exploratory", "defined", "mature"], description: "Current lifecycle stage of the brand" },
10534
10312
  brand_values: { type: "string[]", description: 'Core brand values. The principles the brand stands for. @example ["innovation", "transparency", "sustainability"]' },
10535
10313
  brand_story: { type: "string", description: "Brand origin story or narrative. Free-form text, may be multiple paragraphs." },
10536
10314
  target_audience_description: { type: "string", description: 'Target audience description. Who the brand speaks to. @example "Solo founders and small product teams building their first product."' },
@@ -11051,7 +10829,6 @@ var UPG_PROPERTY_SCHEMA = {
11051
10829
  deliverable: {
11052
10830
  deliverable_type: { type: "string", enum: ["document", "prototype", "release", "design", "report", "other"], description: "Kind of deliverable (UPG-579 Option B)." },
11053
10831
  due_date: { type: "string", description: "Due date for the deliverable (ISO format)" },
11054
- deliverable_status: { type: "string", enum: ["not_started", "in_progress", "in_review", "accepted", "rejected"], description: "Current progress status" },
11055
10832
  acceptance_criteria: { type: "string", description: "Criteria that must be met for the deliverable to be accepted" }
11056
10833
  },
11057
10834
  // DemandGenProgramProperties: DemandGenProgram entity.
@@ -12392,8 +12169,7 @@ var UPG_PROPERTY_SCHEMA = {
12392
12169
  press_release: {
12393
12170
  pr_type: { type: "string", enum: ["product_launch", "partnership", "funding", "milestone", "other"], description: "Category of the press release" },
12394
12171
  publish_date: { type: "string", description: "Date the release was or will be published (ISO format)" },
12395
- outlets: { type: "string[]", description: "Media outlets targeted for distribution" },
12396
- pr_status: { type: "string", enum: ["draft", "in_review", "distributed", "published"], description: "Current status of the press release" }
12172
+ outlets: { type: "string[]", description: "Media outlets targeted for distribution" }
12397
12173
  },
12398
12174
  // PricingStrategyProperties: Pricing strategy.
12399
12175
  pricing_strategy: {
@@ -12438,14 +12214,12 @@ var UPG_PROPERTY_SCHEMA = {
12438
12214
  },
12439
12215
  // ProgramProperties: Program.
12440
12216
  program: {
12441
- program_status: { type: "string", enum: ["planning", "active", "on_hold", "completed", "cancelled"], description: "Current status of the program" },
12442
12217
  start_date: { type: "string", description: "Program start date (ISO format)" },
12443
12218
  end_date: { type: "string", description: "Program end date (ISO format)" },
12444
12219
  budget: { type: "number", description: "Total budget allocated to the program" }
12445
12220
  },
12446
12221
  // ProjectProperties: Project.
12447
12222
  project: {
12448
- project_status: { type: "string", enum: ["planning", "active", "on_hold", "completed", "cancelled"], description: "Current status of the project" },
12449
12223
  start_date: { type: "string", description: "Project start date (ISO format)" },
12450
12224
  end_date: { type: "string", description: "Project end date (ISO format)" },
12451
12225
  methodology: { type: "string", enum: ["agile", "waterfall", "kanban", "hybrid"], description: "Development methodology used" }
@@ -12715,7 +12489,6 @@ var UPG_PROPERTY_SCHEMA = {
12715
12489
  route: { type: "string", description: 'Application route. @example "/dashboard", "/settings/billing"' },
12716
12490
  viewport: { type: "string", enum: ["mobile", "tablet", "desktop", "tv", "watch", "responsive"], description: "Primary target viewport" },
12717
12491
  access_level: { type: "string", enum: ["public", "authenticated", "admin", "internal"], description: "Reach" },
12718
- screen_status: { type: "string", enum: ["draft", "in_design", "built", "shipped", "deprecated"], description: "Build pipeline stage" },
12719
12492
  purpose: { type: "string", description: "One-line purpose" }
12720
12493
  },
12721
12494
  // ScreenStateProperties: Specific state of a screen.
@@ -29919,7 +29692,7 @@ function isCanonical(text) {
29919
29692
  }
29920
29693
 
29921
29694
  // src/index.ts
29922
- var UPG_VERSION = "0.20.2";
29695
+ var UPG_VERSION = "0.22.0";
29923
29696
  var UPG_FORMAT_VERSION = "0.4.0";
29924
29697
  var MARKDOWN_FORMAT_VERSION = "0.1";
29925
29698
  var UPG_TYPES = getTypes();