---
reliability: 4.4 # 2 image-gen stages on the happy path (poster −0.3, carousel −0.3; atmosphere now OPTIONAL), copy + file writes deterministic, ≤5 stages, no E2E showcase
---

# Community event — agent playbook

> Paste this whole file (with the BRIEF filled in) into Claude cowork, chat, or Code. The agent walks through it with you and stops for your approval at every step that matters.

## How the agent should run this (interaction contract)

1. **CONFIRM** — one line: event name + date + vibe + suggested palette + "~$0.50–$1.20, ~15 min". The BRIEF answers everything; ask at most ONE question (only if a field is blank), otherwise state assumptions and start.
2. **PREVIEW CHECKPOINT** — the **poster** (~$0.10) is the checkpoint artifact. Show it and wait: its style and palette drive the carousel. Do not fire the 5-slot carousel until the poster is approved or redirected.
3. **NARRATE** — one line per `create_media` with job_id + ETA ("poster rendering, ~40s"); poll `get_create_media` every 10–15s; for the carousel post "slot N/5 done" as scenes finish. Never silent >2 min.
4. **FAIL GRACEFULLY** — garbled poster text: retry `ideogram-v4` once with shorter title text → `gpt-image`; still bad → render art-only and move ALL text into the HTML template layer (deterministic, always readable). Carousel slot fail → re-fire just that slot. Report "what failed / why / fallback" in one line; ≤2 retries per asset, then ship the rest.
5. **DELIVER** — 3 file paths + carousel viewer URL + one honest quality note ("date/phone live in the HTML layer; poster art is AI — print one test copy before the 20-copy run") + ONE next step: print the poster.

## What you'll get

A complete kit for any community event — neighborhood block party, PTO fundraiser, library reading hour, park cleanup, school picnic, anything where you need to invite a small group of people to show up for a few hours.

What lands at the end:

- **A print-ready poster** (A4 / Letter) you can tape to a community center wall or hand out as flyers
- **A 5-slot Instagram carousel** to post to neighborhood IG or NextDoor
- **An RSVP landing page** you can share as a link
- **A WhatsApp share-pack** with two pre-written messages — one short for casual texting, one longer for the full details

**Tone is deliberately plain.** No commercial polish, no glamour. Hand-drawn feel, warm colors, warm language. The kind of thing that looks like a real neighbor made it, because a real neighbor did.

**Time**: ~15 minutes wall clock. **Your attention**: about 5 minutes across 4 approvals. **Cost**: $0.50 – $1.20 — less than two coffees.

## Tell the agent about the day

```yaml
event_name:       # e.g. Maplewood Block Party 2026
event_date:       # plain English, e.g. "Saturday, June 15 · 11am–3pm"
event_location:   # e.g. "Maplewood Park, the big oak by the playground"
what_to_bring:    # 2-4 things, e.g. "a side dish to share, lawn chairs, sunscreen"
what_to_do:       # 1-2 sentences, e.g. "Eat together, kids run around, neighbors meet neighbors. Music starts at noon."
vibe:             # one of: warm-family | playful-kids | quiet-respectful | celebratory | civic-clean
host_org:         # e.g. "Maplewood Neighborhood Council"
rsvp_method:      # e.g. "Text Sarah at 555-0123" or "rsvp@maplewood.org"
launch_slug:      # kebab-case for filenames, e.g. maplewood-block-party-2026
```

## Quality controls (new — auto-applied)

This playbook leverages the closed quality loop. The agent applies these by default; you don't have to ask:

- **Cost upfront.** Before any multi-step batch fires, the agent calls `submit_plan` with `confirm:false` and shows you the proposed steps + total cost. Nothing runs until you approve.
- **Auto-retry on weak shots.** The server default is `quality_threshold: 0.7`. For hero shots and brand-locked images the playbook step tells the agent to pass `quality_threshold: 0.85` so a low-confidence first try gets one auto-retry before you see it.
- **Critic verdict on the result.** When a multi-scene step finishes, the agent reads the `critique` field on the response (verdict: ship / iterate, plus issues / missing items) and surfaces it for your review.
- **One-click recovery.** If a step fails, `get_plan` returns a `recovery` hint pointing at `replan({plan_id})` — the agent classifies the failure and proposes a recovery plan you can approve.
- **End-of-project scorecard.** The final wrap-up calls `get_scorecard({project_id})` with succeeded count, mean quality score, critic verdict, total cost, and wall time.

