@unified-product-graph/core 0.26.1 → 0.28.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/CHANGELOG.md +16 -0
- package/README.md +1 -1
- package/dist/index.cjs +403 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +423 -8
- package/dist/index.d.ts +423 -8
- package/dist/index.js +401 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -74,8 +74,8 @@ var UPG_DOMAINS = [
|
|
|
74
74
|
{
|
|
75
75
|
id: "ux_design",
|
|
76
76
|
label: "Experience Design",
|
|
77
|
-
description: "How users experience and interact with your product. User journeys map end-to-end experiences, broken into journey steps. User flows chart navigation paths. Screens and screen states define what users see. Design questions frame open problems. Design concepts explore possible solutions. Prototypes and wireframes make ideas tangible. Connects User (who) to Product Specification (what) through Design System (how).",
|
|
78
|
-
types: ["user_journey", "journey_step", "journey_phase", "journey_action", "user_flow", "screen", "screen_state", "design_question", "design_concept", "prototype", "wireframe"]
|
|
77
|
+
description: "How users experience and interact with your product. User journeys map end-to-end experiences, broken into journey steps. User flows chart navigation paths. Screens and screen states define what users see. Surfaces name the places inside a screen, who may occupy them, and the rule that settles contention. Design questions frame open problems. Design concepts explore possible solutions. Prototypes and wireframes make ideas tangible. Connects User (who) to Product Specification (what) through Design System (how).",
|
|
78
|
+
types: ["user_journey", "journey_step", "journey_phase", "journey_action", "user_flow", "screen", "screen_state", "surface", "design_question", "design_concept", "prototype", "wireframe"]
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
81
|
id: "design_system",
|
|
@@ -641,6 +641,11 @@ var UPG_ENTITY_META = [
|
|
|
641
641
|
{ name: "user_flow", type_id: "ent_068", maturity: "stable", since: "0.1.0" },
|
|
642
642
|
{ name: "screen", type_id: "ent_069", maturity: "stable", since: "0.1.0" },
|
|
643
643
|
{ name: "screen_state", type_id: "ent_070", maturity: "stable", since: "0.1.0" },
|
|
644
|
+
// surface (0.27.0): the place inside a screen. `screen` is route-level
|
|
645
|
+
// (route / viewport / access_level); `surface` is the contested slot within
|
|
646
|
+
// it, carrying its occupants and the rule that arbitrates between them.
|
|
647
|
+
// Enters `proposed` per the maturity rubric (precedent: planning_cycle 0.20.0).
|
|
648
|
+
{ name: "surface", type_id: "ent_359", maturity: "proposed", since: "0.27.0" },
|
|
644
649
|
{ name: "journey_phase", type_id: "ent_330", maturity: "proposed", since: "0.2.0" },
|
|
645
650
|
{ name: "journey_action", type_id: "ent_331", maturity: "proposed", since: "0.2.0" },
|
|
646
651
|
{ name: "design_decision", type_id: "ent_319", maturity: "deprecated", since: "0.2.0", deprecated_in: "0.2.0", replacement: "decision" },
|
|
@@ -1533,6 +1538,87 @@ var UPG_EDGE_CATALOG = {
|
|
|
1533
1538
|
// edge mirrors `journey_step_realised_by_feature` one level deeper.
|
|
1534
1539
|
journey_action_surfaces_need: { forward_verb: "surfaces", reverse_verb: "surfaced_in", classification: "cross-domain", source_type: "journey_action", target_type: "need" },
|
|
1535
1540
|
journey_action_realised_by_feature: { forward_verb: "realised_by", reverse_verb: "realises", classification: "cross-domain", source_type: "journey_action", target_type: "feature" },
|
|
1541
|
+
// ── surface (0.27.0): the place inside a screen ─────────────────────────
|
|
1542
|
+
// `screen` is route-level; `surface` is the contested place within it. The
|
|
1543
|
+
// eleven edges below give a surface its spine (nesting), its guest list, its
|
|
1544
|
+
// purpose, its governing rule, its rendering vocabulary, its measurement,
|
|
1545
|
+
// its replacement path, and (0.28.0) the gap between what it intends and
|
|
1546
|
+
// what it actually does.
|
|
1547
|
+
//
|
|
1548
|
+
// Classification adjudications, each anchored on the nearest precedent:
|
|
1549
|
+
// contains → hierarchy (feature_area_contains_feature_area, planning_cycle_contains_planning_cycle)
|
|
1550
|
+
// serves job → cross-domain (ux_design → users_needs; cf. user_journey_addresses_job).
|
|
1551
|
+
// Verb is `serves`, not `addresses`: a feature ADDRESSES a job
|
|
1552
|
+
// (it satisfies the struggle); a surface SERVES it (it is the
|
|
1553
|
+
// place where the job gets done). `serves`/`served_by` is an
|
|
1554
|
+
// established house pair (service_serves_api_endpoint,
|
|
1555
|
+
// api_endpoint_serves_feature, product_serves_account).
|
|
1556
|
+
// governed_by → cross-domain (ux_design → design_system). The verb precedent
|
|
1557
|
+
// design_component_governed_by_design_guideline is `hierarchy`,
|
|
1558
|
+
// but both of its endpoints sit inside design_system; once the
|
|
1559
|
+
// seam is crossed the catalog uses cross-domain
|
|
1560
|
+
// (insight_informs_design_guideline). cross_product_eligible:
|
|
1561
|
+
// the guideline usually lives in the shared design-system graph.
|
|
1562
|
+
// renders comp. → hierarchy + cross_product_eligible, matching its direct
|
|
1563
|
+
// sibling screen_renders_design_component verbatim.
|
|
1564
|
+
// measured_by → semantic + cross_product_eligible. The enumerated
|
|
1565
|
+
// *_measured_by_metric convention splits on OWNERSHIP, not on the
|
|
1566
|
+
// verb: outcome / objective / strategic_pillar are `hierarchy`
|
|
1567
|
+
// because those entities own their metrics as children (each has a
|
|
1568
|
+
// UPG_VALID_CHILDREN entry to match, which the hierarchy-integrity
|
|
1569
|
+
// guardrail enforces). A surface does not own a metric any more
|
|
1570
|
+
// than a revenue_stream does, so it takes the `semantic` half of
|
|
1571
|
+
// the convention (revenue_stream / cost_structure). It stays
|
|
1572
|
+
// cross_product_eligible with the rest: a metric DEFINITION is
|
|
1573
|
+
// portfolio_shared, so the reading it names commonly lives in the
|
|
1574
|
+
// registry rather than in the product graph.
|
|
1575
|
+
// supersedes → semantic (prompt_version_supersedes_prompt_version).
|
|
1576
|
+
surface_contains_surface: { forward_verb: "contains", reverse_verb: "belongs_to", classification: "hierarchy", source_type: "surface", target_type: "surface" },
|
|
1577
|
+
surface_serves_job: { forward_verb: "serves", reverse_verb: "served_by", classification: "cross-domain", source_type: "surface", target_type: "job" },
|
|
1578
|
+
surface_governed_by_design_guideline: { forward_verb: "governed_by", reverse_verb: "governs", classification: "cross-domain", source_type: "surface", target_type: "design_guideline", cross_product_eligible: true },
|
|
1579
|
+
surface_renders_design_component: { forward_verb: "renders", reverse_verb: "rendered_on", classification: "hierarchy", source_type: "surface", target_type: "design_component", cross_product_eligible: true },
|
|
1580
|
+
surface_measured_by_metric: { forward_verb: "measured_by", reverse_verb: "measures", classification: "semantic", source_type: "surface", target_type: "metric", cross_product_eligible: true },
|
|
1581
|
+
surface_supersedes_surface: { forward_verb: "supersedes", reverse_verb: "superseded_by", classification: "semantic", source_type: "surface", target_type: "surface" },
|
|
1582
|
+
// ── surface, 0.28.0 addition: intent versus reality ─────────────────────────
|
|
1583
|
+
// Every surface property records what the design INTENDS. `capacity: 1` on a
|
|
1584
|
+
// banner region is an assertion, and a real product will eventually be found
|
|
1585
|
+
// rendering four. Without somewhere to put that fact, the only ways to record
|
|
1586
|
+
// it are to edit `capacity` up to 4 (which destroys the intent, and with it
|
|
1587
|
+
// any evidence that a gap exists) or to leave the graph quietly wrong.
|
|
1588
|
+
//
|
|
1589
|
+
// This edge is the third option, and it is what lets `capacity` mean intent
|
|
1590
|
+
// unconditionally: the deviation hangs off a `technical_debt_item`, which is
|
|
1591
|
+
// already a trackable, assignable, prioritisable entity with an owner and a
|
|
1592
|
+
// remediation cost. The gap becomes work rather than a discrepancy.
|
|
1593
|
+
//
|
|
1594
|
+
// classification → cross-domain (ux_design → technical_debt). Crossing INTO
|
|
1595
|
+
// the debt domain from another ring is the established shape:
|
|
1596
|
+
// risk_manifests_as_technical_debt_item is cross-domain on exactly that
|
|
1597
|
+
// reasoning. NOT `causal`: `decision_incurs_technical_debt_item` is causal
|
|
1598
|
+
// because a decision BRINGS the debt into existence, whereas a surface
|
|
1599
|
+
// does not cause its own drift, it exhibits it. NOT `hierarchy`: that
|
|
1600
|
+
// would oblige a surface → technical_debt_item containment pair in
|
|
1601
|
+
// UPG_VALID_CHILDREN (guardrail G2b), and a surface does not own the debt
|
|
1602
|
+
// that afflicts it — service_carries_technical_debt_item can be hierarchy
|
|
1603
|
+
// because a service genuinely owns its backlog.
|
|
1604
|
+
// verbs → `deviates_via` / `causes_deviation_in`. The forward verb names
|
|
1605
|
+
// what the SOURCE does (the surface deviates), qualified by the debt that
|
|
1606
|
+
// accounts for it, so the edge key reads as the sentence it asserts. The
|
|
1607
|
+
// reverse says what the debt does to the place.
|
|
1608
|
+
// not cross_product_eligible → a deviation is a fact about one product's
|
|
1609
|
+
// code, and `surface` is not portfolio_shared in the first place.
|
|
1610
|
+
surface_deviates_via_technical_debt_item: { forward_verb: "deviates_via", reverse_verb: "causes_deviation_in", classification: "cross-domain", source_type: "surface", target_type: "technical_debt_item" },
|
|
1611
|
+
// Inbound. `feature_occupies_surface` is the guest list: the edge that makes
|
|
1612
|
+
// "what else lives here?" answerable, and the one the contention anti-pattern
|
|
1613
|
+
// counts. cross-domain (product_spec → ux_design), like screen_surfaces_feature
|
|
1614
|
+
// running the other way.
|
|
1615
|
+
feature_occupies_surface: { forward_verb: "occupies", reverse_verb: "occupied_by", classification: "cross-domain", source_type: "feature", target_type: "surface" },
|
|
1616
|
+
screen_renders_surface: { forward_verb: "renders", reverse_verb: "rendered_by", classification: "hierarchy", source_type: "screen", target_type: "surface" },
|
|
1617
|
+
decision_affects_surface: { forward_verb: "affects", reverse_verb: "affected_by", classification: "cross-domain", source_type: "decision", target_type: "surface" },
|
|
1618
|
+
// The finer-grained sibling of journey_step_shown_on_screen: a step happens on
|
|
1619
|
+
// a PLACE, not just a route. Same semantic classification as that edge (a step
|
|
1620
|
+
// is not contained by the surface; it references where it happens).
|
|
1621
|
+
journey_step_occurs_on_surface: { forward_verb: "occurs_on", reverse_verb: "hosts", classification: "semantic", source_type: "journey_step", target_type: "surface" },
|
|
1536
1622
|
// 2.5 UI System Domain
|
|
1537
1623
|
product_systematised_in_design_system: { forward_verb: "systematised_in", reverse_verb: "systematises", classification: "hierarchy", source_type: "product", target_type: "design_system" },
|
|
1538
1624
|
product_built_with_design_component: { forward_verb: "built_with", reverse_verb: "built_for", classification: "hierarchy", source_type: "product", target_type: "design_component" },
|
|
@@ -4054,8 +4140,24 @@ var UPG_VALID_CHILDREN = {
|
|
|
4054
4140
|
"user_flow",
|
|
4055
4141
|
"insight"
|
|
4056
4142
|
],
|
|
4057
|
-
screen: ["screen_state", "screen", "design_component", "wireframe"],
|
|
4058
|
-
// self-nesting + components + wireframes
|
|
4143
|
+
screen: ["screen_state", "screen", "surface", "design_component", "wireframe"],
|
|
4144
|
+
// self-nesting + surfaces + components + wireframes
|
|
4145
|
+
// surface (0.27.0): the place inside a screen. Self-nests, so a shell holds
|
|
4146
|
+
// panes, a pane holds regions, a region holds slots. A surface is reached
|
|
4147
|
+
// through the screen that renders it (`screen: [... 'surface']`), never as a
|
|
4148
|
+
// top-level product child: every UPG_VALID_CHILDREN pair must be backed by a
|
|
4149
|
+
// hierarchy-classified edge (guardrail G2b), and the ratified ten do not
|
|
4150
|
+
// include a product-to-surface verb. An app-shell surface therefore hangs off
|
|
4151
|
+
// the screen that mounts it.
|
|
4152
|
+
//
|
|
4153
|
+
// NOTE: `surface_kind` narrows this further than UPG_VALID_CHILDREN can
|
|
4154
|
+
// express. UPG_VALID_CHILDREN is keyed on entity TYPE, so it can only say
|
|
4155
|
+
// "a surface may contain a surface"; the kind ordering (shell > tool > pane >
|
|
4156
|
+
// region > slot / gutter / action_bar, with overlay and ambient parented by
|
|
4157
|
+
// whatever raises them) is a property-level rule documented on `SurfaceKind`
|
|
4158
|
+
// and enforced by validators, not by this table. Precedent: the same split
|
|
4159
|
+
// applies to `planning_cycle`, whose `cadence_kind` narrows its self-nesting.
|
|
4160
|
+
surface: ["surface", "design_component"],
|
|
4059
4161
|
// ── Marketing & Communications hierarchy ────────────────────────────────────
|
|
4060
4162
|
marketing_strategy: [
|
|
4061
4163
|
"marketing_channel",
|
|
@@ -5127,6 +5229,48 @@ var SCREEN_LIFECYCLE = {
|
|
|
5127
5229
|
}
|
|
5128
5230
|
]
|
|
5129
5231
|
};
|
|
5232
|
+
var SURFACE_LIFECYCLE = {
|
|
5233
|
+
entity_type: "surface",
|
|
5234
|
+
initial_phase: "draft",
|
|
5235
|
+
terminal_phases: ["deprecated"],
|
|
5236
|
+
phases: [
|
|
5237
|
+
{
|
|
5238
|
+
id: "draft",
|
|
5239
|
+
status_category: "started",
|
|
5240
|
+
label: "Draft",
|
|
5241
|
+
description: "The surface is a rough idea: named and scoped, but not yet worked in a design tool. Its occupants and arbitration rule are usually still undecided.",
|
|
5242
|
+
transitions_to: ["in_design"]
|
|
5243
|
+
},
|
|
5244
|
+
{
|
|
5245
|
+
id: "in_design",
|
|
5246
|
+
status_category: "started",
|
|
5247
|
+
label: "In Design",
|
|
5248
|
+
description: "The surface is being designed: its dimensions, occupants, and arbitration rule are being settled. May fall back to `draft` if the approach is rethought from scratch.",
|
|
5249
|
+
transitions_to: ["built", "draft"]
|
|
5250
|
+
},
|
|
5251
|
+
{
|
|
5252
|
+
id: "built",
|
|
5253
|
+
status_category: "started",
|
|
5254
|
+
label: "Built",
|
|
5255
|
+
description: "The surface 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 layout or contention gap.",
|
|
5256
|
+
transitions_to: ["shipped", "in_design"]
|
|
5257
|
+
},
|
|
5258
|
+
{
|
|
5259
|
+
id: "shipped",
|
|
5260
|
+
status_category: "completed",
|
|
5261
|
+
label: "Shipped",
|
|
5262
|
+
description: "The surface is live in production and reachable by users. Its occupants are the real guest list.",
|
|
5263
|
+
transitions_to: ["deprecated"]
|
|
5264
|
+
},
|
|
5265
|
+
{
|
|
5266
|
+
id: "deprecated",
|
|
5267
|
+
status_category: "completed",
|
|
5268
|
+
label: "Deprecated",
|
|
5269
|
+
description: "The surface has been retired. Its occupants have moved elsewhere, or a replacement has taken the place; record the replacement with `surface_supersedes_surface`.",
|
|
5270
|
+
transitions_to: []
|
|
5271
|
+
}
|
|
5272
|
+
]
|
|
5273
|
+
};
|
|
5130
5274
|
var SERVICE_LIFECYCLE = {
|
|
5131
5275
|
entity_type: "service",
|
|
5132
5276
|
initial_phase: "development",
|
|
@@ -6328,6 +6472,7 @@ var UPG_LIFECYCLES = [
|
|
|
6328
6472
|
DESIGN_CONCEPT_LIFECYCLE,
|
|
6329
6473
|
BRAND_IDENTITY_LIFECYCLE,
|
|
6330
6474
|
SCREEN_LIFECYCLE,
|
|
6475
|
+
SURFACE_LIFECYCLE,
|
|
6331
6476
|
// Engineering & Operations
|
|
6332
6477
|
SERVICE_LIFECYCLE,
|
|
6333
6478
|
DEPLOYMENT_LIFECYCLE,
|
|
@@ -13057,6 +13202,21 @@ var UPG_PROPERTY_SCHEMA = {
|
|
|
13057
13202
|
signal_channel: { type: "string", description: "Channel through which the signal was received" },
|
|
13058
13203
|
signal_urgency: { type: "string", enum: ["low", "medium", "high", "critical"], description: "Perceived urgency of the customer's request" }
|
|
13059
13204
|
},
|
|
13205
|
+
// SurfaceProperties: A place in the UI, its occupants, and the rule that arbitrates between them.
|
|
13206
|
+
surface: {
|
|
13207
|
+
surface_kind: { type: "string", enum: ["shell", "tool", "pane", "region", "slot", "gutter", "action_bar", "overlay", "ambient"], description: "Structural kind. Determines what may legally nest inside this surface." },
|
|
13208
|
+
persistence: { type: "string", enum: ["always", "conditional", "on_demand", "transient"], description: "How reliably the surface is present." },
|
|
13209
|
+
visibility_condition: { type: "string", description: 'When the surface appears, in plain language. Pairs with `persistence: \'conditional\'`, which states *that* it is conditional; this states *what* the condition is. @example "A node is selected", "Only for workspace admins"' },
|
|
13210
|
+
capacity: { type: "number", description: 'How many occupants ONE INSTANCE of the surface holds at once, as a non-negative count. Count the instances themselves with `cardinality`. CAPACITY IS ALWAYS INTENT, NEVER OBSERVED BEHAVIOUR. It records the cap the design asserts, so a banner region declared `capacity: 1` keeps saying 1 even after someone finds it rendering four. Reality that has drifted from the declared intent is recorded as a trackable, assignable debt item on `surface_deviates_via_technical_debt_item`, not by quietly editing this number up to match the bug. Editing it to match would destroy the only record that a gap exists. ABSENT MEANS UNBOUNDED. UPG has no union-typed property primitive (`PropertyDefinition.type` is a single scalar kind), so the proposed `integer | unbounded` shape is expressed as an optional number whose absence carries the "no cap" reading, rather than a magic sentinel value that every consumer would have to special-case. `0` is a real cap meaning "nothing may occupy this surface" (a reserved place), not "unbounded".' },
|
|
13211
|
+
cardinality: { type: "string", enum: ["1", "0..1", "1..n", "0..n"], description: "How many instances of this surface exist. `capacity` counts occupants within one instance; this counts the instances." },
|
|
13212
|
+
instance_scope: { type: "string", enum: ["global", "per_parent"], description: 'What an instance is scoped to: one shared instance for the product, or one per containing surface. Decides whether "the product has this surface" is a true sentence or a per-parent one.' },
|
|
13213
|
+
composition_mode: { type: "string", enum: ["exclusive", "additive", "chained"], description: "How the occupants relate: one wins (`exclusive`), all coexist (`additive`), or each wraps the next (`chained`). Declaring `chained` exempts the surface from `contended-surface-without-arbitration`; leaving this unset does not." },
|
|
13214
|
+
arbitration_rule: { type: "string", description: 'Who wins when more occupants want the surface than `capacity` allows, and why. ABSENCE IS MEANINGFUL: a null or empty `arbitration_rule` on a contested surface means nobody decided, which is exactly what the `contended-surface-without-arbitration` anti-pattern detects. Do not fill this in with a placeholder to silence the check. @example "Highest priority wins; ties break to the most recently updated."' },
|
|
13215
|
+
arbitration_state: { type: "string", enum: ["enforced_documented", "enforced_undocumented", "safe_by_coincidence", "none"], description: 'Whether the arbitration answer is enforced, written down, both, or neither. Separates "enforced in code but never transcribed" (ten minutes of typing) from "never decided" (a design meeting) from "safe only because nothing has collided yet" (the dangerous one).' },
|
|
13216
|
+
extensibility: { type: "string", enum: ["closed", "plugin_registerable", "user_configurable"], description: "Who may add occupants to the surface." },
|
|
13217
|
+
mutates_content: { type: "boolean", description: "Whether occupying this surface can change the underlying content, as opposed to only selecting or revealing it. The selector-versus-mutator distinction: a gutter that toggles a value is a mutator, a gutter that jumps the cursor is not." },
|
|
13218
|
+
dimensional_constraint: { type: "string", description: 'The hard spatial budget the surface imposes on its occupants, in whatever unit the design system speaks. @example "292px wide", "25px per field", "two grid columns"' }
|
|
13219
|
+
},
|
|
13060
13220
|
// SurveyResponseProperties: Aggregated survey response data.
|
|
13061
13221
|
survey_response: {
|
|
13062
13222
|
response_count: { type: "number", description: "Total responses", modifier: "snapshot" },
|
|
@@ -20033,6 +20193,7 @@ var ENTITY_EMOJI = {
|
|
|
20033
20193
|
sales_motion: "\u{1F501}",
|
|
20034
20194
|
screen: "\u{1F5A5}\uFE0F",
|
|
20035
20195
|
screen_state: "\u{1F533}",
|
|
20196
|
+
surface: "\u{1FA9F}",
|
|
20036
20197
|
security_audit: "\u{1F6C3}",
|
|
20037
20198
|
security_control: "\u{1F39A}\uFE0F",
|
|
20038
20199
|
security_policy: "\u{1F510}",
|
|
@@ -20656,6 +20817,7 @@ var STANDARD_LABELS = {
|
|
|
20656
20817
|
design_system: { alt_labels: ["component library", "style system", "ui kit"] },
|
|
20657
20818
|
screen: { alt_labels: ["page", "view", "route", "ui state"] },
|
|
20658
20819
|
screen_state: { alt_labels: ["view state", "empty state", "loading state", "error state"] },
|
|
20820
|
+
surface: { alt_labels: ["slot", "pane", "region", "zone", "shell", "panel", "placement", "ui surface"] },
|
|
20659
20821
|
// Brand layer
|
|
20660
20822
|
brand_identity: { alt_labels: ["brand", "brand guidelines", "brand book"] },
|
|
20661
20823
|
brand_imagery: { alt_labels: ["brand image", "visual asset", "brand photo"] },
|
|
@@ -23237,22 +23399,30 @@ var UX_DESIGN_GUIDE = {
|
|
|
23237
23399
|
// of a journey_step, so the step must precede the action. The journey is the
|
|
23238
23400
|
// anchor; phases are the band overlay; steps are the timeline; actions
|
|
23239
23401
|
// decompose a step into service-blueprint rows.
|
|
23240
|
-
creation_sequence: ["user_journey", "journey_phase", "journey_step", "journey_action", "screen", "screen_state", "user_flow", "wireframe", "prototype", "design_question", "design_concept"],
|
|
23402
|
+
creation_sequence: ["user_journey", "journey_phase", "journey_step", "journey_action", "screen", "screen_state", "surface", "user_flow", "wireframe", "prototype", "design_question", "design_concept"],
|
|
23241
23403
|
patterns: [
|
|
23242
23404
|
{
|
|
23243
23405
|
name: "Journey to Screen Flow",
|
|
23244
23406
|
description: "Journeys map the experience, journey steps are shown on screens, prototypes simulate screens so the design can be tested",
|
|
23245
23407
|
entity_types: ["user_journey", "journey_step", "screen", "prototype"],
|
|
23246
23408
|
edge_chain: ["persona_experiences_user_journey", "user_journey_contains_journey_step", "journey_step_shown_on_screen", "prototype_simulates_screen"]
|
|
23409
|
+
},
|
|
23410
|
+
{
|
|
23411
|
+
name: "Surface Contention",
|
|
23412
|
+
description: "A screen renders surfaces, features occupy them, and the surface records the rule that settles who wins. Nest the place (shell, pane, region, slot), list the occupants, then write the arbitration rule down once so it is not re-argued at the next feature.",
|
|
23413
|
+
entity_types: ["screen", "surface", "feature"],
|
|
23414
|
+
edge_chain: ["screen_renders_surface", "surface_contains_surface", "feature_occupies_surface", "surface_serves_job"]
|
|
23247
23415
|
}
|
|
23248
23416
|
],
|
|
23249
23417
|
required_bridges: [
|
|
23250
23418
|
{ edge_type: "persona_experiences_user_journey", target_domain: "user", when: "Every journey must be anchored to a persona" },
|
|
23419
|
+
{ edge_type: "feature_occupies_surface", target_domain: "product_spec", when: "A surface should list the features that occupy it; the guest list is what makes contention visible" },
|
|
23251
23420
|
{ edge_type: "prototype_tests_hypothesis", target_domain: "validation", when: "Prototypes should test design hypotheses before building" },
|
|
23252
23421
|
{ edge_type: "screen_surfaces_feature", target_domain: "product_spec", when: "Screens should connect to the features they surface" }
|
|
23253
23422
|
],
|
|
23254
23423
|
anti_patterns: [
|
|
23255
23424
|
{ description: "Screens without journeys: isolated screens miss the experience context" },
|
|
23425
|
+
{ description: "Surfaces without an arbitration rule: a place two features both want, with no recorded answer for who wins, is a decision that gets made again every time it comes up. Fill `arbitration_rule`, or link the design guideline that already answers it via surface_governed_by_design_guideline." },
|
|
23256
23426
|
{ description: "Prototypes without testing: if nobody tests the prototype, it is just art" },
|
|
23257
23427
|
{ description: "Design questions left open: exploration status should progress to resolved or parked" },
|
|
23258
23428
|
{ description: "Touchpoints stuffed in the deprecated journey_step.touchpoint string (UPG-675). Touchpoints belong in one of two layers: journey_action is the in-product blueprint layer (the finest band of a journey_step), and the touchpoint entity is the cross-channel customer-success layer (touchpoint_occurs_in_journey_step). Pick the layer; do not duplicate the touch as a free-text string." }
|
|
@@ -26867,8 +27037,196 @@ var UPG_ANTI_PATTERNS = [
|
|
|
26867
27037
|
stages: ["concept", "validation", "build", "beta", "launch", "growth", "mature", "maintenance", "sunset"],
|
|
26868
27038
|
severity: "medium",
|
|
26869
27039
|
source: { kind: "fundamental" }
|
|
27040
|
+
},
|
|
27041
|
+
// ── surface (0.27.0): the place, its guest list, and its arbitration rule ──
|
|
27042
|
+
// Three patterns, calibrated so the contention one leads and the two coverage
|
|
27043
|
+
// companions sit a tier below it. Like every entry in this file, each detector
|
|
27044
|
+
// is a WHOLE-GRAPH approximation of a per-node rule (cf. personas-without-jobs,
|
|
27045
|
+
// which fires on "no persona anywhere links to a job", not per persona): the
|
|
27046
|
+
// `IntelligenceCondition` language composes aggregate counts, not per-node
|
|
27047
|
+
// predicates.
|
|
27048
|
+
{
|
|
27049
|
+
id: "contended-surface-without-arbitration",
|
|
27050
|
+
since: "0.27.0",
|
|
27051
|
+
name: "Contended surface without arbitration",
|
|
27052
|
+
description: 'Features occupy surfaces in this graph, and at least one surface has no recorded answer to "who wins here, and why". Either it carries no arbitration_rule and has not declared itself `chained`, or it admits through arbitration_state that the answer is absent (`none`) or accidental (`safe_by_coincidence`). Left unrecorded, that answer lives in whoever remembers the last argument.',
|
|
27053
|
+
// 0.28.0 (feedback 852a9721, from a 30-surface field audit). Three changes,
|
|
27054
|
+
// each earned by a reported false positive or a reported blind spot:
|
|
27055
|
+
//
|
|
27056
|
+
// (a) rule-absence, EXCEPT chained. `composition_mode: 'chained'` means each
|
|
27057
|
+
// occupant wraps the next rather than competing with it. Many occupants
|
|
27058
|
+
// and no arbitration rule is the designed shape, so the reporter's 14
|
|
27059
|
+
// chained slots were 14 standing false positives — and because
|
|
27060
|
+
// `get_anti_pattern_violations_for` attributes by TYPE, they kept the
|
|
27061
|
+
// whole surface roster lit no matter how diligently the genuinely
|
|
27062
|
+
// contended surfaces were documented. The check could never be silenced
|
|
27063
|
+
// by correct modelling, which is the property a check has to have.
|
|
27064
|
+
// Exemption is DECLARE-TO-EARN: an unset `composition_mode` still fires,
|
|
27065
|
+
// so the default posture stays suspicious and silence must be claimed.
|
|
27066
|
+
// (b) `safe_by_coincidence` fires on its own, with no chained exemption. It
|
|
27067
|
+
// is the one state that a written `arbitration_rule` can mask: the field
|
|
27068
|
+
// audit found surfaces whose prose described disjoint enum values doing
|
|
27069
|
+
// the arbitrating with nothing guarding them. Branch (a) cannot see
|
|
27070
|
+
// those, because the rule text is present.
|
|
27071
|
+
// (c) `none` fires on its own too. A graph that says "nobody decided" while
|
|
27072
|
+
// carrying rule text is contradicting itself, and the admission is the
|
|
27073
|
+
// half to believe.
|
|
27074
|
+
//
|
|
27075
|
+
// `enforced_undocumented` deliberately gets NO branch and NO suppression. It
|
|
27076
|
+
// needs none: a surface enforcing an untranscribed rule has no
|
|
27077
|
+
// `arbitration_rule`, so branch (a) already fires. Nor does it earn a
|
|
27078
|
+
// downgrade — severity is per-anti-pattern, not per-violation, so there is
|
|
27079
|
+
// nowhere to put one; and the harm this pattern names is that the settlement
|
|
27080
|
+
// is unrecorded, which is exactly what `enforced_undocumented` admits. The
|
|
27081
|
+
// graph is the record; code is not. What the state buys is triage, so the
|
|
27082
|
+
// remediation text below names the two costs separately.
|
|
27083
|
+
//
|
|
27084
|
+
// No new anti-pattern was minted for `safe_by_coincidence`. It is a value of
|
|
27085
|
+
// the arbitration question, not a different question, and a second detector
|
|
27086
|
+
// would fire on the same graphs and double-report through type-keyed
|
|
27087
|
+
// attribution — making this family noisier on its first real deployment,
|
|
27088
|
+
// which is the exact failure (a) exists to fix. If field evidence later shows
|
|
27089
|
+
// it needs its own severity, mint it then.
|
|
27090
|
+
structured_condition: {
|
|
27091
|
+
operator: "and",
|
|
27092
|
+
checks: [
|
|
27093
|
+
{ check: { type: "entity_count", entity_type: "surface", comparison: "nonzero" } },
|
|
27094
|
+
{
|
|
27095
|
+
check: {
|
|
27096
|
+
type: "relationship",
|
|
27097
|
+
source_type: "feature",
|
|
27098
|
+
edge_type: "feature_occupies_surface",
|
|
27099
|
+
target_type: "surface",
|
|
27100
|
+
comparison: "exists"
|
|
27101
|
+
}
|
|
27102
|
+
},
|
|
27103
|
+
{
|
|
27104
|
+
operator: "or",
|
|
27105
|
+
checks: [
|
|
27106
|
+
{
|
|
27107
|
+
check: {
|
|
27108
|
+
type: "entity_count",
|
|
27109
|
+
entity_type: "surface",
|
|
27110
|
+
filter: {
|
|
27111
|
+
property: "arbitration_rule",
|
|
27112
|
+
present: false,
|
|
27113
|
+
except_property: "composition_mode",
|
|
27114
|
+
except_value: "chained"
|
|
27115
|
+
},
|
|
27116
|
+
comparison: "nonzero"
|
|
27117
|
+
}
|
|
27118
|
+
},
|
|
27119
|
+
{
|
|
27120
|
+
check: {
|
|
27121
|
+
type: "entity_count",
|
|
27122
|
+
entity_type: "surface",
|
|
27123
|
+
filter: { property: "arbitration_state", value: "safe_by_coincidence" },
|
|
27124
|
+
comparison: "nonzero"
|
|
27125
|
+
}
|
|
27126
|
+
},
|
|
27127
|
+
{
|
|
27128
|
+
check: {
|
|
27129
|
+
type: "entity_count",
|
|
27130
|
+
entity_type: "surface",
|
|
27131
|
+
filter: { property: "arbitration_state", value: "none" },
|
|
27132
|
+
comparison: "nonzero"
|
|
27133
|
+
}
|
|
27134
|
+
}
|
|
27135
|
+
]
|
|
27136
|
+
}
|
|
27137
|
+
]
|
|
27138
|
+
},
|
|
27139
|
+
why_it_matters: "Contention over a UI place is settled every time it comes up, and an unrecorded settlement is re-argued at the next feature. The cost is paid in repeated decisions, not in a visible defect. A surface that is safe only by coincidence pays it all at once instead, the first time an occupant is added.",
|
|
27140
|
+
remediation: "Read `arbitration_state` first: it says what the work actually is. `enforced_undocumented` means the rule already exists in code and needs transcribing into `arbitration_rule`: ten minutes, no meeting. `none` means nobody has decided and someone has to. `safe_by_coincidence` means nothing is enforcing anything and the surface only looks settled; that one wants a guard in code, not just prose. Record the constraint the rule works within (`capacity`, `dimensional_constraint`), and where a design system already answers it, link the source with `surface_governed_by_design_guideline`. Surfaces whose occupants wrap one another rather than compete should declare `composition_mode: 'chained'`, which exempts them: that is a factual claim about how the code composes, not a way to quiet the check.",
|
|
27141
|
+
stages: ["build", "beta", "launch", "growth", "mature", "maintenance"],
|
|
27142
|
+
severity: "medium",
|
|
27143
|
+
source: { kind: "fundamental" }
|
|
27144
|
+
},
|
|
27145
|
+
{
|
|
27146
|
+
id: "surface-without-job",
|
|
27147
|
+
since: "0.27.0",
|
|
27148
|
+
name: "Surface without a job",
|
|
27149
|
+
description: "The graph has surfaces, but none links to the job it exists to serve. A surface with no job is a place that survives on precedent: it is there because it has always been there.",
|
|
27150
|
+
structured_condition: {
|
|
27151
|
+
operator: "and",
|
|
27152
|
+
checks: [
|
|
27153
|
+
{ check: { type: "entity_count", entity_type: "surface", comparison: "nonzero" } },
|
|
27154
|
+
{
|
|
27155
|
+
check: {
|
|
27156
|
+
type: "relationship",
|
|
27157
|
+
source_type: "surface",
|
|
27158
|
+
edge_type: "surface_serves_job",
|
|
27159
|
+
target_type: "job",
|
|
27160
|
+
comparison: "not_exists"
|
|
27161
|
+
}
|
|
27162
|
+
}
|
|
27163
|
+
]
|
|
27164
|
+
},
|
|
27165
|
+
why_it_matters: "Without a job, there is no test for whether a surface still earns its space. Places accumulate, and the layout argument becomes a matter of taste rather than of purpose.",
|
|
27166
|
+
remediation: "Link each surface to the job it serves with `surface_serves_job`. A surface that cannot name one is a candidate for removal or for merging into its parent.",
|
|
27167
|
+
stages: ["build", "beta", "launch", "growth", "mature"],
|
|
27168
|
+
severity: "low",
|
|
27169
|
+
source: { kind: "practitioner", attribution: "Clayton Christensen, Jobs to Be Done" }
|
|
27170
|
+
},
|
|
27171
|
+
{
|
|
27172
|
+
id: "surface-without-measurement",
|
|
27173
|
+
since: "0.27.0",
|
|
27174
|
+
name: "Surface without measurement",
|
|
27175
|
+
description: "The graph has surfaces, but none links to a metric. Nothing reports whether the place is used, ignored, or in the way.",
|
|
27176
|
+
structured_condition: {
|
|
27177
|
+
operator: "and",
|
|
27178
|
+
checks: [
|
|
27179
|
+
{ check: { type: "entity_count", entity_type: "surface", comparison: "nonzero" } },
|
|
27180
|
+
{
|
|
27181
|
+
check: {
|
|
27182
|
+
type: "relationship",
|
|
27183
|
+
source_type: "surface",
|
|
27184
|
+
edge_type: "surface_measured_by_metric",
|
|
27185
|
+
target_type: "metric",
|
|
27186
|
+
comparison: "not_exists"
|
|
27187
|
+
}
|
|
27188
|
+
}
|
|
27189
|
+
]
|
|
27190
|
+
},
|
|
27191
|
+
why_it_matters: "An unmeasured surface cannot be retired on evidence. It is defended by whoever built it and challenged by whoever wants its space, with no reading to settle the question.",
|
|
27192
|
+
remediation: "Attach the reading that would justify keeping the place with `surface_measured_by_metric`. Engagement, or the rate at which its occupants are actually invoked, is usually the honest one.",
|
|
27193
|
+
stages: ["build", "beta", "launch", "growth", "mature"],
|
|
27194
|
+
severity: "low",
|
|
27195
|
+
source: { kind: "fundamental" }
|
|
26870
27196
|
}
|
|
26871
27197
|
];
|
|
27198
|
+
function walkForExceptSpecs(cond, out) {
|
|
27199
|
+
if ("operator" in cond) {
|
|
27200
|
+
for (const child of cond.checks) walkForExceptSpecs(child, out);
|
|
27201
|
+
return;
|
|
27202
|
+
}
|
|
27203
|
+
const check = cond.check;
|
|
27204
|
+
if (check.type !== "entity_count" || !check.filter) return;
|
|
27205
|
+
const f = check.filter;
|
|
27206
|
+
if (typeof f.property !== "string" || typeof f.except_property !== "string" || typeof f.except_value !== "string") {
|
|
27207
|
+
return;
|
|
27208
|
+
}
|
|
27209
|
+
const spec = {
|
|
27210
|
+
entity_type: check.entity_type,
|
|
27211
|
+
property: f.property,
|
|
27212
|
+
except_property: f.except_property,
|
|
27213
|
+
except_value: f.except_value
|
|
27214
|
+
};
|
|
27215
|
+
const seen = out.some(
|
|
27216
|
+
(s) => s.entity_type === spec.entity_type && s.property === spec.property && s.except_property === spec.except_property && s.except_value === spec.except_value
|
|
27217
|
+
);
|
|
27218
|
+
if (!seen) out.push(spec);
|
|
27219
|
+
}
|
|
27220
|
+
var UPG_PRESENCE_EXCEPT_SPECS = (() => {
|
|
27221
|
+
const out = [];
|
|
27222
|
+
for (const ap of UPG_ANTI_PATTERNS) {
|
|
27223
|
+
if (ap.structured_condition) walkForExceptSpecs(ap.structured_condition, out);
|
|
27224
|
+
}
|
|
27225
|
+
return out;
|
|
27226
|
+
})();
|
|
27227
|
+
function presenceExceptKey(property, exceptProperty, exceptValue) {
|
|
27228
|
+
return `${property}!${exceptProperty}=${exceptValue}`;
|
|
27229
|
+
}
|
|
26872
27230
|
function getAntiPatternById(id) {
|
|
26873
27231
|
return UPG_ANTI_PATTERNS.find((ap) => ap.id === id);
|
|
26874
27232
|
}
|
|
@@ -26911,7 +27269,14 @@ function concernGatesFor(kind, concern) {
|
|
|
26911
27269
|
var COVERAGE_ANTI_PATTERNS = /* @__PURE__ */ new Set([
|
|
26912
27270
|
"single-domain-graph",
|
|
26913
27271
|
"persona-count-below-stage-benchmark",
|
|
26914
|
-
"competitors-missing-past-validation"
|
|
27272
|
+
"competitors-missing-past-validation",
|
|
27273
|
+
// surface companions (0.27.0): both presuppose the graph has grown past the
|
|
27274
|
+
// point where a place is worth justifying and measuring. A stub that has
|
|
27275
|
+
// sketched one surface has not yet drifted. `contended-surface-without-
|
|
27276
|
+
// arbitration` is deliberately NOT here: it only fires once features actually
|
|
27277
|
+
// occupy surfaces, which is itself the evidence that the graph has grown.
|
|
27278
|
+
"surface-without-job",
|
|
27279
|
+
"surface-without-measurement"
|
|
26915
27280
|
]);
|
|
26916
27281
|
var THIN_GRAPH_THRESHOLD = 8;
|
|
26917
27282
|
function isThinCoverageAdvisory(antiPatternId, totalEntityCount) {
|
|
@@ -27009,7 +27374,16 @@ function compareNumber(value, comparison, threshold) {
|
|
|
27009
27374
|
function evaluateEntityCount(check, inputs) {
|
|
27010
27375
|
const filter = check.filter;
|
|
27011
27376
|
let count = 0;
|
|
27012
|
-
if (filter && typeof filter.property === "string" && typeof filter.
|
|
27377
|
+
if (filter && typeof filter.property === "string" && typeof filter.present === "boolean" && typeof filter.except_property === "string" && typeof filter.except_value === "string") {
|
|
27378
|
+
const key = presenceExceptKey(filter.property, filter.except_property, filter.except_value);
|
|
27379
|
+
const exempt = inputs.countsByTypeAndProperty?.[check.entity_type]?.[filter.except_property]?.[filter.except_value] ?? 0;
|
|
27380
|
+
const eligible = Math.max(0, (inputs.countsByType[check.entity_type] ?? 0) - exempt);
|
|
27381
|
+
const withValue = inputs.countsByTypeAndPropertyPresenceExcept?.[check.entity_type]?.[key] ?? 0;
|
|
27382
|
+
count = filter.present ? Math.min(withValue, eligible) : Math.max(0, eligible - withValue);
|
|
27383
|
+
} else if (filter && typeof filter.property === "string" && typeof filter.present === "boolean") {
|
|
27384
|
+
const withValue = inputs.countsByTypeAndPropertyPresence?.[check.entity_type]?.[filter.property] ?? 0;
|
|
27385
|
+
count = filter.present ? withValue : Math.max(0, (inputs.countsByType[check.entity_type] ?? 0) - withValue);
|
|
27386
|
+
} else if (filter && typeof filter.property === "string" && typeof filter.value === "string") {
|
|
27013
27387
|
count = inputs.countsByTypeAndProperty?.[check.entity_type]?.[filter.property]?.[filter.value] ?? 0;
|
|
27014
27388
|
} else if (filter && typeof filter.status === "string") {
|
|
27015
27389
|
count = inputs.countsByTypeAndStatus?.[check.entity_type]?.[filter.status] ?? 0;
|
|
@@ -27914,6 +28288,10 @@ var UPG_REGIONS = [
|
|
|
27914
28288
|
type: "screen_state",
|
|
27915
28289
|
role: "leaf"
|
|
27916
28290
|
},
|
|
28291
|
+
{
|
|
28292
|
+
type: "surface",
|
|
28293
|
+
role: "container"
|
|
28294
|
+
},
|
|
27917
28295
|
{
|
|
27918
28296
|
type: "wireframe",
|
|
27919
28297
|
role: "leaf"
|
|
@@ -28022,7 +28400,9 @@ var UPG_REGIONS = [
|
|
|
28022
28400
|
"user_journey_contains_journey_step",
|
|
28023
28401
|
"design_system_contains_design_component",
|
|
28024
28402
|
"brand_identity_coloured_with_brand_colour",
|
|
28025
|
-
"design_component_composes_design_component"
|
|
28403
|
+
"design_component_composes_design_component",
|
|
28404
|
+
"screen_renders_surface",
|
|
28405
|
+
"surface_contains_surface"
|
|
28026
28406
|
],
|
|
28027
28407
|
boundary_edges: [
|
|
28028
28408
|
{
|
|
@@ -28030,6 +28410,16 @@ var UPG_REGIONS = [
|
|
|
28030
28410
|
edge_id: "need_reframed_as_design_question",
|
|
28031
28411
|
crosses_into: "users_needs"
|
|
28032
28412
|
},
|
|
28413
|
+
{
|
|
28414
|
+
direction: "import",
|
|
28415
|
+
edge_id: "feature_occupies_surface",
|
|
28416
|
+
crosses_into: "product_delivery"
|
|
28417
|
+
},
|
|
28418
|
+
{
|
|
28419
|
+
direction: "export",
|
|
28420
|
+
edge_id: "surface_serves_job",
|
|
28421
|
+
crosses_into: "users_needs"
|
|
28422
|
+
},
|
|
28033
28423
|
{
|
|
28034
28424
|
direction: "import",
|
|
28035
28425
|
edge_id: "opportunity_explores_via_design_concept",
|
|
@@ -30111,7 +30501,7 @@ function checkHeaderSealText(text) {
|
|
|
30111
30501
|
}
|
|
30112
30502
|
|
|
30113
30503
|
// src/index.ts
|
|
30114
|
-
var UPG_VERSION = "0.
|
|
30504
|
+
var UPG_VERSION = "0.28.0";
|
|
30115
30505
|
var UPG_FORMAT_VERSION = "0.4.0";
|
|
30116
30506
|
var MARKDOWN_FORMAT_VERSION = "0.1";
|
|
30117
30507
|
var UPG_TYPES = getTypes();
|
|
@@ -30249,6 +30639,7 @@ export {
|
|
|
30249
30639
|
UPG_POLYMORPHIC_EDGE_KEYS,
|
|
30250
30640
|
UPG_PORTFOLIO_KINDS,
|
|
30251
30641
|
UPG_PORTFOLIO_SHARED_TYPES,
|
|
30642
|
+
UPG_PRESENCE_EXCEPT_SPECS,
|
|
30252
30643
|
UPG_PRODUCT_STAGES,
|
|
30253
30644
|
UPG_PRODUCT_STAGE_COERCION_MAP,
|
|
30254
30645
|
UPG_PROPERTY_MIGRATIONS,
|
|
@@ -30385,6 +30776,7 @@ export {
|
|
|
30385
30776
|
normalizeDocument,
|
|
30386
30777
|
parseUpg,
|
|
30387
30778
|
pickCanonicalEdge,
|
|
30779
|
+
presenceExceptKey,
|
|
30388
30780
|
resolveAllEdges,
|
|
30389
30781
|
resolveContainmentEdge,
|
|
30390
30782
|
resolveEntityType,
|