{
  "jimothyPipeline": 1,
  "name": "Social posts from a launch",
  "description": "Reads a page and drafts posts for LinkedIn, X and your newsletter; you pick the ones to schedule.",
  "icon": "sparkles",
  "color": "#db2777",
  "repo": {
    "mode": "scratch"
  },
  "concurrency": 3,
  "variables": {
    "company": "Acme, a reporting tool for finance teams",
    "voice": "Practical and specific. Lead with the problem it solves. One idea per post. No emoji walls, no more than two hashtags.",
    "schedulerWebhookUrl": ""
  },
  "steps": [
    {
      "id": "read",
      "name": "Read the page",
      "type": "agent",
      "description": "Opens the page and pulls out the main claims, numbers and lines worth quoting.",
      "harnessId": "claude-code",
      "model": "sonnet",
      "timeoutMinutes": 10,
      "prompt": "Open the page in this request and read it fully:\n\n{{issue.title}}\n{{issue.description}}\n\nReport in Markdown: the URL, the one-sentence point of the page, who it's for, the three most concrete claims or numbers, two or three lines worth quoting word for word, and anything the request asked to emphasise. Only use what's on the page."
    },
    {
      "id": "posts",
      "name": "Draft posts",
      "type": "agent",
      "description": "Drafts six posts across LinkedIn, X and the newsletter, each as a numbered option.",
      "harnessId": "anthropic-api",
      "model": "claude-sonnet-5",
      "dependsOn": [
        "read"
      ],
      "timeoutMinutes": 5,
      "systemPrompt": "You write social posts for {{vars.company}}. Voice: {{vars.voice}}",
      "prompt": "Source notes:\n{{steps.read.output}}\n\nDraft six posts, each linking to the page, in exactly this shape:\n### Post 1: LinkedIn, <angle>\n<post>\n\nMake posts 1 and 2 LinkedIn (under 1,200 characters), 3 and 4 X (under 280 characters, or a thread of up to four posts separated by ---), 5 a newsletter blurb (under 80 words), and 6 an internal Slack announcement for the team to share. Use only claims from the notes.{{#if steps.pick.output}}\n\nYour previous drafts were rejected with this feedback:\n{{steps.pick.output}}{{/if}}"
    },
    {
      "id": "pick",
      "name": "Pick posts",
      "type": "approval",
      "description": "You tick the posts to schedule. Reject with a comment to get new drafts.",
      "dependsOn": [
        "posts"
      ],
      "loopBackTo": "posts",
      "maxLoops": 3,
      "choices": {
        "fromStep": "posts",
        "mode": "multiple"
      },
      "approvalMessage": "Pick the posts to schedule for {{issue.title}}."
    },
    {
      "id": "schedule",
      "name": "Send to scheduler",
      "type": "shell",
      "description": "Sends the picked posts to your scheduler through a webhook.",
      "dependsOn": [
        "pick"
      ],
      "timeoutMinutes": 2,
      "command": "printf '{\"source\":%s,\"posts\":%s,\"titles\":%s}' {{issue.title | json}} {{steps.pick.selected | json}} {{steps.pick.selectedTitles | json}} | curl -fsS -X POST -H 'Content-Type: application/json' --data @- {{vars.schedulerWebhookUrl}}"
    }
  ]
}