integration.opa-personalization-bridge
Bridge mapping the canonical @lssm-tech/lib.personalization surfaces (preference-dimensions, preference-evolution, behavior-signals, adaptive-surface) onto OPA optimizer objective weights, the behavior→preference learning loop, and role-aware booking/UI adaptation. No ad-hoc preference state.
@lssm-tech/integration.opa-personalization-bridgebun add @lssm-tech/integration.opa-personalization-bridgeManifest declarations describe the current workspace; they do not verify registry publication or runtime execution.
Package guide
Bridge between the canonical @lssm-tech/lib.personalization surfaces and Organization Planning & Agenda (OPA). It exists so OPA never grows ad-hoc preference state — all behaviour/preference logic flows through the canonical personalization lib.
Surfaces
./consent-gate— Layer 8 consent-gated behavioral signal ingestion, pseudonymized telemetry emission, mid-session withdrawal, and idempotentcandidate-privateerasure (createConsentGatedOpaSignalCollector,createInMemoryOpaCandidateSignalStore,probeOpaSignalAuthorityNonEscalation). Enforces zero tracking before consent, strict(tenantId, productApplicationId, candidatePrincipalRef)isolation, clean purge on erasure, andauthority: 'presentation-only'/canGrantAuthority: false../objective—mapPreferencesToObjective(dimensions): pure, deterministic mapping of the 7-dimensionPreferenceDimensionsmodel onto the OPA optimizer'sOptimizerObjectiveWeights(focus defense, priority, deadline urgency, fragmentation, context switch). Deep-work preferences raisefocusDefenseWeight; deadline-driven preferences raisedeadlineUrgencyWeight../learning— the behaviour → preference learning loop. OPA scheduling interactions (focus respected/broken, slot rescheduled, evidence expanded, guidance dismissed…) become canonicalPreferenceEvolutionObservations and canonicalBehaviorSignalModels, fed throughsuggestPreferenceEvolutionso the objective weights adapt over time. Behaviour signals carry only interaction kinds, dimension ids, and opaque surface ids — no PII../surface—resolveOpaAdaptiveSurface(...): a typed accessor the host/UI consumes to adapt booking/planning per user preference AND role. RoleMorph/ACL boundaries are authoritative and fail closed (a read-only auditor never gets advanced controls). Itsreasonstrace resolves from the OPA catalog (experience.personalization.reason.*) in the optionallocale(enby default)../opa-policy—deriveObjectiveFromOpaPolicy(policy): maps the OPA spec's local policy enums onto canonical preferences, so the spec'sapplyOpaPersonalizationPolicycan delegate to the canonical mapping instead of maintaining a parallel scoring system.
Privacy
Behaviour data is personal data and is minimised. Signals never include actor identity, names, emails, titles, or free text — only stable ids and dimension keys. createBehaviorSignalModel additionally fails closed on unsafe behavioural labelling.
Layering
This is an integration: it depends only downward on lib.personalization and lib.organization-planning-spec. It owns no scheduling, persistence, or optimizer logic (those live in spec/runtime).
Relationships
Arrows point from a package to its direct dependency. Counts are derived from captured workspace manifests.
2 declarations
@lssm-tech/lib.organization-planning-specworkspace:^
Read the package manual ↗@lssm-tech/lib.personalizationworkspace:^
Read the package manual ↗
Declared capabilities
Bridge mapping the canonical @lssm-tech/lib.personalization surfaces (preference-dimensions, preference-evolution, behavior-signals, adaptive-surface) onto OPA optimizer objective weights, the behavior→preference learning loop, and role-aware booking/UI adaptation. No ad-hoc preference state.
Scripts
buildcontractspec-bun-build buildbuild:bundlecontractspec-bun-build transpilebuild:typescontractspec-bun-build typesdevcontractspec-bun-build devcleanrimraf dist .turbolint:checknode ../../../scripts/biome.cjs check .lint:fixnode ../../../scripts/biome.cjs check --write .testbun testprebuildcontractspec-bun-build prebuildtypechecktsgo --noEmit