Skip to content
UPG is in early alpha. The specification is still evolving and may change between versions.
Tools/Workspace & Portfolios/clone_structure

clone_structure

Stamp the SHAPE of one product (typed nodes + canonical edges + hierarchy, with `TODO:` placeholder titles) into another, without re-authoring the skeleton. Content (descriptions, properties, real titles, statuses) never crosses; only the structure does. The lever for multi-product structural parity: one stamp plus a content pass replaces a multi-batch rebuild. `from_product` is the read-only exemplar; `into` is the write target and DEFAULTS to the active product (name a non-active product to write there with no `switch_product`). `regions` scopes the clone to entity types in those super-domains. `dry_run: true` previews the plan without writing. Local-only.

Workspace & Portfoliosatomic-with-rollback on commit (created twins + edges are rolled back if a hard error lands mid-clone; catalog-invalid source edges are skipped and reported, not fatal). `dry_run` never writes.

Arguments

from_productstringrequired

Exemplar product (id, file, or basename) whose shape is copied. Read-only.

intostringoptional

Target product to stamp the shape into. Defaults to the ACTIVE product; name a non-active product to write there without switch_product.

regionsarrayoptional

Optional region ids (or labels) to scope the clone to entity types in those super-domains. Omit to clone the whole shape.

dry_runbooleanoptional

Preview the plan (counts by type, edges, sample titles) without writing. Default false.

Returns

JSON: on dry_run, { dry_run, from, into, into_is_active, would_clone: { nodes, edges, by_type }, region_scope?, unmatched_regions?, target_existing_stubs?, sample_titles }.
On commit, { cloned: true, from, into, into_is_active, nodes_created, edges_created, edges_skipped?, by_type, warnings? }.

See Also