BUILD DOCS

PROMPT PACKS: Prayer Delivery Offer Engine

prayer/PROMPT-PACKS.md

PROMPT PACKS: Prayer Delivery Offer Engine

Production asset for the fulfilment pipeline. Internal document. Brand v1: St. Peter's Basilica, Vatican (st_peters_basilica). Wave 1: Western Wall, Jerusalem (western_wall) and Fatima (fatima).

Every deliverable is produced by a two-pass, donor-conditioned run: Pass 1 regenerates the site from a real donor photograph, Pass 2 puts a hand holding the buyer's prayer card into the foreground. Card-in-hand is the default composition for every brand.

Image models only: GPT Image class and Nano Banana Pro class. Nothing else in the path.


1. PIPELINE OVERVIEW

1.1 The two passes

Pass Input Output Why
Pass 1, scene donor reference image + scene prompt clean site photo, no card, no people, no hands the donor is what makes the site look like itself
Pass 2, card in hand Pass-1 output + edit instruction final deliverable: a hand holding the prayer card in the foreground, site behind the card is the product

Pass 1 conditions on the location's DONOR reference image, a real photograph of the site sourced from Pinterest, stored at brands/<slug>/assets/donor/<location_key>.jpg and declared in BrandConfig.location.donorRef. The prompt tells the model to match the reference's composition, materials and light, then re-render it under the order's randomized conditions. The donor is never shipped and never appears in the output; it is the geometry and material anchor.

Pass 2 is an edit on the Pass-1 frame. It adds one hand entering the lower frame holding a prayer card, with {FIRST_NAME} and {PRAYER_TEXT} rendered on the card face. {PRAYER_TEXT} is the buyer's prayer in full, capped at 220 characters by BrandConfig.prayer.maxChars. The cap is what guarantees the text fits at legible size. There is no long-prayer path and no excerpting step.

1.2 Randomization axes (per order)

Every order gets a different moment. Six axes, all derived from the order's variant_seed so a run is reproducible and a re-run of the same job gives the same photo.

Axis Values Derivation
Time of day morning, afternoon, evening, night tod = variant_seed mod 4
Light soft diffuse, raking directional, pooled flame light = (variant_seed >> 2) mod 3
Camera angle the location's scene variants (Section 6) angle = (variant_seed >> 4) mod n_variants
Hand H1 / H2 / H3 (skin tone, age, sleeve) hand = (variant_seed >> 7) mod 3
Card variant E1 / E2 / E3 card = (variant_seed >> 9) mod 3
Hand side left / right side = (variant_seed >> 11) mod 2

Every axis reads a different bit range on purpose. Side takes bits from >> 11 and not the low bit, because the low bit already drives time of day: read the same bit twice and morning and evening always enter from the left while afternoon and night always enter from the right, which throws away half the intended variety.

variant_seed is a 32-bit signed integer (prayers.variant_seed integer, OPS §3) stored on the prayer row at enqueue time. The worker resolves all six axes before it builds either prompt. Two prayers on one order get two different seeds, so a Second Prayer buyer never receives the same photo twice.

Member jobs do not use the angle axis. A monthly member delivery takes its scene from scene_variant = (member_no + month_index) mod n_variants and its treatment from (member_no + year_offset) mod 4 (§9). The worker branches on the job type, not on the seed: angle = (variant_seed >> 4) mod n_variants is the per-order path only.

1.3 Worker call order

load BrandConfig → load donor ref for location_key → resolve 6 axes from variant_seed
  → Pass 1: donor ref + base scene + [TIME_OF_DAY] + [LIGHT] + [ANGLE] + CONSTRAINTS
  → Pass 2: edit on pass-1 output, hand variant + card variant + [SIDE] + candle clause
            + {FIRST_NAME} + {PRAYER_TEXT}
  → QA read-back: one vision call over BOTH frames, seven checks (Section 4.5)
  → upload → deliverables row

The Pass-1 frame is held until QA finishes, because three of the seven checks compare the two frames against each other. QA failure on any check re-runs Pass 2 only. The Pass-1 scene is kept. Three Pass-2 failures escalate the job to the dead-letter queue and set prayers.status = 'failed' (OPS §5).


2. DONOR REFERENCE SPEC (per location)

One donor image per location key. Sourced by hand on Pinterest, approved once, then frozen. Replacing a donor changes the look of every future photo at that site, so a replacement needs a fresh sign-off line.

2.1 Shared acceptance checklist

Every donor must pass all eight before sign-off:

  1. Resolution: at least 2000 px on the long edge. No upscaled and no AI-generated source.
  2. No watermark, no stock-agency overlay, no photographer signature, no border, no collage.
  3. No crowd. Zero recognisable faces. A distant blurred figure is acceptable; a group of pilgrims is not.
  4. No text in frame: no signage, no plaques with readable lettering, no banners, no burned-in captions.
  5. Matches the scene variants listed for that location in Section 6. If the donor shows a part of the site none of the variants describe, either the donor or the variants are wrong.
  6. Clean single viewpoint. One coherent perspective, not a panorama stitch, not a fisheye, not a tilt-shift miniature.
  7. Natural colour. No heavy HDR halos, no filter, no black-and-white, no teal-and-orange grade.
  8. Foreground surface present. A ledge, rail, stone, floor or plaza surface in the lower third that the Pass-2 hand can plausibly enter in front of.

2.2 Shared Pinterest search recipe

Run all five queries for the location. Pin 15 to 25 candidates, then filter with the checklist above. Sort by Pinterest's default relevance, never by "most saved": most-saved skews to heavily edited travel-influencer frames that fail items 7 and 2.

2.3 Sign-off line

Record one line per approved donor in brands/<slug>/assets/donor/APPROVED.txt:

DONOR APPROVED | location_key=<key> | file=brands/<slug>/assets/donor/<key>.jpg
  | long_edge=<px> | source_url=<pinterest pin url> | approved_by=<name> | date=<YYYY-MM-DD>

