@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.cjs CHANGED
@@ -2557,8 +2557,31 @@ var UPG_EDGE_CATALOG = {
2557
2557
  product_cannibalises_product: { forward_verb: "cannibalises", reverse_verb: "cannibalised_by", classification: "causal", source_type: "product", target_type: "product" },
2558
2558
  product_succeeds_product: { forward_verb: "succeeds", reverse_verb: "succeeded_by", classification: "causal", source_type: "product", target_type: "product" },
2559
2559
  // 8.3 Workspace Edges
2560
+ // Altitude anchors (WS3, 2026-07-05): a workspace scopes to exactly one of
2561
+ // three legal altitudes — organization / product_area ("plane") / product —
2562
+ // each a typed hierarchy edge, not a polymorphic `_node` wildcard. Per the
2563
+ // enum-vs-polymorphism ADR (2026-06-16), this family fails universality
2564
+ // (the anchor set is a closed altitude ladder, not "any entity") and is
2565
+ // structural (it must resolve through `resolveContainmentEdge`/`get_tree`),
2566
+ // so it stays enumerated — the same shape `feature`'s five typed parent
2567
+ // edges already use. Same verb pair across all three altitudes. Neither new
2568
+ // edge is cross_product_eligible: an org/plane-altitude workspace lives in
2569
+ // the same portfolio-level `.upg` as its anchor, same as sibling containment
2570
+ // edges (organization_organised_into_product_area, portfolio_contains_product).
2571
+ organization_thinks_in_workspace: { forward_verb: "thinks_in", reverse_verb: "thinks_for", classification: "hierarchy", source_type: "organization", target_type: "workspace" },
2572
+ product_area_thinks_in_workspace: { forward_verb: "thinks_in", reverse_verb: "thinks_for", classification: "hierarchy", source_type: "product_area", target_type: "workspace" },
2560
2573
  product_thinks_in_workspace: { forward_verb: "thinks_in", reverse_verb: "thinks_for", classification: "hierarchy", source_type: "product", target_type: "workspace" },
2561
- workspace_produced_decision: { forward_verb: "produced", reverse_verb: "produced_in", classification: "causal", source_type: "workspace", target_type: "decision" },
2574
+ // Commit provenance (WS3, 2026-07-05): widened from the single-target
2575
+ // `workspace_produced_decision` to the `node` wildcard — a workspace's
2576
+ // commit loop can legitimately produce any entity type arranged in it
2577
+ // (decision, feature, persona, ...), so per the same ADR test this family
2578
+ // is universal + non-structural (provenance metadata, not the produced
2579
+ // node's real containment edge) and collapses polymorphic, mirroring
2580
+ // `decision_produces_node`. See UPG_EDGE_MIGRATIONS for the rename rule.
2581
+ // Edge-provenance (which workspace produced a committed *edge*, not just a
2582
+ // node) has no schema mechanism yet — deliberately deferred, see the WS3
2583
+ // proposal doc, ripple map "surprises" #3.
2584
+ workspace_produced_node: { forward_verb: "produced", reverse_verb: "produced_in", classification: "causal", source_type: "workspace", target_type: "node" },
2562
2585
  // ── P14 edges (replacing foreign-key properties) ─────────────────────────
2563
2586
  feature_addresses_job: { forward_verb: "addresses", reverse_verb: "addressed_by", classification: "cross-domain", source_type: "feature", target_type: "job" },
2564
2587
  feature_drives_key_result: { forward_verb: "drives", reverse_verb: "driven_by", classification: "cross-domain", source_type: "feature", target_type: "key_result" },
@@ -3501,7 +3524,10 @@ var UPG_POLYMORPHIC_EDGE_KEYS = [
3501
3524
  // intended semantic domain; the endpoints are the `node` wildcard.
3502
3525
  "work_item_blocks_work_item",
3503
3526
  "work_item_relates_to_work_item",
3504
- "work_item_duplicates_work_item"
3527
+ "work_item_duplicates_work_item",
3528
+ // Workspace provenance (WS3, 2026-07-05): a workspace can produce any
3529
+ // entity type arranged in it. Widened from workspace_produced_decision.
3530
+ "workspace_produced_node"
3505
3531
  ];
3506
3532
  var _POLY_KEY_SET = new Set(UPG_POLYMORPHIC_EDGE_KEYS);
3507
3533
  function isPolymorphicEdge(key) {
@@ -4263,13 +4289,19 @@ var UPG_VALID_CHILDREN = {
4263
4289
  // ── Portfolio layer hierarchy ────────────────────────────────────────────────
4264
4290
  // organization → product_area is the org-axis anchor (who owns what);
4265
4291
  // organization → portfolio is the strategic-axis anchor (where you invest).
4266
- organization: ["portfolio", "product_area"],
4292
+ // organization → workspace (WS3, 2026-07-05): org-altitude workspace anchor
4293
+ // (organization_thinks_in_workspace) — a workspace scoped to org altitude
4294
+ // lives in the same portfolio-level graph as its organization node.
4295
+ organization: ["portfolio", "product_area", "workspace"],
4267
4296
  // portfolios can nest (multi-level investment structures).
4268
4297
  portfolio: ["product", "portfolio"],
4269
4298
  // product_area is the organisational container for products and can
4270
4299
  // nest (parent → sub-area). product_area also groups features; the
4271
- // "Studio area owns 6 features" mental model.
4272
- product_area: ["product", "product_area", "feature"]
4300
+ // "Studio area owns 6 features" mental model. product_area → workspace
4301
+ // (WS3, 2026-07-05): plane-altitude workspace anchor
4302
+ // (product_area_thinks_in_workspace) — "plane" is Entopo's app-level name
4303
+ // for product_area, not a distinct spec entity.
4304
+ product_area: ["product", "product_area", "feature", "workspace"]
4273
4305
  };
4274
4306
  function getValidChildren(entityType) {
4275
4307
  return UPG_VALID_CHILDREN[entityType] ?? [];
@@ -4352,37 +4384,6 @@ var PRODUCT_LIFECYCLE = {
4352
4384
  }
4353
4385
  ]
4354
4386
  };
4355
- var RESEARCH_STUDY_LIFECYCLE = {
4356
- entity_type: "research_study",
4357
- initial_phase: "planned",
4358
- terminal_phases: ["complete"],
4359
- phases: [
4360
- {
4361
- id: "planned",
4362
- label: "Planned",
4363
- description: "The study has been scoped and scheduled. Research questions are defined, method is chosen, participants have not yet been recruited or sessions started.",
4364
- transitions_to: ["in_progress"]
4365
- },
4366
- {
4367
- id: "in_progress",
4368
- label: "In Progress",
4369
- description: "Research sessions are actively running. Participants are being interviewed, observed, or surveyed. Data is being collected.",
4370
- transitions_to: ["analysing"]
4371
- },
4372
- {
4373
- id: "analysing",
4374
- label: "Analysing",
4375
- description: "Data collection is complete. The team is reviewing recordings, notes, and responses to identify patterns and insights.",
4376
- transitions_to: ["complete"]
4377
- },
4378
- {
4379
- id: "complete",
4380
- label: "Complete",
4381
- description: "Analysis is done. Insights have been captured and shared. The study is a historical record.",
4382
- transitions_to: []
4383
- }
4384
- ]
4385
- };
4386
4387
  var NEED_LIFECYCLE = {
4387
4388
  entity_type: "need",
4388
4389
  initial_phase: "raw",
@@ -4464,74 +4465,6 @@ var SOLUTION_LIFECYCLE = {
4464
4465
  }
4465
4466
  ]
4466
4467
  };
