Day 2 — Verticals Platform — Main Orchestrator Handoff
You are the main orchestrator agent picking up the verticals-first voice agent platform build. Day 1 (foundation) is complete and pushed. Today (Day 2) you spawn 4 parallel Sonnet subagents in worktrees, each working on an independent surface. Tomorrow (Day 3) you integrate, verify, and ship.
This document is your one-stop handoff. Read it through once, then read the artifacts it links, then spawn the 4 agents.
Your model and role
You should run as Opus (reasoning + integration + judgment). Each of the 4 subagents you spawn should run as Sonnet (assembly + writing + clear-spec'd builds). This matches the founder's stated routing memory: "Opus for reasoning/debugging/decisions, Sonnet for assembly/writing/formatting" (memory/MEMORY.md).
Your job:
- Absorb context (this file + linked artifacts).
- Spawn 4 parallel Sonnet agents in worktrees.
- Babysit them as they complete (notifications arrive when each finishes).
- Day 3: review each PR, merge in dependency order, run verification, decide GO/NO-GO on cold-email batch.
The mission, in one paragraph
ChurchWiseAI is shipping a verticals-first voice agent platform so that funeral homes (FuneralWiseAI), churches (ChurchWiseAI), and future verticals (vet, dental, restaurant, law, real estate) all run on the same shared infrastructure with vertical-flavored prompts/tools and a unified per-tenant Master Config. The trigger was a strategic decision to delay the FuneralWiseAI cold-email batch until live director-transfer is shipped — the competitive wedge against ASD Answering Service (~33% of US funeral homes, $150–300/mo, human pickup). Day 1 built the foundation: TenantConfig schema (Python + TS), vertical-agnostic core/transfer.py, two-track escalation taxonomy, isolated outbound SIP trunk, Master Config YAML system. Day 2 builds the four parallel surfaces (live transfer + chatbot, escalation split, vertical dashboards, Master Config UI). Day 3 verifies + ships. Cold-email batch sends end of Day 3 if all green.
Read these artifacts FIRST, in this order
Skim them in this order before spawning anything:
-
The locked plan —
C:/Users/johnm/.claude/plans/steady-munching-penguin.md- The master plan. Architecture decisions, the 5-layer model, what Day 1 shipped, the 3 v1 additions from competitor research, the Day 1 saga (saga = recovery from livekit/agents#3104), and the Day 3 verification checklist. The single source of truth.
-
The original live-transfer plan —
knowledge/decisions/2026-04-28-funeralwiseai-live-transfer-plan.md- Why live transfer is the wedge against ASD. The "killer demo" mechanic. The 8 sub-questions (resolved during Day 2 design, parameters of the architecture).
-
Founder priority memory —
memory/feedback_robustness_over_velocity.md- "To me, the better the demos and the more robust the product, the conversions will be way higher so it's worth spending a few days on it to get it right." This shapes every tradeoff: demo quality + robustness > velocity. Day 3 verification is exhaustive, not symbolic.
-
The two danger memories — DO NOT REPEAT THE NEAR-MISSES:
memory/feedback_lk_overwrite_flag_destroys_secrets.md—lk agent update-secrets --overwritenukes ALL existing secrets. Almost destroyed 22 prod secrets on 2026-04-28. NEVER use--overwriteto add a single secret. Use no-flag (silently appends).memory/feedback_livekit_recovery_lk_deploy_only.md— When agent stuck in "shut down due to inactivity" and won't auto-wake,lk agent restartis INSUFFICIENT. Onlylk agent deploy --project cwa-voice --silentfromcwa-wt-sermonwise/voice-agent-livekit/(aftergit pull --ff-only origin main) recovers. Known LiveKit bug: agents#3104.
-
Master Config canonical docs —
knowledge/voice-clients/README.md- YAML cascade rules, sync workflow, two-track escalation taxonomy. Day 2 worktree D builds the sync command + UI on top of this.
-
Two research reports (skim, don't deep-dive):
tmp/research-livekit-outbound.md— explains why our Day 1 P0 happened + the Telnyx best-practice gotchas (X-Telnyx-Username header, sip_trunk_id="" doesn't default).tmp/research-competitor-live-transfer.md— Bland/Vapi/Retell/ElevenLabs/ASD analysis. The 3 v1 additions came from this report.
Day 1 state — what's already in place
| Artifact | Location | What it is |
|---|---|---|
| Foundation branch | feat/verticals-platform-day1-foundation (origin) | All Day 1 commits. Day 2 worktrees fork from this. |
| Pydantic TenantConfig | voice-agent-livekit/core/tenant_config.py | Schema, adapters from church/funeral dicts. |
| TS TenantConfig | src/lib/tenant-config.ts | Same shape, mirrors Python. |
| Vertical-agnostic transfer | voice-agent-livekit/core/transfer.py | Extracted from verticals/church/transfer_tool.py. NOT YET wired in production. |
| DB migration: outbound columns | Applied to prod Supabase 2026-04-28 (tenant_voice_agents columns + crisis_events table) | New columns: transfer_target_number, transfer_enabled, transfer_business_hours_only, business_hours, response_time_promise_text, transfer_ring_seconds, bridge_intro_template, crisis_contact_phone, crisis_resources_locale. New table: crisis_events with constraints + indexes + RLS. |
| Telnyx outbound credential connection | ID 2948197312620398250 ("CWA Verticals Platform Outbound") | Separate creds from inbound. Outbound voice profile attached. |
| LiveKit outbound trunk | ST_X3n9jxR55VrB | Address sip.telnyx.com, FROM +14697288326, isolated from protected inbound ST_Xa3Bp9aixRFP. |
OUTBOUND_TRUNK_ID LiveKit secret | Set on agent CA_pX3Me4NK6qK8 | Secret count: 23 (was 22, +1 new). |
| Voice clients YAML system | knowledge/voice-clients/{_schema.yaml,_defaults/{church,funeral}.yaml,README.md} | Canonical Master Config schema + vertical defaults. |
| Cleanup | voice-agent-livekit/verticals/funeral/agents.py deleted | Was orphan code from PR #238 deprecated by PR #241. |
| Voice agent recovered | Version MEs6uTJzn8JZ (was PsB7z6ss3m5S) | Fresh deploy from origin/main on 2026-04-28T18:25:13Z. Test call to +13658253552 confirmed agent answering correctly. |
What this build delivers (Day 2 scope)
Four parallel worktrees. Each is independent at the file level (designed to minimize merge conflicts). Each agent runs Sonnet, branches off feat/verticals-platform-day1-foundation, opens a PR back to feat/verticals-platform-day1-foundation (NOT main), does NOT merge their own PR.
| Worktree | Spec file | Headline scope |
|---|---|---|
| A | 01-WORKTREE-A-live-transfer.md | Wire core/transfer.py into church Coordinator. Funeral prompt + data updates. Demo-flip UI on /s/[slug]. + 3 v1 additions: auto-greet on pickup, user-facing wait message, hard crisis-flag contract test. + OUTBOUND_TRUNK_ID hard assertion + X-Telnyx-Username header. + chatbot request_callback tool. |
| B | 02-WORKTREE-B-escalation-split.md | core/escalation.py split. flag_safety_event tool → crisis_events writes. Notification routing split (support@ always, optional crisis_contact_phone). Contract test for 100 simulator messages. CODEOWNERS gate. |
| C | 03-WORKTREE-C-vertical-dash.md | VerticalProfile registry. funeralwiseai.com/admin/[token] middleware rewrite. Funeral tab shells. Inbox tab vertical-aware. |
| D | 04-WORKTREE-D-master-config.md | /founder/[token]/voice-clients/[id] UI. pnpm sync-voice-clients script (YAML ↔ DB). Seed YAML for existing customer churches + funeral demo. |
How to spawn the 4 agents
Use the Agent tool with subagent_type: "voice-agent-engineer" for A and B (touches voice-agent code + life-safety paths), subagent_type: "general-purpose" for C and D (mostly Next.js + scripts). All four use model: "sonnet" and isolation: "worktree" and run_in_background: true.
The prompt for each is the contents of the matching spec file (01–04). Spawn all 4 in a single message with multiple Agent tool calls so they run concurrently.
Pseudo-code:
Agent({
description: "Day 2 Worktree A — live transfer + 3 v1 additions",
subagent_type: "voice-agent-engineer",
model: "sonnet",
isolation: "worktree",
run_in_background: true,
prompt: <contents of 01-WORKTREE-A-live-transfer.md>
})
// + 3 more in same message for B, C, D
Important: the spec files are SELF-CONTAINED. The agent has zero conversation history. Don't shorten them.
After spawning — what you do while they work
Each subagent reports back with a PR URL + commit SHA + summary when done. Notifications arrive in your chat as they complete.
While they're working:
- DO NOT modify the same files they're modifying. Lookup the "FILES TO TOUCH" section in each spec to know which files are claimed.
- You CAN: review research reports, prep Day 3 verification scripts, audit knowledge docs that need updating, clean up
tmp/. - DO NOT: spawn additional agents on the same surfaces, push code to
feat/verticals-platform-day1-foundationdirectly, merge anyone's PR before Day 3.
Day 3 — integration + verification
When all 4 PRs are open, follow 05-DAY3-INTEGRATION.md. Headline:
- Merge PRs in dependency order: B (escalation-split) → A (live-transfer) → D (master-config) → C (vertical-dash).
- Apply any conflict resolutions; resolve via founder if non-trivial.
- Run
pnpm sync-voice-clients --checkin CI. - Founder runs the 10-item live verification (6 voice + 4 chatbot per
steady-munching-penguin.mdDay 3 gate). - Vertical-template acceptance test (stub a vet vertical end-to-end).
- Decision log entry written.
- GO/NO-GO on cold-email batch.
Hard rules (do not violate)
These are codified in C:/dev/CLAUDE.md and the relevant memory files. Reading them again so you don't drift:
- NEVER touch
ST_Xa3Bp9aixRFP(the protected inbound SIP trunk). Outbound work uses the newST_X3n9jxR55VrB. - NEVER use
lk agent update-secrets --overwriteto add a single secret. The flag nukes ALL existing secrets. - NEVER use
lk agent restartto recover a stuck agent. Uselk agent deploy --project cwa-voice --silentfromcwa-wt-sermonwise/voice-agent-livekit/after pulling origin/main. - NEVER deploy the voice agent without (a) explicit founder approval AND (b) the founder being present to test live calls. Per
memory/feedback_voice_agent_locked.md. - NEVER write junk test data to production Supabase. There is no staging DB. Every query hits prod. Use the demo church UUID
00000000-0000-4000-a000-000000000001for testing. - NEVER force-push a branch. Multi-agent git safety: always
git fetch + git pull --rebasebefore push. - NEVER merge a worktree's own PR. Day 3 integration is the merge step, run by you (the orchestrator) under founder supervision.
- Crisis events NEVER attempt a SIP bridge. Crisis routing is 988/911/DV hotline + support@ + optional crisis_contact_phone SMS only. This is the founder's explicit architectural decision; live-bridging a crisis is a life-safety regression.
- Verify DB columns before use.
mcp__plugin_supabase_supabase__execute_sqlto checkinformation_schema.columnsBEFORE assuming a column exists. Perfeedback_verify_db_columns.md. - No code without expected-output specs. Per CLAUDE.md rule #17. Worktree D's seed YAML files are the spec for what each tenant's config must look like.
Cold-email batch — do NOT send
The FuneralWiseAI cold-email batch is HELD until Day 3 verification is fully green. Founder owns the GO/NO-GO. Do not touch anything in the outreach pipeline (/founder/[token]/outreach-engine etc.) during Day 2.
Communication style
You report briefly to the founder when:
- All 4 agents are spawned (one summary message).
- Each agent completes (one summary per agent, ≤200 words).
- A subagent hits a blocker (escalate immediately).
- Day 2 is fully complete and ready for Day 3 review.
Don't pile on commentary between subagent completions. The founder reads the summaries and reacts.
When you're done with this document
- Confirm you've read all 6 linked artifacts.
- Confirm git state in your worktree (
git statusshould be clean, on a session branch). - Confirm the 4 spec files exist (01–04) and are non-empty.
- Spawn the 4 agents per "How to spawn the 4 agents" above.
- Report to founder: "All 4 Day 2 worktrees spawned (A/B/C/D). Reporting back on each completion."
You're cleared to start. Good luck.