# Praxis Core Composition Runtime

> Use when Codex must inspect, change, or rely on @praxisui/core composition and widget runtime contracts: DynamicWidgetPageComponent, widget definitions, widget events, widget shell, composition links, selection-driven formatted headers, nested ports, connection/link execution, transform runtime, surface hosts, related-resource outlets, runtime observations, dynamic page materialization, closed page publication codecs, or typed identity copy.

- Skill: `codexrodrigues/praxis-core-composition-runtime` (Agent Skill, multi-file: 5 files)
- Install (CLI): `npx get-skill add codexrodrigues/praxis-core-composition-runtime`
- Raw SKILL.md: https://api.skillmd.com/api/skills/codexrodrigues/praxis-core-composition-runtime/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: codexrodrigues (https://skillmd.com/u/codexrodrigues)
- Updated: 2026-11-15
- Page: https://skillmd.com/skills/codexrodrigues/praxis-core-composition-runtime

---


# Praxis Core Composition Runtime

Use this skill for `@praxisui/core` composition, widget, dynamic page, connection, and surface-host runtime contracts.

This area materializes governed component and page decisions. It should not become a local page-builder dialect, host-only composition language, or keyword-routed action system. Page Builder and Visual Builder may author decisions, but core owns the shared runtime structures that execute them.

## Source Audit

Inspect the affected source before changing guidance or code:

- `projects/praxis-core/AGENTS.md`
- `projects/praxis-core/src/public-api.ts` when composition models, widget contracts, ports, surface hosts, runtime observations, or composition services are exported or public consumption changes
- `projects/praxis-core/docs/connection-editor.md`
- `projects/praxis-core/docs/dynamic-page-serialized-persistence.md` and `docs/table-connections-persistence-lab-baseline.md` for context-bound writers and SPA owner replacement
- `projects/praxis-core/src/lib/services/config-storage.service.ts` and `enterprise-runtime-context.service.ts` when a composition consumer switches enterprise context
- `src/app/features/remote-config-storage-persistence-lab/session-tabs-consumer.component.ts` and its focused spec for the existing same-SESSION owner/choice materialization
- `projects/praxis-core/docs/rfc-dynamic-page-canvas-runtime.md`
- `projects/praxis-core/src/lib/composition/**`
- `projects/praxis-core/src/lib/widgets/**`
- `projects/praxis-core/src/lib/surfaces/praxis-surface-host.component.ts`
- `projects/praxis-core/src/lib/surfaces/praxis-related-resource-outlet.component.ts`
- `projects/praxis-core/src/lib/models/composition-*.ts`
- `projects/praxis-core/src/lib/models/port-contract.model.ts`
- `projects/praxis-core/src/lib/models/runtime-component-observation.model.ts`
- `projects/praxis-core/src/lib/services/runtime-component-observation-registry.service.ts`
- `projects/praxis-core/src/lib/services/surface-binding-runtime.service.ts`

Read the focused specs for composition runtime, link execution, nested ports, widget loader, dynamic widget page, runtime observations, and surface hosts before deciding a contract is missing.

## Canonical Boundary

Core owns:

- `WidgetDefinition`, `WidgetPageDefinition`, widget shell contracts, widget events, nested widget config access
- dynamic widget loading and materialized widget runtime
- composition link model, transform pipeline, diagnostics, runtime traces, link execution, nested ports
- surface host and related-resource outlet runtime
- runtime component observation and event propagation
- bridge points used by Page Builder agentic authoring, including observations, surface handoff, and component-port grounding

Page Builder, Visual Builder, component libraries, and host apps consume these contracts. They should not redefine the same config/event/link semantics locally.

## Canonical Read And Execution Path

