Skip to content

Epic: Amicus — AI Study Partner (v1) #1446

@CraigBuckmaster

Description

@CraigBuckmaster

AI Study Partner (v1) — Epic

Derived from: #1352, idea #42
Priority: P1 · Size: XL · Status: Planning
Hard blocker: #1312 (R2 DB delivery architecture)
Product name: Amicus (Latin for "friend" — echoes amicus curiae, a scholarly voice offering counsel)

A persistent, RAG-grounded scholarly study partner. Knows the user's study history, asks better questions, draws exclusively from the curated Companion Study corpus. Operates as an ambient presence across three surfaces (home screen module, inline chapter card, dedicated Partner tab).

Full technical plan: ai-study-partner-plan.md (see artifact attached to planning conversation).


Locked Decisions

Decision Choice
Grounding RAG-only with editorial meta-FAQ mitigation
Scope Prompts + reactive Q&A (persistent memory deferred to v2)
Surfaces FAB (with peek) + Home card + Partner tab
Reasoning engine Hybrid — rules + pre-compute + cloud LLM + optional on-device
Cloud model Anthropic Claude (Sonnet for tab, Haiku for inline/proactive)
Pricing Base premium (300/mo cap) + Partner+ at $9.99 (1,500/mo)
Privacy Abstract-only cloud data flow; user-inspectable profile
Corpus gap capture Every gap → own card in Partner Gaps swim lane (switches to digest at 20K users)

Architecture (high level)

Client (React Native)
  → local retrieval (scripture.db + sqlite-vec, ~38K chunks, ~90MB)
  → compressed profile generator (deterministic, user.db → prose)
  → reasoning router (pre-compute | Apple FM | Haiku | Sonnet)
     → Cloudflare Worker AI Proxy (auth, rate limit, zero-retention)
       → Anthropic API
       → Cloudflare D1 (corpus gap capture)

Three surfaces, one engine: FAB (with peek) is always-on and context-aware — surfaces chapter-specific chips when on a chapter screen, entity-aware chips on Explore/people/debates, generic input elsewhere. Home module delivers a daily proactive insight. Amicus tab hosts full threaded conversations with persistent history and citation navigation.


Hybrid Reasoning — cost only where synthesis is needed

Interaction Engine Runtime cost
Daily home prompt Pre-computed + cached $0
Inline chapter chips Pre-generated at build time $0
Meta-FAQ exact match Cached static $0
Single-chunk paraphrase (iOS 18+) Apple Foundation Models $0
Single-chunk paraphrase (other) Claude Haiku ~$0.002
Multi-turn conversation Claude Sonnet ~$0.005
Multi-source synthesis Claude Sonnet ~$0.005

Result: ~60% of interactions route to $0-cost paths.


Cost Model — three scenarios, 5% conversion

Per-user blended cost: ~$0.26/premium/month. Ratio holds at ~10% of premium revenue across all scales.

Scenario Y5 Total users Premium (5%) LLM $/mo % premium rev
Conservative 150K 7,500 $1,950 10%
Moderate 590K 29,500 $7,670 10%
Aggressive 1.80M 90,000 $23,400 10%

Cost safety rails: 300/mo soft cap on base premium prevents power-user tail risk. Partner+ tier at $9.99 pulls heavy users into a sustainable lane without subsidizing from casual fees.


Corpus Gap Capture — the feedback flywheel

Every "I don't have that in my corpus" response is a content roadmap signal. Captured in Cloudflare D1 with:

  • Raw question text (lightly scrubbed for PII)
  • Retrieval scores (distinguishes content gap vs retrieval failure)
  • Compressed profile + current chapter context
  • User feedback signals
  • Semantic deduplication via embedding similarity

Review workflow: Every gap auto-creates a GitHub issue in the Partner Gaps kanban swim lane (label corpus-gap). Dedicated lane keeps corpus-gap volume isolated from product work. Craig reviews, plans content, ships PR → gap auto-closes.

Scale trigger: At ~20K total users (~58 gaps/day), switch to digest-for-singletons + dedicated-cards-for-clusters. D1 backend unchanged — presentation-layer swap only.

See #1471 for implementation detail.


Phase Plan (15–20 weeks from Phase 1 start)

Phase 1 — Foundations (6–8 weeks)

Phase 2 — Partner Tab (4–6 weeks)

Phase 3 — FAB Peek (3–4 weeks)

Phase 4 — Home Screen + Partner+ (2–3 weeks)

Phase 5 — Polish & Optimization (ongoing)


Dependencies


Finalized answers to prior open questions

  • Name: Amicus
  • Meta-FAQ authorship: LLM-drafted (chat-session workflow), Craig edits
  • Beta cohort: Pastoral network (P3 positioning synergy)
  • Embedding strategy: Server-side at launch; evaluate on-device in Phase 5

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions