birth-data-onboarding-gate

/home/avalon/.hermes/skills/astrology/birth-data-onboarding-gate/SKILL.md · raw

Birth Data Onboarding Gate

A post-onboarding, pre-chat React view in the Astral Hermes web app that captures the operator's birth date, time, and location once, then writes a relationship: self profile into the tenant's KB and seeds a one-line marker into the tenant's hermes-home/memories/USER.md. After this gate, every future Hermes session can silently answer "what does my chart say…" because the self-profile already exists.

Why this exists

The hand-off between marketing/onboarding and the first chat used to drop the user into /chat with an empty KB. Their first turn was always "my birth is Y/M/D, X:XX, City" — friction. This gate collapses that turn into a one-shot guided form so the chat can open with context.

It is intentionally skippable: the skip-flag is stored as localStorage['astral.birth-data.skipped'] = '1' and /chat does not (currently) force-redirect back. The gate itself also checks /api/me/self-profile on mount and short-circuits to /chat if the self-profile already exists, so reloading is safe.

The Magi → Astral Hermes port

Astral Hermes has no npm dep for spinners — we load Magi's Mobiscroll bundle as a static asset and call it through window.mobiscroll. This keeps package.json light and matches Magi's runtime exactly.

Backend routes (web/server.mjs)

Both routes use the existing requireChatTenantAccess middleware and the existing ssh() + shellQuote() helpers — no new transport, no new auth.

Wiring

Verification

# Mobiscroll bundle landed
ls web/public/mobiscroll/js/mobiscroll.javascript.min.js
ls web/public/mobiscroll/css/mobiscroll.javascript.min.css

# index.html wires it
grep mobiscroll web/index.html

# Component exists
wc -l web/src/components/BirthDataGate.jsx

# Routes are registered
grep -n "/api/me/" web/server.mjs

# Server still imports cleanly
cd web && node -e "import('./server.mjs').then(()=>console.log('OK'))"

Manual test: log in, hit /onboarding, complete the wizard. On ReadyStep you should auto-redirect to /birth-data?tenant=<slug>. Fill in name + spinner date + spinner time + location (try the 🎤 button on Chrome/Safari). Submit → land on /chat. SSH to the worker and inspect /srv/astral/tenants/<slug>/hermes-home/astral-kb-prototype/knowledge/entities/people/<slug>.md and …/hermes-home/memories/USER.md.

Pitfalls

Future