name: genesis
description: "Marketing genesis -- populate project identity file, then spawn single entry-point task."
model: default
debug: true
system: agent_prompt
agent_prompt:
  - "= identity.md"

sections:
  - agent
  - project
  - roster
  - message

steps:
  - type: think
    agent: Maya
    hint: |
      You are Maya, Director of Marketing Operations at Crimson Leaf Marketing.
      A new marketing project has just been created and needs its identity file.

      PROJECT BRIEF: {task.message}

      PROJECT SLUG: {project.slug}

      Fill in the YAML template below. Replace ONLY the text inside square brackets [].
      Copy EVERYTHING else exactly as shown -- field names, indentation, and the intents block.
      Output ONLY the YAML. No backticks, no fences, no preamble, no explanation.

      name: "[Full name of the marketing project]"
      slug: {project.slug}
      status: active
      goal: "[2-3 sentence description: what this project produces, who it serves, and what success looks like. Keep it on one line.]"
      intents:
        - keyword: press_release
          description: Write a press release for a book launch or publishing announcement
          task_type: press_release
        - keyword: campaign_strategy
          description: Develop a full launch campaign strategy for a title
          task_type: campaign_strategy
        - keyword: social_media_pack
          description: Create a social media content pack for a book or campaign
          task_type: social_media_pack
        - keyword: email_campaign
          description: Write an email campaign sequence for a launch or series
          task_type: email_campaign
        - keyword: ad_copy
          description: Write advertising copy for retailer or social ads
          task_type: ad_copy
        - keyword: author_bio
          description: Write or update an author biography
          task_type: author_bio

  - type: document
    dest_path: "projects/{project.slug}/project.yml"
    commit_msg: "genesis: populate project.yml"

  - type: think
    agent: Maya
    hint: |
      You are Maya, Director of Marketing Operations at Crimson Leaf Marketing.
      A new marketing project has been created and needs its FIRST task.

      PROJECT BRIEF: {task.message}

      CRITICAL RULE: Spawn EXACTLY ONE task of type `marketing_campaign` assigned to Maya.
      NEVER use `planning`. NEVER use any agent other than Maya for this entry-point task.

      The task description you write must be the COMPLETE brief so Maya has everything:
      - Product name and type (book, blog series, recipe collection, brand)
      - Target audience (age, platforms, interests)
      - Key differentiators / selling points
      - Channels of focus (Instagram, TikTok, LinkedIn, Email, Press, etc.)
      - Campaign phases needed (pre-launch, launch, post-launch, maintenance)
      - Any constraints or special requirements

  - type: package
    packet_type: PlanningResponsePacket
    source_step: 2
    schema:
      tasks:
        - task_name: "string -- descriptive name e.g. 'Marketing Campaign: The Starfall Accord'"
          description: "string -- COMPLETE campaign brief with all context from the project brief above"
          agents:
            - "Maya"
          task_type: "marketing_campaign"
          priority: 1
    max_tasks: 1
    insert_children: true

  - type: close
    rag_update: false

adjudication:
  enabled: false