A location with no APPROVED line does not go into production. The worker refuses the job.

2.4 st_peters_basilica (v1)

Must show: the basilica interior looking down the nave toward the baldachin and main altar, or the marble altar rail in the near foreground with the nave behind. Camera at standing eye height, 15 to 40 m from the altar. Travertine, polished coloured marble, gilded bronze and coffered vault all visible. Daylight from the clerestory windows, warm, no flash, no night-only frame.

Queries: st peters basilica interior nave empty · st peters basilica baldachin altar light shafts · vatican basilica marble altar rail close up · st peters basilica interior morning light no people · saint peters rome nave columns coffered ceiling

2.5 western_wall (Wave 1)

Must show: the Wall's lower courses filling the frame, close enough that individual limestone blocks read as blocks and the folded paper notes in the seams are visible. Camera 1 to 3 m from the stone, straight on or slightly angled. Late-afternoon or golden-hour raking light on the stone texture. No prayer books, no chairs, no partition screens, no people at the Wall.

Queries: western wall jerusalem stones notes close up · kotel limestone blocks paper notes cracks · western wall golden hour stone texture · wailing wall jerusalem detail no people · kotel stones prayer notes macro

2.6 fatima (Wave 1 expansion)

Must show: the Chapel of the Apparitions (Capelinha das Aparições) open-sided shelter with its plain columns and the marble pillar marking the apparition site, or the adjacent candle-burning area with its long steel troughs and racks of tall white candles. Camera at standing height, 5 to 20 m out. Overcast or warm evening light, the open plaza visible beyond.

Queries: capelinha das aparicoes fatima chapel apparitions · fatima portugal candle burning area candles · fatima sanctuary chapel of apparitions evening · fatima shrine plaza empty architecture · fatima candles wax troughs candles rack

2.7 lourdes

Must show: the grotto rock face with its arched natural niche and the statue recess, candles in glass holders massed at the base, wet stone, the spring channel. Camera 3 to 10 m out, slightly below the niche looking up, or level. Overcast daylight or evening candle glow.

Queries: lourdes grotto rock niche candles france · grotte de lourdes massabielle rock face · lourdes candles glass holders burning · lourdes grotto wet rock spring water close · lourdes sanctuary grotto no crowd

2.8 holy_sepulchre

Must show: the Stone of Anointing slab with the hanging brass oil lamps above it, or a candlelit stone-arched chapel interior in the same church. Camera 2 to 6 m out at standing height. Warm lamp light, incense haze acceptable, no flash.

Queries: church of the holy sepulchre stone of anointing · holy sepulchre jerusalem oil lamps brass hanging · holy sepulchre interior candles stone arches · jerusalem holy sepulchre chapel lamplight empty · stone of anointing slab close up lamps

2.9 guadalupe

Must show: the tilma of Our Lady of Guadalupe in its gold frame above the altar of the Nueva Basílica, framed straight on from the nave floor, or the modern basilica interior with its curved timber ceiling and radiating pews. Camera 10 to 30 m out. Even interior daylight through the clerestory band.

Queries: basilica de guadalupe interior tilma altar · nueva basilica guadalupe mexico interior ceiling · virgen de guadalupe tilma gold frame altar · basilica guadalupe nave pews architecture empty · guadalupe basilica interior wide no people


3. PASS 1 PROMPT TEMPLATES (reference-conditioned)

Pass 1 always runs with the donor image attached as a reference. The prompt opens with the match instruction, then the base scene, then the three randomized blocks, then the constraints block.

3.1 Prompt assembly order

[MATCH INSTRUCTION] + [BASE SCENE for location_key] + [TIME_OF_DAY block]
  + [LIGHT block] + [ANGLE block from Section 6] + [PASS-1 CONSTRAINTS]

3.2 Match instruction (identical for every location)

Using the attached reference photograph as the authority for this place: match the
composition, materials and light of the reference image. Keep the same architecture,
the same stone and metal surfaces, the same proportions and the same spatial depth.
This is the same real location photographed again on a different day, not an
interpretation of it. Re-render it as a new photograph under the conditions below.

3.3 Base scenes (one per location key)

st_peters_basilica

Photorealistic interior of St. Peter's Basilica in Rome. Polished marble columns and pilasters
receding down the nave toward the gilded baldachin and the main altar, coffered and gilded vaulting
overhead, pale travertine underfoot, candle stands with small warm flames along the altar steps.

western_wall

Photorealistic close view of the Western Wall in Jerusalem. Massive ancient limestone blocks in warm
honey tones, weathered surfaces cracked and pocked with centuries of wear, narrow folded paper notes
pressed into the seams, the wall continuing upward out of frame, worn plaza stones at its base.

fatima

Photorealistic view of the Chapel of the Apparitions at the Sanctuary of Fatima in Portugal. The
plain open-sided shelter on slender columns, the marble pillar marking the apparition site, pale
worn stone floor, the wide open plaza beyond, rows of tall white candles burning in steel troughs.

lourdes

Photorealistic view of the Lourdes Grotto in France. The natural rock niche with its shallow arched
hollow, dozens of candles in glass holders massed and glowing at the base of the rock, clear spring
water running along a stone channel, damp rough rock face, pale flowers on the wet stone ledges.

holy_sepulchre

Photorealistic view of the Stone of Anointing inside the Church of the Holy Sepulchre in Jerusalem.
The broad pale limestone slab catching the glow of hanging brass oil lamps on chains, rough stone
walls and aged pillars around the chapel, candle niches in recessed arches, incense haze in the air.

guadalupe

Photorealistic interior of the Basilica of Our Lady of Guadalupe in Mexico City. The curved timber
ceiling sweeping overhead, the broad radiating nave, the gold-framed tilma of Our Lady raised above
the altar and lit warm against the dark sanctuary wall, even daylight from the high clerestory band.

3.4 Time-of-day blocks

