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

create_product

Create a sibling .upg product in the current workspace. Mints a canonical product id, writes the file, stamps integrity, registers in `workspace.json`. Pairs with `init_workspace` and `switch_product`.

Workspace & Portfoliosnon-atomic. File write + workspace.json patch + optional portfolio edge are separate mutations.

Arguments

namestringrequired

Product display title (required, non-empty).

slugstringoptional

Optional slug for the .upg filename. Defaults to a slug derived from `name`. Collisions append `-2`, `-3`, …

descriptionstringoptional

Optional product description

stagestringoptional

Product lifecycle stage. See UPGProductStage in @unified-product-graph/core.

portfolio_idstringoptional

Optional portfolio id (resolved against portfolio.upg) to place the new product under. A portfolio id that resolves only in the active graph still attaches via an in-graph edge (DEPRECATED; prefer attach_product_to_portfolio).

area_idstringoptional

Optional product_area id (resolved against portfolio.upg) to place the new product under.

dirstringoptional

Optional subfolder under .upg/ to write the graph into (e.g. "competitors"). The file lands at .upg/<dir>/<slug>.upg and is registered in workspace.json with that subpath, so a watched portfolio can keep its intelligence graphs in competitors/. Absent writes flat at .upg/<slug>.upg. No leading slash or "..".

member_kindstringoptional

Workspace member kind. product (default) = a product under management; org_rollup = the company umbrella graph; watched = a monitored intelligence graph (e.g. a competitor); operating_function = a function a team operates (revenue/success/finance/people/marketing), not a product it ships. Stamped into $upg.member_kind and cached in workspace.json; non-product kinds are excluded from counts.products and graded on their own validation profile (product-spine anti-patterns are suppressed).

productorg_rollupwatchedoperating_function

Returns

Shape
{ message,...result }

result carries id, title, slug, file_path, and the optional portfolio edge.

Examples

Live call against the Notion example graph.

Input

{
  "name": "example"
}

Output

{
  "message": "Created product: example",
  "id": "p_P9zFGBICvycswgnv",
  "file": "example.upg",
  "slug": "example",
  "title": "example",
  "workspace_path": ".upg/",
  "portfolio_attached": false
}

See Also