- Persist new page composition in `WidgetPageDefinition.composition.links`. `page.connections` is legacy and `DynamicWidgetPageComponent` rejects it; do not save both shapes or reintroduce a compatibility branch in a host.
- For automatic page persistence, inspect the Core writer before treating a remote `412` as an external edit. Capture each accepted key and canonical snapshot, then serialize the storage adapter invocations themselves; deferring only subscription can capture a stale ETag early. When enterprise context is explicitly configured, bind the page instance to its initially confirmed provenance: a context change invalidates queued saves and loads, and requires a fresh ready owner and rebootstrap. Preserve acknowledgement, context and lifecycle limits in [serialized-page-persistence.md](references/serialized-page-persistence.md); a per-instance queue is not multi-tab coordination, unload durability or an authorization-context freeze.
- Use `WidgetPageCompositionFactory` to materialize widget order, indexed widgets, links, state, derived definitions, and context before bootstrapping `CompositionRuntimeEngine`.
- When state is correct but a reloaded input is stale, inspect overlapping state-to-input projections in Core before changing the host. For the same top-level widget, materialize an ancestor input path before its descendant override within each segment separated by a nested delivery to that widget; preserve existing order for equal paths. This orders snapshot writes only: link conditions, transforms, diagnostics, dispatch and side effects retain their execution order. Nested targets are excluded, and flat writes must not move across their same-widget barrier. Read [state-input-projection.md](references/state-input-projection.md) for the scope, source audit and real-form edit/persist/reload proof.
- Keep dynamic widget input materialization idempotent. A page update that rebuilds a plain JSON input with the same structural value, including a different object-key order, must not rebind the input or emit `ngOnChanges`; use the core loader's stable JSON signature. Values outside the JSON-safe set, including functions, class instances, dates, non-finite numbers, and cycles, retain `Object.is` reference semantics instead of being coerced into a serialized equality rule.
- Treat `CompositionRuntimeEngine.bootstrap()` as semantic validation plus state materialization. Blocking diagnostics produce a `degraded` snapshot with trace evidence; do not convert every diagnostic into an exception or silently mark the page ready.
- Dispatch a `CompositionDispatchEvent` from an exact canonical endpoint. Matching includes owner widget, port, direction, and `nestedPath` when present. Let the engine execute condition, transform, policy, target delivery, state update, diagnostics, and trace as one cycle.
- Treat `nestedPath` as an ordered semantic path, not serialized JSON text. Match each segment by the canonical fields `kind`, `id`, `key`, `index`, and `componentType`; property order inside a segment is irrelevant because PostgreSQL `jsonb` and other stores may reorder object keys. A persisted link must continue matching the equivalent runtime event after reload. Do not use `JSON.stringify` equality for endpoint paths.
- When dispatch originates from `surface.result`, `SurfaceOpenPayload.onResult`, or `dynamicPage.composition.dispatch`, preserve the `EndpointRef` source as the authority for matching. For global-action continuations this means `source: { kind: 'global-action', ref: { actionId, payload?, payloadExpr?, meta? } }`; do not replace it with action labels, result type strings, widget names, route ids, or host-local event names. The event payload may carry data, but it does not choose the link source or target.
- Treat `surface.result` and `dynamicPage.composition.dispatch` as runtime event delivery into the
  composition engine, not config mutation APIs. Drawer result envelopes, row selections, and returned
  surface payloads must move through declared links, transforms, state endpoints, or global-action
  continuations; do not write them directly into widget `definition.inputs`, form/table config, page
  JSON, or host-local state.
- If a drawer outcome should update a component, author that update as a canonical composition link
  with a concrete source endpoint, target endpoint, supported transform, and feedback-cycle guard when
  relevant. Do not infer component mutation from `surface.result.type`, selected row shape, or returned
  payload fields.
- Consume the immutable `RuntimeSnapshot` from the facade/store as execution evidence. Do not maintain a second host state for link status, trace, or diagnostics.
- Treat trace payloads, `inputSnapshot`, `outputSnapshot`, link delivered values, and diagnostics as runtime evidence for audit,
  debugging, AI grounding, and UX feedback. They are not persistence state, business authorization, or a source for choosing
  another action/link after the fact. If a value needs to affect business state or another component, model that effect as a
  declared composition link, writable state endpoint, global-action continuation, or backend-confirmed command.
- Treat feedback-cycle detection as part of semantic validation and runtime safety, not as an editor-only lint. Unguarded cycles produce `SEMANTIC_FEEDBACK_CYCLE_UNGUARDED`, degrade bootstrap, and cause involved matched links to be skipped during dispatch with `RUNTIME_FEEDBACK_CYCLE_BLOCKED`; unrelated matched links may still execute.
- An intentional feedback loop must be explicit and guarded on every link in the cycle: use `metadata.tags: ['intentional-feedback']` plus at least one canonical guard per link (`condition`, `policy.distinct`, `policy.distinctBy`, or `policy.debounceMs`). Guarded intentional cycles produce `SEMANTIC_FEEDBACK_CYCLE_GUARDED` warnings, not blocking errors. Do not suppress cycle diagnostics or invent host-local loop breakers.

