Observer/Help/Glossary
Kquick switch[email protected]
HELP · GLOSSARY

Glossary

Every term that has a precise meaning, defined once.

HelpContext
The structured object the Observer emits on every interesting event. Contains route, identity (hashed), focus, interaction signals, page snapshot, app profile, and meta. It is the input to the Knowledge Engine.
KnowledgePacket
What the Knowledge Engine returns. Resolved concept (definition, regulatory origin, risk level, risk consequence) + jurisdiction variant + role guidance + workflow hint + interaction context + sources + meta (KB version, confidence score, fallback flag). It is the input to the AI Content Generator.
ContentPayload
What the AI Content Generator returns. Six possible components (tooltip, riskCallout, roleGuidance, workflowNudge, correctionGuidance, fallbackMessage), each with a `shown` boolean. Plus meta (model, language, cached, fallback, groundingVerified). It is what the UI Injector renders.
Host app
Any application the Observer is deployed to (Elyxen, LBR Compliance, etc.). The host app does not import any help-layer code — it just loads two <script> tags.
Observer
The vanilla-JS bundle that reads route/identity/focus/interaction from the host app and emits HelpContext events. Under 8 KB gzipped, zero dependencies.
UI Injector
The vanilla-JS bundle that renders ContentPayload components inside a shadow DOM root attached to document.body. It is the only piece that mutates the host page — and only by adding overlays, never by modifying the host's own DOM.
Concept
ConceptEntry
A single entry in the knowledge base. Has a canonical label, domain, definition, regulatory origin, risk level + consequence, sources, optional jurisdiction variants, optional role guidance, optional workflow hints. Goes from status: draft → review → published.
Field alias
FieldAliasEntry
A mapping from a host app's form field to a concept. Supports four matcher types: exact data-concept-id, exact field-id, exact aria-label, fuzzy label (Jaccard ≥ 0.5). Highest-confidence match wins.
Jurisdiction variant
An override of definition / regulatoryOrigin / riskConsequence for a specific jurisdiction. Selected by identity.jurisdiction, falling back to app.jurisdictions[0], falling back to the base concept.
Role guidance
Per-role override of the guidance shown to the user. Selected by walking identity.roles in order — first match wins. Skipped entirely if featureFlag.roleAwareContent is off.
Workflow hint
What step the user is on and what comes next. Keyed by (appId, module, submodule, conceptId) with three fallback tiers. Drives the workflowNudge component.
Grounding validation
Every regulatory citation in the AI Generator's output must appear in the KnowledgePacket's source list. If the LLM hallucinates a source, the output is rejected and retried once with a stricter prompt; if it fails again, degraded mode kicks in. This is the product's legal protection.
Degraded mode
When the LLM is unreachable, rate-limited, or fails grounding twice in a row, the Content Generator assembles a ContentPayload directly from the KnowledgePacket fields. Less polished, accurate by construction. Users always get help.
Telemetry
help:* events (ready, context, content, feedback, error, destroyed) emitted by the Observer and Injector, batched via navigator.sendBeacon, ingested by the Registry API's /telemetry endpoint.
observerEnabled
Per-app feature flag. When false, the Observer bundle loads silently and emits nothing — the safety net during deployment. When true, telemetry flows.
Registry
The Postgres-backed service that holds the list of host apps, their profiles, telemetry events, error events, and rollout stages. The Observer fetches its app profile from here on every page load (cached for 5 minutes).