4467
- var HYPOTHESIS_CLAIM_LIFECYCLE = {
4468
- entity_type: "hypothesis",
4469
- initial_phase: "drafted",
4470
- terminal_phases: ["validated", "invalidated", "archived"],
4471
- phases: [
4472
- {
4473
- id: "drafted",
4474
- label: "Drafted",
4475
- description: "The claim is being written. We_believe / will_result_in / we_know_when may not yet be complete. Not yet committed for testing.",
4476
- transitions_to: ["active", "archived"]
4477
- },
4478
- {
4479
- id: "active",
4480
- label: "Active",
4481
- 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.",
4482
- transitions_to: ["validated", "invalidated", "archived"]
4483
- },
4484
- {
4485
- id: "validated",
4486
- label: "Validated",
4487
- description: "Evidence sufficiently supports the claim. The belief held. Reopens to `active` if new evidence materially changes the picture.",
4488
- transitions_to: ["active"]
4489
- },
4490
- {
4491
- id: "invalidated",
4492
- label: "Invalidated",
4493
- description: "Evidence sufficiently refutes the claim. The belief did not hold. Reopens to `active` if new evidence materially changes the picture.",
4494
- transitions_to: ["active"]
4495
- },
4496
- {
4497
- id: "archived",
4498
- label: "Archived",
4499
- description: "Set aside without resolution: superseded by a new claim, deprioritised, or no longer relevant. Reopens to `active` if revisited.",
4500
- transitions_to: ["active"]
4501
- }
4502
- ]
4503
- };
4504
- var EXPERIMENT_LIFECYCLE = {
4505
- entity_type: "experiment",
4506
- initial_phase: "planned",
4507
- terminal_phases: ["done"],
4508
- phases: [
4509
- {
4510
- id: "planned",
4511
- label: "Planned",
4512
- description: "The experiment has been designed. Method, sample size, success criteria, and timeline are defined. It has not started yet.",
4513
- transitions_to: ["running"]
4514
- },
4515
- {
4516
- id: "running",
4517
- label: "Running",
4518
- description: "The experiment is live and collecting data. Traffic is being split, interviews are being conducted, or surveys are being distributed.",
4519
- transitions_to: ["analysing"]
4520
- },
4521
- {
4522
- id: "analysing",
4523
- label: "Analysing",
4524
- description: "Data collection is complete. The team is reviewing results, running statistical analysis, and deriving conclusions.",
4525
- transitions_to: ["done"]
4526
- },
4527
- {
4528
- id: "done",
4529
- label: "Done",
4530
- description: "The experiment is concluded. Learnings have been captured. The experiment is a historical record.",
4531
- transitions_to: []
4532
- }
4533
- ]
4534
- };
4535
4468
  var EXPERIMENT_PLAN_LIFECYCLE = {
4536
4469
  entity_type: "experiment_plan",
4537
4470
  initial_phase: "drafted",
@@ -4563,31 +4496,6 @@ var EXPERIMENT_PLAN_LIFECYCLE = {
4563
4496
  }
4564
4497
  ]
4565
4498
  };
4566
- var EXPERIMENT_RUN_LIFECYCLE = {
4567
- entity_type: "experiment_run",
4568
- initial_phase: "in_progress",
4569
- terminal_phases: ["complete", "aborted"],
4570
- phases: [
4571
- {
4572
- id: "in_progress",
4573
- label: "In Progress",
4574
- 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.",
4575
- transitions_to: ["complete", "aborted"]
4576
- },
4577
- {
4578
- id: "complete",
4579
- label: "Complete",
4580
- 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.",
4581
- transitions_to: []
4582
- },
4583
- {
4584
- id: "aborted",
4585
- label: "Aborted",
4586
- description: "Terminated early without a valid finding: infrastructure failure, exposure threshold not met, or the underlying plan was withdrawn. No disposition recorded.",
4587
- transitions_to: []
4588
- }
4589
- ]
4590
- };
4591
4499
  var RESEARCH_PLAN_LIFECYCLE = {
4592
4500
  entity_type: "research_plan",
4593
4501
  initial_phase: "draft",
@@ -4755,31 +4663,6 @@ var USER_ADVISORY_BOARD_LIFECYCLE = {
4755
4663
  }
4756
4664
  ]
4757
4665
  };
4758
- var DESIGN_SPRINT_LIFECYCLE = {
4759
- entity_type: "design_sprint",
4760
- initial_phase: "planning",
4761
- terminal_phases: ["completed"],
4762
- phases: [
4763
- {
4764
- id: "planning",
4765
- label: "Planning",
4766
- description: "The sprint challenge has been defined. Participants are identified. Space and materials are being arranged.",
4767
- transitions_to: ["in_progress"]
4768
- },
4769
- {
4770
- id: "in_progress",
4771
- label: "In Progress",
4772
- description: "The sprint is running. The team is moving through understand, sketch, decide, prototype, and test phases.",
4773
- transitions_to: ["completed"]
4774
- },
4775
- {
4776
- id: "completed",
4777
- label: "Completed",
4778
- description: "The sprint has concluded. Decisions and prototypes have been captured. Learnings inform next steps.",
4779
- transitions_to: []
4780
- }
4781
- ]
4782
- };
4783
4666
  var OBJECTIVE_LIFECYCLE = {
4784
4667
  entity_type: "objective",
4785
4668
  initial_phase: "draft",
@@ -4929,37 +4812,6 @@ var STRATEGIC_PILLAR_LIFECYCLE = {
4929
4812
  }
4930
4813
  ]
4931
4814
  };
4932
- var ASSUMPTION_LIFECYCLE = {
4933
- entity_type: "assumption",
4934
- initial_phase: "untested",
4935
- terminal_phases: ["validated", "invalidated"],
4936
- phases: [
4937
- {
4938
- id: "untested",
4939
- label: "Untested",
4940
- description: "Stated and acknowledged, awaiting systematic test. Some strategic assumptions stay untested by design.",
4941
- transitions_to: ["testing"]
4942
- },
4943
- {
4944
- id: "testing",
4945
- label: "Testing",
4946
- description: "An experiment or research activity is underway to test this assumption. Evidence is being gathered.",
4947
- transitions_to: ["validated", "invalidated"]
4948
- },
4949
- {
4950
- id: "validated",
4951
- label: "Validated",
4952
- description: "Evidence supports the assumption. The belief has been confirmed. Decisions resting on it are on firmer ground.",
4953
- transitions_to: []
4954
- },
4955
- {
4956
- id: "invalidated",
4957
- label: "Invalidated",
4958
- description: "Evidence contradicts the assumption. Decisions or plans that rested on it should be revisited.",
4959
- transitions_to: []
4960
- }
4961
- ]
4962
- };
4963
4815
  var STRATEGIC_QUESTION_LIFECYCLE = {
4964
4816
  entity_type: "strategic_question",
4965
4817
  initial_phase: "open",
@@ -5068,31 +4920,6 @@ var FEATURE_LIFECYCLE = {
5068
4920
  }
5069
4921
  ]
5070
4922
  };
5071
- var EPIC_LIFECYCLE = {
5072
- entity_type: "epic",
5073
- initial_phase: "todo",
5074
- terminal_phases: ["done"],
5075
- phases: [
5076
- {
5077
- id: "todo",
5078
- label: "To Do",
5079
- description: "The epic has been defined and scoped but work has not started. It is in the backlog.",
5080
- transitions_to: ["in_progress"]
5081
- },
5082
- {
5083
- id: "in_progress",
5084
- label: "In Progress",
5085
- description: "Work on the epic is underway. Stories are being pulled into sprints.",
5086
- transitions_to: ["done"]
5087
- },
5088
- {
5089
- id: "done",
5090
- label: "Done",
5091
- description: "All stories in the epic have been completed and the epic goal has been achieved.",
5092
- transitions_to: []
5093
- }
5094
- ]
5095
- };
5096
4923
  var RELEASE_LIFECYCLE = {
5097
4924
  entity_type: "release",
5098
4925
  initial_phase: "planned",
@@ -5118,74 +4945,6 @@ var RELEASE_LIFECYCLE = {
5118
4945
  }
5119
4946
  ]
5120
4947
  };