Legacy migration is an explicit ingress concern. Use `CompositionLinkLegacyMigrator` for supported legacy condition/policy shapes, then persist the canonical result. Unsupported legacy conditions fail explicitly; do not keep an open-ended legacy interpreter in runtime code.

## Governed Page Publication Profile

For copying or admitting a publication document, inspect Core's
`src/lib/widgets/page-publication/**`, `docs/page-publication-codec.md` and
`docs/page-publication-codec-delivery.md`, plus Config's
`docs/ai/contracts/page-publication-p0/`. Config owns the closed
`praxis.dynamic-page.editor` contract; Core materializes it using the existing
graph and identity models. This restricted profile is not the full composition
runtime described above.

1. Decode raw authorship with `decodePageAuthoringDocument`, then use
   `validatePageAuthoringDocument` with the owning Form/Table validators. Missing
   owners fail closed. Structural success does not prove native config, admitted
   ports/icons/groups, immutable provenance, authorization or publication.
2. Keep child configuration content solely in `definition.inputs.config` and
   preserve admitted binding/context inputs for native reconstruction. Owner
   adapters reconstruct native envelopes from these inputs; do not add a runtime
   `authoringDocument` input or normalize the graph before validation. Unsupported
   features must produce diagnostics rather than disappear during serialization.
3. Preserve presence, null, zero, false, empty strings and array order. Use
   `cloneBoundedUiLayoutJsonDocument` for the shared 256 KiB UTF-8 bound and maximum
   container depth 64, counting the root as 1; do not replace it with a lossy JSON
   clone at ingress. The
   whole envelope counts. JavaScript numeric identity does not attest raw wire
   precision or backend canonical hashes.
4. Copy through `copyPageAuthoringDocument` using catalog-allocated UUIDs and an
   exact typed widget/link map. Rewrite endpoint references through the widget
   namespace only; preserve UUID-looking literals. A copy resets navigation and
   requires fresh governance. The pure helper does not allocate identities or
   create a server draft.
5. Use `buildPublishedPageIdentity` with the host's registered namespace and
   `derivePageChildRuntimeId` for stable page/widget identities. Titles never
   choose routes. Deriving an ID alone does not suppress personal persistence;
   the owning adapters must provide that runtime behavior.

Compare derived fixture provenance/hashes with the integrated Config source and
run `page-publication/*.spec.ts` plus `ui-layout-json.util.spec.ts`. Public API
changes require Core build, a direct consumer build and the applicable browser
regression. Keep those results separate from downstream Page Builder/host
save-publish-reload evidence: the pure APIs do not activate that journey. Pair
with `praxis-form-editor-document-roundtrip`, `praxis-table-authoring-settings`
and `praxis-config-runtime-persistence` for native and server admission.

## Published Shell Presets

`widgets/widget-shell-presets.ts` owns the single `BUILTIN_WIDGET_SHELL_PRESETS`
catalog. `BUILTIN_SHELL_PRESETS` is its derived public ID lookup, not a second set
of appearance definitions. Preserve published IDs when evolving the catalog;
inspect `widget-shell-published-presets.spec.ts` and shell-editor round-trip tests.
Published IDs remain resolvable; visual recalibration is not pixel-for-pixel
historical compatibility. Dark-glass and graphite retain dark material defaults. Corporate hosts override via
`context.ui.shell.presets` and explicit widget `appearance`, using CSS tokens there;
do not mutate exported catalogs or map old IDs to unrelated new styles.
`frameless` intentionally keeps the corrected content inset; an explicit
`appearance.body.padding: "0"` requests the previous edge-to-edge treatment.
This documented visual difference must not be described as byte-identical baseline
compatibility. Name-only export validation also does not prove full API compatibility.

### Material fields and nested shells

Inspect `WidgetShellAppearance`: `card.borderWidth`, `card.borderStyle`,
`card.backdropFilter`, `card.fallbackBackground`, `header.borderWidth` and
`header.borderStyle` are canonical fields. Defaults remain 1px solid. Card borders
may vary per side; the header owns one bottom divider. Explicit appearance overrides
the resolved preset. Resolve the shell editor context from `mergedContext.ui.shell`
without persisting inherited theme data into the widget.

