name: marketing_campaign
description: "Full go-to-market campaign -- research -> strategy -> spawn execution tasks (social, email, press release, ad copy)."
debug: true
system: agent_prompt
agent_prompt:
  - "= identity.md"

sections:
  - agent
  - project
  - roster
  - message
  - instructions

steps:
  - type: think
    agent: Maya
    hint: |
      You are Maya, Director of Marketing Operations.

      CAMPAIGN BRIEF: {task.message}

      Write a complete CAMPAIGN STRATEGY DOCUMENT covering:

      1. PRODUCT SUMMARY: What are we marketing? Key selling points in 2-3 sentences.
      2. TARGET AUDIENCE: Primary (who we spend money to reach) + 1-2 secondary segments.
         For each: age range, platforms they use, purchasing triggers, emotional state.
      3. MESSAGING PILLARS: Exactly 3 core messages every piece of content must reinforce.
      4. CHANNEL PLAN: For each channel, list: platform, content type, frequency, owner agent.
         Required channels: Instagram/TikTok (visual), LinkedIn (professional), Email (warm list),
         Press (credibility). Add others if relevant.
      5. CAMPAIGN PHASES:
         - Pre-Launch (2 weeks before): teasers, ARC/early access offers, influencer outreach
         - Launch Week: daily posts, email blast, press release, ads
         - Post-Launch (weeks 2-8): reviews amplification, community engagement, retargeting
         - Long-Term (months 3-12): evergreen content, reader community, backlist marketing
      6. SUCCESS METRICS: 3 measurable KPIs with baseline and target.
      7. EXECUTION TASKS: List every piece of content needed (social media pack, email sequence,
         press release, ad copy, author bio/media kit). Assign each to Maya, Leo, or Zara.

  - type: package
    packet_type: PlanningResponsePacket
    schema:
      tasks:
        - task_name: "string -- descriptive name using the ACTUAL book title from the campaign brief above, e.g. 'Social Media Pack: <real book title from brief>'"
          description: "string -- full brief for this content piece: product, audience, channel, phase, tone, CTA, word count"
          agents:
            - "string -- Zara (for copy/creative), Leo (for strategy/research)"
          task_type: "string -- one of: social_media_pack, email_campaign, press_release, ad_copy, author_bio, campaign_strategy"
          priority: 2
    max_tasks: 8
    insert_children: true

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

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

  - type: close
    rag_update: true

adjudication:
  enabled: true
  pass_threshold: 75
  deliverable_type: strategy_document
  criteria:
    audience_clarity:
      weight: 25
      description: "Target audiences are specific, actionable, and well-differentiated"
    channel_strategy:
      weight: 25
      description: "Channel recommendations are platform-appropriate and justified"
    messaging_coherence:
      weight: 25
      description: "Messaging pillars are distinct, memorable, and consistently applied"
    execution_completeness:
      weight: 25
      description: "All campaign phases covered with concrete deliverables and owners"
