MVP Spec
The bridge from architecture to build. What the first release ships — and what waits — so we can start coding a walking skeleton, not boil the ocean. Dogfooded internally before public signup.
The MVP thesis
A multi-tenant CRM with a unified timeline, 2-way email, basic automation and one or two AI agents — with visible token cost & margin — dogfooded on our own agency clients (HLD, AminoCore, Schlickmann). It proves the three hardest, most defensible spines at once: tenancy/RLS, AgentOps as P&L, and billing/metering. Everything else is deferred until this walking skeleton stands.
Scope — in / next / later
| Area | MVP | v2 | Later |
|---|---|---|---|
| Tenancy & Identity (RLS, roles) | ● | ||
| Auth (Supabase) | ● | ||
| Data + Jobs + Event bus (outbox) | ● | ||
| CRM (contacts, deals, timeline, tasks, import) | ● | ||
| Communications — email 2-way + inbox | ● | SMS/WhatsApp | voice |
| Basic automation (trigger → action) | ● | visual builder | |
| AgentOps — runtime, cost, approval, 1–2 agents | ● | eval, A/B, RAG | marketplace |
| Billing & Metering (agency subscription) | ● | wallet/rebilling | |
| Observability (traceId, cost dashboards) | ● | SLO/alerts | |
| White-label (branding) | basic | custom domains | mobile |
| Commercial — SaaS Mode, rebilling, snapshots | ● | ||
| Ads · Social · SEO · Calendar · Workflows | ● | ||
| Public REST API | ● |
● in scope · basic = minimal version · blank = not in that phase.
Milestones
Sequenced so each one is demoable on its own.
Backlog by epic
M0 Foundation
- Turborepo scaffold (web / api / workers / packages)
- Supabase project: Postgres + Auth + Storage
- Drizzle + base table template + migrations
- Tenancy: account/workspace/client/membership + RLS + SET LOCAL
- AuthContext + permission guards
- BullMQ workers + transactional outbox + event bus
- Observability baseline (OTel, Sentry) + CI/CD
M1 CRM Core
- Contacts + Companies + custom fields + dedup/merge
- Pipelines / stages / deals (kanban)
- Activity timeline + tasks
- Lists (static) + basic dynamic segments
- CSV import with field mapping
- Per-client dashboard + tRPC APIs
M2 Communications
- SES 2-way email (send/receive) threaded to contact
- Templates + merge tags
- Unified inbox (email only) with assign/status
- In-app + email notifications
M3 AgentOps
- Agent registry + runtime (run/step, checkpoint)
- Model routing + token & cost accounting (usage_event)
- Tool registry (permission-bounded) + approval gate + budget cap
- CRM Copilot agent: summarize thread, draft follow-up
- Reporting agent: weekly client summary
- Langfuse tracing + cost/margin dashboard
M4 Billing & Agency
- Stripe subscription (platform → agency) + 3.5%+$0.30
- Plans + entitlements enforcement (quotas)
- Agency dashboard (clients, usage, basic margin)
- White-label branding (logo/colors/from-email)
M5 Dogfood & Harden
- Onboard 3 real clients (HLD / AminoCore / Schlickmann)
- Security review (RLS leakage tests, secrets)
- Performance + polish + empty/error states
- Internal docs + runbooks
Definition of Done
The MVP is "done" when all of these are true.
✓ Multi-tenant CRM in production
Dogfooded on ≥3 real agency clients, with zero cross-tenant leakage (RLS verified by test).
✓ AgentOps as P&L
≥1 AI agent running in real workflows, with token cost and margin visible per client/agent.
✓ Communications loop
2-way email working inside a unified inbox, threaded to contacts and the timeline.
✓ Billing live
Stripe subscription active for the agency tier, with entitlement quotas enforced.