Reset these material CSS variables at each `.pdx-shell` boundary so nesting does not
implicitly inherit an outer thick/dashed/blurred treatment. Preserve intentional
`context.ui.shell.preset/presets` inheritance. Test both paths in
`widget-shell-material.spec.ts`; do not indiscriminately reset all global theme tokens.
Glass uses transparency plus backdrop-filter, with an opaque paired-color fallback
for unsupported filters, reduced transparency, expanded/fullscreen and sticky headers.

## Implemented Contract Limits

Do not infer executable support from a public union or serialized field alone:

- Link policy currently executes `missingValuePolicy`, `distinct`, `distinctBy`, and `debounceMs`.
- `LinkPolicy.delivery` is intentionally synchronous: the executable and persisted beta contract accepts only `sync` or omission. Canonical factory and serialization ingress reject removed `microtask`/`batched` values instead of silently normalizing them. `LinkPolicy.errorPolicy` executes `diagnostic`, `drop`, and `halt-page`: `diagnostic` preserves the sanitized failure, `drop` rolls back the failed link and lets later links continue in document order with `RUNTIME_LINK_ERROR_DROPPED`, and `halt-page` rolls back the failed delivery, marks the page failed, blocks later effects with `RUNTIME_PAGE_HALTED`, and requires a new bootstrap to resume. Do not recreate async scheduling or error-policy behavior in a host.
- The stable transform catalog executes `identity`, `constant`, `pick-path`, `template`, `object-template`, `array-template`, `coalesce`, `merge-objects`, `select-case`, and `format-value`. Inspect the current catalog before relying on other `TransformKind` members; a declared union member alone is not execution evidence. Pipeline and derived-state formatting share the Core formatter, with explicit configuration rather than inference from field names. Read [selection-presentation.md](references/selection-presentation.md) for date/mask semantics, coherent transient identity, editor proof, and the agentic shorthand boundary.
- A link-level `condition` is canonical Json Logic with explicit roots and no implicit root. A transform step `when` currently permits the implicit `source` root. Preserve this distinction when validating or migrating conditions.

For nested component ports, resolve the child through `NestedPortCatalogService`, component metadata, and a `nestedPath` that terminates in a stable `childWidgetKey`. New nested endpoints must not use `bindingPath`; that field is only a migration bridge. `NestedWidgetConfigAccessor` currently materializes nested widget inputs for tabs/nav and expansion containers. Other path segment kinds in the model require concrete proof in the owning container runtime; the union alone does not prove that input patching works.

Runtime component observations are redacted, time-bounded, untrusted grounding evidence. They may expose active page/widget refs, declared link ids, valid selected widget, surfaces, actions, warnings, and digests. They must omit business state values, full inputs, raw events, rendered DOM, and intent decisions. Never route intent or authorize an action from an observation.

## Decision Rules

- If the task is about authoring a page/editor graph, use the builder skill as the functional owner and this skill for the runtime contract.
- If the task is about Page Builder surface handoff or runtime observation evidence, keep Page Builder as the authoring owner and core as the execution/trust-boundary owner.
- If the task is specifically about `@praxisui/page-builder`, pair with `praxis-page-builder-composition` for palette, canvas, graph, connection editor, and page-builder-owned authoring semantics.
- If the task is about rich-content widgets, presets, host-mediated actions, or `RichContentDocument` materialization inside dynamic pages, pair with `praxis-rich-content-runtime` and `praxis-rich-content-integration-adapters`.
- If the task is about container widgets such as `@praxisui/tabs`, `@praxisui/stepper`, or `@praxisui/expansion`, pair with the owning runtime skill before changing widget event paths, nested widgets, registry metadata, or dynamic page materialization.
- If the task is about `SettingsValueProvider`, apply/save/reset, or config editor round-trip, use `praxis-authoring-editors` as well.
- If the task is about a specific widget's visual/product UX, use `praxis-ui-product-design` with the owning component skill.
- If a host composes a page by copying local event buses, action routers, or link transforms, prefer the core composition runtime or open a core follow-up.
- Do not persist local command strings such as `showAlert:...`, `surface.open:...`, or `navigate:...` when `GlobalActionRef`, surface metadata, or composition links can express the decision.
- Missing composition runtime, invalid dispatch source, unmatched links, or blocked delivery are structured runtime outcomes. Do not recover by guessing another source endpoint, parsing `surface.result.type`, or writing state directly in the host; repair the authored link/source, provider bootstrap, or composition definition and surface the diagnostic.

