Status: product decision, 2026-05-10 evening session. Supersedes the
morning version of this file. Backend is live and indexed
(168 docs, see UXCORE_RAG_HANDOFF.md). The floating-button test page at
/concierge-test was a working spike — do not ship it as-is, this spec
replaces it.
One sentence: a guide, not a chatbot. Every reply is short, every reply ends with 2-3 next-step cards, every card click navigates the page under the widget while the widget stays open and reacts.
The differentiator: the widget doesn't answer and stop — it walks the user through the site.
- Name on the pill: "Ask UX Core" + small icon. The UX Core brand is stronger than KeepSimple itself; it pulls curiosity.
- The widget knows the entire site (UX Core, UXCG, UXCP, Pyramids, articles, AI Atlas) — not only UX Core. The pill name is a doorway, not a scope limit.
- Voice: professorial, formal "вы" / formal English, but never walls of text. Reads like a Harvard professor who respects your time.
- Idle: pill anchored bottom-right of every page. Icon + "Ask UX Core". Subtle pulse every few seconds (idle attention; not aggressive).
- Open: floating panel ~380×520 px, anchored bottom-right, hovers above the page. Does not compress page content (a full-height sidebar would smash the UX Core grid — explicitly rejected).
- Visual style: KeepSimple-native (paper, cream, terracotta accents,
editorial type). Note:
/uxcoreis a sibling repo with its own design; the widget keeps a single identity across both surfaces — it does not morph per host page. - Mobile is deferred. Will think later.
Empty input + cursor. No suggested prompts, no greeting, no page-aware opener (a page-aware opener was considered and rejected — on a bias page the example is right there on the page already).
- Answer text: ≤ 2 sentences, ~200 chars. No paragraph dumps.
- 2-3 cards as next steps, title only — no preview line, no type chip. Clean, like Arc Search results.
If the user query is vague, the widget may answer with a single counter-question before giving the answer ("the LLM decides by confidence"). On a clear request, it answers immediately. This is the "sometimes Socratic" mode and is the principal upgrade Wolf wanted.
The page navigates beneath the widget. The widget stays open and reacts: "Открыл Anchoring. Что дальше — пример или приём?" with new next-step cards. This continuous reaction is what turns the widget from a chat into a guide.
If the user navigates via the site's own nav (not via a card), the widget stays silent. It does not chase the user. The next move is the user's.
Conversation is a scrolling chat feed within the browser tab. Closing the panel (× / Esc) collapses it back to the pill — history is preserved until the tab closes. Reopen → continue where you left off.
No cross-session memory, no problem-map artifact, no TTS — these were considered and explicitly cut. A well-built guide does not need them.
When RAG returns nothing strong, the widget says something like: "Не нашёл точно, но вот близкое" + 1-2 nearest cards. It never goes silent and never reaches a dead end.
The widget follows the site locale (useRouter().locale):
en / ru (HY falls back to EN as everywhere else on the site).
No in-widget locale selector.
- Mobile.
- Memory of what the user has already read.
- A "your problem map" shareable artifact.
- TTS / voice answers.
- First-visit tooltip onboarding ("Спросите про UX Core").
- Page-aware first-screen prompts.
- Diagnostic flow with persona generation (was the original variant #3 in the three-options discussion; remains the natural follow-up after this concierge ships and is validated).
These are deliberately deferred. If the guide is built well, none of them are needed for the feature to feel premium.
- Single source of truth: the widget is a standalone JS bundle.
Both
keepsimple-ossandUXCoreOSSrepos add one<script src=...>line in<head>. One codebase, no per-repo divergence. - The corresponding edge-injection variant (Cloudflare Worker rewrites HTML to inject the script) is cleaner but harder; flagged as a follow-up question for The Order as an optional upgrade. Do not block on it.
- Scope on the site: every public page. Auth flows, checkout, user dashboard, Longevity Protocol, Vibesuite remain excluded (wrong context — that exclusion list survives from the morning version of this brief).
- Backend already wired:
POST /query/conciergeathttps://keepsimple-rag.administration.ae- Cloudflare Access service token in
.env.local(CF_ACCESS_CLIENT_ID/CF_ACCESS_CLIENT_SECRET) - Proxy pattern in
UXCORE_RAG_HANDOFF.md - Returns
{answer}Markdown; strip or stylize[KG]/[DC]markers.
- Abuse protection: anonymous session token in a cookie, per-token
rate limit (~20 requests / 10 min). Plus a Cloudflare-level rate limit
on
/api/concierge. No login wall (would lose the audience), no CAPTCHA (would feel hostile). - Analytics (Mixpanel): pill-open, query-sent, card-click, panel-close. Enough to see whether the feature is used and whether the guide flow holds.
- One mount point. A single
<AskUxCore />component added to the root layout in each repo. Never pasted into individual page files. - One config file controlling per-route visibility (the excluded-routes list above).
- One kill switch. A single env flag
(
NEXT_PUBLIC_ASK_UX_CORE_ENABLED) turns the whole feature off site-wide. Default off until merged + Wolf flips it on. - Small atomic PRs. Each PR routed through The Order or QA for structural review before merge. Wolf does not read code — we translate.
All three landed:
- Corpus. Re-indexed: 168 → 200 docs. Biases (105) + UXCG (63) +
articles (28) + pyramids (3) + company-management (1).
AI Atlas deferred until we hand The Order the new content path
(his old
/home/wolf/projects/ai-atlaswas deleted from the host). See "AI Atlas follow-up" below. - Citation URLs. Re-emit was already correct from the morning:
/uxcore/<slug>,/uxcg/<slug>,/articles/<slug>,/company-management. New endpointGET /citations/debtreturns the 5 known content-debt items (3 pyramids + 1 company-management single-page + AI Atlas pending). Widget should drop or relabel chips for those slugs. - Bundle host.
https://widget.administration.aeis live, public, CORS-locked to keepsimple.io + staging + localhost. Deploy:rsync ./dist/ contabo-wolf:/home/wolf/widget-bundle/. Hashed assetsCache-Control: 1y immutable; entry HTMLno-cache, so new bundles ship instantly.
Edge-injection (CF Worker HTML rewrite) flagged as a follow-up, not blocking.
AI Atlas ingested: 32 dossiers, one doc per sector. Citations resolve
to /ai-atlas#<sector-id>. Corpus now 232 docs total. RU locale is
one config flip away (not yet flipped — request that as part of
"flip RU index" ask whenever we're ready).
The Order's GET /citations/debt returns 4 remaining items:
3 pyramids + 1 company-management single-page. They all share the
URL /company-management. Widget rule: if a citation's URL is on
the debt list, drop the chip entirely (don't render a card). We
prefer "fewer cards" over "card that links to a generic page that
doesn't answer the question". Re-evaluate when content is added.
- Streaming: LLM answer streams word-by-word into the panel (no spinner replacing the answer once a token arrives). Cards render after the answer completes. Streaming makes ≤200-char answers feel instant and alive.
- Errors:
- Network fail / timeout: "Не получилось дотянуться, попробуйте ещё раз" + retry button. No carded fallback.
- Rate limit hit (per-token quota): "Многовато за раз. Подождите минуту" + auto-retry timer. No retry button.
- Server 500: same as network fail copy. These are short by design — the widget's brand is concision.
- Translate this spec into 3-4 atomic engineering tickets: one for the bundle, one for the panel UI, one for the API integration + rate-limit middleware, one for analytics + kill switch.
- Send The Order the corpus + citation + hosting asks above.
- Build the bundle. Wire it into both repos behind the env flag.
- QA smoke: homepage, one article, one bias page (once /ux-core destinations exist), one Pyramids page.
- Flip flag in staging. Wolf eyeballs. Iterate on tone + card selection from real session traces.
- Promote to production via the agreed image + brain-snapshot pattern (HANDOFF.md).
- Don't ship
/concierge-testas the user-facing surface. - Don't add the widget per-page.
- Don't ship without the env kill switch.
- Don't add memory / problem-map / TTS / mobile / onboarding tooltips in this MVP — they were cut on purpose.
- Don't make the widget louder than the page it lives on. The whole point is that it walks beside the user.