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

portfolio_validate

Run `validate_graph` ACROSS every product in scope in one call (the audit counterpart to `portfolio_digest`). Replaces the `switch_product` + `validate_graph` round-trip per product. Each product is checked by the SAME single-product code path (schema drift + anti-patterns), so per-product verdicts never diverge. Returns a per-product `valid` / `structurally_valid` + drift + anti-pattern counts, plus a portfolio rollup with `all_valid`. Read-only; the active product is read live, the rest read-only.

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

Arguments

scopearrayoptional

Product IDs (or files) to validate. Omit to validate ALL products in the workspace.

severitystringoptional

Restrict anti-pattern evaluation to this severity (passed through to validate_graph).

highmediumlow
include_violationsbooleanoptional

Include a per-product `top_violations` list (default true).

violation_limitnumberoptional

Max anti-pattern violations listed per product (default 5, max 25).

Returns

Shape
{ products: Array<{ product_id, file, title, valid, structurally_valid, drift, anti_patterns: { high, medium, low }, top_violations? }>, rollup: { products, valid, invalid, structurally_valid, anti_pattern_violations, all_valid }, errored_products?, unmatched_scope? }
severity filters anti-patterns; include_violations: false drops the per-product top_violations list.
When the portfolio has a canonical registry, a registry_drift block reports instance_of edges that point at a missing canonical, dangle, mismatch type, or were renamed off-canon (canonical-registry initiative, Phase 3).
When the portfolio uses the foundations tier (a registry specification / primitive or a foundations cross-edge), a portfolio_anti_patterns block reports the portfolio-scoped (scope: 'portfolio') anti-patterns: specification-without-implementer, primitive-scattered-without-canonical, product-reimplements-specification (0.9.13).

See Also