name: email_campaign
description: "Write a complete email marketing sequence for a product launch or campaign."
debug: true
system: agent_prompt
agent_prompt:
  - "= identity.md"

sections:
  - agent
  - project
  - message

steps:
  - type: think
    agent: Zara
    hint: |
      You are Zara, Lead Creative Copywriter at Crimson Leaf Marketing.

      CAMPAIGN BRIEF: {task.message}

      Write a COMPLETE EMAIL MARKETING SEQUENCE. For each email include:
      - EMAIL #: [sequence number and send timing, e.g. "Email 1: Launch Day"]
      - SUBJECT LINE: [the line that earns the open -- A/B option if useful]
      - PREVIEW TEXT: [the 40-50 character preview visible in inbox]
      - HEADER: [above-the-fold headline inside the email]
      - BODY: [full email body, conversational, 150-300 words]
      - CTA BUTTON TEXT: [specific, action-oriented]
      - POST-CTA: [one sentence below the button reinforcing the offer]

      REQUIRED SEQUENCE (minimum 5 emails):
      1. Launch Day -- main announcement, full value pitch
      2. Day 3 -- social proof or early reader reaction
      3. Day 7 -- last chance for launch discount/bonus (if applicable)
      4. Week 3 -- long-form value email (why this book/product matters)
      5. Month 2 -- re-engagement for non-converters

      Add campaign-specific emails as needed (ARC reader invitation, review request, etc.)

      TONE RULES:
      - Write to ONE person (use "you"), not "our community"
      - Subject lines are conversational, not promotional
      - Every email has ONE job and ONE CTA

  - type: document
    filename: "{{task_name_slug}}-emails"

  - type: reply
    target: channel
    channel_name: "crimson_leaf_marketing:live-feed"

  - type: close
    rag_update: true

adjudication:
  enabled: true
  pass_threshold: 75
  deliverable_type: marketing_copy
  criteria:
    subject_line_quality:
      weight: 30
      description: "Subject lines are specific, curiosity-driven, and avoid spam triggers"
    sequence_logic:
      weight: 25
      description: "Email sequence builds momentum, each email has a clear reason to exist"
    copy_quality:
      weight: 25
      description: "Body copy is personal, value-first, and earns the CTA"
    cta_clarity:
      weight: 20
      description: "CTAs are single, specific, and low-friction"
debug: true