5121
- var TASK_LIFECYCLE = {
5122
- entity_type: "task",
5123
- initial_phase: "todo",
5124
- terminal_phases: ["done"],
5125
- phases: [
5126
- {
5127
- id: "todo",
5128
- label: "To Do",
5129
- description: "The task is defined and ready to be picked up.",
5130
- transitions_to: ["in_progress"]
5131
- },
5132
- {
5133
- id: "in_progress",
5134
- label: "In Progress",
5135
- description: "A team member is actively working on this task.",
5136
- transitions_to: ["in_review", "done"]
5137
- },
5138
- {
5139
- id: "in_review",
5140
- label: "In Review",
5141
- description: "Work is complete and awaiting review, approval, or verification.",
5142
- transitions_to: ["in_progress", "done"]
5143
- },
5144
- {
5145
- id: "done",
5146
- label: "Done",
5147
- description: "The task is complete and verified.",
5148
- transitions_to: []
5149
- }
5150
- ]
5151
- };
5152
- var BUG_LIFECYCLE = {
5153
- entity_type: "bug",
5154
- initial_phase: "open",
5155
- terminal_phases: ["verified", "wont_fix"],
5156
- phases: [
5157
- {
5158
- id: "open",
5159
- label: "Open",
5160
- description: "The bug has been reported but not yet triaged or assigned.",
5161
- transitions_to: ["in_progress", "wont_fix"]
5162
- },
5163
- {
5164
- id: "in_progress",
5165
- label: "In Progress",
5166
- description: "A developer is investigating and/or fixing the bug.",
5167
- transitions_to: ["fixed", "wont_fix"]
5168
- },
5169
- {
5170
- id: "fixed",
5171
- label: "Fixed",
5172
- description: "A fix has been implemented and merged. Awaiting verification in the target environment.",
5173
- transitions_to: ["verified", "open"]
5174
- },
5175
- {
5176
- id: "verified",
5177
- label: "Verified",
5178
- description: "The fix has been confirmed to resolve the bug in the target environment.",
5179
- transitions_to: []
5180
- },
5181
- {
5182
- id: "wont_fix",
5183
- label: "Won't Fix",
5184
- description: "Declined: by design, too costly relative to impact, or superseded by other work.",
5185
- transitions_to: []
5186
- }
5187
- ]
5188
- };
5189
4948
  var ROADMAP_ITEM_LIFECYCLE = {
5190
4949
  entity_type: "roadmap_item",
5191
4950
  initial_phase: "planned",
@@ -5328,37 +5087,6 @@ var DESIGN_CONCEPT_LIFECYCLE = {
5328
5087
  }
5329
5088
  ]
5330
5089
  };
5331
- var PROTOTYPE_LIFECYCLE = {
5332
- entity_type: "prototype",
5333
- initial_phase: "untested",
5334
- terminal_phases: ["passed", "failed"],
5335
- phases: [
5336
- {
5337
- id: "untested",
5338
- label: "Untested",
5339
- description: "The prototype has been built but has not yet been put in front of users.",
5340
- transitions_to: ["testing"]
5341
- },
5342
- {
5343
- id: "testing",
5344
- label: "Testing",
5345
- description: "The prototype is being tested with users. Sessions are underway.",
5346
- transitions_to: ["passed", "failed"]
5347
- },
5348
- {
5349
- id: "passed",
5350
- label: "Passed",
5351
- description: "Testing confirmed the design concept works for users. It is ready to inform detailed design or development.",
5352
- transitions_to: []
5353
- },
5354
- {
5355
- id: "failed",
5356
- label: "Failed",
5357
- description: "Testing revealed significant usability or concept problems. Learnings will inform a new design direction.",
5358
- transitions_to: []
5359
- }
5360
- ]
5361
- };
5362
5090
  var BRAND_IDENTITY_LIFECYCLE = {
5363
5091
  entity_type: "brand_identity",
5364
5092
  initial_phase: "exploratory",
@@ -5384,6 +5112,43 @@ var BRAND_IDENTITY_LIFECYCLE = {
5384
5112
  }
5385
5113
  ]
5386
5114
  };
5115
+ var SCREEN_LIFECYCLE = {
5116
+ entity_type: "screen",
5117
+ initial_phase: "draft",
5118
+ terminal_phases: ["deprecated"],
5119
+ phases: [
5120
+ {
5121
+ id: "draft",
5122
+ label: "Draft",
5123
+ description: "The screen is a rough idea: named and scoped, but not yet worked in a design tool.",
5124
+ transitions_to: ["in_design"]
5125
+ },
5126
+ {
5127
+ id: "in_design",
5128
+ label: "In Design",
5129
+ 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.",
5130
+ transitions_to: ["built", "draft"]
5131
+ },
5132
+ {
5133
+ id: "built",
5134
+ label: "Built",
5135
+ 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.",
5136
+ transitions_to: ["shipped", "in_design"]
5137
+ },
5138
+ {
5139
+ id: "shipped",
5140
+ label: "Shipped",
5141
+ description: "The screen is live in production and reachable by users.",
5142
+ transitions_to: ["deprecated"]
5143
+ },
5144
+ {
5145
+ id: "deprecated",
5146
+ label: "Deprecated",
5147
+ description: "The screen has been retired. It is no longer reachable, or is being phased out in favour of a replacement.",
5148
+ transitions_to: []
5149
+ }
5150
+ ]
5151
+ };
5387
5152
  var SERVICE_LIFECYCLE = {
5388
5153
  entity_type: "service",
5389
5154
  initial_phase: "development",
@@ -5465,43 +5230,6 @@ var FEATURE_FLAG_LIFECYCLE = {
5465
5230
  }
5466
5231
  ]
5467
5232
  };
5468
- var TECHNICAL_DEBT_ITEM_LIFECYCLE = {
5469
- entity_type: "technical_debt_item",
5470
- initial_phase: "identified",
5471
- terminal_phases: ["resolved", "accepted"],
5472
- phases: [
5473
- {
5474
- id: "identified",
5475
- label: "Identified",
5476
- description: "The debt has been recognised and documented. It has not yet been triaged for action.",
5477
- transitions_to: ["acknowledged", "accepted"]
5478
- },
5479
- {
5480
- id: "acknowledged",
5481
- label: "Acknowledged",
5482
- description: "The team agrees the debt exists and has assessed its severity. A decision on when to address it is pending.",
5483
- transitions_to: ["in_progress", "accepted"]
5484
- },
5485
- {
5486
- id: "in_progress",
5487
- label: "In Progress",
5488
- description: "Work is underway to address and remediate the debt.",
5489
- transitions_to: ["resolved"]
5490
- },
5491
- {
5492
- id: "resolved",
5493
- label: "Resolved",
5494
- description: "The debt has been addressed. The code or system has been improved.",
5495
- transitions_to: []
5496
- },
5497
- {
5498
- id: "accepted",
5499
- label: "Accepted",
5500
- description: "A conscious decision to live with the debt. Remediation cost outweighs current value.",
5501
- transitions_to: []
5502
- }
5503
- ]
5504
- };
5505
5233
  var INVESTIGATION_LIFECYCLE = {
5506
5234
  entity_type: "investigation",
5507
5235
  initial_phase: "open",
@@ -5632,49 +5360,6 @@ var INCIDENT_LIFECYCLE = {
5632
5360
  }
5633
5361
  ]
5634
5362
  };
5635
- var VULNERABILITY_LIFECYCLE = {
5636
- entity_type: "vulnerability",
5637
- initial_phase: "open",
5638
- terminal_phases: ["resolved", "accepted"],
5639
- phases: [
5640
- {
5641
- id: "open",
5642
- label: "Open",
5643
- description: "The vulnerability has been identified. It has not yet been assessed for severity or assigned for remediation.",
5644
- transitions_to: ["triaged"]
5645
- },
5646
- {
5647
- id: "triaged",
5648
- label: "Triaged",
5649
- description: "The vulnerability has been assessed. CVSS score assigned. Priority and ownership determined.",
5650
- transitions_to: ["in_progress", "accepted"]
5651
- },
5652
- {
5653
- id: "in_progress",
5654
- label: "In Progress",
5655
- description: "Remediation work is actively underway. A fix is being developed or a compensating control is being implemented.",
5656
- transitions_to: ["mitigated", "resolved"]
5657
- },
5658
- {
5659
- id: "mitigated",
5660
- label: "Mitigated",
5661
- description: "A compensating control is in place. Immediate risk is reduced but the root vulnerability has not been patched.",
5662
- transitions_to: ["resolved", "accepted"]
5663
- },
5664
- {
5665
- id: "resolved",
5666
- label: "Resolved",
5667
- description: "The vulnerability has been fully remediated. The underlying issue is patched or eliminated.",
5668
- transitions_to: []
5669
- },
5670
- {
5671
- id: "accepted",
5672
- label: "Accepted",
5673
- description: "Formally acknowledged by the security team. Remediation is parked: low severity, compensating controls, or cost/benefit analysis.",
5674
- transitions_to: []
5675
- }
5676
- ]
5677
- };
5678
5363
  var SECURITY_CONTROL_LIFECYCLE = {
5679
5364
  entity_type: "security_control",
5680
5365
  initial_phase: "planned",
@@ -5706,49 +5391,6 @@ var SECURITY_CONTROL_LIFECYCLE = {
5706
5391
  }
5707
5392
  ]
5708
5393
  };