MORNING:   early morning, cool clear air warming at the edges, long low light entering
           from one side, the space still and freshly lit.
AFTERNOON: full afternoon daylight, bright and even, warm highlights on stone, short
           soft shadows, the space at its most open and legible.
EVENING:   late evening, deep amber daylight nearly gone, flame and lamp light taking
           over as the dominant source, long warm shadows.
NIGHT:     night, no daylight at all, only candle, lamp and fixture light, deep warm
           pools against cool dark stone, high contrast, intimate and hushed.

3.5 Light blocks

SOFT DIFFUSE:       soft diffuse light with no hard edges, gentle falloff, even exposure across the
                    frame, calm and open.
RAKING DIRECTIONAL: hard directional light raking across the surfaces at a low angle, picking out
                    every grain and chisel mark, visible light shafts and dust motes in the air.
POOLED FLAME:       light pooled from flames, warm amber falling off fast into shadow, every flame a
                    distinct source, the rest of the frame sinking into warm dark.

3.6 Pass-1 constraints block (append to every Pass 1)

Photorealistic, 35mm documentary photograph, natural colour, shallow depth of field,
reverent mood. Colour: neutral, true-to-life white balance, not orange, not warm-filtered,
even in evening and night frames; the marble reads white and grey, the bronze reads dark
brown, flame light stays small and local. A candid photograph taken on a phone, not a
studio image. Portrait orientation, 3:4. No people, no faces, no hands, no readable text
anywhere, no signage, no plaques, no logos, no watermark, no borders, no distortions, no
duplicated architecture.

4. PASS 2 CARD-IN-HAND RECIPE

The edit pass. It runs on the Pass-1 output, adds one hand holding the prayer card in the foreground, and changes nothing else.

4.1 Edit instruction template

Both passes run on the newest GPT image model (openai/gpt-5.4-image-2 via OpenRouter). Shaw's call 2026-09-16: GPT only for image generation, no Gemini. The vision read-back (§4.5) is a separate reading model and generates nothing.

Edit this photograph. Keep the place exactly as it is: the same architecture, marble,
bronze, surfaces, light, time of day and camera position. A person's hand enters the frame
from the lower [SIDE] foreground, close to the camera, holding up a [CARD_VARIANT] so the
card faces the camera squarely, [CARD_DISTANCE] [HAND_VARIANT]. The fingers grip the card
at its lower edge and along one side, thumb in front, fingertips visible, no finger
crossing the written area.

On the card, written by hand in blue ballpoint, is the name "{FIRST_NAME}" on its own
first line, and underneath it, in natural handwriting across several lines, exactly this
text and nothing else: "{PRAYER_TEXT}"

The handwriting is real human handwriting: natural slant, uneven letter sizes, lines that
drift slightly, changes of pen pressure, ballpoint ink with small skips, sitting in the
paper fibres. It is not typeset, not a font, not printed. The card is lit by the same
light as the scene behind it, with a soft natural shadow where the fingers press it. The
card and the writing are the sharpest thing in the photograph; the scene behind stays in
focus but a little softer.

[CANDLE_CLAUSE]

Colour: neutral, true-to-life white balance, not orange, not warm-filtered; the marble
reads white and grey, the bronze reads dark brown. This is a candid photograph taken on a
phone by the person holding the card, not a studio image. Portrait orientation, 3:4. Add
nothing else beyond what is stated above. No other text anywhere in the frame, no signage,
no logos, no watermark, no second hand, no face.

Slots: [SIDE] is left or right, from side = (variant_seed >> 11) mod 2 (§1.2). [CARD_VARIANT] is the E1 / E2 / E3 card description from Section 7. [CARD_DISTANCE] follows the prayer length (4.2 rule 2; blocks in 4.3a). [HAND_VARIANT] is one of the three blocks in 4.3: one persona hand, three small variations. {FIRST_NAME} is the buyer's first name, exact string, title case, no surname. {PRAYER_TEXT} is the buyer's prayer in full, verbatim, max 220 characters.

4.1a The candle clause (one on every order, two with the bump)

[CANDLE_CLAUSE] always renders. Every order is promised a candle lit beside the card — the promise is printed on the landing page, the sales page, the thank-you page, the portal timeline and the delivery email (COPY-CREATIVES §1, §4, §7, §8, §9) — so Pass 2 always places one lit votive beside the card. That single flame is the base deliverable.

The job payload's candle boolean, true when the buyer took the $4.99 Votive Candle bump at checkout, makes it two. The second flame is the whole deliverable of that bump. Without it the buyer pays $4.99 and receives a photograph identical to one who did not.

When candle is false, the slot renders this text verbatim:

A lit votive candle in a small glass holder stands on the surface just beyond the card's lower
edge, fully visible, not overlapped by the card, the fingers or the hand's
shadow, its flame small and clear and its own warm light falling across the lower edge of the
card.

When candle is true, the slot renders this text verbatim:

Two lit votive candles in small glass holders stand side by side on the surface just beyond
the card's lower edge, both fully visible, not overlapped by the card, the
fingers or the hand's shadow, their flames small and clear and their own warm light falling
across the lower edge of the
card.

QA never compares an absolute flame count. Five of the six locations put many lit flames in the Pass-1 frame by design: candle stands along the altar steps, dozens of glass holders, racks of white candles. The check is the delta between the two frames, counted in one vision call: exactly one new flame without the bump, two with it (4.5 check 3).