You can override any of these per step: pass `quality_gate: false` on cost-sensitive tries, `quality_threshold: 0.6` for stylized/abstract work where strict adherence isn't the point, or `submit_plan({plan_id, confirm:true})` to skip the cost-preview pause when you trust the chain.

## How this works

Four gates. At each one the agent shows you what it made and asks one question. Answer in one word or one short phrase. The agent never spends past an approval — you stay in control.

## The steps

### Step 0 — Confirm and pick a palette

The agent reads back your BRIEF and suggests a 4-color palette based on the vibe:

- **warm-family** → cream + terracotta + sage + charcoal
- **playful-kids** → cream + sun yellow + sky blue + tomato
- **quiet-respectful** → cream + dusty blue + plum + slate
- **celebratory** → cream + magenta + gold + ink
- **civic-clean** → white + leaf green + sun yellow + slate

**STOP**: "Brief and palette look right? (approve / palette [4 hexes] / edit [field] [value])"

### Step 1 — The poster (~2 min, ~$0.10)

> **For the agent**: pass `quality_threshold: 0.85` on the poster generation — text-on-image hero quality is non-negotiable, the auto-retry catches glitched type or color drift before the user has to ask.

This is what people see first when they're walking past the bulletin board. A4 portrait format. Big hand-drawn title at the top with the event name. Date and location in clean readable type below. A simple illustrative motif at the bottom matching the vibe — for a family picnic, a long table with plates; for a kids' day, balloons and a kite; for a cleanup, a leafy tree.

Lots of whitespace. Palette stays muted. Looks hand-illustrated, not photoreal.

> **For the agent**: typography is the hero here. Render the poster with `create_media({ action: "generate", model_override: "ideogram-v4" })` — it's the best text-in-image model for posters/signage; the regular generators butcher letters. (`mai-image-2.5` is the photoreal alternative if the vibe needs realism.) The poster's job is for someone to read the event name and date from across a room.

**STOP**: "Poster shown. The text needs to be perfectly readable. Approve, or refine? (approve / refine [direction])"

### Step 2 — Atmosphere illustration for the landing page (OPTIONAL — default: reuse carousel slot 2)

> **De-engineered:** the carousel's slot 2 IS an atmosphere scene. By default, reuse it as the RSVP-page hero (zero extra cost, zero extra render). Only render a separate 16:9 illustration if the user explicitly wants a wide landscape header.

If rendered separately (~30s, ~$0.05): one wide friendly scene that shows what the event feels like — people gathered, food laid out, kids playing. Hand-illustrated. No specific faces. 16:9 landscape.

### Step 3 — Five-slot announcement carousel (~2 min, ~$0.15)

The carousel goes on neighborhood IG, NextDoor, or wherever you announce the day. Five slots in this order:

1. **Title card** — the event name big
2. **Atmosphere** — a scene of the event
3. **"Bring along" card** — your bring-list with checkmarks
4. **Detail shot** — close-up of one thing (food, balloons, tools)
5. **People enjoying** — atmosphere of folks together

Same hand-illustrated style as the poster — render the 5 slots in one `generate_project({ scenes: 5, aspect_ratio: "1:1" })` call so they share the palette and read as one set. Slots 1 and 3 (title card + bring-list) carry text, so route those two to `ideogram-v4`.

**STOP**: "5-slot carousel ready. Slot order: title → atmosphere → bring-list → detail → enjoy. Approve, or reorder? (approve / reorder [new order])"

### Step 4 — Three pieces of plain-language copy (~30s, ~$0.005)

The agent writes three pieces of copy for you:

