Connect
Open the activity pipe (SDK in this spike; PostHog webhook in Approach A sellable form).
POST /v1/events
Approach A · Layer · Self-hosted
Self-hosted context layer in the Nudgely Prototype — Glance Intelligent Detect: connect activity, evaluate against paths, proactive coach. Today’s JSON files are the compiled path + coach stand-in (self-hosted, no LLM in MVP).
00 · Product journey
Not a selector CMS. Not “describe intent → AI Publish.” Same order as Glance Intelligent Detect docs: connect → golden paths → live / evaluate. See journey doc and console mock.
Open the activity pipe (SDK in this spike; PostHog webhook in Approach A sellable form).
POST /v1/events
Define ideal action sequences to evaluate. Prototype MVP = JSON per route (compile target for coach).
gid/playbooks/*.json
Dwell / off-path → proactive offer. FSM cooldown. Delivery = coach sheet in-app.
GET /v1/proactive
Connect + paths + evaluate — not babysitting every offer. Triggers stay mostly built-in / eng.
gid-admin-mock.html
01 · Runtime (prototype spike)
The prototype stays the product. GID is the side layer: collect → detect → resolve path playbook → render coach. Playbooks here = recorded-path stand-ins for the 18 screens (eng-authored JSON until console ships).
Hooks go() and clicks. Emits pageviews/clicks with canonical_url.
collector.js
Local FastAPI. Dwell / ping-pong. Offers only when a path playbook matches the route.
glance-intelligent-detect/
Compiled guidance per screen (title + steps). Runtime contract — not the customer happy-path UI.
gid/playbooks/*.json
Nudgely sheet + spotlight on the step target. “Help” FAB on every screen.
coach-ui.js + playbook-runner.js
02 · Wiring
Vendor untouched (integrity check). All GID code lives in src/gid/ and the sibling Python service.
nudgely-prototype/
integration.jscalls installGlanceIntelligentDetect()src/gid/index.jsstarts collector + coach when flag oncollector.jsevents → POST /v1/eventscoach-ui.jssheet + Help FAB (EN chrome)playbook-runner.jsspotlight + step advancementvendor/*do not edit — integrity lockglance-intelligent-detect/
gid/app.py/events /proactive /playbooktriggers.pydwell + ping-pongplaybooks/18 path playbooks · route stand-insauth.json#authEmail → #authPw → Sign infeed.jsonopen a card or create articlevalidate_mvp.shV1–V10 automated checks03 · Coverage
Today each screen has a path playbook (eng JSON). Product direction: customer
records paths in console; coach still consumes the compiled shape.
~8s dwell → automatic offer, or tap Help
via GET /v1/playbook.
04 · Experience
Not a chat stub. Product guidance with Nudgely visuals (dark / blue).
Bottom sheet with 1–3 concrete steps. Done / current / todo. Actionable copy — no URL dump or user_id.
Ring + dim on the right control (#authEmail, card, tab…). Advances when the step completes (input or click).
05 · Live demo
:8090
VITE_GID_ENABLED=1 points at local GID
Help anytime
# Terminal A — GID cd glance-intelligent-detect && source .venv/bin/activate GID_PRODUCT_ID=nudgely-prototype GID_API_KEY=dev-gid-key \ GID_DWELL_THRESHOLD_SECONDS=8 \ uvicorn gid.app:app --host 127.0.0.1 --port 8090 # Terminal B — Prototype cd nudgely-prototype VITE_GID_ENABLED=1 \ VITE_GID_BASE_URL=http://127.0.0.1:8090 \ VITE_GID_API_KEY=dev-gid-key \ VITE_GID_PRODUCT_ID=nudgely-prototype \ npm run dev # → http://127.0.0.1:4322/