5709
- var A11Y_ISSUE_LIFECYCLE = {
5710
- entity_type: "a11y_issue",
5711
- initial_phase: "open",
5712
- terminal_phases: ["verified", "accepted"],
5713
- phases: [
5714
- {
5715
- id: "open",
5716
- label: "Open",
5717
- description: "The accessibility issue has been identified. It has not yet been triaged for severity or assigned for remediation.",
5718
- transitions_to: ["triaged"]
5719
- },
5720
- {
5721
- id: "triaged",
5722
- label: "Triaged",
5723
- description: "The issue has been assessed for severity and mapped to the affected WCAG criterion. Priority has been assigned.",
5724
- transitions_to: ["in_progress", "accepted"]
5725
- },
5726
- {
5727
- id: "in_progress",
5728
- label: "In Progress",
5729
- description: "A developer or designer is actively working to fix the accessibility issue.",
5730
- transitions_to: ["fixed"]
5731
- },
5732
- {
5733
- id: "fixed",
5734
- label: "Fixed",
5735
- description: "The fix has been implemented. Awaiting verification with assistive technology.",
5736
- transitions_to: ["verified", "in_progress"]
5737
- },
5738
- {
5739
- id: "verified",
5740
- label: "Verified",
5741
- description: "The fix has been confirmed to resolve the accessibility barrier using appropriate assistive technology.",
5742
- transitions_to: []
5743
- },
5744
- {
5745
- id: "accepted",
5746
- label: "Accepted",
5747
- description: "The team has formally acknowledged this issue and made a documented decision not to fix it at this time.",
5748
- transitions_to: []
5749
- }
5750
- ]
5751
- };
5752
5394
  var DATA_PIPELINE_LIFECYCLE = {
5753
5395
  entity_type: "data_pipeline",
5754
5396
  initial_phase: "building",
@@ -5823,37 +5465,6 @@ var AI_MODEL_LIFECYCLE = {
5823
5465
  }
5824
5466
  ]
5825
5467
  };
5826
- var EVAL_RUN_LIFECYCLE = {
5827
- entity_type: "eval_run",
5828
- initial_phase: "planned",
5829
- terminal_phases: ["complete", "failed"],
5830
- phases: [
5831
- {
5832
- id: "planned",
5833
- label: "Planned",
5834
- description: "The run has been queued. It has not yet started executing.",
5835
- transitions_to: ["running"]
5836
- },
5837
- {
5838
- id: "running",
5839
- label: "Running",
5840
- description: "Actively executing. Prompts are being sent and responses scored.",
5841
- transitions_to: ["complete", "failed"]
5842
- },
5843
- {
5844
- id: "complete",
5845
- label: "Complete",
5846
- description: "The run finished successfully. Scores and results are available.",
5847
- transitions_to: []
5848
- },
5849
- {
5850
- id: "failed",
5851
- label: "Failed",
5852
- description: "Failed to complete: API error, timeout, or infrastructure failure. Create a new run to retry.",
5853
- transitions_to: []
5854
- }
5855
- ]
5856
- };
5857
5468
  var WORKFLOW_RUN_LIFECYCLE = {
5858
5469
  entity_type: "workflow_run",
5859
5470
  initial_phase: "pending",
@@ -6090,29 +5701,6 @@ var TEST_PLAN_LIFECYCLE = {
6090
5701
  { id: "cancelled", label: "Cancelled", description: "Plan was abandoned mid-flight: assumption changed, priorities shifted, or the underlying code went away.", transitions_to: [] }
6091
5702
  ]
6092
5703
  };
6093
- var FEASIBILITY_STUDY_LIFECYCLE = {
6094
- entity_type: "feasibility_study",
6095
- initial_phase: "scoped",
6096
- terminal_phases: ["concluded", "abandoned"],
6097
- phases: [
6098
- { id: "scoped", label: "Scoped", description: "Study has been framed: questions, methods, and budget are agreed.", transitions_to: ["analysing", "abandoned"] },
6099
- { id: "analysing", label: "Analysing", description: "Active analysis. Data is being gathered and synthesised.", transitions_to: ["concluded", "abandoned"] },
6100
- { id: "concluded", label: "Concluded", description: "Study reached a conclusion. Findings inform a go/no-go decision.", transitions_to: [] },
6101
- { id: "abandoned", label: "Abandoned", description: "Study was stopped before reaching a conclusion. Captured for the record.", transitions_to: [] }
6102
- ]
6103
- };
6104
- var AI_EXPERIMENT_LIFECYCLE = {
6105
- entity_type: "ai_experiment",
6106
- initial_phase: "planned",
6107
- terminal_phases: ["completed", "abandoned"],
6108
- phases: [
6109
- { id: "planned", label: "Planned", description: "Experiment has been designed but is not yet running.", transitions_to: ["running", "abandoned"] },
6110
- { id: "running", label: "Running", description: "Experiment is actively executing: model is being trained, evaluated, or compared.", transitions_to: ["analysed", "abandoned"] },
6111
- { id: "analysed", label: "Analysed", description: "Run is finished and results are being reviewed.", transitions_to: ["completed", "abandoned"] },
6112
- { id: "completed", label: "Completed", description: "Findings captured. Linked learnings drive downstream decisions.", transitions_to: [] },
6113
- { id: "abandoned", label: "Abandoned", description: "Experiment was stopped before producing usable findings.", transitions_to: [] }
6114
- ]
6115
- };
6116
5704
  var AI_DATASET_LIFECYCLE = {
6117
5705
  entity_type: "ai_dataset",
6118
5706
  initial_phase: "collecting",
@@ -6135,17 +5723,6 @@ var AI_GUARDRAIL_LIFECYCLE = {
6135
5723
  { id: "removed", label: "Removed", description: "Guardrail is no longer enforced. May reopen to active if reinstated.", transitions_to: ["active"] }
6136
5724
  ]
6137
5725
  };
6138
- var HALLUCINATION_REPORT_LIFECYCLE = {
6139
- entity_type: "hallucination_report",
6140
- initial_phase: "reported",
6141
- terminal_phases: ["resolved", "accepted"],
6142
- phases: [
6143
- { id: "reported", label: "Reported", description: "A hallucination has been observed and logged. Not yet investigated.", transitions_to: ["investigating"] },
6144
- { id: "investigating", label: "Investigating", description: "Active investigation: root cause analysis, reproduction, scope.", transitions_to: ["resolved", "accepted"] },
6145
- { id: "resolved", label: "Resolved", description: "A fix has shipped. Future occurrences should not happen.", transitions_to: ["investigating"] },
6146
- { id: "accepted", label: "Accepted", description: "Known limitation that will not be fixed in this iteration. Documented for users.", transitions_to: ["investigating"] }
6147
- ]
6148
- };
6149
5726
  var MODEL_COMPARISON_LIFECYCLE = {
6150
5727
  entity_type: "model_comparison",
6151
5728
  initial_phase: "planned",
@@ -6191,17 +5768,6 @@ var BUSINESS_MODEL_LIFECYCLE = {
6191
5768
  { id: "pivoted", label: "Pivoted", description: "Model became something structurally different. Captured as a milestone before the new model takes over.", transitions_to: [] }
6192
5769
  ]
6193
5770
  };
6194
- var VALUE_PROPOSITION_LIFECYCLE = {
6195
- entity_type: "value_proposition",
6196
- initial_phase: "drafted",
6197
- terminal_phases: ["validated", "invalidated"],
6198
- phases: [
6199
- { id: "drafted", label: "Drafted", description: "Statement of value has been articulated. Not yet tested.", transitions_to: ["testing", "invalidated"] },
6200
- { id: "testing", label: "Testing", description: "Statement is being tested against the target audience.", transitions_to: ["validated", "invalidated"] },
6201
- { id: "validated", label: "Validated", description: "Audience response confirms the value resonates. Forms the messaging foundation.", transitions_to: ["testing"] },
6202
- { id: "invalidated", label: "Invalidated", description: "Statement did not resonate. May reopen to drafted for a rewrite.", transitions_to: ["drafted"] }
6203
- ]
6204
- };
6205
5771
  var REVENUE_STREAM_LIFECYCLE = {
6206
5772
  entity_type: "revenue_stream",
6207
5773
  initial_phase: "proposed",
@@ -6213,29 +5779,6 @@ var REVENUE_STREAM_LIFECYCLE = {
6213
5779
  { id: "sunset", label: "Sunset", description: "Stream is being wound down. May reopen to piloting if revived.", transitions_to: ["piloting"] }
6214
5780
  ]
6215
5781
  };
