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`.
Arguments
namestringrequiredProduct display title (required, non-empty).
slugstringoptionalOptional slug for the .upg filename. Defaults to a slug derived from `name`. Collisions append `-2`, `-3`, …
descriptionstringoptionalOptional product description
stagestringoptionalProduct lifecycle stage. See UPGProductStage in @unified-product-graph/core.
portfolio_idstringoptionalOptional 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_idstringoptionalOptional product_area id (resolved against portfolio.upg) to place the new product under.
dirstringoptionalOptional 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_kindstringoptionalWorkspace 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).
Returns
{ 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
}