Date: 2026-05-05
Trigger: Sam asked how to get an AI to learn the firm and communicate with web visitors as an interactive section vs a chatbot.
Full production bundle now sitting at /mnt/user-data/outputs/sa-concierge/ and zipped at /mnt/user-data/outputs/sa-concierge.zip. Files:
worker/worker.js - Cloudflare Worker with system prompt, /api/chat proxy, /api/log endpoint, KV rate limiting (30/hr/IP), em-dash regex backstop, banned-word violation logging, nightly cron that flushes KV logs to Notion.worker/wrangler.toml - Worker config. Account ID baked in: 984bc799da7024033ddc9172d72de27a. Cron 0 4 * * * for nightly Notion flush. KV namespace ID needs replacement after first wrangler kv:namespace create CONCIERGE_KV.embed/concierge.js - Vanilla JS embed, no dependencies, ~14KB. Two-mode UI: guided card path (crash type, when, injuries) plus free-form chat. Brand colors hardcoded. Phone CTA pinned. Mobile-first responsive.wp/staging-block.html - Drop-in for WP Custom HTML block. Script URL placeholder needs swap after embed is hosted.skill/SKILL.md - The web-ai-concierge skill. Codifies system prompt, banned-word enforcement, escalation triggers, embed pattern, monthly content-refresh routine.DEPLOY.md - 25-minute end-to-end runbook.sa-concierge.zip - Whole bundle, 20KB.984bc799da7024033ddc9172d72de27a (Aguiarlawmarketing@gmail.com).Sam needs to do these to go live. Total ~25 minutes.
cd worker; wrangler login; wrangler kv:namespace create CONCIERGE_KV (paste returned ID into wrangler.toml), then wrangler secret put ANTHROPIC_API_KEY (his Anthropic API key from console.anthropic.com), wrangler secret put NOTION_TOKEN (Notion integration token from notion.so/profile/integrations - integration must be connected to the analytics DB), wrangler secret put NOTION_DATABASE_ID (paste 25a5d96a473545f5a5ff83345fbc32b0), wrangler deploy. Health-check the URL.cdn.aguiarinjurylawyers.com. Alt: serve from same Worker (one code addition needed). Alt: WP uploads folder.wp/staging-block.html into Custom HTML block, swap script URL.