- **RSVP blurb** (3-4 sentences for the landing page): what it is, when + where, why come, how to RSVP. Warm + clear. Doesn't sell. Just invites.
- **WhatsApp short** (1-2 sentences): casual, like texting a friend. Includes the date.
- **WhatsApp detailed** (5-6 lines): event name, date, location, bring-list, RSVP method. Ends warm.

All three match your vibe.

**STOP**: "All three pieces of copy shown. Approve, or refine? (approve / refine [which one])"

### Step 5 — Write the three pieces (no gate)

Three files written to disk:

- **`public/launches/{launch_slug}-poster.html`** — open in a browser, ⌘P / Ctrl+P, print to A4 or Letter. No bleed needed.
- **`public/launches/{launch_slug}-rsvp.html`** — single-page landing with the atmosphere illustration, RSVP blurb, and carousel embedded. Shareable as a URL.
- **`public/launches/{launch_slug}-share-pack.md`** — the WhatsApp messages and links, in a plain markdown file you can copy from.

### Final step — scorecard wrap-up

After all deliverables ship, call:

```
get_scorecard({ project_id: "{the project id from earlier steps}" })
```

The response is a one-page report card:

```
Scorecard for cjob_xxx
{N}/{N} scenes shipped — critic: SHIP (or ITERATE)
Title: <your project name>
Steps: N/N succeeded (100%)
Quality: mean X.XX · M/N passed · K retries
Critic: SHIP/ITERATE
  • issue: <only present if iterate>
  • missing: <only present if iterate>
Cost: $X.XX actual (est $Y.YY) · Ts wall time
Viewer: <project URL>
```

Paste the scorecard into Slack or the project channel so reviewers see the actual quality numbers, not vibes.

## When you're done

The agent prints:

```
✅ Poster (A4 print-ready): public/launches/{launch_slug}-poster.html
✅ RSVP landing page: public/launches/{launch_slug}-rsvp.html
✅ Share pack (WhatsApp + IG): public/launches/{launch_slug}-share-pack.md
✅ IG carousel viewer: <URL>

Total spent: $X.XX  (budget was $1.20)
Total wall-clock: MM:SS

To print the poster:
  Open the poster HTML in a browser, ⌘P / Ctrl+P, print to A4 or Letter at 100%.
```

## What can disappoint (cap ceilings)

Even `ideogram-v4` (the best text-in-image cap) can glitch long event names or small date type — anything that MUST be exact (date, address, phone, RSVP email) belongs in the HTML template layer, never in the image. The hand-drawn style also varies slightly per render, so the poster and carousel will be siblings, not twins.

## What to do next

1. **Print 20 posters**. Ask 4-5 neighbors to put one in their window. Coffee shops, libraries, school bulletin boards.
2. **Post the IG carousel** in slot order. Caption is in the share-pack.
3. **Text the WhatsApp short version** to your closest 10 neighbors today. Forward the detailed one to a wider group 5 days before the day.
4. **The day before** — re-send the WhatsApp short with location + parking notes.
5. **Save the brief** — next year's event re-runs this same playbook. Year 2 should feel like year 1's sibling. The neighbors will recognize the look.

---

## Notes for the agent (only read if a step fails)

**Output paths**: write to `public/launches/{launch_slug}-*.html` and `.md`. Print full absolute paths in the final summary.

**Carousel slot order**: the user picks the order; render the `generate_project` scenes in the standard order, then the user's reorder rearranges slot indices in the share-pack and rsvp HTML.

**Polling**: poll `get_create_media` every 8-15s until `done` or `failed`. Most calls in this playbook are quick (under 30s); only the carousel involves multi-slot generation.

**On capability failure**: retry once after 5s. On second failure, ask: "Step X failed: [error]. retry / skip / abort?"

**Templates**: substitute `{{PLACEHOLDER}}` markers in `public/playbooks/_templates/community-day-flyer.html`. The template supports a print-ready poster mode (default) and an `?mode=rsvp` URL parameter for the landing-page view — use the same file for both deliverables.

**No brand_kit needed**: community events don't get a sticky brand kit. The lightweight palette suggested in Step 0 is enough. Don't call `brand_kit_create`.
