name: blog_series_outline
description: "Plan a blog series — generate a numbered multi-post outline with title, brief, and keywords per post."
debug: true
system: agent_prompt

agent_prompt:
  - "= identity.md"
  - "agent.rag.json"

sections:
  - agent
  - project
  - rag
  - deliverables
  - message
  - instructions

steps:
  - type: think
    hint: |
      You are planning a blog series for the project described above.

      Read the project description and current message to understand:
        - SERIES TOPIC: What is the overall theme or subject?
        - TARGET READER: Who is this series for? What is their experience level?
        - VOICE: What tone should the posts use? (e.g., conversational, authoritative, peer-to-peer)
        - POST COUNT: How many posts? (default to 10 if not specified)
        - POST LENGTH: Target word count per post? (default to 800-1200 if not specified)

      First, organize the series into 3-5 thematic clusters. Each cluster covers one
      dimension of the topic. This ensures the series doesn't repeat itself and builds
      progressively.

      Think through:
        - What does a beginner need to know first?
        - What intermediate topics will add depth?
        - What advanced or nuanced topics complete the picture?
        - What "quick win" or highly shareable posts should be included?

      Output a CLUSTER PLAN:
        Cluster A: [Name]
          - [3-4 post ideas that belong here]
        Cluster B: [Name]
          ...

      Stop here — the numbered outline comes in the next step.

  - type: think
    model: power
    hint: |
      Using the cluster plan above, write the COMPLETE numbered outline.

      For each post, output exactly this format on ONE LINE:
        N. [Post Title] — [2-3 sentence brief covering what the post does]. Keywords: [kw1, kw2, kw3]

      Rules:
        - Titles must be specific and curiosity-driven (not "Introduction to X" — instead "Why X breaks and how to fix it")
        - Briefs must be 2-3 sentences describing the actual content (not the title restated)
        - 3 keywords per post: 1 primary, 2 supporting (naturally integrated, not stuffed)
        - Number sequentially from 1 to N
        - Posts should build logically — early posts don't assume knowledge from later posts
        - Vary post types: how-to, analysis, checklist, case study, opinion, beginner explainer
        - At least 2 posts should be "highly shareable" (strong opinion, surprising finding, or practical quick-win)

      Output ONLY the numbered list. No prose, no cluster headings, no commentary.

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

  - type: package
    packet_type: IntakeResponse
    hint: |
      Convert every post from the numbered blog outline above into a create_task action.

      RULES:
      - One action per post, in order
      - task_name: "Write Post N: [Post Title]" where N is the exact post number from the outline
      - agent_name: "Iris"
      - task_type: "blog_write"
      - description: Start with the post title, then the 2-3 sentence brief, then "Keywords: [keywords]"
        Full format:
          "[Post Title]

          [Full brief from the outline — 2-3 sentences describing what the post covers]

          Keywords: [comma-separated keywords from the outline]"
      - depends_on: "" (all posts can be written in parallel)

      Produce ONLY the numbered actions. No prose, no commentary.
    schema:
      actions:
        - type: create_task
          task_name: "string"
          agent_name: "string"
          task_type: "blog_write"
          description: "string"
          depends_on: "string"

  - type: close
    rag_update: true

adjudication:
  enabled: true
  pass_threshold: 65
  deliverable_type: coordination
  criteria:
    completeness:
      weight: 35
      description: "All posts have title, brief, and keywords in the correct format"
    variety:
      weight: 30
      description: "Posts cover different angles, formats, and difficulty levels — no redundancy"
    progression:
      weight: 20
      description: "Series builds logically; posts don't assume knowledge the series hasn't covered"
    shareability:
      weight: 15
      description: "At least 2 posts have obvious viral or sharing potential"
