{
  "jimothyPipeline": 1,
  "name": "Leadership meeting decisions",
  "description": "Pulls decisions, action items and open questions out of a meeting transcript and posts them after you check them.",
  "icon": "workflow",
  "color": "#6d28d9",
  "repo": {
    "mode": "scratch"
  },
  "concurrency": 2,
  "variables": {
    "attendees": "Maya (CEO), Tom (CFO), Priya (VP Product), Luis (VP Engineering), Ana (VP Sales)",
    "slackWebhookUrl": "",
    "tasksWebhookUrl": ""
  },
  "steps": [
    {
      "id": "extract",
      "name": "Extract decisions",
      "type": "agent",
      "description": "Separates decisions from discussion and lists action items with owners and dates.",
      "harnessId": "anthropic-api",
      "model": "claude-sonnet-5",
      "timeoutMinutes": 10,
      "prompt": "Transcript of \"{{issue.title}}\". Attendees: {{vars.attendees}}.\n\n{{issue.description | truncate:80000}}\n\nWrite the meeting record for Slack (*bold* headings, - bullets):\n*Decisions*: only things explicitly agreed, each with who made the call\n*Action items*: \"<owner> — <action> — <due date or 'no date set'>\"\n*Open questions*: raised but not resolved, with who owns getting the answer\n*Parked*: topics deferred to a later meeting\n\nDon't record something as decided if people only discussed it. Use attendees' names.{{#if steps.approve.output}}\n\nYour previous record was rejected with these corrections. Apply them:\n{{steps.approve.output}}{{/if}}"
    },
    {
      "id": "approve",
      "name": "Check the record",
      "type": "approval",
      "description": "Shows you the record. Reject with corrections and it is redone.",
      "dependsOn": [
        "extract"
      ],
      "loopBackTo": "extract",
      "maxLoops": 3,
      "approvalMessage": "Post this record of {{issue.title}}? Reject with corrections if anything is wrong.\n\n---\n\n{{steps.extract.output}}"
    },
    {
      "id": "post",
      "name": "Post to Slack",
      "type": "shell",
      "description": "Posts the record to the leadership channel.",
      "dependsOn": [
        "approve"
      ],
      "timeoutMinutes": 2,
      "command": "printf '{\"text\":%s}' {{steps.extract.output | json}} | curl -fsS -X POST -H 'Content-Type: application/json' --data @- {{vars.slackWebhookUrl}}"
    },
    {
      "id": "tasks",
      "name": "Send action items",
      "type": "shell",
      "description": "Sends the record to your task tool, if you set a webhook.",
      "dependsOn": [
        "approve"
      ],
      "runIf": "{{vars.tasksWebhookUrl}}",
      "timeoutMinutes": 2,
      "command": "printf '{\"meeting\":%s,\"record\":%s}' {{issue.title | json}} {{steps.extract.output | json}} | curl -fsS -X POST -H 'Content-Type: application/json' --data @- {{vars.tasksWebhookUrl}}"
    }
  ]
}