{
  "markdown": "# Morning Form\n\nMorning Form is a premium mobile-first state-optimization web app covering assessment, profile generation, protocol recommendation, daily guidance, check-ins, insights, and wearable integrations.\n\n## Local development\n\n```bash\ncd /Users/reubenselby/Desktop/morning-form\nnpm install\nnpx prisma db push\nnpm run db:seed\nnpm run dev\n```\n\nApp URL:\n\n```txt\nhttp://localhost:3000\n```\n\nDemo user seeded locally:\n\n```txt\ndemo@morningform.com\n```\n\n## Current branch workflow\n\n- `main`: built MVP\n- `feat/real-health-oauth`: review branch for real provider connection wiring\n\nOpen PR:\n\n```txt\nhttps://github.com/contactxyz-admin/morning-form/pull/1\n```\n\n## Health integrations\n\nMorning Form currently supports:\n\n- Terra-backed Apple Health and Garmin connection flow\n- Direct OAuth scaffolding for Whoop, Oura, Fitbit, and Google Fit\n- persisted provider connections via Prisma\n- callback routes and token exchange when credentials are configured\n- graceful mock fallback when credentials are absent\n\nDetailed provider setup lives in:\n\n[`docs/HEALTH_PROVIDER_SETUP.md`](/Users/reubenselby/Desktop/morning-form/docs/HEALTH_PROVIDER_SETUP.md)\n\n## Metrics\n\n- Activation funnel (signup → first grounded answer → retained): `npx tsx scripts/metrics/activation-funnel.ts --signup-since 2026-03-22 --signup-until 2026-04-21`. Prints CSV + human-readable summary. See [`docs/plans/2026-04-21-002-feat-activation-funnel-instrumentation-plan.md`](docs/plans/2026-04-21-002-feat-activation-funnel-instrumentation-plan.md).\n\n## Retest loop\n\nThe retest loop (off by default, behind `RETEST_LOOP_ENABLED`) runs the \"return leg\": a lab panel completes a `Draw`, the next retest is scheduled, a daily Vercel cron (`/api/cron/retest-nudge`, gated by `CRON_SECRET`) sends a capped nudge sequence, and retention-to-retest is measured (nudge-attributed = loop-caused). The metrics CLI above appends a retest-retention section when the flag is on. Backfill existing users (run dark, before the flip): `npx tsx scripts/retest/backfill-baseline-draws.ts` (dry run) then `--apply`. Tunables live in `src/lib/retest/constants.ts`. See [`docs/runbooks/retest-loop-go-live.md`](docs/runbooks/retest-loop-go-live.md) and [`docs/plans/2026-06-17-001-feat-return-leg-retest-loop-plan.md`](docs/plans/2026-06-17-001-feat-return-leg-retest-loop-plan.md).\n\n## Retrieval\n\nHybrid retrieval is enabled when an embedding provider is configured. It embeds only `SourceChunk.text`, stores one `VectorEmbedding` per chunk, and keeps `search_graph_nodes` on the same public contract while ranking with vector + lexical + graph RRF. Set `HYBRID_RETRIEVAL_ENABLED=false` to roll back to legacy lexical/graph behavior.\n\nProduction rollout:\n\n```bash\nnpx prisma generate\nnpx prisma db push\nnpx tsx scripts/backfill-embeddings.ts --dry-run --estimate\nnpx tsx scripts/backfill-embeddings.ts --batch 80\n```\n\nSee [`docs/runbooks/hybrid-retrieval-production.md`](docs/runbooks/hybrid-retrieval-production.md) and [`docs/runbooks/backfill-embeddings.md`](docs/runbooks/backfill-embeddings.md).\n",
  "bytes": 3047,
  "sha": "82458a8eb88f47bdf80626c00e42aeaad9adaaf72fe350d74d69bd00ddff9578",
  "repo_slug": "contactxyz-admin/morning-form",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_contactxyz_admin_morningform_b9ba37da/readme"
}