## Runtime Evidence

Before declaring composition complete, identify:

- source of the widget/component catalog entry
- canonical config shape being materialized
- event and output contract
- link or transform that moves data between widgets
- diagnostics when a target, port, or transform cannot resolve
- runtime observation evidence when behavior is user-visible
- redaction/serializability proof when observations feed AI or diagnostics
- public API and AI manifest impact when the component is public

Classify gaps before adding contracts:

- `ja-suportado-so-ux`: the link executes and trace/diagnostics exist, but the host does not present them.
- `ja-suportado-mal-nomeado-ou-mal-materializado`: the page still saves `connections`, uses `bindingPath` for new nested links, hides feedback-cycle diagnostics, or duplicates runtime snapshot state.
- `suportado-parcialmente`: the public model contains a policy, transform, or nested segment that the executor/accessor does not yet materialize.
- `lacuna-real-de-contrato`: no canonical endpoint, port metadata, transform, action, surface, or diagnostic can represent the required behavior.

Only the last category justifies a new shared contract. Extend the canonical owner and its consumers together; do not add an event bus, command-string router, custom transform registry, or host-only nested path convention.

## Same-SESSION SPA Owner Lifecycle

Use the existing Core context service and Config adapter; do not implement context
switching by changing tenant headers, component IDs, page inputs or a compatibility
flag. Confirm an opaque authorized `choiceRef` with the current
`expectedSelectionVersion`. Labels present choices; they do not choose scope.

Before mounting that journey, keep reference demos with fixed identity headers
out of a server-confirmed principal's page: use the existing
`user.resolvedFromServerPrincipal === true` fact, as the remote lab parent does,
with a monotonic presentation latch across null transitions. Keep the SESSION
consumer mounted once; hiding auto-fit/color/demo-tabs is not a grant or a new
contract/route/flag, and must not infer identity from cookies or roles. Check the
parent presentation spec and the browser `corporateLab` assertions before proof.

1. On each invalidation/unready emission, synchronously clear the host owner and
   visible document/JSON. Each newly confirmed owner receives fresh defaults from
   the canonical factory and a monotonic render epoch. Track that epoch to recreate
   the DWP even when A→null→A or A→B→A completes before Angular renders. Reusing the
   parent document lets GET404 accidentally adopt the previous tenant's defaults.
2. Capture the emitting epoch in `pageChange` and reject obsolete outputs. Correlate
   async catalog callbacks by operation and context revision, including A1→B→A2.
   Prevent duplicate selection submissions. CAS/503 selection failures cannot
   restore the former owner; allow an explicit context HTTP refresh. Catalog
   discovery failure alone does not revoke a still-confirmed owner.
3. Keep Core's context-bound queue guard. Discard not-yet-invoked obsolete jobs;
   do not redirect their payloads to the next tenant's headers. Recreate a fresh
   ready DWP in the same SPA/SESSION instead of requiring browser reload. This is
   host materialization, not live reuse of an obsolete page instance or cross-tab
   coordination. Draining after DWP view destruction requires the parent adapter
   provider to remain alive. Destroying that provider rejects callbacks/releases
   probes and carries no drain guarantee. Inspect the Config skill for captured
   transport/cache epochs.
4. Require an emitted current-owner load result before enabling writes. A genuine
   404 confirms absent config and permits that owner's fresh defaults; hard error,
   synchronous throw and EMPTY do not. Preserve the existing DWP i18n
   `persistence.loadFailed` alert with `role="alert"`; do not hide a failed load,
   expose its raw error, or call empty completion success.
5. A request already admitted/committed can finish after the view changes. Ignoring
   its ACK is not rollback, and operational admission followed by Config commit is
   not an atomic database fence. Same-SESSION claims require the real proof below;
   historical fresh-session/reload tests alone do not establish them. Render only
   safe context facts/presence markers, never raw opaque context versions.
   A functional proof on a warmed host does not certify recovery after idle or
   SLA. Preserve that evidence boundary, stable CSRF within one authenticated
   SESSION and unresolved connection-recovery failures using the Config proof workflow;
   a per-request token-rotation host bug is not a reason to bypass browser CAS;
   do not mask them with heartbeat traffic or widened authentication deadlines.

