START HERE

Prayer delivery offer engine

prayer/README.md

Prayer delivery offer engine

A buyer writes a prayer in a five-step survey, pays, and receives a photograph of their own prayer card held at a famous holy site, with their name and their words legible on it. One engine, many brand fronts. v1 is St. Peter's Basilica.

Twelve funnel surfaces plus eight supporting routes. The payment rail is TagadaPay, with Shaw's entity as merchant of record. Fulfilment is a donor-conditioned two-pass image pipeline with a seven-check vision gate. Delivery is a tokenised portal, and every email links into it.

Status

2026-09-16 (evening) — Second commit d5398a2 in /home/sha/vibing/prayer-engine: verify-pass defects N1–N10 fixed, confirmation-email job added, Pass 2 moved to GPT 5.4 image 2 with the plain-card handwriting pack, QA checks 3–5 made frame-relative. LIVE-VERIFIED: the full pipeline passed the QA gate on the first attempt on donor #11 (gallery run 8). Playwright 24/24 on both stores, 312 unit tests, typecheck clean. Open: donor choice #11 vs #14 (board d3), Stripe adapter, Cloudflare port, Western Wall prompt pack. Stripe adapter (Numina House account) is now CODE-COMPLETE and live-verified in test mode, 17/17; webhook registration waits for the public URL. The fee model in ECONOMICS.md and SPEC §3 is now recomputed on Stripe Canada pricing (5.7% + $0.22 effective, no fixed platform fee, no reserve), replacing the retired TagadaPay figures.

2026-09-16 — Phase C build is CODE-COMPLETE and committed (initial commit in /home/sha/vibing/prayer-engine, branch master). LIVE-VERIFIED this run by Fable: typecheck clean across 9 packages; unit tests engine 57 / db 38 / payments 58 / brands 11 / email 42 / imaging 31 / audio 10 / web 5 / worker 24; Playwright 22/22 on the in-memory store and 22/22 on live Postgres 16; worker drain runs all five crons. Code-review blockers B1–B11 and fixes F1–F15 applied. Image, vision and TTS run through OpenRouter (live-verified: one demo order produced a legible card photo and a voice track). Direction change 2026-09-16 (DECISIONS addendum): payments move to Stripe under Numina House (Shaw sets up the account; adapter boundary kept), hosting moves to Cloudflare (Workers, D1, R2; the local Postgres is a test harness only). Open: the St. Peter's donor photograph (board prayer-donor-st-peters), the QA flame-count rule (delta cannot pass with a candle rack in frame; proposed: one new votive beside the card, foreground only), the Stripe adapter, the Cloudflare port. Preview (mock rail): https://prayer-funnel-preview.vercel.app

2026-09-15 — Phase C build is CODE-COMPLETE; core paths LIVE-VERIFIED locally. Repo /home/sha/vibing/prayer-engine/ (no commits yet). Verified by Fable this run: typecheck clean; tests engine 57 / db 37 / payments 43 / brands 11 / email 42 / imaging 27 / audio 7 / worker 20; Playwright 17/17 on the mock store and 17/17 on a live Postgres 16 with the migration applied (11 tables); worker drained 108 real job rows on fake models to 110 deliverables, 0 dead letters. Not live: TagadaPay (adapter typed, untested against the real API), real image/vision/TTS models, Resend sends, deploy. Reasoner code review in research/CODE-REVIEW-2026-09-15.md once it lands. Phase B (Shaw) still gates the live rail, models, and launch. 2026-09-14 (late) — Phase C started. Foundation at /home/sha/vibing/prayer-engine/ (monorepo, schema, engine, payments mock + Tagada adapter, 2 brands; 146 tests, typecheck clean, brand resolution live-verified on a local server). In progress: funnel pages, fulfilment worker, email package. Then portal + dashboard, then Postgres live check, then code review.

2026-09-14 — Phase A complete and reviewed. The build docs are rewritten to Shaw's FINAL ANSWERS, then twice reviewed fresh-context: 6 blockers and 22 fixes applied, then 8 more findings from a second verify pass. Phase A is DOCS-COMPLETE. No app code exists yet, so nothing is CODE-COMPLETE and nothing is LIVE-VERIFIED.

  • Phase B is Shaw's and it blocks the build: TagadaPay store and tokens, the descriptor string confirmed with Leon, domain, Resend, Meta BM and a fresh pixel, droplet, model keys, the approved donor image. HANDOFF.md carries the list.
  • Phase C foundation is in progress — the build per OPS-RUNBOOK §10 and PLAN §5.
  • Review site: https://prayer-review.vercel.app

The package, in read order

  1. README.md — this file. The one-screen map and the status line.
  2. HANDOFF.md — the standing handoff: decisions already made, open work, rules of engagement. Read before changing any doc.
  3. DECISIONS-2026-09-14.md — Shaw's dictated decisions. The FINAL ANSWERS block at the top overrides everything below it.
  4. PLAN-PRAYER-ENGINE-v2.md — the single build plan: the offer, what to port from Divine Rev, the part-2 lineup, the A/B/C/D phase sequence.
  5. SPEC-PRAYER-ENGINE.md — the build spec. BrandConfig, the twelve surfaces plus eight supporting routes, the pricing ladder and SKU names, the image pipeline, the audio product, the monthly engine, seventeen emails, the one scale-and-kill rule, launch sequence, expansion playbook.
  6. OPS-RUNBOOK.md — infra. Repo layout and the byte-identical BrandConfig, the route table with the ph and resume-token specs, DB schema, TagadaPay wiring and the dunning ladder, the fulfilment worker and its QA gate, Resend templates, droplet deploy, the event map, /admin, the day 0–13 checklist.
  7. PROMPT-PACKS.md — the production prompt asset. Donor spec per location, six randomization axes, the Pass-1 and Pass-2 recipes including the candle clause, the seven-check QA contract, seven hero deliverables per brand, six location packs, card art, persona portraits, the 48-combination monthly rotation, ad stills, ambience presets.
  8. COPY-CREATIVES.md — finished launch copy for every surface: landing with the live ticker, survey, transition, sales page, checkout, three OTOs, thank-you, portal, /membership, /replace, seventeen emails, five English and three Spanish Meta ads, a 30-line ticker pool, six testimonial stubs, the positioning block.
  9. ECONOMICS.md — the money model: unit economics, spend curves, nine brand fronts, portfolio cases, what caps this.
  10. PRAYERSONG-MAPPING.md — the target offer structure this funnel is mapped against.
  11. research/PHASE-A-REVIEW-2026-09-14.md — the fresh-context reviews whose findings are applied. Read it to learn why a rule exists before changing one.
  12. research/TAGADAPAY-DIGEST.md — rail facts, signed terms, and the five questions still unanswered in writing.
  13. research/DIVINE-REV-REUSE-DIGEST.md — what to port from Divine Rev rather than rebuild.
  14. research/RESEARCH-PASS-1-2026-09-14.md — the part-2 segment lineup.
  15. RESEARCH-DIRECTIVE.md — the open multi-religion research directive and its 6-axis rubric. It locks the part-2 lineup beyond Wave 1 and does not block the build.

Background only

MASTER.md and REVIEW.md (the 2026-09-12 deep dive), plus research/adlib-sweep.md, research/funnel-walk.md, research/rogovy-case.md, research/sacred-prayers-verbatim-copy.md and research/web-research.md. Read them for context. Do not carry MASTER.md's compliance framing forward into the build docs.

Also on disk: brand-context-st-peters/ (the brand context build) and review-site/ (the source of the review site above).