4.2 Legibility rules

  1. Cap is 220 characters, enforced at input by BrandConfig.prayer.maxChars. Never truncate at render time. If a stored prayer exceeds the cap, that is a funnel bug, not a prompt problem: fail the job loudly.
  2. Card distance follows prayer length ([CARD_DISTANCE], Section 4.1): up to 80 characters the card sits at arm's length, 81 to 150 at half the frame width, 151 and above close. Short prayers show the place; long prayers must stay readable on a phone screen.
  3. Name is the first line, on its own, in the same handwriting. It is the first thing the buyer's eye lands on.
  4. Body runs across several natural lines. Say so; without it the model writes one or two long lines that shrink.
  5. Handwriting is named, always: "written by hand in blue ballpoint", "real human handwriting", "not typeset, not a font, not printed". Never ask for a typeface, never say "serif", never say "elegant". The writing should look like a person wrote it in a minute, not like a designer set it.
  6. Ink and paper: blue ballpoint on a plain white index card. Nothing decorative: no gold, no deckle, no vellum, no parchment, no border. The paper is ordinary on purpose.
  7. Nothing occludes the written area. The grip is at the lower edge and one side, thumb in front, and the prompt says so.
  8. The card and the writing are the sharpest element. State it. The model otherwise focuses on the architecture it just rendered.
  9. Colour is neutral. State the white balance every time: marble white and grey, bronze dark brown, not orange. The model otherwise warms the scene toward candlelight orange.
  10. Name-spelling recovery trick. If the model mangles the name, re-run Pass 2 with the name respelled inline:
...the name "Nneka", spelled exactly N-n-e-k-a as one single word with no spaces
and no hyphens, on its own first line...

Use this on the retry only. Applying it on the first pass makes the model render the hyphens about one time in ten.

4.3 Hand variants

One hand per brand: the persona's. The three entries are the same hand with small differences so the set does not repeat exactly. Never a ring, never a watch, never a face.

H1: The hand is a man's in his fifties, light warm skin, clean short nails, faint lines
    at the knuckles, no ring, no watch, the cuff of a plain black sleeve just visible at
    the wrist.
H2: The hand is a man's in his fifties, light warm skin, clean short nails, faint lines
    at the knuckles, no ring, no watch, the plain black sleeve pushed a little further
    back so more wrist shows.
H3: The hand is a man's in his fifties, light warm skin, clean short nails, faint lines
    at the knuckles, no ring, no watch, the cuff of a plain black sleeve at the wrist,
    the thumb pressing a touch harder so the card dips slightly.

4.3a Card distance

Selected by the prayer length in characters: up to 80 = FAR, 81 to 150 = MID, 151 and above = NEAR.

FAR:  held at arm's length so the card fills about one third of the frame width; the place
      is the subject and the card is the detail
MID:  held so the card fills about half the frame width, slightly tilted, every line easy
      to read
NEAR: held closer so the card fills about two thirds of the frame width and every line is
      clearly readable, the scene softening behind it

4.4 Filled examples

Example 1, short prayer. st_peters_basilica, morning, hand H1, card E1, distance FAR, 57 characters.

Edit this photograph. Keep the place exactly as it is: the same architecture, marble,
bronze, surfaces, light, time of day and camera position. A person's hand enters the frame
from the lower left foreground, close to the camera, holding up a plain white unlined index
card, crisp, clean edges, no decoration of any kind so the card faces the camera squarely,
held at arm's length so the card fills about one third of the frame width; the place is
the subject and the card is the detail The hand is a man's in his fifties, light warm
skin, clean short nails, faint lines at the knuckles, no ring, no watch, the cuff of a
plain black sleeve just visible at the wrist. The fingers grip the card at its lower edge
and along one side, thumb in front, fingertips visible, no finger crossing the written
area.

On the card, written by hand in blue ballpoint, is the name "Maria" on its own first
line, and underneath it, in natural handwriting across several lines, exactly this text
and nothing else: "Heal my mother, and give her strength for the year ahead."

The handwriting is real human handwriting: natural slant, uneven letter sizes, lines that
drift slightly, changes of pen pressure, ballpoint ink with small skips, sitting in the
paper fibres. It is not typeset, not a font, not printed. The card is lit by the same
light as the scene behind it, with a soft natural shadow where the fingers press it. The
card and the writing are the sharpest thing in the photograph; the scene behind stays in
focus but a little softer.

A lit votive candle in a small glass holder stands on the surface just beyond the card's
lower edge, fully visible, not overlapped by the card, the fingers or the hand's shadow,
its flame small and clear and its own warm light falling across the lower edge of the
card.

Colour: neutral, true-to-life white balance, not orange, not warm-filtered; the marble
reads white and grey, the bronze reads dark brown. This is a candid photograph taken on a
phone by the person holding the card, not a studio image. Portrait orientation, 3:4. Add
nothing else beyond what is stated above. No other text anywhere in the frame, no signage,
no logos, no watermark, no second hand, no face.

Example 2, full 220-character prayer. western_wall, evening, hand H2, card E2. Card block only; the rest of the 4.1 template is unchanged.

The card face reads, in elegant dark serif typography on the pale card stock: the name
"Robert" as a heading in larger letters across the top, and beneath it, in smaller but
clearly readable serif text across four to six lines, this exact text:
"Watch over my son, Daniel, as he begins his treatment on Monday. Give his doctors steady
hands, and give him courage on the hard days when he has none left. Keep our family close
and patient. Thank you for every morning."

Example 3, uncommon name. lourdes, night, hand H3, card E3. This is the first pass. If the name comes back mangled, re-run with the spelling trick from rule 9.

The card face reads, in elegant dark serif typography on the pale card stock: the name
"Nneka" as a heading in larger letters across the top, and beneath it, in smaller but
clearly readable serif text across four to six lines, this exact text:
"For my mother, who carried all of us and never once asked for anything back. Give her
rest now, and let her know she is not forgotten."

4.5 QA read-back (run on every Pass-2 output before upload)

This is a machine check, not an eyeball. The worker sends two images in one call — the Pass-1 frame and the Pass-2 output — to a vision model through OpenRouter (OPENROUTER_API_KEY, default google/gemini-3.5-flash) with one instruction: transcribe the card face exactly as printed, count the lit candle flames in each image separately, and answer four scene questions as booleans. It then compares the transcription against the source strings and the two flame counts against each other. The mechanism, cost and retry budget are specified in OPS-RUNBOOK §5 step 6; this section is the prompt-side contract.

