PRAYER OFFER — BUILD SPEC v1
Directive doc for Fable/Claude runs. Written 2026-09-14 from the research in MASTER.md, rewritten the same day to match DECISIONS-2026-09-14.md, then rewritten a second time the same day to the FINAL ANSWERS in that file and the PrayerSong funnel shape (PRAYERSONG-MAPPING.md §2–§4). Everything below is build instruction — the mechanics only.
Every line that once carried a (PROPOSED — confirm) tag is now settled by the FINAL ANSWERS block in DECISIONS-2026-09-14.md. No open tags remain in this doc.
0. WHAT THIS IS
A prayer-delivery funnel engine. Buyer submits a prayer, pays, and receives a photo of their prayer card held at a famous holy site. Fulfilment is 100% image generation — two passes through an image model, nothing else in the path. No physical errand, no fulfiller, no logistics, no mailed goods. One core codebase, many brand fronts — each brand is a config file: domain, site, persona, location, copy, prices, pixels.
Part 1 = one brand live and converting. Part 2 = clone the engine across pages/identities by adding configs. Recurring layer = monthly prayer membership (new photo every month). Three one-time offers after the sale: second prayer at reduced cost, 24-hour rush delivery, and an audio recording of the prayer.
Delivery is a portal, not just an inbox. Every buyer gets a tokenised portal at
/portal/<token>; every email links into it; email still carries the photo so a portal
outage never blocks a delivery.
1. PRODUCT ARCHITECTURE
/brands/<slug>/ ← everything brand-specific lives here
config.ts ← copy, prices, persona, location, colors, pixels, domain
prompts/ ← pass-1 scene prompts, pass-2 card-in-hand prompts, persona portraits
assets/donor/ ← per-location DONOR reference image (sourced from Pinterest)
assets/examples/ ← 7 example deliverable photos: 1 landing hero, 3 for /create/ready, 3 for /offer
emails/ ← branded email templates
/apps
web/ ← Next.js funnel + portal (reads brand config at build/runtime)
worker/ ← image gen + audio gen + reveal tick + email queue consumer
/packages
engine/ ← shared: survey, checkout, session, upsell chain, subscriptions
imaging/ ← image-model clients (GPT Image / Nano Banana Pro class), two-pass runner
audio/ ← TTS + ambience mixing
payments/ ← Stripe adapter + mock adapter
New brand = new folder + config + prompt pack + donor image + example photos + domain. Zero code changes. Target spin-up: one day.
Brand config schema (the modularity contract)
This block is byte-identical to OPS-RUNBOOK §1. Edit both or neither.
// brands/<slug>/config.ts
export type BrandConfig = {
slug: string; // "st-peters" — used as brand_slug in DB
domain: string; // "holycardsofsaintpeters.com" — middleware match key
site: {
name: string; // "Holy Cards of St. Peter's"
tagline: string; // "Your prayer, placed at the heart of the Basilica."
merchantName: string; // legal name on receipts — never contains "prayer"
supportEmail: string; // "care@holycardsofsaintpeters.com" — the only support channel
supportUrl: string; // "holycardsofsaintpeters.com/support" — goes in the descriptor
statementDescriptor: string; // Stripe suffix after the fixed NUMINA* prefix, e.g. "HOLYCARDS"; <= 15 chars, no <>\'"* characters. Never the word "prayer".
colors: { primary: string; accent: string; bg: string; text: string };
};
location: {
key: string; // "st_peters_confessio" — keys donor refs + ambience presets
displayName: string; // "St. Peter's Basilica, Vatican City"
storyBlock: string; // long-form copy for /offer
donorRef: string; // "assets/donor/st_peters_confessio.jpg" — pass-1 reference
examplePhotos: string[]; // 7 paths under assets/examples — 1 landing hero, 3 on /create/ready, 3 on /offer
bump?: { // the SECOND location (the checkout bump); absent on a one-location brand
key: string; // "vatican_grottoes" — keys the bump's donor ref + ambience preset
donorRef: string; // "assets/donor/vatican_grottoes.jpg" — the bump's own pass-1 reference
};
};
persona: {
name: string; // "Fr. Marco"
title: string; // "Pilgrim Chaplain"
bio: string; // short bio for /offer + emails
portraitSet: string; // key into brands/<slug>/assets — consistent persona face
};
prayer: {
maxChars: number; // 320 — hard cap so the text always fits the card
};
survey: {
forWhom: string[]; // step 1 options: Myself, Mother, Father, Husband, Wife, Child, Friend, Someone who has passed, Other
intentions: string[]; // step 2 options: Healing, Strength, Grief, Family, Provision, Protection, Gratitude, Other
};
products: {
fe: { cents: number }; // 3490 — Western Wall front runs 2990
anchorCents: number; // 6900 — struck-through anchor above the FE price
bumps: {
apostlesTomb?: { cents: number }; // 997 — The Apostle's Tomb, the second location; absent on a brand with no second location
speed?: { cents: number }; // 900 — the checkout speed option, also never pre-checked
};
oto1: { cents: number }; // 1400 — second prayer, saved card
oto2: { rush: { cents: number; hours: number } }; // 1990 / 24 — rush delivery
oto3: { audio: { cents: number } }; // 2490 — Voice of the Sanctuary MP3
oto4: { mail: { cents: number } }; // 1990 — Your Card by Post, printed and posted, postage included
replacement: { cents: number }; // 1400 — anniversary re-placement, saved card
monthly: { monthly: { cents: number }; annual: { cents: number } }; // 990 / 7900
};
delivery: {
standardDays: number; // 3 — fixed promise; delivery email fires on day 3
rushHours: number; // 24 — OTO2 rush SLA, queue-jumping
queueHours: number; // max hours from payment to asset generated (SLA: 24)
};
guarantee: {
days: number; // 30 — satisfaction guarantee, stated on every sales surface
};
portal: {
revealMinutes: number; // 15 — reveal cron tick that flips a ready deliverable visible
};
audio: {
voiceId: string; // TTS voice id for the persona
ambiencePreset: string; // ffmpeg mix preset keyed to location.key
sampleUrl: string; // static per-brand preview clip played on /oto/3
};
gift: {
enabled: boolean; // true — optional recipient email at survey step 5
};
tracking: {
pixelId: string; // Meta pixel — a fresh pixel per brand, never shared
capiToken: string; // Meta CAPI access token (server-side mirror)
};
locales: string[]; // ["en-US"] — copy variants keyed by locale
};
2. FUNNEL FLOW
The PrayerSong spine, our mechanic. Thirteen surfaces, in this order. Route names are the contract: OPS-RUNBOOK §2 carries the identical list.
/— Landing. Testimonial headline, hero = example card-in-hand photo, trust line "Delivered in 3 days", then directly under the hero the live "prayers being carried in right now" ticker (city-rotated, from the COPY-CREATIVES §11 pool), then how-it-works, what-you-get, pricing block and FAQ. One CTA into the survey. No price is shown above the pricing block. No aggregate customer-count claim appears anywhere until real customers exist. Firesview_landing./create— 5-step survey. Progress bar, 20% per step, Back/Next. No price on any step.- Who is this prayer for? —
survey.forWhom: Myself, Mother, Father, Husband, Wife, Child, Friend, Someone who has passed, Other. Plus their first name. - What is it for? —
survey.intentions: Healing, Strength, Grief, Family, Provision, Protection, Gratitude, Other. This answer names the discount on/offerand seeds the member's default monthly theme. - The prayer — multiline, hard-capped at
prayer.maxChars(320), live character counter, Next disabled over the cap, server re-validates. - Anything else the Father should know? — optional free-text note. Feeds the persona's note, never printed on the card.
- Where should the photo go? — your first name + email, plus an optional gift
recipient email ("sending this for someone else? we deliver the photo to them").
Writes the
leadrow and keeps the abandonment sequence alive.
- Who is this prayer for? —
/create/ready— transition. 3 example photos with customer quotes (stubs until real), the guarantee box, and one button: "Continue to your order". Firestransition_viewon render. First route that requires thephorder handle./offer— sales page. Headline "Almost There! Complete Your Order". In order: summary card (prayer for [name], placed by [date = today +delivery.standardDays]); "Limited Time [Intention] Discount" box named from the step-2 answer; price block$69$34.90 with the subsidy line "our monthly members keep the door open for everyone else"; 3 example photos with quotes; the guarantee box; "what you get"; "why choose us"; and the persona letter as a lower section — a section, not the headline. Firesoffer_viewon render, and that is the only placeoffer_viewfires./checkout. Card only, tokenized by Stripe (Stripe.js Card Element creates aPaymentMethodin the browser — the server never sees a card number — then the server charges the vaulted instrument). Wallets and alternative rails are off for v1. Two checkout options, both opt-in and both never pre-checked: The Apostle's Tomb, the same card at a second place, +$9.97, and Speed, 24 hours, +$9.00. Buying the speed option setsorders.rushand hides/oto/2, which sells the same 24-hour promise at $19.90 — charging twice for one delivery is a refund, not an upsell. Scarcity line under the order summary. Billing address required on every order; no phone collected anywhere. Statement descriptor: brand short name + support URL, never the word "prayer"./oto/1— Second prayer, $14. Not a bare one-click. One textarea prefilled with the first prayer (same 320 cap, same live counter), one confirm checkbox, then Submit (charges the saved card) or Skip. 5-minute countdown on the page. Accept → a secondprayersrow on the same order → a second photo. Guarantee box on the page./oto/2— Rush delivery, $19.90. One tap on the saved card: your photo in 24 hours instead of 3 days. A banner at the top confirms the OTO1 decision before the pitch. Guarantee box on the page. Accept →orders.rush = true, every job on the order jumps the queue./oto/3— Voice of the Sanctuary, $24.90. One tap on the saved card: the prayer spoken aloud and delivered as a recording. A static per-brand sample clip (audio.sampleUrl) plays on the page — it is not the buyer's own prayer, which does not exist yet. Accept → audio job queued. Accept and decline both go on to/oto/4./oto/4— Your Card by Post, $19.90, postage included. The last step of the chain. One tap on the saved card, plus a postal address (name and country prefilled, the country list is the checkout's own): a second print of the buyer's own card — the exact file@prayer-engine/cardrenders for the photograph — printed on heavy stock at A6 (105 × 148 mm) and posted in an envelope within 5 business days. The page shows her card (CardPreview, her for-name and her words), never a stock photograph. Nothing recurring. Accept → amail_ordersrow (statuspending) and amail_printjob that renders the print file to R2; fulfilment is aMailVendoradapter,manualfor now (/admin/mail, OPS §5). Accept and decline both go to/thanks./thanks. An order recap card per accepted item, each labelled with its SKU name from §3 (The Witnessed Carry, The Apostle's Tomb, Second Prayer, Same-Day Placement, Voice of the Sanctuary, Your Card by Post). The Your Card by Post card carries its price and the line "Your printed card will be posted to [city], [country] within 5 business days." An "I need to correct my email" button posting to/thanks/correct-email. What happens next in 3 steps, with real dates. A spam-folder note. One big button: "Open your portal". A cross-sell: "place a prayer for someone else". The membership pitch at the bottom, not the top./portal/<token>— the delivery portal. Magic-link entry, no passwords. Carries: the deliverable gallery (photos + audio, each held until the reveal tick flips it visible); the track-order timeline (with the posted card's status and address when OTO4 was taken: "Your printed card is being prepared" / "Your printed card is in the post"); the monthly intention field; membership manage (pause / resume / cancel, self-serve); email preferences at/portal/<token>/email-preferences; and the tokenised offer surface/offer?product=<id>&s=<token>for one-tap offers on the saved card. Every email links here./membership. Monthly Prayer Membership, $9.90/mo or annual $79, theme preview carousel. Also the remarketing landing page. A visitor who arrives here with no prior order is a standalone member signup: the route creates asubscriptionsrow carrying its ownemailandfirst_name, mints aportal_sessionstoken against that subscription, and sends the Member welcome email (§7 template 17)./replace. Anniversary Re-Placement, $14, one tap on the saved card. Reached from the day-365 email. An accepted re-placement writes a newprayersrow on the original order (newvariant_seed, same or edited text) and produces a new photo, because the invariant is one row per prayer, one photo per prayer.
Supporting routes. Nine surfaces exist outside the funnel order. This list is identical in OPS-RUNBOOK §2.
/support— contact form posting tosite.supportEmail. Target ofsite.supportUrl./terms,/privacy,/refunds— the three footer pages linked from every page./create/resume— GET only. The target of all three abandoned emails. Verifies the signedttoken, re-mintsphfor that order, and lands on/create/readywith the draft intact. 30-day TTL, matching draft retention. OPS §2 carries the token spec./thanks/correct-email— POST only. Rewritesorders.emailand re-sends the confirmation./admin— the orders dashboard (§9 / OPS §9), gated byADMIN_DASH_TOKEN./admin/mail— the Your Card by Post queue: pending cards with address and print file, Export CSV (marks themexported) and Mark sent. Same admin session as/admin./portal/<token>/email-preferences— setsorders.marketing_opt_out/subscriptions.marketing_opt_out. Every marketing send checks it; transactional ignores it.
Guarantee. A 30-day satisfaction guarantee, in this exact frame, verbatim on every
surface that carries it: "100% Money Back Guarantee. Not satisfied? Get a full refund. No
questions asked, no hassle. 30-day guarantee. Risk-free purchase." It is always tied to the
price anchor. It appears on /, /create/ready, /offer, /oto/1, /oto/2, /oto/4,
/membership, /replace and in all three abandoned emails.
Delivery promise. Standard = day 3, fixed. Rush = inside 24 hours. Both dates are printed
on /offer, /thanks, in the confirmation email, and on the portal timeline. Every date on
every surface is computed from orders.paid_at, never from orders.created_at:
| Token | Formula |
|---|---|
[DELIVERY_DATE] |
paid_at + delivery.standardDays (3 days), or paid_at + delivery.rushHours (24 h) on a rush order |
[PLACEMENT_DATE] |
paid_at + 2 days standard, paid_at + 12 hours on rush — the moment prayers.placed_at is written. Always this order's own placement, never a prior year's. |
[ORIGINAL_PLACEMENT_DATE] |
the placed_at of the first prayer on the order — last year's actual date. Used on /replace and in the day-365 email, which both name the original placement and the new one on one surface. |
[RUSH_DATE] |
paid_at + delivery.rushHours |
[NEXT_DATE] |
the member's next monthly delivery date = subscriptions.member_since + N months, independent of billing interval |
orders.created_at is lead-creation time. It keys only the three abandoned-lead emails.
Post-purchase: confirmation email within 1 minute (order id, promise date, portal link, what happens next). Delivery email on day 3 (or inside 24 h on rush) with the photo — and the audio inside the same email if OTO3 was taken.
State/session — the ph order handle. Survey step 5 writes the lead: the server creates
the orders row (status lead) and sets a signed, httpOnly cookie ph carrying the order
id plus an HMAC over it, 7-day TTL. That cookie is the whole of funnel identity.
- Every route from
/create/readyonward requires a validph. Noph, no page. /oto/1,/oto/2,/oto/3,/oto/4,/thanksand/replaceadditionally requireorders.status = 'paid'on the handle's order.- Ownership pre-check: never re-sell an owned SKU. If the
upsellstable already carries thatkindfor the order, the OTO page skips straight to the next step in the chain. - Per-handle rate limit: 5 charge attempts per hour. A saved-card one-tap route with a guessable identifier is an abuse surface; the handle plus this limit is the defence.
- The portal does not use
ph./portal/<token>authenticates on its ownportal_sessions.tokenmagic link, and so does the tokenised offer surface/offer?product=<id>&s=<token>. The two identities never substitute for each other.
Payment path: /checkout charges, and the synchronous settle path is authoritative — it
sets orders.status = 'paid' and orders.paid_at, mints the portal_sessions token, fires
purchase, and enqueues fulfilment. The webhook only reconciles. Upsells attach as upsells
rows. One row per prayer, one photo per prayer, one parent order. orders, prayers,
deliverables, portal_sessions, subscriptions, upsells, charge_intents, disputes,
mail_orders tables.
3. PRODUCT CATALOG + PRICING
SKU names are a cross-doc invariant. The name in the middle column is the only name this
product ever has: on the receipt, on the /thanks recap card, in the email that delivers it,
and as the take-rate label on the orders dashboard. OPS-RUNBOOK §4/§9 and COPY-CREATIVES use
these exact strings.
| # | SKU name | Price | Notes |
|---|---|---|---|
| FE | The Witnessed Carry | $34.90 | prayer carried in and held up at [location] + photograph; anchored against |
| Bump 1 | The Apostle's Tomb | +$9.97 | the second checkout option, opt-in, never pre-checked; the same card, the same prayer, photographed in the Vatican Grottoes — the crypt beneath the basilica floor |
| Bump 2 | Speed, 24 hours | +$9.00 | the other checkout option, opt-in, never pre-checked; queue-jumps the order's jobs, so /oto/2 is never offered to a buyer who took it |
| OTO1 | Second Prayer | $14.00 | typed on /oto/1, saved card, 5-minute countdown |
| OTO2 | Same-Day Placement | $19.90 | one tap on /oto/2, saved card, queue-jumps every job on the order |
| OTO3 | Voice of the Sanctuary | $24.90 | one tap on /oto/3, saved card; see §5 |
| OTO4 | Your Card by Post | $19.90 | one tap on /oto/4 plus a postal address, saved card; a second print of her own card, A6, posted within 5 business days, postage included; nothing recurring |
| Post | Anniversary Re-Placement | $14.00 | one tap at /replace, saved card, day-365 email |
| Monthly | Monthly Prayer Membership | $9.90/mo (annual $79) | new photo monthly, themed; cancel anytime |
One physical SKU exists in the ladder: Your Card by Post, a print of the same card file the photograph uses, posted by a print-and-post vendor (manual export for now, OPS §5). Everything else delivered is a generated image, an MP3, or an email.
Max stacked order: 34.90 + 9.97 + 9.00 + 14 + 19.90 + 24.90 + 19.90 = $132.57, across up to five separate charges on the saved card.
Annual is "save $39" against 12 × $9.90, not "two months free". OTO1 is "less than half" of $34.90, not "half".
Economics (Stripe rail, recomputed 2026-09-16 on published Stripe Canada card pricing)
Processing is 5.7% + $0.22 per approved transaction (2.9% base + 0.8% international-card
- 2% currency conversion), flat on every charge regardless of type. Stripe has no fixed monthly platform fee.
Take rates below are assumptions, not observations. They are the ECONOMICS.md §2 model: The Apostle's Tomb 25%, OTO1 20%, OTO2 rush 12%, OTO3 audio 12%, OTO4 card by post 10%. The checkout speed option is deliberately unmodelled — no take-rate assumption exists for it yet, because nothing has measured it. Recompute every one of them from real data once ≥100 orders exist. The bump rate is the weakest of the four and should be recomputed first: the price roughly doubles with this swap, and a $9.97 bump will not convert at the rate a $4.99 one did.
| Item | Price | Take rate | Revenue per buyer |
|---|---|---|---|
| The Witnessed Carry | $34.90 | 100% | $34.90 |
| The Apostle's Tomb | $9.97 | 25% | $2.49 |
| Speed, 24 hours | $9.00 | unmodelled | — |
| Second Prayer | $14.00 | 20% | $2.80 |
| Same-Day Placement | $19.90 | 12% | $2.39 |
| Voice of the Sanctuary | $24.90 | 12% | $2.99 |
| Your Card by Post | $19.90 | 10% | $1.99 |
| AOV | ≈ $47.56 (excludes the checkout speed option) |
Average charges per order = 1.54 (the bump rides inside the FE charge; each OTO is its own charge).
| Cost per order | Amount |
|---|---|
| Processing 5.7% of $47.56 (2.9% + 0.8% intl-card + 2% FX) | $2.71 |
| Per-charge US$0.22 × 1.54 (Stripe's C$0.30 at 1.36 CAD/USD) | $0.34 |
| Image generation (scene + card-lock container, front end only) | $0.47 |
| Card-text QA read-back (vision model, §4) | $0.02 |
| Audio, email, storage | $0.10 |
| Print and post (10% take × $3.50 per posted card) | $0.35 |
The image line understates a bumped order. The bump used to be one extra Pass-2 on the front end's own frame. It is now a full second pipeline at the bump location — its own Pass 1, its own Pass 2, and its own QA read-back — so the average image cost rises with the bump take rate. Read the real figure off the per-job COGS log once orders exist rather than trusting $0.47. | Refunds + disputes allowance (4% of AOV, under a 30-day guarantee) | $1.90 | | Net before ads | ≈ $41.67 |
Membership layer: 6% of buyers join at $9.90/mo, average life 4 months, fee ≈7.9% → ≈ $36.46 net per member → +$2.19 per buyer. Contribution per buyer before ads ≈ $43.86. Break-even CPA ≈ $44.
Rail cash terms, not in the per-order table above. This reserve-and-chargeback-fee note
was TagadaPay-specific and does not carry over: the Numina House Stripe account has charges
and payouts enabled with no reserve noted, and Stripe's exact dispute fee for this account is
not yet confirmed. Disputes now arrive as webhooks (OPS §4), landing in the disputes table
directly, on top of the existing manual daily entry — one more reason the 0.6% dispute
kill-switch (§9, OPS §9) exists.
Per-ticket net:
| Ticket | Fee | Net |
|---|---|---|
| FE $34.90 | $2.21 | ≈ $32.52 after generation cost |
| FE + bump $39.89 | $2.49 | ≈ $37.00 after generation cost |
| OTO1 $14.00 | $1.02 | ≈ $12.98 |
| OTO2 rush $19.90 | $1.35 | ≈ $18.55 |
| OTO3 audio $24.90 | $1.64 | ≈ $23.26 |
| OTO4 card by post $19.90 | $1.35 | ≈ $15.05 after print and post ($3.50) |
| Replacement $14.00 | $1.02 | ≈ $12.98 |
| Monthly $9.90 rebill | $0.78 | ≈ $9.12 |
| Annual $79 | $4.72 | ≈ $74.28 |
Generation is near-zero marginal cost; the margin lives entirely in media CPA. Target CPA ≤ $19 → ≈ $24.86 net per buyer at the modelled take rates (contribution ≈$43.86 minus CPA $19). Stripe has no fixed monthly platform fee, so there is no order-count threshold needed to cover one.
Scale and kill live in one place only: the day-10 read in §9. No other threshold is stated in this doc, in OPS-RUNBOOK or in ECONOMICS.
4. IMAGE PIPELINE (the fulfilment core)
Image models only — GPT Image class and Nano Banana Pro class. Nothing else in the path. This section is engineering. None of it appears on any customer surface.
Pass 1 — scene. Every location has one DONOR reference image (sourced from Pinterest,
stored at brands/<slug>/assets/donor/<location_key>.jpg) showing exactly what the site and
the scene look like. Pass 1 conditions on that donor and regenerates the scene, randomizing
time of day (morning / afternoon / evening / night) and light per order so every photo
reads as a real, different moment. Variation is seeded from variant_seed. The donor is the
camera: one angle entry per approved donor view, and the front end does not rotate, because the
offer's claim names the tomb of St. Peter and only a Confessio frame can carry it (R9, R10).
The card — printed, before either pass runs. The buyer's first name and prayer are typeset by
@prayer-engine/card onto our printed card: 105 x 148 mm at 300 dpi, one geometry, one typeface,
one printed header, identical on every order and printable as a mail piece. No model is involved
and nothing about it is generated. The finished PNG is attached to Pass 2 as a second reference
image at every location, so the front end and the bump hold the same bytes and "one card,
photographed twice" is true by construction. Full layout: CARD-SPEC.md.
Pass 2 — the card into the frame. An edit pass on the Pass-1 output puts a hand holding that
printed card into the foreground, and writes nothing: the pack carries no name slot and no
prayer slot. Card-in-hand is the default composition for every brand. Pass 2 invents nothing
the place does not already contain — no candle, no lamp, no object that is not in the frame. The
votive lights at St. Peter's are electric and appear only where they genuinely stand. The
Apostle's Tomb bump runs the whole pipeline a second time at a second location — its own Pass 1
and Pass 2 at the Vatican Grottoes — and it adds no object to either frame. The prayer input is
capped at prayer.maxChars, enforced at the survey, at the API and at the renderer, and the
renderer's fit ladder sets the whole cap at a legible size — there is no long-prayer path and no
excerpting. Legibility rules, the donor references and the hand-held recipe live in PROMPT-PACKS.
Prompt pack per location (brands/<slug>/prompts/): donor reference + pass-1 scene prompt
with the time/light/angle axes; pass-2 hand-held card edit prompt with the [CARD_REFERENCE]
second-image clause and no text slots at all; monthly theme variants so recurring members never
repeat a photo.
Card-text QA is a pipeline stage, not a hope. Between Pass 2 and upload the worker runs
one vision call over both frames — the Pass-1 scene and the Pass-2 output — which reads the
printed card back and returns four scene booleans: scene unchanged, no extra text, card not
occluded, hand plausible. The strings it grades against are ours: the pipeline rendered the
card, so the two text checks catch an unreadable print — a word under a finger, ink blown out by a
highlight — rather than a misspelling. An unreadable card is still not deliverable. The candle-count check was removed on 2026-09-21:
the votive lights at St. Peter's are electric, the offer no longer sells a candle, and the check
existed only to prove delivery of a candle we do not sell. Six checks gate the upload. The thresholds, the retry budget and the failure state are
specified in OPS-RUNBOOK §5. A job that cannot clear QA in three Pass-2 attempts dead-letters
and sets prayers.status = 'failed'.
Example photos. Seven finished deliverables per brand — 1 landing hero, 3 for
/create/ready, 3 for /offer — generated once with placeholder names and committed to
brands/<slug>/assets/examples/. They are a launch prerequisite (§13), not a nice-to-have.
Pipeline:
settle(paid) → enqueue one job PER PRAYER row (order_id, prayer_id, location_key, variant_seed, rush, bumpTaken)
worker → load prompt pack + donor ref → render the printed card (no model, no cost)
→ pass 1 scene → pass 2 card-in-hand (the rendered card attached)
→ card-text QA read-back (pass or re-run pass 2, max 3) → S3/B2 upload
→ insert deliverable (hidden) with reveal_at → reveal tick flips it visible in the portal
→ schedule delivery email (day 3 standard, ≤24 h rush)
Queue: Postgres table read with FOR UPDATE SKIP LOCKED — same DB, no extra infra. Rush jobs
are pulled first. Worker: single droplet, headless. Store every generation; emails carry
signed URLs (7-day expiry); the portal always serves fresh ones.
Persona portraits: generate once per brand — 6–10 consistent portraits (same face across the set, reference-image conditioning) for the offer page, emails, and creative frames.
5. AUDIO PRODUCT — "Voice of the Sanctuary" (OTO3)
The prayer, read aloud inside the space, delivered as an MP3:
- Script build: prayer text → polished spoken version (light cleanup, breath points).
- TTS: persona voice from
audio.voiceId(Spanish/Italian voice variants per locale). - Mix: TTS track layered over location ambience (bells, distant chant, echo/reverb matching
the site interior, votive-light tone) — ffmpeg, one preset per
audio.ambiencePreset. - 60–90 s master. The preview on the
/oto/3page is a static per-brand sample file (audio.sampleUrl) — not the buyer's own prayer, which does not exist yet at that point. - Delivery: inside the photo delivery email, and in the portal gallery. There is no separate audio email.
Marginal cost ~$0.02–0.06. Placement as the third OTO is deliberate: the buyer has already made two decisions, the card is on file, and the one-tap is frictionless. Expect 15% take.
6. MONTHLY RECURRING ENGINE
Monthly Prayer Membership — the recurring layer:
- Signup:
/thanks(bottom of the page) + the dedicated/membershiplanding for remarketing. A/thankssignup attaches to the buyer's order. A standalone/membershipsignup has no order: it writes its ownemailandfirst_nameonto thesubscriptionsrow, gets its ownportal_sessionstoken keyed to the subscription, and receives the Member welcome email. Member deliverables carrysubscription_idinstead oforder_id. - The first member photograph is enqueued within fifteen minutes of
createSubscription, by the worker'smember_firsttick (every 15 minutes, on the reveal_tick expression), with exactly the payload the monthly cron uses, so the monthly tick's dedupe never doubles the first month. (Until 2026-09-29 nothing enqueued it, and a member who joined after 06:00 UTC waited a month for a first photograph.) The initial payment is not a rebill, so nothing else would produce it, and the Member welcome email names the date it lands. - Every member job reads its two card strings off the
subscriptionsrow — the name fromsubscriptions.first_name, the text fromsubscriptions.current_intentionor the month's default prayer. A member job never dereferences an order, because a standalone member does not have one. - Subscription on Stripe's native Subscriptions engine, inline
price_dataper brand (monthly $9.90, annual $79 = save $39). - Monthly intention is opt-in and optional. Capture surface: the intention field in the
portal, plus one reminder email 5 days before the member's monthly delivery date. If the member
submits nothing, the engine places that month's default prayer (themes.md
## DEFAULT INTENTIONS) and delivers on that. Nobody ever misses a delivery for not filling in a form. A new member's default theme is seeded from their survey step-2 intention. - Rotation: theme = the calendar month (12 themes: "January — Renewal", "March — St.
Joseph", "November — All Souls" …). Treatment =
(member_no + year_offset) mod 4, wheremember_nois a serial assigned at signup andyear_offsetis years sincemember_since. 12 × 4 = 48 combinations; no member repeats a photo inside four years. - Cron (daily, fires on each member's monthly delivery date =
member_since+ N months): generate a NEW photo on that month's theme and treatment → member delivery email + the portal gallery. The delivery date is independent of the billing interval. An annual member at $79 rebills once a year and still receives twelve photographs a year, on the same schedule as a $9.90 monthly member — the copy sells twelve walks and twelve photographs to both. A rebill never enqueues a delivery; only this cron does, after the first one (OPS §4, §5). - Every rebill email states what the member is receiving, by name, in the subject line and the first line of the body. The Divine Rev chargeback audit traced ~75% of dispute volume to one recurring charge that delivered nothing recognisable; 85% of those were reason-coded "fraudulent" and never contacted support first. The recurring deliverable must be unmissable, every single month.
- Dunning: Stripe retries a failed invoice on its own adaptive Smart Retries schedule
(dashboard-configurable, not a fixed hour ladder), then marks it uncollectible and the
subscription cancels. Our three dunning emails ride Stripe's real webhook events, not a
calendar of our own: dunning 1 on the first
invoice.payment_failed, dunning 2 on a laterinvoice.payment_failedbefore the final scheduled retry, dunning 3 on the last scheduled retry'sinvoice.payment_failed. Dunning 3 says one more attempt is coming, update your card in the portal to keep it. No email ever says charges have stopped while the rail can still charge. The "billing has stopped" statement lives in one place only: the Membership ended email, fired oncustomer.subscription.deletedand nowhere else. - Retention hooks: 3-month milestone = a bonus generated keepsake image; 6-month = annual audio library ("every prayer you've sent us, voiced").
- Skip / pause / cancel from the portal (self-serve, one click) — the single biggest churn reducer. There is no chargeback-as-cancel path: cancelling is always easier than disputing.
Membership includes: monthly photo + monthly themed card. Audio is NOT included — it stays a paid add (protect OTO3's slot).
7. EMAIL SYSTEM
Transactional + lifecycle (Resend, per-brand sending domain, DKIM/SPF/DMARC). Seventeen
templates. This list is mirrored one-for-one in OPS-RUNBOOK §6, and COPY-CREATIVES §9 must
carry finished copy for all seventeen. Every one of them links into /portal/<token>. Every
post-purchase schedule below counts from orders.paid_at; only templates 8, 9 and 10 count
from orders.created_at.
| # | Template | Trigger |
|---|---|---|
| 1 | Confirmation | within 60 s of payment — order id, promise date, prayer echoed back, portal link |
| 2 | In-progress | paid_at + 24 h, standard orders not yet delivered (rush orders skip it) |
| 3 | Delivery — photo + audio | paid_at + 3 days standard, ≤24 h on rush. Audio rides inside this email if OTO3 was taken. |
| 4 | Day-5 re-send | paid_at + 5 days — "here is your photo again", for buyers who never opened email 3 |
| 5 | Day-7 membership invite | paid_at + 7 days, non-members only |
| 6 | Day-30 win-back (buyer) | paid_at + 30 days, no second purchase |
| 7 | Day-365 re-placement | paid_at + 365 days → /replace |
| 8 | Abandoned #1 | night 1 after a lead row that never paid — social proof, 3 example photos |
| 9 | Abandoned #2 | night 2 — "you started a prayer" + what you get |
| 10 | Abandoned #3 | night 3 — one example + the guarantee as urgency |
| 11 | Monthly intention reminder | 5 days before the member's monthly delivery date (member_since + N months) → the portal intention field |
| 12 | Member delivery | each monthly delivery date, themed, the photograph named in the subject line. Twelve a year for monthly and annual members alike. |
| 13 | Dunning #1 | first invoice.payment_failed — "we could not renew, we will try again" |
| 14 | Dunning #2 | the rail's 96 h attempt fails |
| 15 | Dunning #3 | the rail's first 168 h attempt fails — "one more attempt in 7 days, update your card in the portal to keep it" |
| 16 | Membership ended | customer.subscription.deleted only — the one email that says billing has stopped, plus the win-back ask |
| 17 | Member welcome | standalone /membership signup with no prior order — portal link, what arrives and when |
Rules:
- Delivery email: one clickable CTA only, and it is the Monthly Prayer Membership. No audio pitch, no second-prayer pitch, no seasonal block. The review ask is a reply request ("reply to this email with 1–5 stars"), not a link — reviews are collected by reply only.
- Abandoned emails fire on
status = 'lead'only, re-checked at send time, and each one carries the guarantee. All three link to/create/resume?t=<token>, which re-mintsphfor that order and lands on/create/readywith the draft intact — that is the mechanism behind "exactly where you left it", and its 30-day TTL matches draft retention. - Every marketing send checks the opt-out (
orders.marketing_opt_out/subscriptions.marketing_opt_out, set from/portal/<token>/email-preferences). Transactional templates ignore it. OPS-RUNBOOK §6 carries the class per template. - No psychic/manifestation cross-promo anywhere — keeps the list on-brand.
8. TECH STACK
| Layer | Choice | Why |
|---|---|---|
| Funnel/app | Next.js 14 (app router) | the curse-funnel pattern already exists; port it |
| Payments | Stripe — own checkout pages, Stripe.js Card Element tokenization, server-side charge | merchant of record, subscriptions, saved-card one-tap |
| Upsell chain | self-hosted one-tap (vaulted instrument) | Upsell Checkout v2 pattern, fresh instance |
| Portal | tokenised magic-link portal | Divine Rev client-portal-worker pattern: portal_sessions, reveal tick, offer surface |
| DB | Postgres + Drizzle | orders, prayers, deliverables, portal sessions, subs, charge intents |
| Queue | Postgres table, FOR UPDATE SKIP LOCKED |
no extra infra; matches OPS §5 |
| Image gen | GPT Image class + Nano Banana Pro class | two-pass donor → card-in-hand |
| Card | Rendered locally — @prayer-engine/card, deterministic |
prints the buyer's words; no model touches the text |
| TTS/audio | TTS voice per persona + ffmpeg | voice + ambience mix |
| Resend | transactional + lifecycle templates | |
| Storage | B2/S3 + signed URLs | deliverables |
| Hosting | droplet (isolated from every other brand) | one box runs web + worker initially |
| Support | email only — Resend inbound or a shared mailbox | Divine Rev reply-engine v2 pattern ported later |
| Escalations | Telegram digest | Divine Rev check-escalations pattern: investigate → present → approve → execute |
| Analytics | Meta Pixel + CAPI + PostHog | full funnel events |
Deploy isolation: this stack shares zero infra with any existing brand. Own domain, own payment store, own BM, own sending domain, own droplet.
9. ANALYTICS + DECISION RULES
Events, in funnel order:
view_landing → survey_step → lead_submit → transition_view → offer_view → initiate_checkout → purchase → bump_take → oto1_take → oto2_take → oto3_take → oto4_take → monthly_signup → deliverable_sent → portal_open → replacement_take → email_open → email_click
survey_stepfires once per completed step, with meta{ step: 1–5 }— this is the drop-off map for the survey and the single most important new number in the funnel.transition_viewfires on/create/readyrender.offer_viewfires on/offerrender, and nowhere else. One event, one firing point: two firing points on one name double-counts the step and corrupts the drop-off read.purchasefires from the synchronous settle path, server-side, withevent_id = order_idso the browser pixel and the CAPI mirror dedupe against each other. The webhook never fires it a second time.portal_openfires on every successful/portal/<token>magic-link entry.oto3_takefires on an accepted audio one-tap;oto2_takeis now the rush upsell.oto4_takefires on an accepted Your Card by Post one-tap (the charge settled and themail_ordersrow written).replacement_takefires on an accepted/replacecharge.
Meta will classify this domain as Religion. Divine Rev's religion-flagged pixel got an EU block and a slow appeal. Build for it from day one:
- Attribution must not rely on URL parameters. Assume click ids get stripped.
- Every CAPI event carries
event_source_urlplus the full match-key set, withevent_iddedupe against the browser pixel. - A fresh pixel per brand. Never reuse a pixel across brand fronts.
- New-ads-per-day cap ≤ 4 to keep a restricted account out of review pileup.
Read order: CPA is the only day-3–13 metric. Then survey step drop-off. Then bump/OTO take rates (needs ≥100 orders). Then monthly signup rate and portal open rate.
The scale-and-kill rule. This is the only version of it that exists. OPS-RUNBOOK §10 and ECONOMICS quote these four sentences verbatim and state no threshold of their own:
Contribution per buyer before ads ≈ $43.86. Day-10 read: CPA ≤ $33.40 → scale +20–30% every 3 days. CPA $33.40–$35.10 → hold, rotate creative. CPA > $35.10 → kill the ad set.
- Creative rotation always comes before any offer change.
- Dispute watch: daily manual read from the payment dashboard; >0.6% in any month → pause ads, fix billing clarity first.
10. LAUNCH SEQUENCE
Day 0 — entity + accounts: new entity/numbered co., domain(s), Stripe account live for
this brand (Numina House already live) + PSP_ADAPTER=stripe set + brand Stripe env keys
populated + webhook endpoint registered once the public URL exists and its signing secret
captured, Meta BM + page, Resend sending
domain, image-model + TTS accounts, droplet provisioned. Donor reference image approved for
the launch location. Seven example photos generated and approved.
Day 1–2 — build: funnel + survey + portal, wire Stripe + webhooks, image pipeline
end-to-end with a test order, all 17 email templates, brand config v1 filled (site, persona
pack, prompt pack, donor image, example photos, copy).
Day 2 — one live purchase and one live refund on production before a single ad runs.
This gate is not skippable.
Day 3 — creative + live: 3 ad creatives — (a) 15–30 s silent B-roll-style generated footage
- on-screen text (the proven format), (b) "what you receive" walkthrough of the delivery email, (c) persona-voiced honest framing. Launch broad USA only, women 40+, $50 CAD/day, ≤4 new ads/day. Day 3–13 — read CPA only, then survey step drop-off. Rotate creative at day 6. Day 14+ — if scaling: push the membership, then the anniversary re-placement to the day-365 cohort. Part 2 — second brand config (new location + persona + donor image + example photos + domain): clone day.
11. PART 2 — BRAND EXPANSION PLAYBOOK
Each new brand = one config + one prompt pack + one donor image + seven example photos + one domain:
| Brand slot | Location key | FE | Angle |
|---|---|---|---|
| v1 | st_peters_confessio |
$34.90 | Catholic, Vatican authority framing |
| v2 | holy_sepulchre |
$34.90 | Jerusalem terms; proven largest demand |
| v3 | lourdes |
$34.90 | healing angle; Marian devotion |
| v4 | western_wall |
$29.90 | Jewish audience; note-in-wall mechanic; Wave 1 |
| v5 | guadalupe |
$29.90 | Spanish-language twin, LATAM+US Hispanic |
| v6 | fatima |
$34.90 | expansion inside the Christian brand — zero incumbent ads |
The Western Wall front runs a $29.90 front-end. The $34.90 floor was a v1 rule, not a
system rule; products.fe.cents is per brand.
Location keys are snake_case everywhere: BrandConfig.location.key, the donor filename, the
ambience preset key, and the PROMPT-PACKS location pack headings must all match exactly.
Rules: one persona per brand (never shared faces across brands), one ad account and one fresh pixel per brand, copy contrast stays categorical ("this is a service fee") — never comparative against named competitors. Shared engine, zero shared identity surface.
12. BACKLOG (post-launch ideas)
- Video OTO — Ken Burns pan over the generated photo + the audio product + music → 15 s MP4 ("your prayer at the altar, filmed"). $19. Trivial pipeline on top of §4+§5.
- Prayer wall — free tier: opt-in public listing of (first name + intention) for SEO + lead capture.
- Seasonal campaigns — All Souls (Nov), Advent, Lent, St. Joseph (Mar 19): themed creatives + member offers, one email each.
- SEO prayer library — ~90 pages per brand (the durable-traffic layer the incumbent uses).
- Localized twins — ES first (the incumbent runs ES ads successfully), then PT.
- Price-ladder test — $13.90 / $27 / $55 three-tier variant against single-price $34.90. Run only after the single price has a stable CPA.
Gift flow and anniversary re-placement moved out of the backlog: both ship in v1 (§2, §3).
13. WHAT MUST EXIST BEFORE FIRST DOLLAR (checklist)
- Entity + bank + Stripe account live under Numina House (
acct_1UGPHEKGASr0FGk4) — DONE 2026-09-16 - Brand Stripe env keys populated (
<SLUG>_STRIPE_SECRET_KEY/_WEBHOOK_SECRET/_PUBLISHABLE_KEY); webhook endpoint registered viascripts/stripe-register-webhook.tsonce the public URL exists, its signing secret captured at creation - Statement descriptor set:
NUMINA* HOLYCARDS— DONE 2026-09-16, no phone, never "prayer" - Live Stripe keys swapped in for test keys (
pass companies/9566-0866/stripe-api-live) before the live-purchase-and-refund gate below - Domain + Cloudflare + deployed Next.js funnel (brand config v1 filled)
- Donor reference image approved for the launch location and committed to
brands/<slug>/assets/donor/ - Seven example photos generated, approved and committed to
brands/<slug>/assets/examples/— 1 landing hero, 3 on/create/ready, 3 on/offer - 5-step survey live end-to-end: 320-char cap enforced client and server,
survey_stepfiring with step meta, lead row written at step 5 - Image pipeline: pass 1 donor scene → pass 2 card-in-hand → card-text QA read-back → S3 → delivery email (one test order end-to-end, one photo per prayer row)
- Audio pipeline mixed (one test MP3 per locale) + the static OTO3 sample clip live
- Portal live: magic-link entry at
/portal/<token>, deliverable gallery, 15-minute reveal tick flipping a ready deliverable visible, track-order timeline, intention field, membership pause/resume/cancel, email preferences, tokenised offer surface - Supporting routes live:
/support,/terms,/privacy,/refunds,/create/resume,/thanks/correct-email,/admin - Stripe webhooks verified: all 12 subscribed event types reaching the endpoint,
Stripe-Signatureverified inside the 5-minute replay window, handler returning 2xx - 48 h reconciliation sweep running against the orders/payments list API
- Resend domain verified; all 17 email templates live (§7), every one linking into the portal
- Support mailbox live and answered — email only
- Meta BM + page + fresh pixel + CAPI verified (Events Manager check post-pixel,
event_source_urlon every server event) - 3 creatives cut and uploaded
- Orders dashboard: revenue, CPA, take rates, portal open rate, disputes (manual daily entry) — one screen
- One live purchase and one live refund completed on production before any ad spend
- Pre-mortem doc: what a bad dispute month does to any adjacent brand — then confirm zero shared infra