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

portfolio_query

Traverse the graph ACROSS products in one call (the multi-product `query`). Runs the same BFS (typed-edge traversal + field projection) against every product in scope and tags each subgraph with its source `product_id`, without `switch_product` (the active product is read live; others are read-only). Use for portfolio-level questions ("every product's strategy region", "which products have a persona"). `from_id` only matches in its owning product. Read-only.

Workspace & Portfoliosatomic (read-only). Never mutates active-product state.

Arguments

fromstringoptional

Start from all nodes of this type (in each product)

from_idstringoptional

Start from a specific node ID. Node IDs are product-local; only the owning product returns results.

traversearrayoptional

Edge types to follow at each level (in order). If omitted, follows all edges. Prefix with ! to exclude.

depthnumberoptional

Max traversal depth (default 3, max 10)

includearrayoptional

Fields per node: "title", "status", "tags", "description", "properties" (default: title, status, type)

limitnumberoptional

Max nodes per product (default 100, max 1000)

edge_includearrayoptional

Edge fields to return: "id", "type", "source", "target". Empty array = no edges. Default: all fields.

property_includearrayoptional

When "properties" is in include, only return these property keys.

scopearrayoptional

Product IDs (or files) to query. Omit to query ALL products in the workspace. Match by product id, relative file, or basename.

Returns

Shape
{ products: Array<{ product_id, file, title, total_nodes, total_edges, nodes, edges, truncated? }>, products_searched, products_with_matches, empty_products, unmatched_scope? }
Products that matched zero nodes are summarised in empty_products, not expanded, to keep the payload lean.
from_id only matches in its owning product; the rest report empty.

See Also