Seven gating checks. All seven must pass. Each one names the field of the call that verifies it.

# Check Verified by Pass condition
1 Name spelled right card_text The read-back name matches {FIRST_NAME} exactly, case-insensitive. No added letter, no dropped letter, no invented hyphen, no doubled word.
2 Prayer present card_text At least 95% of the words in {PRAYER_TEXT} appear in the read-back, in source order. No dropped clause, no invented word, no repeated line.
3 Votive beside the card card_votives The number of lit votives in glass holders standing in the FOREGROUND beside or just below the held card in the Pass-2 image = 1 when candle is false, 2 when it is true (4.1a). Candle racks, altar candles and lamps in the background are never counted: the hand and card hide part of them, so a whole-frame count can never match. pass1_flames and pass2_flames stay in the call for logging only. (Rule changed 2026-09-16 after live runs.)
4 Same place same_place The Pass-2 image shows the same real location as the Pass-1 image: recognisably the same architecture and surfaces from a similar viewpoint, allowing for the added hand, card and votive and a modest change of framing. False when the room, building or architecture was replaced. (The Pass-2 model re-renders the place rather than editing pixels, so pixel-level sameness is not the test. Changed 2026-09-16.)
5 No new text new_text Nothing readable in the Pass-2 frame except the card face AND text that was already visible in the Pass-1 frame (the basilica's own inscriptions and friezes do not count). Fails on a second card, a watermark, a caption or lettering that appeared only in Pass 2. (Changed 2026-09-16: the frieze inscription failed every St. Peter's frame under the old rule.)
6 Card not occluded card_unoccluded No finger, thumb, flame, candle or architectural edge crosses the printed area.
7 Hand plausible hand_plausible One hand with five fingers, one card, no face, no second person.

The call. One request, two images attached in order (Pass 1 first, Pass 2 second), one JSON response:

{ "card_text": "<the card face, transcribed exactly as printed>",
  "card_votives": <integer>, "same_place": <bool>, "new_text": <bool>,
  "pass1_flames": <integer>, "pass2_flames": <integer>,
  "scene_unchanged": <bool>, "no_extra_text": <bool>,
  "card_unoccluded": <bool>, "hand_plausible": <bool> }

Checks 1 and 2 are computed by the worker from card_text. Check 3 compares card_votives to the expected count. Checks 4 to 7 read same_place, new_text, card_unoccluded and hand_plausible straight. pass1_flames, pass2_flames, scene_unchanged and no_extra_text are logged, never gated.

On any failure, re-run Pass 2 only — the Pass-1 scene is kept — using the name-spelling recovery prompt from 4.2 rule 9. Maximum three Pass-2 attempts. After the third, the job dead-letters and prayers.status goes to failed. The two-image read-back costs about $0.02 per attempt — one call, seven checks — which is the line carried in SPEC-PRAYER-ENGINE §3 and ECONOMICS §2.


5. EXAMPLE-DELIVERABLE HERO SET