## Operational Proof

Before declaring composition guidance current, prove:

1. Happy path: a widget output matches one `composition.links` source, passes a supported transform, delivers to a canonical port or writable state, and records link status plus trace phases.
2. Risk path: a missing nested widget/port, incompatible semantic kind, invalid condition, unsupported transform, derived-state write, or unguarded feedback cycle produces the expected structured diagnostic and a non-divergent snapshot.
3. Feedback path: prove an unguarded component/component or component/state/component cycle degrades bootstrap and skips involved matched links with `RUNTIME_FEEDBACK_CYCLE_BLOCKED`; prove an intentional guarded cycle remains a warning by using `intentional-feedback` plus canonical guards.
4. Policy path: prove synchronous document order; prove `drop` rolls back only the failed link and permits later links; prove `halt-page` blocks later effects and future dispatch until a new bootstrap; reject removed `microtask`/`batched` values at canonical ingress.
5. Adversarial path: reject `page.connections`, new `bindingPath` links, local event buses, command strings, raw callback transforms, host-local loop breakers, and host implementations of composition policy semantics.
6. Certification path: preflight the authored plan against the target registry,
   then preserve first-pass/refinement lineage and a sanitized lifecycle receipt
   through apply, persistence, reload, and applicable CRUD/related/global-action
   effects. For nested composition, execute a fresh output-to-state-to-input
   interaction after reload so hash equality alone cannot hide an endpoint-match
   regression. Readiness and receipts remain derived evidence, never page inputs.
7. State-input overlap path: project a whole input object and an independent descendant override in both link orders within one segment. Verify the descendant survives persistence/reload in the rendered real form while source selection remains unchanged. Cover a same-widget nested delivery as an ordering barrier and another widget's nested delivery as unrelated; equal-path order and event/side-effect execution retain their existing behavior. A persisted state assertion or synthetic output emission alone does not prove input rehydration.
8. Remote writer path: prove serialized adapter calls, captured snapshots/keys, acknowledgement versus empty completion/error, and draining accepted jobs after view destruction only while provenance remains valid and the adapter provider remains alive. Require real remote control edits, acknowledged PUTs, GET/control round-trips and all exact-key pending/failed requests. For SPA switching, prove fresh owner/defaults and actual requests after A→null→B and coalesced A→B→A, obsolete output rejection, and load503/EMPTY blocking with the localized alert versus legitimate404. Use `praxis-config-runtime-persistence` for real before-admission and after-commit transport gates, scope/ETag and authorization proof; do not duplicate that contract here.

Use a focused Angular gate from the `praxis-ui-angular` root:

```bash
npm run test:core -- \
  --include=projects/praxis-core/src/lib/composition/composition-runtime.engine.spec.ts \
  --include=projects/praxis-core/src/lib/composition/composition-runtime.facade.spec.ts \
  --include=projects/praxis-core/src/lib/composition/link-executor.service.spec.ts \
  --include=projects/praxis-core/src/lib/composition/transform-runtime.service.spec.ts \
  --include=projects/praxis-core/src/lib/composition/composition-validator.service.spec.ts \
  --include=projects/praxis-core/src/lib/composition/composition-link-legacy-migrator.spec.ts \
  --include=projects/praxis-core/src/lib/composition/nested-port-catalog.service.spec.ts \
  --include=projects/praxis-core/src/lib/services/surface-binding-runtime.service.spec.ts \
  --include=projects/praxis-core/src/lib/widgets/dynamic-widget-page.component.spec.ts \
  --include=projects/praxis-core/src/lib/widgets/dynamic-widget-loader.directive.spec.ts \
  --include=projects/praxis-core/src/lib/widgets/dynamic-widget-page-runtime-observation.spec.ts \
  --include=projects/praxis-core/src/lib/widgets/dynamic-widget-page-record-surface-open.spec.ts \
  --include=projects/praxis-core/src/lib/services/runtime-component-observation-registry.service.spec.ts \
  --include=projects/praxis-core/src/lib/surfaces/praxis-surface-host.component.spec.ts \
  --include=projects/praxis-core/src/lib/surfaces/praxis-related-resource-outlet.component.spec.ts
npm run build:praxis-core
```

