portfolio_census
List product-local nodes of ONE type ACROSS the whole portfolio with a chosen projection (the cross-product `list_nodes`). The overflow-safe answer to "every metric across all 16 graphs, with title + description": the read every canonicalisation / coverage pass needs. Unlike `portfolio_query` (which returns full nodes AND traversed edges, and overflows the payload cap past ~195 nodes), a census never traverses and never returns edges, so payload scales only with row count x projected-field size. Each row is `{ product_id, node_id, <projected> }`; `group_by: "product"` nests rows under each product instead. Read-only; never mutates active-product state.
Arguments
typestringrequiredEntity type to census (e.g. "metric", "persona", "primitive"). Required.
includearrayoptionalProjected fields per node: "title", "status", "tags", "description", "properties" (default: ["title"]). id (as node_id) and product_id are always present.
property_includearrayoptionalWhen "properties" is in include, only return these property keys.
group_bystringoptionalnone (one flat `rows` list, default) or product (nest rows under each product, the comparison view).
statusstringoptionalOnly census nodes with this lifecycle status.
tagsarrayoptionalOnly census nodes carrying at least one of these tags.
scopearrayoptionalProduct IDs (or files) to census. Omit to census ALL products in the workspace. Match by product id, relative file, or basename. (`products` is accepted as an alias.)
limitnumberoptionalMax rows in the returned page (default 1000, max 5000). Pages the flat sequence; `total` reports the full match count.
offsetnumberoptionalSkip this many rows before the page (default 0). With `limit`, pages a large census.
Returns
{ type, rows: Array<{ product_id, node_id, <projected> }>, total, returned, offset, limit, has_more, products_searched, products_with_matches, errored_products?, unmatched_scope? }.group_by: "product": a products: Array<{ product_id, file, title, count, rows: Array<{ node_id, <projected> }> }> nesting replaces the flat rows.total is the full match count across the portfolio; rows/products hold the requested page (offset/limit).["title"].