Seven hero deliverables per brand, because the copy needs seven distinct images: 1 landing hero, 3 on /create/ready, 3 on /offer. That is exactly what BrandConfig.location.examplePhotos declares (// 7 paths) and what both launch checklists gate on. Fake-name stubs only. Generated once, approved by hand, shipped as static assets. They are not regenerated per deploy.

Build each hero by running the standard Pass 1 and Pass 2 with the values in the table. Hero H-1 is written out as the worked model; heroes H-2 to H-7 are the same two prompts with the table's values substituted. Every hero runs with candle false, so each one shows the single votive that every order gets (4.1a) and none of them shows the bump's second flame: the example set is the standard deliverable.

5.1 st_peters_basilica hero set

# Name Prayer text on card Time of day Angle Hand Card Page
H-1 Maria "Heal my mother, and give her strength for the year ahead." morning A2 close altar rail H1 E1 landing hero
H-2 Denise "For my husband's surgery on the 14th. Steady the hands of his doctors and bring him home to us." afternoon A1 wide nave H3 E2 transition
H-3 Robert "Thank you for forty-one years with her. Watch over her now." evening A4 candle cluster H2 E1 transition
H-4 Kathleen "For my daughter on the night shift. Bring her home safe every morning." night A5 low-angle columns H1 E3 transition
H-5 Maria "Let my son find work this month, and let him believe in himself again while he looks." morning A3 over the rail H1 E3 sales page
H-6 Denise "For peace in this house, and for the strength to keep asking." evening A2 close altar rail H3 E2 sales page
H-7 Robert "For my brother, nine years gone this week, and still not a day without him." afternoon A4 candle cluster H2 E1 sales page

H-1 Pass 1, with brands/st-peters/assets/donor/st_peters_basilica.jpg attached. Assemble the 3.2 match instruction, then the st_peters_basilica base scene from 3.3, then these three blocks, then the 3.6 constraints block:

[ANGLE A2]  Framed close on the polished marble altar rail: the veined stone ledge crosses the lower
            foreground, candle stands just beyond it, the nave and altar softly blurred behind.
[MORNING]   Early morning, cool clear air warming at the edges, long low light entering from one
            side, the space still and freshly lit.
[RAKING]    Hard directional light raking across the surfaces at a low angle, picking out every
            grain and chisel mark, visible light shafts and dust motes in the air.

H-1 Pass 2: the 4.1 template with [SIDE]=left, [CARD_VARIANT]=E1 plain white index card, [CARD_DISTANCE]=FAR, [HAND_VARIANT]=H1, {FIRST_NAME}=Maria, {PRAYER_TEXT}=Heal my mother, and give her strength for the year ahead.

5.2 western_wall hero set

The same seven heroes, same names, same prayer texts, re-shot at the Wall. Swap the base scene to western_wall, the donor to brands/<slug>/assets/donor/western_wall.jpg, and the angles to the 6.4 list.

# Name Time of day Angle Hand Card Page
H-1 Maria morning D1 notes between stones H1 E1 landing hero
H-2 Denise afternoon D2 wall wide H3 E2 transition
H-3 Robert evening D1 notes between stones H2 E1 transition
H-4 Kathleen night D3 low-angle stone mass H1 E3 transition
H-5 Maria morning D3 low-angle stone mass H1 E3 sales page
H-6 Denise evening D4 seam close with note H3 E2 sales page
H-7 Robert afternoon D2 wall wide H2 E1 sales page

For western_wall, [SIDE] alternates the same way, but the Pass-2 surface language changes one clause. The hand holds the card up against the stone, not over a rail. Replace the first sentence's tail with:

...holding up a small [CARD_VARIANT] prayer card flat against the limestone face, a
hand's width from the folded paper notes in the seams, so the card faces the camera
squarely and fills roughly one third of the frame width.

6. LOCATION PACKS (angle and scene vocabulary)

The [ANGLE] block for Pass 1. One pack per location key, matching the donor specs in §2.4 to §2.9 one for one. Append the 3.6 constraints block to every one.

6.1 st_peters_basilica

A1 WIDE NAVE: shot from floor level at the entrance to the nave, an immense symmetrical corridor of
   marble columns and gilded vaults converging on the distant candlelit altar, the floor's geometric
   stonework leading the eye straight to the glow.
A2 CLOSE ALTAR RAIL: framed close on the polished marble altar rail, the veined stone ledge crossing
   the lower foreground, candle stands just beyond it, the nave and altar softly blurred behind.
A3 OVER THE RAIL: framed from just behind and above the altar rail, the rail's edge cutting across
   the lower foreground, the candlelit altar and receding nave beyond it gently out of focus.
A4 CANDLE CLUSTER: close on a cluster of lit votive candles, flames sharp against deep creamy bokeh
   of the basilica interior, wax running down the candle sides.
A5 LOW-ANGLE COLUMNS: looking up along a colossal marble column toward the coffered and gilded
   vault, light raking across the carved capital, the altar small and distant below.

6.2 holy_sepulchre

B1 STONE SLAB CLOSE: the worn pale limestone slab of the Stone of Anointing filling the
   frame, brass oil lamps glowing just above, warm reflections pooling on the stone.
B2 OIL-LAMP ROW: a row of hanging brass oil lamps on chains, small flames steady inside
   glass chimneys, the pale slab glowing below, aged walls receding into warm shadow.
B3 CHAPEL ARCHES WIDE: the candlelit chapel interior, low stone arches and worn pillar
   capitals, clusters of small candles on ledges against shadowed stone, incense haze.
B4 STONE LEDGE CLOSE: a stone ledge beside a lit votive candle in the near foreground,
   lamplight pooling across it, the slab and blurred arches glowing behind.

6.3 lourdes

C1 GROTTO NICHE: the arched natural rock hollow centred in frame, candles in glass holders
   glowing amber at its base, the niche lit against darker rough rock, flowers on the ledge.
C2 CANDLE GLASS MACRO: candles in glass votive holders close, flames sharp in their cups,
   wax light spilling across wet rock, cool cave bokeh behind.
C3 WATER AND FLOWERS: low along the stone channel, clear spring water running over smooth
   wet stone catching the candle flicker, pale flowers among the rocks at the water's edge.
C4 ROCK LEDGE CLOSE: a flat rock ledge in the near foreground among small white flowers, a
   candle in a glass holder burning beside it, the niche arch blurred in amber behind.

6.4 western_wall

D1 NOTES BETWEEN STONES: close on a cluster of small folded paper notes pressed into the gaps
   between the limestone blocks, edges curled by weather, light raking across the pitted stone.
D2 WALL WIDE: the enormous wall spanning the frame, low sun bathing the lower courses in gold
   while the upper stones fall into soft shadow, the empty plaza stones in front.
D3 LOW-ANGLE STONE MASS: looking up the towering face of gigantic limestone blocks from the plaza
   floor, chisel marks and erosion pits sharp in raking light, notes in the seams.
D4 SEAM CLOSE WITH NOTE: framed tight on a single seam between two massive blocks with one folded
   note tucked upright in it, the courses above and below falling into golden bokeh.

6.5 fatima

Base scene in 3.3. Three variants:

F1 CHAPEL OF THE APPARITIONS: the open-sided shelter framed head on from the plaza, slender columns
   holding the low roof, the marble apparition pillar centred beneath it, worn pale stone floor.
F2 CANDLE-BURNING AREA: the long steel troughs of the candle area, racks of tall white candles in
   dense rows, wax pooling down the trough walls, heat shimmer, the chapel pale in the background.
F3 CANDLE ROW CLOSE: close along one rack of tall white candles, flames sharp and leaning together
   in the air, melted wax sheeting down the steel, the open plaza a bright blur beyond the flames.

6.6 guadalupe

Base scene in 3.3. Three variants:

G1 TILMA ABOVE THE ALTAR: framed straight on from the nave floor, the gold-framed tilma of Our Lady
   raised above the altar, lit warm against the dark sanctuary wall, the nave soft below it.
G2 BASILICA INTERIOR WIDE: the modern basilica interior from the rear of the nave, curved timber
   ceiling sweeping overhead, radiating pews converging on the sanctuary, even clerestory daylight.
G3 SANCTUARY CLOSE: close on the sanctuary rail and altar below the tilma, polished stone and pale
   timber in the near foreground, votive candles to one side, the framed tilma gold and blurred.

7. CARD ART (E1 to E3)

The card description injected into Pass 2 as [CARD_VARIANT]. Plain white index card, blue ballpoint, handwritten. Decided 2026-09-16: nothing decorative, ever. A torn or aged edge is a place the model invents a different tear every time, and that is where a photograph stops looking real.

E1 CRISP: a plain white unlined index card, crisp, clean edges, no decoration, no border,
   no gold, no texture beyond ordinary card stock.
E2 POCKET: a plain white unlined index card with corners very slightly softened from being
   carried in a pocket, no decoration of any kind.
E3 CURVED: a plain white unlined index card held with a slight natural curve, no
   decoration of any kind.

Standalone card shot (no scene, no hand) for thumbnails:

[CARD_VARIANT], photographed straight on under soft even daylight on a plain neutral
surface, centred composition, gentle shadow. On the card, written by hand in blue
ballpoint, the name "{FIRST_NAME}" on its own first line and beneath it, in natural
handwriting across several lines, exactly this text: "{PRAYER_TEXT}". Real handwriting,
not a font. No other text, no logos, no watermark, neutral colour, photorealistic.

8. PERSONA PORTRAIT PACK

Persona: a warm, believable priest in his late 50s. Silver hair, kind eyes, black cassock with white collar, Roman setting. Reference-image workflow: generate the MASTER first, then drive all follow-ups with the master attached as reference. Generate once per brand, 6 to 10 frames, same face across the whole set.

8.1 Master reference prompt (generate first, keep as the character anchor)

Studio portrait photograph, front-facing, of a warm believable Catholic priest in his late
50s: silver hair neatly combed, kind expressive eyes, gentle natural wrinkles, light warm
smile lines, wearing a black cassock with a white roman collar. Neutral soft light, clean
seamless warm-grey background, sharp focus on the eyes, 85mm portrait lens look, shallow
depth of field, natural skin texture, photorealistic, no text, no logos, no watermark.
This is the master reference image for the character.

8.2 Follow-up poses

All prefixed with: same man as the reference image, same face, same silver hair, same black cassock with white collar, now:

P1 LETTER BY CANDLELIGHT: writing a letter by hand at a worn wooden desk lit by one beeswax candle,
   flame light carving soft shadows across his face, a brass crucifix on the desk edge, dark beyond.
P2 WALKING AT DAWN: a distant wide shot of him walking alone toward St. Peter's Basilica at dawn,
   cool blue air with the first gold light on the dome, long empty cobblestone approach.
P3 CANDLE IN THE NAVE: standing in the dim nave holding a single lit candle at chest height, flame
   light on his kind face, marble columns and gilded arches falling into soft shadow behind him.
P4 HANDS OVER A CARD: medium close at the marble altar rail, his hands gently folded over a small
   parchment prayer card on the ledge, head slightly bowed, candlelight crossing the stone.
P5 SPEAKING TO CAMERA: medium shot speaking gently to camera, warm engaged expression mid-sentence,
   soft key light from a window, the basilica interior softly blurred behind him, calm.
P6 HANDS ONLY, PLACING: close on his hands only, no face, an older man's hands in black cassock
   sleeves placing a parchment prayer card among lit votive candles, wax glow on his knuckles.
P7 READING AT A TABLE: seated at a long wooden table strewn with dozens of small parchment cards
   and opened letters, reading one intently, warm lamplight from above, no readable text.
P8 COLONNADE AT GOLDEN HOUR: standing in a grand curved stone colonnade at golden hour, low warm sun
   flaring between the columns behind him, cassock catching the amber light, wide low angle.

All frames take 35mm documentary look, photorealistic, no text, no watermark, except P1 and P5 which take 85mm portrait lens look. P5 is the direct-address creative frame; P1 and P7 are the workhorse stills.


9. MONTHLY ROTATION

Members get a new photo every month. Three axes decide it.

9.1 Theme is the calendar month, always

Theme never rotates off the calendar month. There is no cursor, no queue, no stored index and no per-member theme offset. A December delivery is the December theme for every member in every year. Only the treatment and the scene variant move. This is deliberate: the theme is what the member recognises in the subject line, and it must match the month they are living in.

Catholic calendar (v1, and every Christian brand):

month_index Month Theme
0 January Renewal
1 February Devotion
2 March St. Joseph
3 April Easter light
4 May Marian month
5 June Sacred Heart
6 July Pilgrimage season
7 August Assumption
8 September Autumn intentions
9 October Rosary
10 November All Souls candles
11 December Advent

Jewish calendar (western_wall): month_index runs September = 0 through August = 11, so index 0 lands on the Hebrew year's opening month. Each row names the Hebrew month that predominantly overlaps that Gregorian month.

month_index Gregorian Theme
0 September Tishrei / High Holidays
1 October Cheshvan
2 November Kislev / Chanukah
3 December Tevet
4 January Shevat / Tu BiShvat
5 February Adar / Purim
6 March Nisan / Pesach
7 April Iyar
8 May Sivan / Shavuot
9 June Tammuz
10 July Av / Tisha B'Av
11 August Elul

The theme supplies scene dressing only: seasonal flowers, Advent wreaths, All Souls candle counts, Marian blues, a shofar on the ledge in Tishrei, lilies at Pesach. It never changes the site, the composition rule or the card.

9.2 Treatment

treatment = (member_no + year_offset) mod 4

member_no is a serial assigned at signup. year_offset is whole years since member_since. Four treatments: (0) dawn, (1) midday shaft, (2) candlelit evening, (3) blue hour. Twelve themes by four treatments is 48 combinations, so a member does not repeat a theme-and-treatment pair inside four years. The formula is the state; nothing is stored.

DAWN:              cool pale dawn light, first soft gold rim on edges, empty hushed air.
MIDDAY SHAFT:      bright vertical light shafts through high openings, dust motes, high
                   warm-cool contrast.
CANDLELIT EVENING: full candle and lamp glow, deep warm shadows, intimate amber palette.
BLUE HOUR:         deep blue ambient dusk with flames as the only warm points, high
                   warm-cool contrast.

9.3 Scene variant

scene_variant = (member_no + month_index) mod n_variants

n_variants is the length of the active brand's angle list in Section 6. This advances by one per month, so the angle changes on every delivery even when the treatment repeats.

This formula replaces the per-order angle axis, it does not stack with it. The worker takes an explicit branch: an order job resolves the angle from (variant_seed >> 4) mod n_variants (§1.2); a member job resolves it from scene_variant here and ignores the seed's angle bits entirely. The branch is on job type, and it is the only place the two paths differ.

9.4 Card text on member deliveries

Same Pass 2, same rules. A member job resolves both strings from the subscriptions row, never from an order — a standalone /membership member has no order row at all (OPS §5).

  • {FIRST_NAME} is subscriptions.first_name.
  • {PRAYER_TEXT} is subscriptions.current_intention when the member submitted one for that month, and the generic themed intention for that month — the theme named in the 9.1 table for that month_index — when they did not.

Same 220-character cap either way. The QA read-back (4.5) checks the rendered name against that same subscriptions.first_name.


10. AD CREATIVE STILLS

Seven prompt blocks for the silent B-roll ad format. Each is a visual frame plus an animation note for the 5-second motion pass. Append the 3.6 constraints block to every still except AD4 and AD7, which include hands on purpose.

AD1 CANDLE CLOSE-UP: photorealistic macro of votive candle flames in a dark basilica chapel, wax
    tears down the candle sides, deep warm bokeh of blurred gilded arches behind, one flame taller.
    ANIMATION: 5s slow push-in toward the central flame, subtle flicker, no camera shake.
AD2 CARD PLACEMENT: photorealistic small parchment prayer card resting on the marble altar rail
    beside lit votive candles, a warm morning light shaft crossing the stone, altar blurred behind.
    ANIMATION: 5s slow push-in from wide to close on the card, gentle shaft shimmer.
AD3 LIGHT SHAFTS: photorealistic wide interior of a great basilica at morning, parallel light shafts
    through high clerestory windows onto the stone floor, dust motes suspended in the beams.
    ANIMATION: 5s subtle sideways parallax drift, dust motes drifting through the shafts.
AD4 HANDS-ONLY PLACEMENT: photorealistic close-up of an older man's hands in black cassock sleeves
    tucking a parchment prayer card into a seam between lit votive candles, no face in frame.
    ANIMATION: 5s slow push-in on the hands and card, candle flames flickering gently.
AD5 WIDE REVERENT SPACE: photorealistic ultra-wide of an immense empty basilica nave at dawn,
    symmetrical columns receding toward the candlelit altar, first gold light on the vault, still.
    ANIMATION: 5s very slow push-in down the centreline, parallax on the columns.
AD6 NOTES BETWEEN STONES: photorealistic close-up of folded paper notes pressed into the seams
    between massive warm limestone blocks at golden hour, thin paper edges glowing amber.
    ANIMATION: 5s slow push-in, subtle warmth shift as the sun grazes the stone.
AD7 CARD IN HAND: photorealistic close-up of a hand holding a small parchment prayer card up in
    front of a candlelit basilica interior, the printed name and lines legible on the card face.
    ANIMATION: 5s slow push-in onto the card face, flames flickering behind.

Ad format rules:

  1. 5-second cap per frame, silent, no on-screen text except the card where the frame includes one.
  2. AD7 is the card-in-hand frame and matches the deliverable. Lead the rotation with it.
  3. Push-ins move toward the card or the flame, never out. Zoom-out reads as withdrawal; push-in reads as approach.
  4. Ad frames are chosen by the media buyer. There is no per-member ad-frame formula.

11. OTO3 AUDIO SAMPLE AND AMBIENCE PRESETS

11.1 The OTO3 preview sample

OTO3 is "Voice of the Sanctuary" at $9.90. The buyer's own audio does not exist at the point they see the offer, so the preview on /oto/3 is one static 15-second clip per brand, generated once and stored at BrandConfig.audio.sampleUrl.

Build:

  1. Ambience bed: the location's preset from 11.2, running the full 15 seconds, at −26 LUFS.
  2. Three spoken lines in the brand persona voice (BrandConfig.audio.voiceId), at −16 LUFS, with a clear breath between each. Total speech about 11 seconds, leaving roughly 2 seconds of clean ambience at the head and the tail.
  3. Master: MP3 128 kbps, 15.0 seconds, fade in 0.4 s, fade out 0.8 s.

The three lines (v1, st_peters_basilica):

1. "This morning I carried your prayer to the altar."
2. "I read your words aloud, in this place, where the candles are still burning."
3. "And I left them there, with your name on them."

For western_wall, swap the place nouns and keep the cadence exactly:

1. "This morning I carried your prayer to the Wall."
2. "I read your words aloud, here, with my hand on the stone."
3. "And I left them there, in the seam, with your name on them."

The sample is generic on purpose. It carries no buyer name, no buyer prayer and no date, so it never expires and never has to be regenerated per order.

11.2 Ambience preset table

One ffmpeg mix preset per location key, keyed by BrandConfig.audio.ambiencePreset. The bed sits at −26 LUFS under voice at −16 LUFS in the sample and in every delivered master.

location_key Preset id Bed contents Reverb character
st_peters_basilica bells distant bronze bells on a slow irregular cycle, faint far-off footfall, very low air long stone reverb, 2.8 s tail, bright
holy_sepulchre lamp_room_tone close oil-lamp room tone, faint chain creak, distant muffled voices well below the bed tight low-ceiling reverb, 1.4 s tail, dark
lourdes grotto_water running spring water over stone, steady and close, an occasional single drip, open-air wind beyond damp cave reverb, 1.9 s tail, cool
western_wall plaza_wind open-air plaza wind across stone, distant city hum, paper edges moving in the seams almost no reverb, outdoor, 0.4 s tail
fatima plaza_wind open plaza wind, candle flames guttering close, footsteps crossing pale stone open air with a faint shelter slap, 0.7 s tail
guadalupe bells distant bells, broad interior air, faint votive-candle crackle broad modern-interior reverb, 2.2 s tail, warm

Each delivered audio master runs 60 to 90 seconds on the same bed: the buyer's prayer, read in the persona voice, over the location preset.