6216
- var SUPPORT_TICKET_LIFECYCLE = {
6217
- entity_type: "support_ticket",
6218
- initial_phase: "opened",
6219
- terminal_phases: ["resolved", "closed"],
6220
- phases: [
6221
- { id: "opened", label: "Opened", description: "Ticket has been filed. Not yet looked at.", transitions_to: ["triaged"] },
6222
- { id: "triaged", label: "Triaged", description: "Ticket has been categorised, prioritised, and assigned. Ready for work.", transitions_to: ["in_progress"] },
6223
- { id: "in_progress", label: "In Progress", description: "Support is actively working on the ticket.", transitions_to: ["resolved", "triaged"] },
6224
- { id: "resolved", label: "Resolved", description: "Support believes the issue is fixed. Awaiting customer confirmation.", transitions_to: ["in_progress", "closed"] },
6225
- { id: "closed", label: "Closed", description: "Customer has confirmed. Ticket is fully done.", transitions_to: [] }
6226
- ]
6227
- };
6228
- var CUSTOMER_FEEDBACK_LIFECYCLE = {
6229
- entity_type: "customer_feedback",
6230
- initial_phase: "received",
6231
- terminal_phases: ["actioned", "acknowledged"],
6232
- phases: [
6233
- { id: "received", label: "Received", description: "Feedback has been captured. Not yet processed.", transitions_to: ["triaged"] },
6234
- { id: "triaged", label: "Triaged", description: "Feedback has been categorised and routed. Decision on action is pending.", transitions_to: ["actioned", "acknowledged"] },
6235
- { id: "actioned", label: "Actioned", description: "Feedback drove a change (a feature, a process, a doc update). Captured for the record.", transitions_to: [] },
6236
- { id: "acknowledged", label: "Acknowledged", description: "Feedback was read and considered but will not drive a change. Customer has been thanked.", transitions_to: [] }
6237
- ]
6238
- };
6239
5782
  var CUSTOMER_HEALTH_SCORE_LIFECYCLE = {
6240
5783
  entity_type: "customer_health_score",
6241
5784
  initial_phase: "monitoring",
@@ -6439,6 +5982,43 @@ var SALES_DEAL_TEMPLATE = {
6439
5982
  { 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: [] }
6440
5983
  ]
6441
5984
  };
