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; 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 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.
- 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.
- 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.
- 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.
- 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.
- 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 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.
- 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.
- 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.
- 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.
- 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.
- 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:
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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:
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:
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:
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.
1---2name: praxis-core-composition-runtime3description: "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."4metadata:5 source: https://skillmd.com/skills/codexrodrigues/praxis-core-composition-runtime6---78# Praxis Core Composition Runtime910Use this skill for `@praxisui/core` composition, widget, dynamic page, connection, and surface-host runtime contracts.1112This 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.1314## Source Audit1516Inspect the affected source before changing guidance or code:1718- `projects/praxis-core/AGENTS.md`19- `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 changes20- `projects/praxis-core/docs/connection-editor.md`21- `projects/praxis-core/docs/dynamic-page-serialized-persistence.md` and `docs/table-connections-persistence-lab-baseline.md` for context-bound writers and SPA owner replacement22- `projects/praxis-core/src/lib/services/config-storage.service.ts` and `enterprise-runtime-context.service.ts` when a composition consumer switches enterprise context23- `src/app/features/remote-config-storage-persistence-lab/session-tabs-consumer.component.ts` and its focused spec for the existing same-SESSION owner/choice materialization24- `projects/praxis-core/docs/rfc-dynamic-page-canvas-runtime.md`25- `projects/praxis-core/src/lib/composition/**`26- `projects/praxis-core/src/lib/widgets/**`27- `projects/praxis-core/src/lib/surfaces/praxis-surface-host.component.ts`28- `projects/praxis-core/src/lib/surfaces/praxis-related-resource-outlet.component.ts`29- `projects/praxis-core/src/lib/models/composition-*.ts`30- `projects/praxis-core/src/lib/models/port-contract.model.ts`31- `projects/praxis-core/src/lib/models/runtime-component-observation.model.ts`32- `projects/praxis-core/src/lib/services/runtime-component-observation-registry.service.ts`33- `projects/praxis-core/src/lib/services/surface-binding-runtime.service.ts`3435Read 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.3637## Canonical Boundary3839Core owns:4041- `WidgetDefinition`, `WidgetPageDefinition`, widget shell contracts, widget events, nested widget config access42- dynamic widget loading and materialized widget runtime43- composition link model, transform pipeline, diagnostics, runtime traces, link execution, nested ports44- surface host and related-resource outlet runtime45- runtime component observation and event propagation46- bridge points used by Page Builder agentic authoring, including observations, surface handoff, and component-port grounding4748Page Builder, Visual Builder, component libraries, and host apps consume these contracts. They should not redefine the same config/event/link semantics locally.4950## Canonical Read And Execution Path5152- 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.53- 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.54- Use `WidgetPageCompositionFactory` to materialize widget order, indexed widgets, links, state, derived definitions, and context before bootstrapping `CompositionRuntimeEngine`.55- 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.56- 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.57- 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.58- 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.59- 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.60- 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.61- Treat `surface.result` and `dynamicPage.composition.dispatch` as runtime event delivery into the62 composition engine, not config mutation APIs. Drawer result envelopes, row selections, and returned63 surface payloads must move through declared links, transforms, state endpoints, or global-action64 continuations; do not write them directly into widget `definition.inputs`, form/table config, page65 JSON, or host-local state.66- If a drawer outcome should update a component, author that update as a canonical composition link67 with a concrete source endpoint, target endpoint, supported transform, and feedback-cycle guard when68 relevant. Do not infer component mutation from `surface.result.type`, selected row shape, or returned69 payload fields.70- Consume the immutable `RuntimeSnapshot` from the facade/store as execution evidence. Do not maintain a second host state for link status, trace, or diagnostics.71- Treat trace payloads, `inputSnapshot`, `outputSnapshot`, link delivered values, and diagnostics as runtime evidence for audit,72 debugging, AI grounding, and UX feedback. They are not persistence state, business authorization, or a source for choosing73 another action/link after the fact. If a value needs to affect business state or another component, model that effect as a74 declared composition link, writable state endpoint, global-action continuation, or backend-confirmed command.75- 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.76- 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.7778Legacy 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.7980## Governed Page Publication Profile8182For copying or admitting a publication document, inspect Core's83`src/lib/widgets/page-publication/**`, `docs/page-publication-codec.md` and84`docs/page-publication-codec-delivery.md`, plus Config's85`docs/ai/contracts/page-publication-p0/`. Config owns the closed86`praxis.dynamic-page.editor` contract; Core materializes it using the existing87graph and identity models. This restricted profile is not the full composition88runtime described above.89901. Decode raw authorship with `decodePageAuthoringDocument`, then use91 `validatePageAuthoringDocument` with the owning Form/Table validators. Missing92 owners fail closed. Structural success does not prove native config, admitted93 ports/icons/groups, immutable provenance, authorization or publication.942. Keep child configuration content solely in `definition.inputs.config` and95 preserve admitted binding/context inputs for native reconstruction. Owner96 adapters reconstruct native envelopes from these inputs; do not add a runtime97 `authoringDocument` input or normalize the graph before validation. Unsupported98 features must produce diagnostics rather than disappear during serialization.993. Preserve presence, null, zero, false, empty strings and array order. Use100 `cloneBoundedUiLayoutJsonDocument` for the shared 256 KiB UTF-8 bound and maximum101 container depth 64, counting the root as 1; do not replace it with a lossy JSON102 clone at ingress. The103 whole envelope counts. JavaScript numeric identity does not attest raw wire104 precision or backend canonical hashes.1054. Copy through `copyPageAuthoringDocument` using catalog-allocated UUIDs and an106 exact typed widget/link map. Rewrite endpoint references through the widget107 namespace only; preserve UUID-looking literals. A copy resets navigation and108 requires fresh governance. The pure helper does not allocate identities or109 create a server draft.1105. Use `buildPublishedPageIdentity` with the host's registered namespace and111 `derivePageChildRuntimeId` for stable page/widget identities. Titles never112 choose routes. Deriving an ID alone does not suppress personal persistence;113 the owning adapters must provide that runtime behavior.114115Compare derived fixture provenance/hashes with the integrated Config source and116run `page-publication/*.spec.ts` plus `ui-layout-json.util.spec.ts`. Public API117changes require Core build, a direct consumer build and the applicable browser118regression. Keep those results separate from downstream Page Builder/host119save-publish-reload evidence: the pure APIs do not activate that journey. Pair120with `praxis-form-editor-document-roundtrip`, `praxis-table-authoring-settings`121and `praxis-config-runtime-persistence` for native and server admission.122123## Published Shell Presets124125`widgets/widget-shell-presets.ts` owns the single `BUILTIN_WIDGET_SHELL_PRESETS`126catalog. `BUILTIN_SHELL_PRESETS` is its derived public ID lookup, not a second set127of appearance definitions. Preserve published IDs when evolving the catalog;128inspect `widget-shell-published-presets.spec.ts` and shell-editor round-trip tests.129Published IDs remain resolvable; visual recalibration is not pixel-for-pixel130historical compatibility. Dark-glass and graphite retain dark material defaults. Corporate hosts override via131`context.ui.shell.presets` and explicit widget `appearance`, using CSS tokens there;132do not mutate exported catalogs or map old IDs to unrelated new styles.133`frameless` intentionally keeps the corrected content inset; an explicit134`appearance.body.padding: "0"` requests the previous edge-to-edge treatment.135This documented visual difference must not be described as byte-identical baseline136compatibility. Name-only export validation also does not prove full API compatibility.137138### Material fields and nested shells139140Inspect `WidgetShellAppearance`: `card.borderWidth`, `card.borderStyle`,141`card.backdropFilter`, `card.fallbackBackground`, `header.borderWidth` and142`header.borderStyle` are canonical fields. Defaults remain 1px solid. Card borders143may vary per side; the header owns one bottom divider. Explicit appearance overrides144the resolved preset. Resolve the shell editor context from `mergedContext.ui.shell`145without persisting inherited theme data into the widget.146147Reset these material CSS variables at each `.pdx-shell` boundary so nesting does not148implicitly inherit an outer thick/dashed/blurred treatment. Preserve intentional149`context.ui.shell.preset/presets` inheritance. Test both paths in150`widget-shell-material.spec.ts`; do not indiscriminately reset all global theme tokens.151Glass uses transparency plus backdrop-filter, with an opaque paired-color fallback152for unsupported filters, reduced transparency, expanded/fullscreen and sticky headers.153154## Implemented Contract Limits155156Do not infer executable support from a public union or serialized field alone:157158- Link policy currently executes `missingValuePolicy`, `distinct`, `distinctBy`, and `debounceMs`.159- `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.160- 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.161- 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.162163For 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.164165Runtime 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.166167## Decision Rules168169- 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.170- 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.171- 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.172- 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`.173- 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.174- If the task is about `SettingsValueProvider`, apply/save/reset, or config editor round-trip, use `praxis-authoring-editors` as well.175- If the task is about a specific widget's visual/product UX, use `praxis-ui-product-design` with the owning component skill.176- 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.177- Do not persist local command strings such as `showAlert:...`, `surface.open:...`, or `navigate:...` when `GlobalActionRef`, surface metadata, or composition links can express the decision.178- 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.179180## Runtime Evidence181182Before declaring composition complete, identify:183184- source of the widget/component catalog entry185- canonical config shape being materialized186- event and output contract187- link or transform that moves data between widgets188- diagnostics when a target, port, or transform cannot resolve189- runtime observation evidence when behavior is user-visible190- redaction/serializability proof when observations feed AI or diagnostics191- public API and AI manifest impact when the component is public192193Classify gaps before adding contracts:194195- `ja-suportado-so-ux`: the link executes and trace/diagnostics exist, but the host does not present them.196- `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.197- `suportado-parcialmente`: the public model contains a policy, transform, or nested segment that the executor/accessor does not yet materialize.198- `lacuna-real-de-contrato`: no canonical endpoint, port metadata, transform, action, surface, or diagnostic can represent the required behavior.199200Only 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.201202## Same-SESSION SPA Owner Lifecycle203204Use the existing Core context service and Config adapter; do not implement context205switching by changing tenant headers, component IDs, page inputs or a compatibility206flag. Confirm an opaque authorized `choiceRef` with the current207`expectedSelectionVersion`. Labels present choices; they do not choose scope.208209Before mounting that journey, keep reference demos with fixed identity headers210out of a server-confirmed principal's page: use the existing211`user.resolvedFromServerPrincipal === true` fact, as the remote lab parent does,212with a monotonic presentation latch across null transitions. Keep the SESSION213consumer mounted once; hiding auto-fit/color/demo-tabs is not a grant or a new214contract/route/flag, and must not infer identity from cookies or roles. Check the215parent presentation spec and the browser `corporateLab` assertions before proof.2162171. On each invalidation/unready emission, synchronously clear the host owner and218 visible document/JSON. Each newly confirmed owner receives fresh defaults from219 the canonical factory and a monotonic render epoch. Track that epoch to recreate220 the DWP even when A→null→A or A→B→A completes before Angular renders. Reusing the221 parent document lets GET404 accidentally adopt the previous tenant's defaults.2222. Capture the emitting epoch in `pageChange` and reject obsolete outputs. Correlate223 async catalog callbacks by operation and context revision, including A1→B→A2.224 Prevent duplicate selection submissions. CAS/503 selection failures cannot225 restore the former owner; allow an explicit context HTTP refresh. Catalog226 discovery failure alone does not revoke a still-confirmed owner.2273. Keep Core's context-bound queue guard. Discard not-yet-invoked obsolete jobs;228 do not redirect their payloads to the next tenant's headers. Recreate a fresh229 ready DWP in the same SPA/SESSION instead of requiring browser reload. This is230 host materialization, not live reuse of an obsolete page instance or cross-tab231 coordination. Draining after DWP view destruction requires the parent adapter232 provider to remain alive. Destroying that provider rejects callbacks/releases233 probes and carries no drain guarantee. Inspect the Config skill for captured234 transport/cache epochs.2354. Require an emitted current-owner load result before enabling writes. A genuine236 404 confirms absent config and permits that owner's fresh defaults; hard error,237 synchronous throw and EMPTY do not. Preserve the existing DWP i18n238 `persistence.loadFailed` alert with `role="alert"`; do not hide a failed load,239 expose its raw error, or call empty completion success.2405. A request already admitted/committed can finish after the view changes. Ignoring241 its ACK is not rollback, and operational admission followed by Config commit is242 not an atomic database fence. Same-SESSION claims require the real proof below;243 historical fresh-session/reload tests alone do not establish them. Render only244 safe context facts/presence markers, never raw opaque context versions.245 A functional proof on a warmed host does not certify recovery after idle or246 SLA. Preserve that evidence boundary, stable CSRF within one authenticated247 SESSION and unresolved connection-recovery failures using the Config proof workflow;248 a per-request token-rotation host bug is not a reason to bypass browser CAS;249 do not mask them with heartbeat traffic or widened authentication deadlines.250251## Operational Proof252253Before declaring composition guidance current, prove:2542551. 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.2562. 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.2573. 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.2584. 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.2595. 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.2606. Certification path: preflight the authored plan against the target registry,261 then preserve first-pass/refinement lineage and a sanitized lifecycle receipt262 through apply, persistence, reload, and applicable CRUD/related/global-action263 effects. For nested composition, execute a fresh output-to-state-to-input264 interaction after reload so hash equality alone cannot hide an endpoint-match265 regression. Readiness and receipts remain derived evidence, never page inputs.2667. 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.2678. 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.268269Use a focused Angular gate from the `praxis-ui-angular` root:270271```bash272npm run test:core -- \273 --include=projects/praxis-core/src/lib/composition/composition-runtime.engine.spec.ts \274 --include=projects/praxis-core/src/lib/composition/composition-runtime.facade.spec.ts \275 --include=projects/praxis-core/src/lib/composition/link-executor.service.spec.ts \276 --include=projects/praxis-core/src/lib/composition/transform-runtime.service.spec.ts \277 --include=projects/praxis-core/src/lib/composition/composition-validator.service.spec.ts \278 --include=projects/praxis-core/src/lib/composition/composition-link-legacy-migrator.spec.ts \279 --include=projects/praxis-core/src/lib/composition/nested-port-catalog.service.spec.ts \280 --include=projects/praxis-core/src/lib/services/surface-binding-runtime.service.spec.ts \281 --include=projects/praxis-core/src/lib/widgets/dynamic-widget-page.component.spec.ts \282 --include=projects/praxis-core/src/lib/widgets/dynamic-widget-loader.directive.spec.ts \283 --include=projects/praxis-core/src/lib/widgets/dynamic-widget-page-runtime-observation.spec.ts \284 --include=projects/praxis-core/src/lib/widgets/dynamic-widget-page-record-surface-open.spec.ts \285 --include=projects/praxis-core/src/lib/services/runtime-component-observation-registry.service.spec.ts \286 --include=projects/praxis-core/src/lib/surfaces/praxis-surface-host.component.spec.ts \287 --include=projects/praxis-core/src/lib/surfaces/praxis-related-resource-outlet.component.spec.ts288npm run build:praxis-core289```290291These 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.292293When the change is authored or exercised through Page Builder, add the focused authoring proof:294295```bash296npm run ng -- test praxis-page-builder --watch=false --progress=false \297 --include=projects/praxis-page-builder/src/lib/editor/connection-editor/connection-editor.component.spec.ts \298 --include=projects/praxis-page-builder/src/lib/editor/connection-editor/connection-editor-graph.util.spec.ts \299 --include=projects/praxis-page-builder/src/lib/editor/connection-editor/connection-editor-trace.util.spec.ts \300 --include=projects/praxis-page-builder/src/lib/ai/page-builder-ui-composition-plan.spec.ts \301 --include=projects/praxis-page-builder/src/lib/ai/page-builder-agentic-authoring-turn-flow.spec.ts302```303304When nested composition flows through container widgets, add the owning-container proof instead of inferring from the core union alone:305306```bash307npm 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.ts308npm run ng -- test praxis-stepper --watch=false --progress=false --include=projects/praxis-stepper/src/lib/praxis-stepper-widget-config-editor.spec.ts309npm run ng -- test praxis-expansion --watch=false --progress=false --include=projects/praxis-expansion/src/lib/praxis-expansion-widget-config-editor.spec.ts310```311312## Validation Guidance313314Prefer focused specs:315316- composition runtime engine/facade/store specs317- composition validator specs for semantic compatibility, nested endpoints, and feedback-cycle diagnostics318- link executor and transform runtime specs319- nested port catalog specs320- dynamic widget loader and dynamic widget page specs321- widget recipe specs for rich table, nested path, actions workspace, and record surface open322- surface host and related-resource outlet specs323324For visual/editor flows, add screenshot or browser validation through the official host route when feasible.325326## Companion Skills327328- Use `praxis-core-runtime-contracts` for public API, shared models, tokens, i18n, logging, and providers.329- Use `praxis-core-widget-observations` for dynamic widget models, loader, widget events, dynamic widget page, runtime observations, observation registry, and redaction/serializability proof.330- Use `praxis-core-global-action-payloads` when widget events or composition links execute structured global actions, payloadExpr, `surface.result`, or `dynamicPage.composition.dispatch`.331- Use `praxis-core-surface-materialization` when composition opens resource-derived surfaces or materialized related-resource payloads.332- Use `praxis-core-component-registry-contracts` when composition depends on component metadata registry entries, ports, insertion presets, or AI component context.333- Use `praxis-core-global-actions-metadata` for the broader global action and metadata-services umbrella.334- Use `praxis-core-providers-bootstrap` when composition runtime requires provider, token, or registry wiring.335- Use `praxis-authoring-editors` for editor/runtime round-trip and Settings Panel behavior.336- 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`.337- 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.338- 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.339- 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.340- Use `praxis-ui-product-design` for visual hierarchy, accessibility, and screenshot QA.