These gates prove the shared Angular runtime. Record Page Builder/Visual Builder authoring, owning-container nested paths, real global-action side effects, metadata-backed surface discovery, and browser UX as unverified unless their focused consumers were also exercised.

When the change is authored or exercised through Page Builder, add the focused authoring proof:

```bash
npm run ng -- test praxis-page-builder --watch=false --progress=false \
  --include=projects/praxis-page-builder/src/lib/editor/connection-editor/connection-editor.component.spec.ts \
  --include=projects/praxis-page-builder/src/lib/editor/connection-editor/connection-editor-graph.util.spec.ts \
  --include=projects/praxis-page-builder/src/lib/editor/connection-editor/connection-editor-trace.util.spec.ts \
  --include=projects/praxis-page-builder/src/lib/ai/page-builder-ui-composition-plan.spec.ts \
  --include=projects/praxis-page-builder/src/lib/ai/page-builder-agentic-authoring-turn-flow.spec.ts
```

When nested composition flows through container widgets, add the owning-container proof instead of inferring from the core union alone:

```bash
npm run ng -- test praxis-tabs --watch=false --progress=false --include=projects/praxis-tabs/src/lib/praxis-tabs-widget-event.spec.ts --include=projects/praxis-tabs/src/lib/praxis-tabs-widget-config-editor.spec.ts
npm run ng -- test praxis-stepper --watch=false --progress=false --include=projects/praxis-stepper/src/lib/praxis-stepper-widget-config-editor.spec.ts
npm run ng -- test praxis-expansion --watch=false --progress=false --include=projects/praxis-expansion/src/lib/praxis-expansion-widget-config-editor.spec.ts
```

## Validation Guidance

Prefer focused specs:

- composition runtime engine/facade/store specs
- composition validator specs for semantic compatibility, nested endpoints, and feedback-cycle diagnostics
- link executor and transform runtime specs
- nested port catalog specs
- dynamic widget loader and dynamic widget page specs
- widget recipe specs for rich table, nested path, actions workspace, and record surface open
- surface host and related-resource outlet specs

For visual/editor flows, add screenshot or browser validation through the official host route when feasible.

## Companion Skills

- Use `praxis-core-runtime-contracts` for public API, shared models, tokens, i18n, logging, and providers.
- Use `praxis-core-widget-observations` for dynamic widget models, loader, widget events, dynamic widget page, runtime observations, observation registry, and redaction/serializability proof.
- Use `praxis-core-global-action-payloads` when widget events or composition links execute structured global actions, payloadExpr, `surface.result`, or `dynamicPage.composition.dispatch`.
- Use `praxis-core-surface-materialization` when composition opens resource-derived surfaces or materialized related-resource payloads.
- Use `praxis-core-component-registry-contracts` when composition depends on component metadata registry entries, ports, insertion presets, or AI component context.
- Use `praxis-core-global-actions-metadata` for the broader global action and metadata-services umbrella.
- Use `praxis-core-providers-bootstrap` when composition runtime requires provider, token, or registry wiring.
- Use `praxis-authoring-editors` for editor/runtime round-trip and Settings Panel behavior.
- Use `praxis-page-builder-composition`, `praxis-page-builder-authoring`, and `praxis-page-builder-ai-agentic` when the shared runtime contract is being authored or exercised through `@praxisui/page-builder`.
- Use `praxis-tabs-runtime-authoring`, `praxis-stepper-wizard-runtime`, and `praxis-expansion-runtime-panels` when composition flows through those container widgets; use `praxis-navigation-containers-ai-validation` when their AI manifests, capabilities, context packs, or registry projection are involved.
- Use `praxis-navigation-container-composition-events` for cross-container nested widget event paths, dynamic page embedding, lazy container materialization, and composition-link proof across tabs, stepper/wizard, and expansion.
- Use `praxis-rich-content-runtime`, `praxis-rich-content-integration-adapters`, and `praxis-rich-content-ai-security-validation` when composition flows through structured rich-content documents or rich-content widgets.
- Use `praxis-ui-product-design` for visual hierarchy, accessibility, and screenshot QA.