5985
+ var VALIDATION_TEMPLATE = {
5986
+ template_id: "VALIDATION",
5987
+ initial_phase: "untested",
5988
+ terminal_phases: ["validated", "invalidated", "archived"],
5989
+ phases: [
5990
+ { id: "untested", label: "Untested", description: "Articulated but not yet examined against evidence.", transitions_to: ["testing"] },
5991
+ { id: "testing", label: "Testing", description: "Actively gathering evidence for or against the claim.", transitions_to: ["validated", "invalidated"] },
5992
+ { id: "validated", label: "Validated", description: "Evidence supports the claim. Treated as true until contradicted.", transitions_to: ["archived"] },
5993
+ { id: "invalidated", label: "Invalidated", description: "Evidence contradicts the claim. May re-test if new evidence appears.", transitions_to: ["archived", "testing"] },
5994
+ { id: "archived", label: "Archived", description: "Settled and retained for provenance. No longer active.", transitions_to: [] }
5995
+ ]
5996
+ };
5997
+ var INCIDENT_TEMPLATE = {
5998
+ template_id: "INCIDENT",
5999
+ initial_phase: "open",
6000
+ terminal_phases: ["resolved", "closed", "wont_fix"],
6001
+ phases: [
6002
+ { id: "open", label: "Open", description: "Surfaced and logged. Not yet triaged.", transitions_to: ["triaged"] },
6003
+ { id: "triaged", label: "Triaged", description: "Assessed for severity and ownership. Routed for work or dispositioned.", transitions_to: ["in_progress", "resolved", "wont_fix"] },
6004
+ { id: "in_progress", label: "In Progress", description: "Actively being worked toward a fix.", transitions_to: ["resolved", "wont_fix"] },
6005
+ { id: "resolved", label: "Resolved", description: "Addressed and verified. May reopen to `triaged` on regression.", transitions_to: ["closed", "triaged"] },
6006
+ { id: "closed", label: "Closed", description: "Administratively closed (duplicate, withdrawn, or no longer relevant).", transitions_to: [] },
6007
+ { id: "wont_fix", label: "Won't Fix", description: "Triaged as not to be actioned. Reason should be documented.", transitions_to: [] }
6008
+ ]
6009
+ };
6010
+ var STUDY_TEMPLATE = {
6011
+ template_id: "STUDY",
6012
+ initial_phase: "planned",
6013
+ terminal_phases: ["complete", "abandoned"],
6014
+ phases: [
6015
+ { id: "planned", label: "Planned", description: "Scoped and scheduled. Not yet started.", transitions_to: ["running"] },
6016
+ { id: "running", label: "Running", description: "Actively executing: collecting data or running the protocol.", transitions_to: ["analysing", "abandoned"] },
6017
+ { id: "analysing", label: "Analysing", description: "Execution done; results are being analysed and written up.", transitions_to: ["complete", "abandoned"] },
6018
+ { id: "complete", label: "Complete", description: "Analysed and concluded. Findings captured.", transitions_to: [] },
6019
+ { id: "abandoned", label: "Abandoned", description: "Stopped before completion (killed, timed out, or superseded).", transitions_to: [] }
6020
+ ]
6021
+ };
6442
6022
  var TEMPLATE_LIFECYCLES = [
6443
6023
  // Publishing lifecycle
6444
6024
  fromTemplate("content_piece", PUBLISHING_TEMPLATE),
@@ -6538,10 +6118,11 @@ var TEMPLATE_LIFECYCLES = [
6538
6118
  fromTemplate("access_policy", APPROVAL_TEMPLATE),
6539
6119
  fromTemplate("privacy_policy", APPROVAL_TEMPLATE),
6540
6120
  // ── Phase C: MATURITY (alpha / beta / ga / deprecated) ──────────────────────
6121
+ // screen removed (UPG-690 Q3, 0.21.0): hand-authored SCREEN_LIFECYCLE below —
6122
+ // the build-pipeline IS the real lifecycle, MATURITY was the mis-fit.
6541
6123
  fromTemplate("design_system", MATURITY_TEMPLATE),
6542
6124
  fromTemplate("design_component", MATURITY_TEMPLATE),
6543
6125
  fromTemplate("design_pattern", MATURITY_TEMPLATE),
6544
- fromTemplate("screen", MATURITY_TEMPLATE),
6545
6126
  fromTemplate("brand_logo", MATURITY_TEMPLATE),
6546
6127
  fromTemplate("certification", MATURITY_TEMPLATE),
6547
6128
  fromTemplate("data_source", MATURITY_TEMPLATE),
@@ -6551,12 +6132,44 @@ var TEMPLATE_LIFECYCLES = [
6551
6132
  fromTemplate("agent_task", WORK_ITEM_TEMPLATE),
6552
6133
  fromTemplate("agent_skill", WORK_ITEM_TEMPLATE),
6553
6134
  fromTemplate("agent_hook", WORK_ITEM_TEMPLATE),
6135
+ // UPG-690 (0.21.0): task (exact match) + epic (todo→in_progress→done ⊆ WORK_ITEM,
6136
+ // in_review becomes available — non-breaking widening) folded off hand-authored.
6137
+ fromTemplate("task", WORK_ITEM_TEMPLATE),
6138
+ fromTemplate("epic", WORK_ITEM_TEMPLATE),
6554
6139
  // ── Phase B: RISK_ITEM (identified → assessed → mitigated/accepted/closed) ──
6555
6140
  fromTemplate("threat", RISK_ITEM_TEMPLATE),
6556
6141
  fromTemplate("risk", RISK_ITEM_TEMPLATE),
6557
6142
  fromTemplate("compliance_requirement", RISK_ITEM_TEMPLATE),
6558
6143
  // ── Phase B: SALES_DEAL (qualified → proposal → negotiation → won/lost) ─────
6559
- fromTemplate("deal", SALES_DEAL_TEMPLATE)
6144
+ fromTemplate("deal", SALES_DEAL_TEMPLATE),
6145
+ // ── STUDY (planned → running → analysing → complete / abandoned) ───────────
6146
+ // UPG-690 (0.21.0): time-boxed investigations folded off bespoke singletons.
6147
+ // `model_comparison` stays bespoke — its publish/archive tail is a weak fit.
6148
+ fromTemplate("experiment", STUDY_TEMPLATE),
6149
+ fromTemplate("experiment_run", STUDY_TEMPLATE),
6150
+ fromTemplate("research_study", STUDY_TEMPLATE),
6151
+ fromTemplate("design_sprint", STUDY_TEMPLATE),
6152
+ fromTemplate("feasibility_study", STUDY_TEMPLATE),
6153
+ fromTemplate("ai_experiment", STUDY_TEMPLATE),
6154
+ fromTemplate("eval_run", STUDY_TEMPLATE),
6155
+ // ── VALIDATION (untested → testing → validated / invalidated → archived) ───
6156
+ // UPG-690 (0.21.0): claims-tested-to-a-verdict folded off bespoke singletons.
6157
+ // `business_model` stays bespoke — its `pivoted` terminal is a strategic
6158
+ // outcome, not a verdict.
6159
+ fromTemplate("assumption", VALIDATION_TEMPLATE),
6160
+ fromTemplate("prototype", VALIDATION_TEMPLATE),
6161
+ fromTemplate("value_proposition", VALIDATION_TEMPLATE),
6162
+ fromTemplate("hypothesis", VALIDATION_TEMPLATE),
6163
+ // ── INCIDENT (open → triaged → in_progress → resolved / closed / wont_fix) ─
6164
+ // UPG-690 (0.21.0): triage-to-resolution defect/ticket family folded off
6165
+ // bespoke singletons. `incident` stays bespoke (richer SRE flow).
6166
+ fromTemplate("support_ticket", INCIDENT_TEMPLATE),
6167
+ fromTemplate("bug", INCIDENT_TEMPLATE),
6168
+ fromTemplate("a11y_issue", INCIDENT_TEMPLATE),
6169
+ fromTemplate("vulnerability", INCIDENT_TEMPLATE),
6170
+ fromTemplate("hallucination_report", INCIDENT_TEMPLATE),
6171
+ fromTemplate("technical_debt_item", INCIDENT_TEMPLATE),
6172
+ fromTemplate("customer_feedback", INCIDENT_TEMPLATE)
6560
6173
  ];
6561
6174
  var FRAMEWORK_EXERCISE_LIFECYCLE = {
6562
6175
  entity_type: "framework_exercise",
@@ -6630,21 +6243,15 @@ var UPG_LIFECYCLES = [
6630
6243
  // Foundations (0.9.12)
6631
6244
  SPECIFICATION_LIFECYCLE,
6632
6245
  // Discovery & Validation
6633
- RESEARCH_STUDY_LIFECYCLE,
6634
6246
  NEED_LIFECYCLE,
6635
6247
  OPPORTUNITY_LIFECYCLE,
6636
6248
  SOLUTION_LIFECYCLE,
6637
- HYPOTHESIS_CLAIM_LIFECYCLE,
6638
- // 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.
6639
- EXPERIMENT_LIFECYCLE,
6640
6249
  EXPERIMENT_PLAN_LIFECYCLE,
6641
- EXPERIMENT_RUN_LIFECYCLE,
6642
6250
  RESEARCH_PLAN_LIFECYCLE,
6643
6251
  FEEDBACK_PROGRAM_LIFECYCLE,
6644
6252
  FEATURE_REQUEST_LIFECYCLE,
6645
6253
  BETA_PROGRAM_LIFECYCLE,
6646
6254
  USER_ADVISORY_BOARD_LIFECYCLE,
6647
- DESIGN_SPRINT_LIFECYCLE,
6648
6255
  // Strategy & Product Specification
6649
6256
  OUTCOME_LIFECYCLE,
6650
6257
  VISION_LIFECYCLE,
@@ -6655,39 +6262,31 @@ var UPG_LIFECYCLES = [
6655
6262
  STRATEGIC_THEME_LIFECYCLE,
6656
6263
  INITIATIVE_LIFECYCLE,
6657
6264
  STRATEGIC_PILLAR_LIFECYCLE,
6658
- ASSUMPTION_LIFECYCLE,
6659
6265
  STRATEGIC_QUESTION_LIFECYCLE,
6660
6266
  FEATURE_AREA_LIFECYCLE,
6661
6267
  FEATURE_LIFECYCLE,
6662
- EPIC_LIFECYCLE,
6663
6268
  // user_story is lifecycle-free (declared in UPG_LIFECYCLE_FREE_TYPES below).
6664
- // story_task lifecycle removed v0.4.0; collapsed into task (TASK_LIFECYCLE,
6665
- // WORK_ITEM_TEMPLATE).
6269
+ // story_task lifecycle removed v0.4.0; collapsed into task. task + epic are
6270
+ // now WORK_ITEM-template-derived (UPG-690, 0.21.0) — see TEMPLATE_LIFECYCLES.
6666
6271
  RELEASE_LIFECYCLE,
6667
- TASK_LIFECYCLE,
6668
- BUG_LIFECYCLE,
6669
6272
  ROADMAP_ITEM_LIFECYCLE,
6670
6273
  PLANNING_CYCLE_LIFECYCLE,
6671
6274
  IP_ASSET_LIFECYCLE,
6672
6275
  CONTRACT_LIFECYCLE,
6673
6276
  DESIGN_CONCEPT_LIFECYCLE,
6674
- PROTOTYPE_LIFECYCLE,
6675
6277
  BRAND_IDENTITY_LIFECYCLE,
6278
+ SCREEN_LIFECYCLE,
6676
6279
  // Engineering & Operations
6677
6280
  SERVICE_LIFECYCLE,
6678
6281
  DEPLOYMENT_LIFECYCLE,
6679
6282
  FEATURE_FLAG_LIFECYCLE,
6680
- TECHNICAL_DEBT_ITEM_LIFECYCLE,
6681
6283
  INVESTIGATION_LIFECYCLE,
6682
6284
  EXTERNAL_API_LIFECYCLE,
6683
6285
  DATABASE_SCHEMA_LIFECYCLE,
6684
6286
  INCIDENT_LIFECYCLE,
6685
- VULNERABILITY_LIFECYCLE,
6686
6287
  SECURITY_CONTROL_LIFECYCLE,
6687
- A11Y_ISSUE_LIFECYCLE,
6688
6288
  DATA_PIPELINE_LIFECYCLE,
6689
6289
  AI_MODEL_LIFECYCLE,
6690
- EVAL_RUN_LIFECYCLE,
6691
6290
  WORKFLOW_RUN_LIFECYCLE,
6692
6291
  AGENT_DEFINITION_LIFECYCLE,
6693
6292
  AGENT_SESSION_LIFECYCLE,
@@ -6700,22 +6299,16 @@ var UPG_LIFECYCLES = [
6700
6299
  RESEARCH_QUESTION_LIFECYCLE,
6701
6300
  INTERVIEW_GUIDE_LIFECYCLE,
6702
6301
  TEST_PLAN_LIFECYCLE,
6703
- FEASIBILITY_STUDY_LIFECYCLE,
6704
6302
  // AI workflow
6705
- AI_EXPERIMENT_LIFECYCLE,
6706
6303
  AI_DATASET_LIFECYCLE,
6707
6304
  AI_GUARDRAIL_LIFECYCLE,
6708
- HALLUCINATION_REPORT_LIFECYCLE,
6709
6305
  MODEL_COMPARISON_LIFECYCLE,
6710
6306
  PROMPT_VERSION_LIFECYCLE,
6711
6307
  EVAL_BENCHMARK_LIFECYCLE,
6712
6308
  // Business Model
6713
6309
  BUSINESS_MODEL_LIFECYCLE,
6714
- VALUE_PROPOSITION_LIFECYCLE,
6715
6310
  REVENUE_STREAM_LIFECYCLE,
6716
6311
  // Customer Success
6717
- SUPPORT_TICKET_LIFECYCLE,
6718
- CUSTOMER_FEEDBACK_LIFECYCLE,
6719
6312
  CUSTOMER_HEALTH_SCORE_LIFECYCLE,
6720
6313
  PLAYBOOK_LIFECYCLE,
6721
6314
  // Team & Organisation
@@ -7829,6 +7422,64 @@ function getDeprecatedTypes() {
7829
7422
  return deprecated;
7830
7423
  }
7831
7424
  var UPG_PROPERTY_MIGRATIONS = {
7425
+ // ── v0.21.0: UPG-690 D.1 — collapse residual *_status shadows into status ────
7426
+ //
7427
+ // Six `*_status` enum properties that re-encode their entity's own lifecycle
7428
+ // phases (the residual Pattern-D shadows not caught by the 0.15.0 sweep, now
7429
+ // that the entities sit on shared templates). Each is removed; the authored
7430
+ // value LIFTS to UPGBaseNode.status, remapping where the property vocabulary
7431
+ // diverged from the (template) lifecycle. `security_policy.policy_status` was
7432
+ // deliberately EXCLUDED (Captain 2026-07-04): its active/under_review/retired
7433
+ // values are an operational-status axis distinct from its APPROVAL lifecycle
7434
+ // (active != approved) — a distinct-axis keeper, not a shadow.
7435
+ "0.21.0": [
7436
+ {
7437
+ kind: "lift_property_to_top_level",
7438
+ type: "brand_identity",
7439
+ from_property: "brand_stage",
7440
+ to: "status",
7441
+ 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."
7442
+ },
7443
+ {
7444
+ kind: "lift_property_to_top_level",
7445
+ type: "deliverable",
7446
+ from_property: "deliverable_status",
7447
+ to: "status",
7448
+ value_map: { not_started: "todo", accepted: "done", rejected: "done" },
7449
+ 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."
7450
+ },
7451
+ {
7452
+ kind: "lift_property_to_top_level",
7453
+ type: "press_release",
7454
+ from_property: "pr_status",
7455
+ to: "status",
7456
+ value_map: { in_review: "review", distributed: "published" },
7457
+ 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."
7458
+ },
7459
+ {
7460
+ kind: "lift_property_to_top_level",
7461
+ type: "program",
7462
+ from_property: "program_status",
7463
+ to: "status",
7464
+ value_map: { on_hold: "paused", cancelled: "sunset" },
7465
+ 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."
7466
+ },
7467
+ {
7468
+ kind: "lift_property_to_top_level",
7469
+ type: "project",
7470
+ from_property: "project_status",
7471
+ to: "status",
7472
+ value_map: { on_hold: "paused", cancelled: "sunset" },
7473
+ 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."
7474
+ },
7475
+ {
7476
+ kind: "lift_property_to_top_level",
7477
+ type: "screen",
7478
+ from_property: "screen_status",
7479
+ to: "status",
7480
+ 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."
7481
+ }
7482
+ ],
7832
7483
  // ── v0.16.0: Pattern G — open-standard data boundary (UPG-691) ───────────────
7833
7484
  //
7834
7485
  // The portable graph holds modeling knowledge, not PII, registry filings,
@@ -9427,6 +9078,25 @@ function getScalarToEdgeMigrations(fromVersion, toVersion) {
9427
9078
  return result;
9428
9079
  }
9429
9080
  var UPG_EDGE_MIGRATIONS = {
9081
+ // (target version TBD at release ceremony — pencilled at 0.22.0, the next
9082
+ // breaking slot after 0.21.0 per the docket; adjust the key if Wave 4
9083
+ // claims it first.) WS3 commit-provenance collapse (2026-07-05, ratified):
9084
+ // `workspace_produced_decision` widens to the `node` wildcard endpoint —
9085
+ // a workspace's commit loop can legitimately produce any entity type
9086
+ // arranged in it (decision, feature, persona, ...), not just decisions.
9087
+ // No flip (source stays workspace); the target node's concrete type is
9088
+ // unchanged (still a decision), only the edge key + catalog target_type
9089
+ // widen. See the enum-vs-polymorphism ADR and the WS3 proposal doc for
9090
+ // the full reasoning (mirrors decision_produces_node).
9091
+ "0.22.0": [
9092
+ // No requires_target_type: the destination's target_type is the `node`
9093
+ // wildcard, and the endpoint guard is checked against the catalog's
9094
+ // declared type (per the spec-integrity "endpoint guards match the
9095
+ // catalog entry" test), not the concrete instance type — a concrete
9096
+ // `decision` instance would never satisfy a literal 'node' guard at
9097
+ // runtime. Gate only on the unwidened source endpoint.
9098
+ { 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." }
9099
+ ],
9430
9100
  "0.9.9": [
9431
9101
  // (since v0.9.9, UPG-664/UPG-678) Validation experiment-model + test_plan
9432
9102
  // re-home. The validation chain is reshaped to the single-parent line
@@ -10253,19 +9923,7 @@ var UPG_STATUS_MIGRATIONS = {
10253
9923
  retired: "deprecated"
10254
9924
  },
10255
9925
  // ── Discovery & Validation ───────────────────────────────────────────────
10256
- hypothesis: {
10257
- // Lifecycle: [drafted, active, validated, invalidated, archived]
10258
- // Legacy pre-v0.2.8 vocabulary mapped via UPG_PROPERTY_MIGRATIONS for
10259
- // property→top-level lifts, but raw top-level legacy values surface
10260
- // when authors set `status: untested` directly without going through
10261
- // the property bag.
10262
- untested: "drafted",
10263
- testing: "active",
10264
- proposed: "drafted",
10265
- deferred: "archived",
10266
- resolved: "active"
10267
- // ambiguous: prefer active until evidence settles
10268
- },
9926
+ // (hypothesis moved to the VALIDATION template fold section below, 0.21.0)
10269
9927
  opportunity: {
10270
9928
  // Lifecycle: [identified, validated, deferred] (no terminal phases)
10271
9929
  // Common authoring leftovers from pre-canonical Lean Canvas
@@ -10317,7 +9975,118 @@ var UPG_STATUS_MIGRATIONS = {
10317
9975
  archived: "sunset",
10318
9976
  retired: "sunset"
10319
9977
  },
10320
- // ── DevOps: incident ─────────────────────────────────────────────────────
9978
+ // ── VALIDATION template fold (UPG-690, 0.21.0) ───────────────────────────
9979
+ // Bespoke claim vocabularies remapped onto VALIDATION
9980
+ // [untested, testing, validated, invalidated, archived].
9981
+ // `assumption` already matches (untested, testing, validated, invalidated) —
9982
+ // no migration entry needed.
9983
+ prototype: {
9984
+ // was [untested, testing, passed, failed]
9985
+ passed: "validated",
9986
+ failed: "invalidated"
9987
+ },
9988
+ value_proposition: {
9989
+ // was [drafted, testing, validated, invalidated]
9990
+ drafted: "untested"
9991
+ },
9992
+ hypothesis: {
9993
+ // was [drafted, active, validated, invalidated, archived] (HYPOTHESIS_CLAIM
9994
+ // const, re-homed to entity_type 'hypothesis' at v0.4.0). The legacy
9995
+ // pre-v0.2.8 [untested, testing, resolved] mapping already lived here; it is
9996
+ // now consistent with the VALIDATION spine.
9997
+ drafted: "untested",
9998
+ active: "testing",
9999
+ // pre-v0.2.8 legacy values (kept from the prior hypothesis migration):
10000
+ proposed: "untested",
10001
+ deferred: "archived",
10002
+ resolved: "validated"
10003
+ // ambiguous historically; prefer validated on resolve
10004
+ },
10005
+ // ── STUDY template fold (UPG-690, 0.21.0) ────────────────────────────────
10006
+ // Bespoke run/study vocabularies remapped onto STUDY
10007
+ // [planned, running, analysing, complete, abandoned].
10008
+ experiment: {
10009
+ // was [planned, running, analysing, done]
10010
+ done: "complete"
10011
+ },
10012
+ experiment_run: {
10013
+ // was [in_progress, complete, aborted]
10014
+ in_progress: "running",
10015
+ aborted: "abandoned"
10016
+ },
10017
+ research_study: {
10018
+ // was [planned, in_progress, analysing, complete]
10019
+ in_progress: "running"
10020
+ },
10021
+ design_sprint: {
10022
+ // was [planning, in_progress, completed]
10023
+ planning: "planned",
10024
+ in_progress: "running",
10025
+ completed: "complete"
10026
+ },
10027
+ feasibility_study: {
10028
+ // was [scoped, analysing, concluded, abandoned]
10029
+ scoped: "planned",
10030
+ concluded: "complete"
10031
+ },
10032
+ ai_experiment: {
10033
+ // was [planned, running, analysed, completed, abandoned]
10034
+ analysed: "analysing",
10035
+ completed: "complete"
10036
+ },
10037
+ eval_run: {
10038
+ // was [planned, running, complete, failed]. `failed` = the run did not
10039
+ // finish cleanly (errored / killed) → abandoned. A completed run whose
10040
+ // result was negative stays `complete` (the verdict lives elsewhere).
10041
+ failed: "abandoned"
10042
+ },
10043
+ // ── INCIDENT template fold (UPG-690, 0.21.0) ─────────────────────────────
10044
+ // Bespoke triage vocabularies remapped onto INCIDENT
10045
+ // [open, triaged, in_progress, resolved, closed, wont_fix]. `incident` itself
10046
+ // is NOT folded (stays bespoke; see the DevOps entry below).
10047
+ support_ticket: {
10048
+ // was [opened, triaged, in_progress, resolved, closed]
10049
+ opened: "open"
10050
+ },
10051
+ bug: {
10052
+ // was [open, in_progress, fixed, verified, wont_fix]
10053
+ fixed: "in_progress",
10054
+ // fixed-but-not-verified is still work in progress
10055
+ verified: "resolved"
10056
+ },
10057
+ a11y_issue: {
10058
+ // was [open, triaged, in_progress, fixed, verified, accepted]
10059
+ fixed: "in_progress",
10060
+ verified: "resolved",
10061
+ accepted: "resolved"
10062
+ // verified-and-accepted == resolved
10063
+ },
10064
+ vulnerability: {
10065
+ // was [open, triaged, in_progress, mitigated, resolved, accepted]
10066
+ mitigated: "in_progress",
10067
+ // mitigation applied, not yet fully resolved
10068
+ accepted: "resolved"
10069
+ },
10070
+ hallucination_report: {
10071
+ // was [reported, investigating, resolved, accepted]
10072
+ reported: "open",
10073
+ investigating: "in_progress",
10074
+ accepted: "resolved"
10075
+ },
10076
+ technical_debt_item: {
10077
+ // was [identified, acknowledged, in_progress, resolved, accepted]
10078
+ identified: "open",
10079
+ acknowledged: "triaged",
10080
+ accepted: "resolved"
10081
+ },
10082
+ customer_feedback: {
10083
+ // was [received, triaged, actioned, acknowledged]
10084
+ received: "open",
10085
+ actioned: "resolved",
10086
+ acknowledged: "closed"
10087
+ // noted with no action == administratively closed
10088
+ },
10089
+ // ── DevOps: incident (stays bespoke — richer SRE flow, not folded) ────────
10321
10090
  incident: {
10322
10091
  // Lifecycle: [detected, triaged, contained, resolved, mitigated]
10323
10092
  open: "detected",
@@ -10326,6 +10095,16 @@ var UPG_STATUS_MIGRATIONS = {
10326
10095
  in_progress: "triaged",
10327
10096
  closed: "resolved",
10328
10097
  fixed: "resolved"
10098
+ },
10099
+ // ── UX/Design: screen (UPG-690 Q3/D.3, 0.21.0) — MATURITY → build-pipeline
10100
+ // flip. Old lifecycle [alpha, beta, ga, deprecated]; new SCREEN_LIFECYCLE
10101
+ // [draft, in_design, built, shipped, deprecated]. `deprecated` IS canonical
10102
+ // in both (no rewrite needed); omitted per the no-identity-entries doctrine
10103
+ // (see status-migrations.test.ts).
10104
+ screen: {
10105
+ alpha: "built",
10106
+ beta: "shipped",
10107
+ ga: "shipped"
10329
10108
  }
10330
10109
  };
10331
10110
  function migrateStatusValue(entityType, currentStatus) {
@@ -10785,7 +10564,6 @@ var UPG_PROPERTY_SCHEMA = {
10785
10564
  personality_traits: { type: "string[]", description: 'Core personality traits of the brand (e.g. "bold", "approachable", "innovative")' },
10786
10565
  tagline: { type: "string", description: 'Brand tagline or slogan (e.g. "Just Do It", "Think Different")' },
10787
10566
  mission_statement: { type: "string", description: "Mission statement: what the brand exists to do." },
10788
- brand_stage: { type: "string", enum: ["exploratory", "defined", "mature"], description: "Current lifecycle stage of the brand" },
10789
10567
  brand_values: { type: "string[]", description: 'Core brand values. The principles the brand stands for. @example ["innovation", "transparency", "sustainability"]' },
10790
10568
  brand_story: { type: "string", description: "Brand origin story or narrative. Free-form text, may be multiple paragraphs." },
10791
10569
  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."' },
@@ -11306,7 +11084,6 @@ var UPG_PROPERTY_SCHEMA = {
11306
11084
  deliverable: {
11307
11085
  deliverable_type: { type: "string", enum: ["document", "prototype", "release", "design", "report", "other"], description: "Kind of deliverable (UPG-579 Option B)." },
11308
11086
  due_date: { type: "string", description: "Due date for the deliverable (ISO format)" },
11309
- deliverable_status: { type: "string", enum: ["not_started", "in_progress", "in_review", "accepted", "rejected"], description: "Current progress status" },
11310
11087
  acceptance_criteria: { type: "string", description: "Criteria that must be met for the deliverable to be accepted" }
11311
11088
  },
11312
11089
  // DemandGenProgramProperties: DemandGenProgram entity.
@@ -12647,8 +12424,7 @@ var UPG_PROPERTY_SCHEMA = {
12647
12424
  press_release: {
12648
12425
  pr_type: { type: "string", enum: ["product_launch", "partnership", "funding", "milestone", "other"], description: "Category of the press release" },
12649
12426
  publish_date: { type: "string", description: "Date the release was or will be published (ISO format)" },
12650
- outlets: { type: "string[]", description: "Media outlets targeted for distribution" },
12651
- pr_status: { type: "string", enum: ["draft", "in_review", "distributed", "published"], description: "Current status of the press release" }
12427
+ outlets: { type: "string[]", description: "Media outlets targeted for distribution" }
12652
12428
  },
12653
12429
  // PricingStrategyProperties: Pricing strategy.
12654
12430
  pricing_strategy: {
@@ -12693,14 +12469,12 @@ var UPG_PROPERTY_SCHEMA = {
12693
12469
  },
12694
12470
  // ProgramProperties: Program.
12695
12471
  program: {
12696
- program_status: { type: "string", enum: ["planning", "active", "on_hold", "completed", "cancelled"], description: "Current status of the program" },
12697
12472
  start_date: { type: "string", description: "Program start date (ISO format)" },
12698
12473
  end_date: { type: "string", description: "Program end date (ISO format)" },
12699
12474
  budget: { type: "number", description: "Total budget allocated to the program" }
12700
12475
  },
12701
12476
  // ProjectProperties: Project.
12702
12477
  project: {
12703
- project_status: { type: "string", enum: ["planning", "active", "on_hold", "completed", "cancelled"], description: "Current status of the project" },
12704
12478
  start_date: { type: "string", description: "Project start date (ISO format)" },
12705
12479
  end_date: { type: "string", description: "Project end date (ISO format)" },
12706
12480
  methodology: { type: "string", enum: ["agile", "waterfall", "kanban", "hybrid"], description: "Development methodology used" }
@@ -12970,7 +12744,6 @@ var UPG_PROPERTY_SCHEMA = {
12970
12744
  route: { type: "string", description: 'Application route. @example "/dashboard", "/settings/billing"' },
12971
12745
  viewport: { type: "string", enum: ["mobile", "tablet", "desktop", "tv", "watch", "responsive"], description: "Primary target viewport" },
12972
12746
  access_level: { type: "string", enum: ["public", "authenticated", "admin", "internal"], description: "Reach" },
12973
- screen_status: { type: "string", enum: ["draft", "in_design", "built", "shipped", "deprecated"], description: "Build pipeline stage" },
12974
12747
  purpose: { type: "string", description: "One-line purpose" }
12975
12748
  },
12976
12749
  // ScreenStateProperties: Specific state of a screen.
@@ -30174,7 +29947,7 @@ function isCanonical(text) {
30174
29947
  }
30175
29948
 
30176
29949
  // src/index.ts
30177
- var UPG_VERSION = "0.20.2";
29950
+ var UPG_VERSION = "0.22.0";
30178
29951
  var UPG_FORMAT_VERSION = "0.4.0";
30179
29952
  var MARKDOWN_FORMAT_VERSION = "0.1";
30180
29953
  var UPG_TYPES = getTypes();