# Trust Weighting UI/API Prep — PREP-POLICY-ENGINE-30-101-TRUST-WEIGHTING-UI- Status: Draft (2025-11-20) Owners: Policy Guild Scope: Capture the UI/API surfaces for trust weighting once change events (30-003) are available. ## Dependencies - Change events payload (30-003) and overlay schema (30-001). - UI design tokens/UX from Console/Policy surfaces (not yet provided). ## Proposed API surface (draft) - `GET /policy/trust-weighting` → returns current weights per source (`cartographer`, `concelier`, `scanner`, `advisory_ai`, etc.) and effective profile hash. - `PUT /policy/trust-weighting` → accepts deterministic payload sorted by `source` with fields: `{source, weight, justification?, updated_at}`. - `GET /policy/trust-weighting/preview?overlay_hash=` → previews recalculated statuses using supplied weights (calls simulation bridge under the hood). ## Determinism & validation - Weights are decimals with fixed scale 3; sum not required to 1 but capped at max per policy profile. - Payloads canonical JSON ordering; timestamps UTC. ## Acceptance to close PREP - Align sources list with 30-003 change event fields and overlay inputs. - Document schema at `docs/modules/policy/schemas/trust-weighting@draft.json` and sample at `docs/modules/policy/samples/trust-weighting@draft.json`. ## Handoff Treat this as the prep artefact for PREP-POLICY-ENGINE-30-101-TRUST-WEIGHTING-UI-. Finalize once 30-003 is frozen and UI tokens arrive; then move implementation to DOING.